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 does not enabling the feature, 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. Predefined for all -mcpu suboptions.
_ARCH_PPC64 Indicates that the application is targeted to run on Power processors with 64-bit support. Predefined for all -mcpu suboptions.
_ARCH_PPCGR Indicates that the application is targeted to run on Power processors with graphics support. Predefined for all -mcpu suboptions.
_ARCH_PPCSQ Indicates that the application is targeted to run on Power processors with square root support. pwr7 | pwr8 | pwr9 | pwr10
_ARCH_PWR4 Indicates that the application is targeted to run on POWER4 or higher processors. pwr7 | pwr8 | pwr9 | pwr10
_ARCH_PWR5 Indicates that the application is targeted to run on POWER5 or higher processors. pwr7 | pwr8 | pwr9 | pwr10
_ARCH_PWR5X Indicates that the application is targeted to run on POWER5+ or higher processors. pwr7 | pwr8 | pwr9 | pwr10
_ARCH_PWR6 Indicates that the application is targeted to run on POWER6 or higher processors. pwr7 | pwr8 | pwr9 | pwr10
_ARCH_PWR7 Indicates that the application is targeted to run on POWER7 , POWER7+ , or higher processors. pwr7 | pwr8 | pwr9 | pwr10
_ARCH_PWR8 Indicates that the application is targeted to run on POWER8 , or higher processors. pwr8 | pwr9 | pwr10
_ARCH_PWR9 Indicates that the application is targeted to run on POWER9 or higher processors. pwr9 | pwr10
_ARCH_PWR10 Indicates that the application is targeted to run on Power10 processors. pwr10
_ARCH_PWR11 Indicates that the application is targeted to run on Power11 processors. pwr11

Related information