[Openmp-commits] [PATCH] D137168: [OpenMP][mingw] Fix build for aarch64 target

Martin Storsjö via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Nov 8 05:28:07 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGa356782426f5: [OpenMP][mingw] Fix build for aarch64 target (authored by alvinhochun, committed by mstorsjo).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137168

Files:
  openmp/runtime/src/dllexports
  openmp/runtime/src/kmp_os.h
  openmp/runtime/src/kmp_utility.cpp


Index: openmp/runtime/src/kmp_utility.cpp
===================================================================
--- openmp/runtime/src/kmp_utility.cpp
+++ openmp/runtime/src/kmp_utility.cpp
@@ -370,7 +370,7 @@
         case 'I':
         case 'i': {
           pid_t id = getpid();
-#if KMP_ARCH_X86_64 && defined(__MINGW32__)
+#if (KMP_ARCH_X86_64 || KMP_ARCH_AARCH64) && defined(__MINGW32__)
           snp_result = KMP_SNPRINTF(pos, end - pos + 1, "%0*lld", width, id);
 #else
           snp_result = KMP_SNPRINTF(pos, end - pos + 1, "%0*d", width, id);
Index: openmp/runtime/src/kmp_os.h
===================================================================
--- openmp/runtime/src/kmp_os.h
+++ openmp/runtime/src/kmp_os.h
@@ -456,7 +456,7 @@
 
 // Synchronization primitives
 
-#if KMP_ASM_INTRINS && KMP_OS_WINDOWS
+#if KMP_ASM_INTRINS && KMP_OS_WINDOWS && !(KMP_ARCH_AARCH64 && defined(__GNUC__))
 
 #if KMP_MSVC_COMPAT && !KMP_COMPILER_CLANG
 #pragma intrinsic(InterlockedExchangeAdd)
Index: openmp/runtime/src/dllexports
===================================================================
--- openmp/runtime/src/dllexports
+++ openmp/runtime/src/dllexports
@@ -1243,7 +1243,6 @@
     %ifdef IS_IA_ARCH
     __kmpc_atomic_float10_max              2139
     __kmpc_atomic_float10_min              2140
-    %endif
     __kmpc_atomic_float10_max_cpt          2141
     __kmpc_atomic_float10_min_cpt          2142
 
@@ -1263,6 +1262,7 @@
     __kmpc_atomic_val_2_cas_cpt            2156
     __kmpc_atomic_val_4_cas_cpt            2157
     __kmpc_atomic_val_8_cas_cpt            2158
+    %endif
 
 %endif
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137168.473967.patch
Type: text/x-patch
Size: 1609 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20221108/f2517dad/attachment.bin>


More information about the Openmp-commits mailing list