Using hardware VFP instructions

转自:http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0483c/BABBGHDB.html

Using hardware VFP instructions

ARM Linux uses software floating-point linkage, where floating-point arguments are passed in integer registers even if functions themselves perform operations in hardware VFP registers.

When building ARM Linux applications with the --arm_linux or --arm_linux_paths compiler command-line options, the default is always software floating-point linkage even if you specify a CPU that implies an FPU.

For example, if you specify a --cpu that implies an FPU, such as ARM1136JF-S or Cortex-A9, the compiler defaults to --fpu=softvfp+vfp rather than --fpu=vfp--fpu=softvfp+vfp is equivalent to the GCC -mfloat-abi=softfp command-line option.

If you specify a --cpu that does not imply an FPU, you must explicitly specify --fpu=softvfp+vfp to use VFP.

You can override these explicitly to use hardware or software floating point variants of the Procedure Call Standard by specifying --apcs=/hardfp or --apcs=/softfp respectively. If using GCC emulation, the corresponding options are:

  • -mfloat-abi=hard, to compile for hardware FPU with hardware linkage

  • -mfloat-abi=softfp, to compile for hardware FPU but with software linkage

  • -mfloat-abi=soft, to compile without hardware FPU instructions being used.

See also

Reference

Compiler Reference:

  • --apcs=qualifer...qualifier

  • --arm_linux

  • --arm_linux_paths

  • --fpu=name.

Assembler Reference:

  • --apcs=qualifier…qualifier

    --fpu=name.

你可能感兴趣的:(Using hardware VFP instructions)