forked from OSchip/llvm-project
[AIX] Define _ARCH_PPC64 macro for 32-bit
%%% 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
This commit is contained in:
parent
869d07ee88
commit
41bcfe8174
|
@ -257,6 +257,9 @@ void PPCTargetInfo::getTargetDefines(const LangOptions &Opts,
|
|||
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__");
|
||||
|
|
|
@ -391,6 +391,7 @@
|
|||
// 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
|
||||
|
|
Loading…
Reference in New Issue