2.3.10. Specifying the target processor or architecture

These options enable you to specify the target processor or architecture attributes for a compilation. The compiler can take advantage of certain extra features of the selected processor or architecture, such as support for halfword load and store instructions and instruction scheduling.

Note

Specifying the target processor might make the code incompatible with other ARM processors.

You can specify how the compiler is configured at start-up using either:

--arm

To target the ARM instruction set. This is the default.

--thumb

To target the Thumb instruction set.

For more details on these options, see Targeting the instruction set.

The following general points apply to processor and architecture options:

The following options are available:

--cpu list

Lists the supported architecture and processor names that you can use with the --cpu name option.

--cpu name

This option generates code for a specific ARM processor or architecture.

If name is a processor:

  • You must enter the name exactly as it is shown on ARM data sheets, for example ARM926EJ-S. Wildcard characters are not accepted.

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

  • Some specifications of --cpu imply an --fpu selection. For example, when compiling with the --arm option, --cpu ARM1136JF-S implies --fpu vfpv2. Be aware that any explicit FPU (set with --fpu) on the command line overrides an implicit FPU.

  • If no --fpu option and no --cpu option are specified, --fpu softvfp is used.

If name is an architecture, it must be one of:

5TE

ARMv5 with long multiply, Thumb, interworking, DSP multiply, and double-word instructions.

--fpu list

Lists the supported FPU architecture names that you can use with the --fpu name option.

Deprecated options are not listed.

--fpu name

This option determines the target FPU architecture. If you specify this option, it overrides any implicit FPU option that appears on the command line, for example, where you use the --cpu option.

Valid options for name are:

none

Selects no floating-point option. No floating-point code is to be used. This produces an error if your code contains floats.

softvfp

Selects the software floating-point library (fplib). This is the default if you do not specify a --fpu option, or if you select a CPU that does not have an FPU.

To get a full list of FPU architectures use the --fpu list option.

Copyright © 2005 ARM Limited. All rights reserved.ARM DUI 0282B
Non-Confidential