Revision history   OpenPOWER Library

 3.1.1. Pre-defined macros

A C preprocessor that conforms to the ELFv2 ABI shall predefine the following macros to the specified values:

__PPC__=1

Indicate the POWER architecture.

__powerpc__=1

Indicate the POWER architecture.

__powerpc64__=1

Indicate the 64-bit POWER architecture.

_ARCH_PWR8=1

Indicate the POWER8 hardware architecture.

_CALL_ELF=2

Indicate the ELFv2 ABI.

Depending on the target processor, the following macros shall also be predefined if applicable:

_ARCH_PWR9=1

Indicate the POWER9 hardware architecture.

_ARCH_PWR10=1

Indicate the POWER10 hardware architecture.

__MMA__=1

Indicate support for the Matrix-Multiply Assist instructions.

If the target processor is little-endian, the following macros shall also be predefined:

__LITTLE_ENDIAN__=1

__BYTE_ORDER__=__ORDER_LITTLE_ENDIAN__

__FLOAT_BYTE_ORDER__=__ORDER_LITTLE_ENDIAN__

If the target processor is big-endian, the following macros shall also be predefined:

__BIG_ENDIAN__=1

__BYTE_ORDER__=__ORDER_BIG_ENDIAN__

__FLOAT_BYTE_ORDER__=__ORDER_BIG_ENDIAN__