Compiler options for floating-point linkage and computations

By specifying the type of floating-point linkage and floating-point computations you require, you can determine, from Table 15, the associated compiler command-line options that are available.

Table 15. Compiler options for floating-point linkage and floating-point computations

LinkageComputations  
Hardware FP linkageSoftware FP linkageHardware FP coprocessorSoftware FP library (fplib)Compiler options
NoYesNoYes

--fpu=softvfp

--apcs=/softfp

NoYesYesNo

--fpu=softvfp+vfpv2

--fpu=softvfp+vfpv3

--fpu=softvfp+vfpv3_fp16

--fpu=softvfp+vfpv3_d16

--fpu=softvfp+vfp3_d16_fp16

--fpu=softvfp+vfpv4

--fpu=softvfp+vfpv4_d16

--fpu=softvfp+fpv4-sp

--apcs=/softfp

YesNoYesNo

--fpu=vfp

--fpu=vfpv2

--fpu=vfpv3

--fpu=vfpv3_fp16

--fpu=vfpv3_dp16

--fpu=vfpv3_d16_fp16

--fpu=vpfv4

--fpu=vfpv4_d16

--fpu=fpv4-sp

--apcs=/hardfp


softvfp specifies software floating-point linkage. When software floating-point linkage is used, either:

Each of the options --fpu softvfp, --fpu softvfp+vfpv2,--fpu softvfp+vfpv3, --fpu softvfp+vfpv3_fp16, --fpu softvfpv3_d16, --fpu softvfpv3_d16_fp16, --fpu softvfp+vfpv4, softvfp+vfpv4_d16 and softvfp+fpv4-sp specify software floating-point linkage across the whole file. In contrast, the __softfp keyword enables software floating-point linkage to be specified on a function by function basis.

Note

Rather than having separate compiler options to select the type of floating-point linkage you require and the type of floating-point computations you require, you use one compiler option, --fpu, to select both. (See Table 15.) For example, --fpu=softvfp+vfpv2 selects software floating-point linkage, and a hardware coprocessor for the computations. Whenever you use softvfp, you are specifying software floating-point linkage.

If you use the --fpu option, you need to know the VFP architecture version implemented in the target core. An alternative to --fpu=softvfp+... is --apcs=/softfp. This gives software linkage with whatever VFP architecture version is implied by --cpu. --apcs=/softfp and --apcs=/hardfp are alternative ways of requesting the integer or floating-point variant of the Procedure Call Standard for the ARM Architecture (AAPCS).

Show/hideSee also

Copyright © 2007-2008, 2011-2012 ARM. All rights reserved.ARM DUI 0375D
Non-ConfidentialID062912