[PATCH] D107244: [AIX] Define _ARCH_PPC64 macro for 32-bit

Jake Egan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 6 07:43:36 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG41bcfe81742e: [AIX] Define _ARCH_PPC64 macro for 32-bit (authored by Jake-Egan).

Changed prior to commit:
  https://reviews.llvm.org/D107244?vs=364766&id=364793#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107244/new/

https://reviews.llvm.org/D107244

Files:
  clang/lib/Basic/Targets/PPC.cpp
  clang/test/Preprocessor/init-ppc.c


Index: clang/test/Preprocessor/init-ppc.c
===================================================================
--- clang/test/Preprocessor/init-ppc.c
+++ clang/test/Preprocessor/init-ppc.c
@@ -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
Index: clang/lib/Basic/Targets/PPC.cpp
===================================================================
--- clang/lib/Basic/Targets/PPC.cpp
+++ clang/lib/Basic/Targets/PPC.cpp
@@ -257,6 +257,9 @@
     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__");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107244.364793.patch
Type: text/x-patch
Size: 992 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210806/f0d0f937/attachment.bin>


More information about the cfe-commits mailing list