7.2.3. Floating-point parameters

Floating-point values are passed to (and returned from) functions using the floating-point registers. Both integer (general-purpose) and floating-point registers can be used at the same time. This means that the floating-point parameters are passed in the floating-point H, S or D registers and other parameters are passed in integer X or W registers. The AArch64 Procedure Call Standard mandates hardware floating-point wherever floating-point arithmetic is required, so there is no software floating-point linkage in AArch64 state.

A detailed list of instructions is given in the ARMv8-A Architecture Reference Manual, but the main floating-point data processing operations are listed here to show the kind of things that can be done:

Table 7.1. 

FABS Sd, SnCalculates the absolute value.
FNEG Sd, SnNegates the value.
FSQRT Sd, SnCalculates the square root.
FADD Sd, Sn, SmAdds values.
FSUB Sd, Sn, SmSubtracts values.
FDIV Sd, Sn, SmDivides one value by another.
FMUL Sd, Sn, SmMultiplies two values.
FNMUL Sd, Sn, SmMultiplies and negates.
FMADD Sd, Sn, Sm, SaMultiplies and adds (fused).
FMSUB Sd, Sn, Sm, SaMultiplies, negates and subtracts (fused).
FNMADD Sd, Sn, Sm, SaMultiplies, negates and adds (fused).
FNMSUB Sd, Sn, Sm, SaMultiplies, negates and subtracts (fused).
FPINTy Sd, SnRounds to an integral in floating-point format (where y is one of a number of rounding mode options)
FCMP Sn, SmPerforms a floating-point compare.
FCCMP Sn, Sm, #uimm4, condPerforms a floating-point conditional compare.
FCSEL Sd, Sn, Sm, condFloating-point conditional select if (cond) Sd = Sn else Sd = Sm.
FCVTSty Rn, SmConverts a floating-point value to an integer value (ty specifies type of rounding).
SCVTF Sm, RoConverts an integer value to a floating-point value.

Copyright © 2015 ARM. All rights reserved.ARM DEN0024A
Non-ConfidentialID050815