Macros related to architecture settings

The following macros can be tested for target architecture settings. All of these macros are predefined to a value of 1 by a -qarch compiler option setting, or any other compiler option that implies that setting. If the -qarch suboption enabling the feature is not in effect, then the macro is undefined.

Table 1. -qarch-related macros
Macro name Description Predefined by the following -qarch suboptions
_ARCH_PPC Indicates that the application is targeted to run on any Power® processor. Defined for all -qarch suboptions except auto.
_ARCH_PPC64 Indicates that the application is targeted to run on Power processors with 64-bit support. ppc64 | ppc64gr | ppc64grsq | ppc64v | pwr4 | pwr5 | pwr5x | pwr6 | pwr6e | pwr7 | pwr8 | ppc970
_ARCH_PPCGR Indicates that the application is targeted to run on Power processors with graphics support. ppcgr | ppc64gr | ppc64grsq | ppc64v | pwr4 | pwr5 | pwr5x | pwr6 | pwr6e | pwr7 | pwr8 | ppc970
_ARCH_PPC64GR Indicates that the application is targeted to run on Power processors with 64-bit and graphics support. ppc64gr | ppc64v | pwr4 | pwr5 | pwr5x | pwr6 | pwr6e | pwr7 | pwr8 | ppc970
_ARCH_PPC64GRSQ Indicates that the application is targeted to run on Power processors with 64-bit, graphics, and square root support. ppc64grsq | ppc64v | pwr4 | pwr5 | pwr5x | pwr6 | pwr6e | pwr7 | pwr8 | ppc970
_ARCH_PPC64V Indicates that the application is targeted to run on Power processors with 64-bit and vector processing support. ppc64v | ppc970 | pwr6 | pwr6e | pwr7 | pwr8
_ARCH_PPC970 Indicates that the application is targeted to run on the PowerPC® 970 processor. ppc970
_ARCH_PWR4 Indicates that the application is targeted to run on POWER4 or higher processors. pwr4 | pwr5 | pwr5x | pwr6 | pwr6e | pwr7 | pwr8 | ppc970
_ARCH_PWR5 Indicates that the application is targeted to run on POWER5 or higher processors. pwr5 | pwr5x | pwr6 | pwr6e | pwr7 | pwr8
_ARCH_PWR5X Indicates that the application is targeted to run on POWER5+ or higher processors. pwr5x | pwr6 | pwr6e | pwr7 | pwr8
_ARCH_PWR6 Indicates that the application is targeted to run on POWER6® or higher processors. pwr6 | pwr6e | pwr7 | pwr8
_ARCH_PWR6E Indicates that the application is targeted to run on POWER6 processors running in POWER6 raw mode. pwr6e
_ARCH_PWR7 Indicates that the application is targeted to run on POWER7® , POWER7+™ or higher processors. pwr7 | pwr8
_ARCH_PWR8 Indicates that the application is targeted to run on POWER8® processors. pwr8

Related information



Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us