|Non-Confidential||PDF version||ARM DUI0473M|
|Home > Assembler Command-line Options > --cpu=name|
Enables code generation for the selected ARM® processor or architecture.
name is the name of a
processor or architecture:
is the name of a processor, enter it as
shown on ARM data sheets, for example,
is the name of an architecture, it must
belong to the list of architectures shown in the following table.
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
Table 10-2 Supported ARM architectures
||ARMv4 without Thumb|
||ARMv4 with Thumb|
||ARMv5 with Thumb and interworking|
||ARMv5 with Thumb, interworking, DSP multiply, and double-word instructions|
ARMv5 with Thumb, interworking, DSP multiply, double-word instructions, and Jazelle® extensions
armasm cannot generate Java bytecodes.
||ARMv6 with Thumb, interworking, DSP multiply, double-word instructions, unaligned and mixed-endian support, Jazelle, and media extensions.|
ARMv6 microcontroller profile with Thumb only, plus processor state instructions.
ARMv6 microcontroller profile with Thumb only, plus processor state instructions and OS extensions.
||ARMv6 with SMP extensions.|
||ARMv6 with Thumb (Thumb-2 technology).|
||ARMv6 with Security Extensions.|
||ARMv7 with Thumb (Thumb-2 technology) only, and without hardware divide.|
||ARMv7 application profile.|
||ARMv7-A architecture profile with the
ARMv7 real-time profile.
||ARMv7 microcontroller profile.|
||ARMv7-M architecture profile with DSP extension.|
ARMv7 is not an actual ARM architecture.
--cpu=7 denotes the
features that are common to the ARMv7-A, ARMv7-R, and ARMv7-M
architectures. By definition, any given feature used with
exists on the ARMv7-A, ARMv7-R, and ARMv7-M architectures.
7-A.security is not
an actual ARM architecture, but rather refers to
7-A plus Security Extensions.
if you do not specify a
The following general points apply to processor and architecture options:
Selecting the processor selects the appropriate architecture, Floating-Point Unit (FPU), and memory organization.
values include all current ARM product names or architecture versions.
Other ARM architecture-based processors, such as the Marvell Feroceon and the Marvell XScale, are also supported.
If you specify a processor
--cpu option, 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
--cpu option, the generated code
can run on any processor supporting that architecture. For example,
produces code that can be used by the ARM926EJ-S processor.
Some specifications of
--cpu imply an
For example, when building
--fpuon the command line, overrides an implicit FPU.
--fpu option is specified and no
--cpu option is
--fpu=softvfp is used.
Specifying a processor or architecture that supports Thumb instructions, such as
--cpu=ARM7TDMI, does not make the assembler generate Thumb code. It only enables features
of the processor to be used, such as long multiply. Use the
--thumb option to
generate Thumb code, unless the processor is a Thumb-only processor, for example Cortex-M4. In this
--thumb is not required.
If you are building for mixed ARM/Thumb systems for processors that support ARMv4T or ARMv5T,
then you must specify the interworking option
--apcs=/interwork. By default, this
is enabled for processors that support ARMv5T or above.
If you build for Thumb, that is with the
--thumb option on the command line,
the assembler generates as much of the code as
possible using the Thumb instruction set. However, the assembler might generate ARM code for some parts of the
compilation. For example, if you are generating code for a 16-bit Thumb processor and using VFP, any
function containing floating-point operations is compiled for ARM.
If the architecture only supports Thumb, you do
not have to specify
the command line. For example, if building for ARMv7-M with
--cpu=7-M, you do not have to specify
--thumb on the command line,
because ARMv7-M only supports Thumb. Similarly, ARMv6-M and
other Thumb-only architectures.
You cannot specify both a processor and an architecture on the same command-line.
armasm --cpu=Cortex-A17 inputfile.s