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:

All PowerPC machines share a common set of instructions, but may also include additional instructions unique to a given processor or processor family.

The table below shows some selected processors, and the various features they may or may not support:

Architecture graphics support sqrt support 64-bit support VMX support
rs64b yes yes yes no
rs64c yes yes yes no
pwr3 yes yes yes no
pwr4 yes yes yes no
pwr5 yes yes yes no
pwr5x yes yes yes no
ppc no no no no
ppc64 no no yes no
ppc64gr yes no yes no
ppc64grsq yes yes yes no
ppc64v yes yes yes yes
ppc970 yes yes yes yes

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 following table.

Related information

Table 39. Acceptable -qarch /-qtune combinations
-qarch option Predefined macros Default -qtune setting Available -qtune settings
ppc _ARCH_PPC pwr4 auto
pwr3
pwr4
pwr5
ppc970
rs64b
rs64c
ppcgr _ARCH_PPC
_ARCH_PPCGR
pwr4 auto
pwr3
pwr4
pwr5
ppc970
rs64b
rs64c
ppc64 _ARCH_PPC
_ARCH_PPC64
pwr4 auto
pwr3
pwr4
pwr5
ppc970
rs64b
rs64c
ppc64v _ARCH_PPC
_ARCH_PPCGR
_ARCH_PPC64
_ARCH_PPC64GR
_ARCH_PPC64GRSQ
_ARCH_PPC64V
ppc970 auto
ppc970
ppc64gr _ARCH_PPC
_ARCH_PPCGR
_ARCH_PPC64
_ARCH_PPC64GR
pwr4 auto
pwr3
pwr4
pwr5
ppc970
rs64b
rs64c
ppc64grsq _ARCH_PPC
_ARCH_PPCGR
_ARCH_PPC64
_ARCH_PPC64GR
_ARCH_PPC64GRSQ
pwr4 auto
pwr3
pwr4
pwr5
ppc970
rs64b
rs64c
ppc970 _ARCH_PPC
_ARCH_PPCGR
_ARCH_PPC64
_ARCH_PWR3
_ARCH_PWR4
_ARCH_PPC970
_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