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.

Show/hideSee also

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值