You copied the Doc URL to your clipboard.

--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.

Note

armasm does not support architectures later than Armv8.3.

Table 11-1 Supported Arm architectures

Architecture name Description
6-M

Armv6 architecture microcontroller profile.

6S-M

Armv6 architecture microcontroller profile with OS extensions.

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

7-R

Armv7 architecture real-time profile.

7-M Armv7 architecture 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
Was this page helpful? Yes No