Go to the previous, next section.

IBM RS/6000 and PowerPC Options

These `-m' options are defined for the IBM RS/6000 and PowerPC:

-mpower
-mno-power
-mpower2
-mno-power2
-mpowerpc
-mno-powerpc
-mpowerpcsqr
-mno-powerpcsqr
-mpowerpc64
-mno-powerpc64
GNU CC supports two related instruction set architectures for the RS/6000 and PowerPC. The POWER instruction set are those instructions supported by the `rios' chip set used in the original RS/6000 systems and the PowerPC instruction set is the architecture of the Motorola MPC6xx microprocessors. The PowerPC architecture defines 64-bit instructions, but they are not supported by any current processors.

Neither architecture is a subset of the other. However there is a large common subset of instructions supported by both. An MQ register is included in processors supporting the POWER architecture.

You use these options to specify which instructions are available on the processor you are using. The default value of these options is determined when configuring GNU CC. Specifying the `-mcpu=cpu_type' overrides the specification of these options. We recommend you use that option rather than these.

The `-mpower' option allows GNU CC to generate instructions that are found only in the POWER architecture and to use the MQ register. Specifying `-mpower2' implies `-power' and also allows GNU CC to generate instructions that are present in the POWER2 architecture but not the original POWER architecture.

The `-mpowerpc' option allows GNU CC to generate instructions that are found only in the 32-bit subset of the PowerPC architecture. Specifying `-mpowerpcsqr' implies `-mpowerpc' and also allows GNU CC to use the floating point square root instructions in the PowerPC architecture but not in its first implementation. Likewise, specifying `-mpowerpc64' implies `-mpowerpc' and also allows GNU CC to use the 64-bit instructions in the PowerPC architecture.

If you specify both `-mno-power' and `-mno-powerpc', GNU CC will use only the instructions in the common subset of both architectures and will not use the MQ register. Specifying both `-mpower' and `-mpowerpc' permits GNU CC to use any instruction from either architecture and to allow use of the MQ register; specify this for the Motorola MPC601.

-mnew-mnemonics
-mold-mnemonics
Select which mnemonics to use in the generated assembler code. `-mnew-mnemonics' requests output that uses the assembler mnemonics defined for the PowerPC architecture, while `-mold-mnemonics' requests the assembler mnemonics defined for the POWER architecture. Instructions defined in only one architecture have only one mnemonic; GNU CC uses that mnemonic irrespective of which of thse options is specified.

PowerPC assemblers support both the old and new mnemonics, as will later POWER assemblers. Current POWER assemblers only support the old mnemonics. Specify `-mnew-mnemonics' if you have an assembler that supports them, otherwise specify `-mold-mnemonics'.

The default value of these options depends on how GNU CC was configured. Specifing `-mcpu=cpu_type' sometimes overrides the value of these option. Unless you are building a cross-compiled, you should normally not specify either `-mnew-mnemonics' or `-mold-mnemonics', but should instead accept the default.

-mcpu=cpu_type
Set architecture type, register usage, choice of mnemonics, and instruction scheduling parameters for machine type cpu_type. By default, cpu_type is the target system defined when GNU CC was configured. Supported values for cpu_type are `rios1', `rios2', `rsc1', `601', `603', `604', `620' and `all'.

Specifying `-mcpu=rios1' or `-mcpu=rios2' enables the `-mpower' option and disables the `-mpowerpc' option, `-mcpu=601' enables both the `-mpower' and `-mpowerpc' options, `-mcpu=603' and `-mcpu=604' enable the `-mpowerpc' option and disables the `-mpower' option, and `-mcpu=620' enables both the `-mpowerpc' and `-mpowerpc64' options and also disables the `-mpower' option.

To generate code that will operate on all members of the RS/6000 and PowerPC family, specify `-mcpu=all'. In that case, GNU CC will only use instructions in the common subset and will not use the MQ register. The instruction scheduling parameters and choice of mnemonics are not affected.

Specifying `-mcpu=601', `-mcpu=603', `-mcpu=604', or `-mcpu=620' also enables the `new-mnemonics' option.

-mnormal-toc
-mno-fp-in-toc
-mminimal-toc
Modify generation of the TOC (Table Of Contents), which is created for every executable file. The `-mnormal-toc' option is selected by default. In that case, GNU CC will allocate at least one TOC entry for each unique non-automatic variable reference in your program. GNU CC will also place floating-point constants in the TOC. However, only 16K entries are available in the TOC.

If you receive a linker error message that says you have overflowed the available TOC space, recompile your files with either the `-mno-fp-in-toc' or `-mminimal-toc' options. `-mno-fp-in-toc' prevents GNU CC from putting floating-point constants in the TOC. `-mminimal-toc' causes GNU CC to make only one TOC entry for every file. Using the `-minimal-toc' option produces slightly slower and larger code than the `-mnormal-toc' or `-mno-fp-in-toc' options. If you use floating-point, try the `-mno-fp-in-toc' option before you specify `-mminimal-toc'.

Go to the previous, next section.