[Openmp-commits] [openmp] 52a02b6 - [openmp] Fix for 32-bit PowerPC (#126412)

via Openmp-commits openmp-commits at lists.llvm.org
Mon Feb 10 01:04:30 PST 2025


Author: Brad Smith
Date: 2025-02-10T04:04:26-05:00
New Revision: 52a02b6d1e0c6b492495ff79a3a06ce93e6180b8

URL: https://github.com/llvm/llvm-project/commit/52a02b6d1e0c6b492495ff79a3a06ce93e6180b8
DIFF: https://github.com/llvm/llvm-project/commit/52a02b6d1e0c6b492495ff79a3a06ce93e6180b8.diff

LOG: [openmp] Fix for 32-bit PowerPC (#126412)

Added: 
    

Modified: 
    openmp/runtime/src/kmp_platform.h
    openmp/runtime/src/z_Linux_asm.S

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/src/kmp_platform.h b/openmp/runtime/src/kmp_platform.h
index 9c2215140467df5..2f47efd3e85ffd4 100644
--- a/openmp/runtime/src/kmp_platform.h
+++ b/openmp/runtime/src/kmp_platform.h
@@ -116,6 +116,7 @@
 #define KMP_ARCH_PPC64_ELFv2 0
 #define KMP_ARCH_PPC64_XCOFF 0
 #define KMP_ARCH_PPC_XCOFF 0
+#define KMP_ARCH_PPC 0
 #define KMP_ARCH_MIPS 0
 #define KMP_ARCH_MIPS64 0
 #define KMP_ARCH_RISCV64 0
@@ -164,6 +165,9 @@
 #define KMP_ARCH_PPC_XCOFF 1
 #undef KMP_ARCH_PPC
 #define KMP_ARCH_PPC 1
+#elif defined(__powerpc__) && !defined(__LP64__)
+#undef KMP_ARCH_PPC
+#define KMP_ARCH_PPC 1
 #elif defined __ARM64_ARCH_8_32__
 #undef KMP_ARCH_AARCH64_32
 #define KMP_ARCH_AARCH64_32 1

diff  --git a/openmp/runtime/src/z_Linux_asm.S b/openmp/runtime/src/z_Linux_asm.S
index 0bf9f07a13f1478..607bfd8e3cb0f9d 100644
--- a/openmp/runtime/src/z_Linux_asm.S
+++ b/openmp/runtime/src/z_Linux_asm.S
@@ -2470,7 +2470,7 @@ __kmp_invoke_microtask:
 
 #endif /* KMP_ARCH_S390X */
 
-#if KMP_ARCH_ARM || KMP_ARCH_MIPS || KMP_ARCH_AARCH64_32
+#if KMP_ARCH_ARM || KMP_ARCH_MIPS || KMP_ARCH_PPC || KMP_ARCH_AARCH64_32
 #ifndef KMP_PREFIX_UNDERSCORE
 # define KMP_PREFIX_UNDERSCORE(x) x
 #endif


        


More information about the Openmp-commits mailing list