ARM Technical Support Knowledge Articles

How can I compile for specific architectural extensions such as Advanced SIMD (NEON) when targeting an ARMv7-A processor?

Applies to: Cortex processors, DS-5

Answer

When compiling for an architecture rather than a CPU, the ARM Compiler does not assume that optional architectural extensions are available. For example, when targeting an ARMv7-A processor using the --cpu=7-a compiler option, the ARM Compiler cannot perform auto-vectorization and will not support NEON intrinsics, even if --fpu is specified. This is because the Advanced SIMD Extension (NEON) is optional in ARMv7-A. You can enable or disable support for Advanced SIMD for cores that support it. For example, when targeting Cortex-A8 with VFPv3, but without NEON, you can specify options --cpu=cortex-a8.no_neon --fpu=vfpv3.

The following table shows which features are supported by different ARM Compiler --cpu options:

ARMv7-A processor
(--cpu option)
Security
(TrustZone)
Floating-point
(VFP)
Advanced SIMD
(NEON)
Multiprocessing Virtualization Division instructions
(SDIV/UDIV)
Cortex-A5 Yes No No Yes No No
Cortex-A5.vfp Yes Yes (VFPv4) No Yes No No
Cortex-A5.neon Yes Yes (VFPv4) Yes Yes No No
Cortex-A7 Yes Yes (VFPv4) Yes Yes Yes Yes
Cortex-A8.no_neon Yes No No No No No
Cortex-A8 Yes Yes (VFPv3) Yes No No No
Cortex-A9.no_neon.no_vfp Yes No No Yes No No
Cortex-A9 Yes Yes (VFPv3) Yes Yes No No
Cortex-A15 Yes Yes (VFPv4) Yes Yes Yes Yes
Cortex-A17 Yes Yes (VFPv4) Yes Yes Yes Yes

Sometimes it is necessary to build code for a specific set of architectural features, for example Advanced SIMD, rather than a particular processor. For example, you might be defining a build environment to generate objects and/or executables that will be used on a range of ARMv7-A processors. The table below shows the lowest common denominator ARM Compiler --cpu option to enable support for different architecture extensions.

ARMv7-A architecture extension Lowest common denominator CPU
(--cpu option)
Security Cortex-A8.no_neon
Security and NEON Cortex-A8
Multiprocessing Cortex-A9.no_neon.no_vfp or Cortex-A5
NEON with VFPv3 Cortex-A8
NEON with VFPv4 Cortex-A5.neon
Virtualization Cortex-A7
Division instructions Cortex-A7

Article last edited on: 2016-03-01 17:47:34

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential