Enables code generation for the selected ARM® processor or architecture.
the name of a processor or architecture:
Processor and architecture names are not case-sensitive.
Wildcard characters are not accepted.
The following table shows examples of supported processor names for each
architecture. For a complete list of the supported architecture and processor names,
Table 11-1 Supported ARM architectures
|Processor and architecture name||Description||Example processor names|
||ARMv7 with Thumb (Thumb-2 technology) only, and without hardware divide||-|
||ARMv7 application profile supporting virtual MMU-based memory systems, with ARM, Thumb (Thumb-2 technology) and ThumbEE, DSP support, and 32-bit SIMD support||
||Enables the use of the
||ARMv8, AArch32 state||-|
||ARMv8, AArch32 state with cryptographic instructions||-|
||ARMv8, AArch32 state without Advanced SIMD instructions||-|
||ARMv8, AArch64 state||-|
||ARMv8, AArch64 state with cryptographic instructions||-|
||ARMv8, AArch64 state without Advanced SIMD instructions||-|
7-A.securityis not an actual ARM architecture, but rather refers to
7-Aplus Security Extensions.
- The full list of supported architectures and processors depends on your license.
There is no default option for
The following general points apply to processor and architecture options:
Selecting the processor selects the appropriate architecture, Floating-Point Unit (FPU), and memory organization.
If you specify a processor for the
--cpuoption, the generated code is optimized for that processor. This enables the assembler to use specific coprocessors or instruction scheduling for optimum performance.
If you specify an architecture name for the
--cpuoption, the generated code can run on any processor supporting that architecture. For example,
--cpu=7-Aproduces code that can be used by the Cortex®‑A9 processor.
Some specifications of
NoteAny explicit FPU, set with
--fpuon the command line, overrides an implicit FPU.
--fpuoption is specified and no
--cpuoption is specified,
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
--thumboption to generate T32 code, unless the processor is a T32-only processor, for example Cortex‑M4. In this case,
--thumbis not required.
NoteSpecifying 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 you build for T32, that is with the
--thumboption on the command line, the assembler generates as much of the code as possible using the T32 instruction set. However, the assembler might generate A32 code for some parts of the compilation. For example, if you are generating code for a 16-bit T32 processor and using floating-point, any function containing floating-point operations is compiled for A32.
You cannot specify both a processor and an architecture on the same command-line.
armasm --cpu=Cortex-A17 inputfile.s