11.13 --cpu=name

Enables code generation for the selected ARM® processor or architecture.

Syntax

--cpu=name

Where name is the name of a processor or architecture:

Processor and architecture names are not case-sensitive.

Wildcard characters are not accepted.

The following table shows the supported architectures. For a complete list of the supported architecture and processor names, specify the --cpu=list option.

Table 11-1 Supported ARM architectures

Architecture name Description
6-M

ARMv6 microcontroller profile.

6S-M

ARMv6 microcontroller profile with OS extensions.

7-A ARMv7 application profile.
7-A.security ARMv7-A architecture profile with Security Extensions and includes the SMC instruction (formerly SMI).

7-R

ARMv7 real-time profile.

7-M ARMv7 microcontroller profile.
7E-M ARMv7-M architecture profile with DSP extension.
8-A.32 ARMv8-A architecture profile, AArch32 state.
8-A.32.crypto ARMv8-A architecture profile, AArch32 state with cryptographic instructions.
8-A.64 ARMv8-A architecture profile, AArch64 state.
8-A.64.crypto ARMv8-A architecture profile, AArch64 state with cryptographic instructions.

8.1-A.32

ARMv8.1, for ARMv8-A architecture profile, AArch32 state.

8.1-A.32.crypto

ARMv8.1, for ARMv8-A architecture profile, AArch32 state with cryptographic instructions.

8.1-A.64

ARMv8.1, for ARMv8-A architecture profile, AArch64 state.

8.1-A.64.crypto

ARMv8.1, for ARMv8-A architecture profile, AArch64 state with cryptographic instructions.

8.2-A.32

ARMv8.2, for ARMv8-A architecture profile, AArch32 state.

8.2-A.32.crypto

ARMv8.2, for ARMv8-A architecture profile, AArch32 state with cryptographic instructions.

8.2-A.32.crypto.dotprod

ARMv8.2, for ARMv8-A architecture profile, AArch32 state with cryptographic instructions and the VSDOT and VUDOT instructions.

8.2-A.32.dotprod

ARMv8.2, for ARMv8-A architecture profile, AArch32 state with the VSDOT and VUDOT instructions.

8.2-A.64

ARMv8.2, for ARMv8-A architecture profile, AArch64 state.

8.2-A.64.crypto

ARMv8.2, for ARMv8-A architecture profile, AArch64 state with cryptographic instructions.

8.2-A.64.crypto.dotprod

ARMv8.2, for ARMv8-A architecture profile, AArch64 state with cryptographic instructions and the SDOT and UDOT instructions.

8.2-A.64.dotprod

ARMv8.2, for ARMv8-A architecture profile, AArch64 state with the SDOT and UDOT instructions.

8.3-A.32

ARMv8.3, for ARMv8-A architecture profile, AArch32 state.

8.3-A.32.crypto

ARMv8.3, for ARMv8-A architecture profile, AArch32 state with cryptographic instructions.

8.3-A.32.crypto.dotprod

ARMv8.3, for ARMv8-A architecture profile, AArch32 state with cryptographic instructions and the VSDOT and VUDOT instructions.

8.3-A.32.dotprod

ARMv8.3, for ARMv8-A architecture profile, AArch32 state with the VSDOT and VUDOT instructions.

8.3-A.64

ARMv8.3, for ARMv8-A architecture profile, AArch64 state.

8.3-A.64.crypto

ARMv8.3, for ARMv8-A architecture profile, AArch64 state with cryptographic instructions.

8.3-A.64.crypto.dotprod

ARMv8.3, for ARMv8-A architecture profile, AArch64 state with cryptographic instructions and the SDOT and UDOT instructions.

8.3-A.64.dotprod

ARMv8.3, for ARMv8-A architecture profile, AArch64 state with the SDOT and UDOT instructions.

8-R ARMv8-R architecture profile.
8-M.Base ARMv8-M baseline architecture profile. Derived from the ARMv6-M architecture.
8-M.Main ARMv8-M mainline architecture profile. Derived from the ARMv7-M architecture.
8-M.Main.dsp

ARMv8-M mainline architecture profile with DSP extension.

Note:

  • The full list of supported architectures and processors depends on your license.

Default

There is no default option for --cpu.

Usage

The following general points apply to processor and architecture options:

Processors
  • Selecting the processor selects the appropriate architecture, Floating-Point Unit (FPU), and memory organization.

  • If you specify a processor for the --cpu option, the generated code is optimized for that processor. This enables the assembler to use specific coprocessors or instruction scheduling for optimum performance.

Architectures
  • If you specify an architecture name for the --cpu option, the generated code can run on any processor supporting that architecture. For example, --cpu=7-A produces code that can be used by the Cortex®‑A9 processor.

FPU
  • Some specifications of --cpu imply an --fpu selection.

    Note:

    Any explicit FPU, set with --fpu on the command line, overrides an implicit FPU.
  • If no --fpu option is specified and the --cpu option does not imply an --fpu selection, then --fpu=softvfp is used.

A32/T32
  • Specifying a processor or architecture that supports T32 instructions, such as --cpu=cortex-a9, does not make the assembler generate T32 code. It only enables features of the processor to be used, such as long multiply. Use the --thumb option to generate T32 code, unless the processor only supports T32 instructions.

    Note:

    Specifying the target processor or architecture might make the generated object code incompatible with other ARM processors. For example, A32 code generated for architecture ARMv8 might not run on a Cortex‑A9 processor, if the generated object code includes instructions specific to ARMv8. Therefore, you must choose the lowest common denominator processor suited to your purpose.
  • If the architecture only supports T32, you do not have to specify --thumb on the command line. For example, if building for Cortex‑M4 or ARMv7-M with --cpu=7-M, you do not have to specify --thumb on the command line, because ARMv7-M only supports T32. Similarly, ARMv6-M and other T32-only architectures.

Restrictions

You cannot specify both a processor and an architecture on the same command-line.

Example

armasm --cpu=Cortex-A17 inputfile.s
Non-ConfidentialPDF file icon PDF versionARM 100069_0608_00_en
Copyright © 2014–2017 ARM Limited or its affiliates. All rights reserved.