Targetting processors, floating-point units, and NEON with Arm DS

Arm Development Studio (Arm DS) tutorial for selecting specific processors with Arm Compiler 6 to maximize performance, selecting Floating Point Unit (FPU) and enabling NEON.


Introduction Selecting the target processor Selecting the target FPU Enabling NEON automatic vectorization Further reading

Selecting the target FPU

Each target architecture has a default floating-point unit (FPU) option. However, you can use the --mfpu option to specify a target FPU architecture and override the default option.

Note: For AArch64 targets, the -mfpu option is ignored with AArch64 targets. In this case, you must 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 option.

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

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

To configure the -mfpu option in Arm DS, use the FPU (-mfpu) setting. This setting is in the same location on the Properties dialog box as the Target (--target) setting. You can find the location of this setting in the Selecting the target processor section in this tutorial.

For example, to generate A32 and T32 instructions for AArch32 state, we specify the option --target=arm-arm-none-eabi. To select the Armv8 application architecture profile we set the option -march=armv8-a. Then, to enable the Armv8 Floating-point Extension and disable the Cryptographic Extension and the Advanced SIMD extension, we set -mfpu=fp-armv8.

Setting FPU (-mfpu) option to fp-armv8

Set the value list to the -mfpu option to view a list of all the supported FPU architectures. Then build your project. The console shows the list of FPU architectures.

Previous Next