Acceptable Compiler Mode and Processor Architecture Combinations

You can use the -q32, -q64, -qarch, and -qtune compiler options to optimize the output of the compiler to suit:

Generally speaking, the options do the following:

There are three families of RS/6000 machines:

Each of these families have a different instruction set but share a common subset of instructions. The POWER2 instruction set is a superset of the POWER instructions set. The PowerPC instruction set includes additional instructions not available on POWER systems but does not support all of the POWER instruction set. It also includes some but not all of the POWER2 instructions not available in the POWER instruction set. Further, some features found in the POWER2 instruction set may or may not be implemented on particular PowerPC processors. These optional feature groups are:

If you want to generate code that will run across a variety of processors, use the following guidelines to select the appropriate -qarch and/or -qtune compiler options. Code compiled with:

If you want to generate code optimized specifically for a particular processor, acceptable combinations of -q32, -q64, -qarch, and -qtune compiler options are shown in the tables below (one eac for 32-bit and 64-bit execution modes). If you specify incompatible combinations of these options, the compiler will assume its own option selections, as described in Specify Compiler Options for Architecture-Specific, 32- or 64-bit Compilation.

The default execution mode is 32-bit unless the OBJECT_MODE environment variable is set to 64.

32-bit Execution Mode

-qarch option Predefined Macro Available
-qtune suboptions
Default -qtune suboption
com _ARCH_COM DEFAULT
(not selectable)

pwr
pwr2
pwr2s
pwr3
pwrx
p2sc
601
602
603
604
403
rs64a
rs64b
rs64c

pwr2
pwr _ARCH_PWR pwr
pwr2
pwr2s
pwrx
p2sc
601
pwr2
pwr2
pwrx
_ARCH_PWR
_ARCH_PWR2
pwr2
pwr2s
pwrx
p2sc
pwr2
ppc _ARCH_PPC 601
602
603
604
403
rs64a
rs64b
rs64c
pwr3
604
ppcgr _ARCH_PPC
_ARCH_PPCGR
603
604
604
pwr2s _ARCH_PWR
_ARCH_PWR2
_ARCH_PWR2S
pwr2s pwr2s
p2sc _ARCH_PWR
_ARCH_PWR2
_ARCH_P2SC
p2sc p2sc
601 _ARCH_601 601 601
602 _ARCH_PPC
_ARCH_602
602 602
603 _ARCH_PPC
_ARCH_PPCGR
_ARCH_603
603 603
604 _ARCH_PPC
_ARCH_PPCGR
_ARCH_604
604 604
403 _ARCH_PPC
_ARCH_403
403 403
pwr3 _ARCH_PPC
_ARCH_PPCGR
_ARCH_PWR3
pwr3 pwr3
rs64a
(RS/6000 Models S70, S71)
_ARCH_PPC
_ARCH_RS64A
rs64a rs64a
rs64b
(RS/6000 Models S70, S71)
_ARCH_PPC
_ARCH_PPCGR
_ARCH_RS64B
rs64b rs64b
rs64c
_ARCH_PPC
_ARCH_PPCGR
_ARCH_RS64C
rs64c rs64c

 

64-bit Execution Mode

-qarch option Predefined Macro Available
-qtune suboptions
Default -qtune suboption
com _ARCH_COM DEFAULT
(not selectable)

auto
pwr3
rs64a
rs64b
rs64c

pwr3
ppc _ARCH_PPC auto
rs64a
rs64b
rs64c
pwr3
pwr3
ppcgr _ARCH_PPC
_ARCH_PPCGR
auto
pwr3
pwr3
pwr3 _ARCH_PPC
_ARCH_PPCGR
_ARCH_PWR3
auto
pwr3
pwr3
rs64a
(RS/6000 Models S70, S71)
_ARCH_PPC
_ARCH_RS64A
auto
rs64a
rs64a
rs64b
(RS/6000 Models S70, S71)
_ARCH_PPC
_ARCH_PPCGR
_ARCH_RS64B
auto
rs64b
rs64b
rs64c
_ARCH_PPC
_ARCH_PPCGR
_ARCH_RS64C
auto
rs64c
rs64c


Specify Compiler Options for Architecture-Specific, 32- or 64-bit Compilation


Built-in Functions for PowerPC Processors
-q32, 64
-qarch
-qtune