| |||
| Home > The ARM Compilers > Command syntax > Specifying the target processor and architecture | |||
The options described below specify the target processor or architecture for a compilation. The compiler may take advantage of certain features of the selected processor or architecture, such as support for halfword instructions and instruction scheduling. This may make the code incompatible with other ARM processors.
If neither a -processor or -architecture option
is specified, the default is -processor ARM7TDMI.
The following general points apply to processor and architecture options:
If you specify a -architecture option,
the compiler compiles code that runs on any processor that supports
that architecture.
To enable halfword
load and store instructions, specify one of the architecture 4 options,
or specify an appropriate processor using a -processor option
such as ARM7TDMI, ARM9TDMI, or StrongARM1.
To enable long multiply, specify -architecture
3M, -architecture 4, -architecture
4M, or -architecture 4T, or specify an
appropriate -processor option such as ARM7DMI.
If you specify a -processor option,
the compiler compiles code and optimizes specifically for that processor.
The code may be incompatible with other ARM processors that support
the same architecture.
For example, a -processor option may imply
the presence of specific coprocessors, or allow instruction scheduling
for optimum performance on the specified processor.
Specifying a Thumb-aware processor, such as -processor
ARM7TDMI, to armcc or armcpp does not make these compilers
generate Thumb code. It only allows features of the processor to
be used, such as support for halfword instructions. You must use
tcc or tcpp to generate Thumb code.
The following options are available:
-architecture nSpecifies the ARM architecture version that compiled code will comply with. Valid values for n are:
3
3M
4
4M
4xM. This is architecture 4M without long multiply instructions.
4T
4TxM. This is architecture 4T without long multiply instructions.
It is not necessary
to specify both -architecture and -processor.
If a -architecture option is specified and a -processor option
is not, the default processor is generic.
-cpu , nameThis is a synonym for the -processor option.
-fpu, nameSelect the target FPU, where is
one of:name
noneNo FPU. Use software floating point library. This
option implies /softfp.
Attached Media Processor
fpaFloating
Point Accelerator. This option implies /hardfp.
-processor, nameCompiles code for the specified ARM processor where is
the name of the ARM processor. It is not necessary to specify both name-architecture and -processor.
The -processor option is specific to an individual processor.
The -architecture option compiles code for any
processor that conforms to the specified architecture. Valid values
are:
ARM6Implements architecture 3.
ARM7Implements architecture 3.
ARM7MImplements architecture 3M.
ARM7TMImplements architecture 4T.
ARM7TImplements architecture 4TxM.
ARM7TDIImplements architecture 4TxM.
ARM7TDMIImplements architecture 4T. This is the default
if no -processor and no -architecture options
are specified. If -architecture is specified and -processor is
not, the default processor is generic.
ARM8Implements architecture 4.
ARM9Implements architecture 4.
ARM9TDMIImplements architecture 4T.
SA-110Implements architecture 4.
StrongARM1Implements architecture 4.
Implements architecture
4. Selecting this processor option implies -fpu amp and -APCS
/softdoubles.
genericThis
processor name is used when compiling for a specified architecture
and no -processor option is specified.