%%%
The macro _ARCH_PPC64 is already defined for 64-bit, but this patch defines it for 32-bit on AIX to follow xlc. See: https://www.ibm.com/docs/en/xl-c-and-cpp-aix/13.1.0?topic=features-macros-related-architecture-settings
Note: This change creates a discrepancy between GCC, which defines _ARCH_PPC64 only for 64-bit mode.
Tested with SPEC.
%%%
Reviewed By: cebowleratibm
Differential Revision: https://reviews.llvm.org/D107244
Builder.defineMacro("__powerpc64__");
Builder.defineMacro("__ppc64__");
Builder.defineMacro("__PPC64__");
+ } else if (getTriple().isOSAIX()) {
+ // The XL compilers on AIX define _ARCH_PPC64 for both 32 and 64-bit modes.
+ Builder.defineMacro("_ARCH_PPC64");
}
if (getTriple().isOSAIX()) {
Builder.defineMacro("__THW_PPC__");
// PPC-AIX-NOT:#define __64BIT__ 1
// PPC-AIX:#define _AIX 1
// PPC-AIX:#define _ARCH_PPC 1
+// PPC-AIX:#define _ARCH_PPC64 1
// PPC-AIX:#define _BIG_ENDIAN 1
// PPC-AIX:#define _IBMR2 1
// PPC-AIX:#define _LONG_LONG 1