1.50 -mfpu

Specifies the target FPU architecture, that is the floating-point hardware available on the target.

Syntax

To view a list of all the supported FPU architectures, use:

-mfpu=list

Note:

-mfpu=list is rejected when targeting AArch64 state.

Alternatively, to specify a target FPU architecture, use:

-mfpu=name

Where name is one of the following:

none
Prevents the compiler from using hardware-based floating-point functions. If the compiler encounters floating-point types in the source code, it will use software-based floating-point library functions. This is similar to the -mfloat-abi=soft option.
vfpv3
Enable the Arm®v7 VFPv3 floating-point extension. Disable the Advanced SIMD extension.
vfpv3-d16
Enable the Armv7 VFPv3-D16 floating-point extension. Disable the Advanced SIMD extension.
vfpv3-fp16
Enable the Armv7 VFPv3 floating-point extension, including the optional half-precision extensions. Disable the Advanced SIMD extension.
vfpv3-d16-fp16
Enable the Armv7 VFPv3-D16 floating-point extension, including the optional half-precision extensions. Disable the Advanced SIMD extension.
vfpv3xd
Enable the Armv7 VFPv3XD floating-point extension. Disable the Advanced SIMD extension.
vfpv3xd-fp16
Enable the Armv7 VFPv3XD floating-point extension, including the optional half-precision extensions. Disable the Advanced SIMD extension.
neon
Enable the Armv7 VFPv3 floating-point extension and the Advanced SIMD extension.
neon-fp16
Enable the Armv7 VFPv3 floating-point extension, including the optional half-precision extensions, and the Advanced SIMD extension.
vfpv4
Enable the Armv7 VFPv4 floating-point extension. Disable the Advanced SIMD extension.
vfpv4-d16
Enable the Armv7 VFPv4-D16 floating-point extension. Disable the Advanced SIMD extension.
neon-vfpv4
Enable the Armv7 VFPv4 floating-point extension and the Advanced SIMD extension.
fpv4-sp-d16
Enable the Armv7 FPv4-SP-D16 floating-point extension.
fpv5-d16
Enable the Armv7 FPv5-D16 floating-point extension.
fpv5-sp-d16
Enable the Armv7 FPv5-SP-D16 floating-point extension.
fp-armv8
Enable the Armv8 floating-point extension. Disable the cryptographic extension and the Advanced SIMD extension.
neon-fp-armv8
Enable the Armv8 floating-point extension and the Advanced SIMD extensions. Disable the cryptographic extension.
crypto-neon-fp-armv8
Enable the Armv8 floating-point extension, the cryptographic extension. and the Advanced SIMD extension.

The -mfpu option overrides the default FPU option implied by the target architecture.

Note:

  • The -mfpu option is ignored with AArch64 targets, for example aarch64-arm-none-eabi. Use the -mcpu option to override the default FPU for aarch64-arm-none-eabi targets. For example, to prevent the use of floating-point instructions or floating-point registers for the aarch64-arm-none-eabi target use the -mcpu=name+nofp+nosimd option. Subsequent use of floating-point data types in this mode is unsupported.
  • In Armv7, the Advanced SIMD extension was called the Arm Neon™ Advanced SIMD extension.

Note:

There are no software floating-point libraries for AArch64 targets. When linking for AArch64 targets, armlink uses AArch64 libraries that contain floating-point and Advanced SIMD instructions and registers. This applies even if you compile the source with -mcpu=<name>+nofp+nosimd to prevent the compiler from using floating-point and Advanced SIMD instructions and registers. Therefore, there is no guarantee that the linked image for AArch64 targets is entirely free of floating-point and Advanced SIMD instructions and registers.

You can prevent the use of floating-point and Advanced SIMD instructions and registers in images that are linked for AArch64 targets. To do this, re-implement the library functions or create your own library that does not use floating-point and Advanced SIMD instructions and registers.

Note:

In AArch32 state, if you specify -mfloat-abi=soft, then specifying the -mfpu option does not have an effect.

Default

The default FPU option depends on the target processor.

Non-ConfidentialPDF file icon PDF versionDUI0774J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.