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 -mcpu compiler option setting, or any other compiler option that implies that setting. If the -mcpu suboption enabling the feature is not in effect, then the macro is undefined.

Table 1. -mcpu-related macros
Macro name Description Predefined by the following -mcpu suboptions
_ARCH_PPC Indicates that the application is targeted to run on any Power® processor. Defined for all -mcpu suboptions except auto.
_ARCH_PPC64 Indicates that the application is targeted to run on Power processors with 64-bit support. pwr8
_ARCH_PPCGR Indicates that the application is targeted to run on Power processors with graphics support. pwr8
_ARCH_PWR4 Indicates that the application is targeted to run on POWER4 or higher processors. pwr8
_ARCH_PWR5 Indicates that the application is targeted to run on POWER5 or higher processors. pwr8
_ARCH_PWR5X Indicates that the application is targeted to run on POWER5+ or higher processors. pwr8
_ARCH_PWR6 Indicates that the application is targeted to run on POWER6® or higher processors. pwr8
_ARCH_PWR7 Indicates that the application is targeted to run on POWER7® , POWER7+™ or higher processors. 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