Page 321 - ARM 64 Bit Assembly Language
P. 321

310 Chapter 9

                  9.7.4 Multiply and accumulate

                  These instructions are used to multiply and accumulate the results. A fused multiply accu-
                  mulate operation does not perform rounding between the multiply and add operations. The
                  two operations are fused into one. Using the fused multiply accumulate can speed up and im-
                  prove the accuracy of many computations that involve the accumulation of products. NEON
                  provides the following fused multiply accumulate instructions.:
                  fmadd    Fused Multiply Accumulate
                  fmsub    Fused Multiply Subtract
                  fnmadd   Fused Multiply Accumulate and Negate
                  fnmsub   Fused Multiply Subtract and Negate

                  9.7.4.1 Syntax

                       f<op> Fd, Fn, Fm, Fa


                  •  Fd, Fn, Fm,and Fa must specify either four single precision registers or four double preci-
                     sion registers.
                  •  <op> is one of madd, msub, nmadd,or nmsub.

                  9.7.4.2 Operations

                   Name      Effect                               Description
                   fmadd     Fd ← Fa + Fn × Fm                    Multiply the values in the operand
                                                                  registers, and add the value to the
                                                                  destination register.
                   fmsub     Fd ← Fa − Fn × Fm                    Multiply the values in the operand
                                                                  registers, and subtract the value from
                                                                  the destination register.
                   fnmadd    Fd ←−(Fa + Fn × Fm)                  Multiply the values in the operand
                                                                  registers, and add the value to the
                                                                  destination register, then negate the
                                                                  final result and store it in the destina-
                                                                  tion register
                   fnmsub    Fd ←−(Fa − Fn × Fm)                  Multiply the values in the operand
                                                                  registers, and subtract the value from
                                                                  the destination register, then negate
                                                                  the final result and store it in the des-
                                                                  tination register
   316   317   318   319   320   321   322   323   324   325   326