[Openmp-commits] [PATCH] D31923: Fix crash in invoking microtask on ios arm64

Phabricator via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Apr 17 05:11:05 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL300448: Fix crash in invoking microtask on ios arm64. (authored by achurbanov).

Changed prior to commit:
  https://reviews.llvm.org/D31923?vs=95075&id=95433#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D31923

Files:
  openmp/trunk/runtime/src/z_Linux_asm.s
  openmp/trunk/runtime/src/z_Linux_util.cpp


Index: openmp/trunk/runtime/src/z_Linux_asm.s
===================================================================
--- openmp/trunk/runtime/src/z_Linux_asm.s
+++ openmp/trunk/runtime/src/z_Linux_asm.s
@@ -109,8 +109,28 @@
 # endif // KMP_OS_DARWIN
 #endif // KMP_ARCH_X86 || KMP_ARCH_x86_64
 
-#if KMP_OS_LINUX && KMP_ARCH_AARCH64
+#if (KMP_OS_LINUX || KMP_OS_DARWIN) && KMP_ARCH_AARCH64
 
+# if KMP_OS_DARWIN
+#  define KMP_PREFIX_UNDERSCORE(x) _##x  // extra underscore for OS X* symbols
+#  define KMP_LABEL(x) L_##x             // form the name of label
+
+.macro ALIGN
+	.align $0
+.endmacro
+
+.macro DEBUG_INFO
+/* Not sure what .size does in icc, not sure if we need to do something
+   similar for OS X*.
+*/
+.endmacro
+
+.macro PROC
+	ALIGN  4
+	.globl KMP_PREFIX_UNDERSCORE($0)
+KMP_PREFIX_UNDERSCORE($0):
+.endmacro
+# else // KMP_OS_DARWIN
 #  define KMP_PREFIX_UNDERSCORE(x) x  // no extra underscore for Linux* OS symbols
 // Format labels so that they don't override function names in gdb's backtraces
 #  define KMP_LABEL(x) .L_##x         // local label hidden from backtraces
@@ -133,8 +153,9 @@
 KMP_PREFIX_UNDERSCORE(\proc):
 	.cfi_startproc
 .endm
+# endif // KMP_OS_DARWIN
 
-#endif // KMP_OS_LINUX && KMP_ARCH_AARCH64
+#endif // (KMP_OS_LINUX || KMP_OS_DARWIN) && KMP_ARCH_AARCH64
 
 // -----------------------------------------------------------------------
 // data
@@ -1441,7 +1462,7 @@
 #endif /* KMP_ARCH_X86_64 */
 
 // '
-#if KMP_OS_LINUX && KMP_ARCH_AARCH64
+#if (KMP_OS_LINUX || KMP_OS_DARWIN) && KMP_ARCH_AARCH64
 
 //------------------------------------------------------------------------
 //
@@ -1553,7 +1574,7 @@
 	DEBUG_INFO __kmp_invoke_microtask
 // -- End  __kmp_invoke_microtask
 
-#endif /* KMP_OS_LINUX && KMP_ARCH_AARCH64 */
+#endif /* (KMP_OS_LINUX || KMP_OS_DARWIN) && KMP_ARCH_AARCH64 */
 
 #if KMP_ARCH_PPC64
 
Index: openmp/trunk/runtime/src/z_Linux_util.cpp
===================================================================
--- openmp/trunk/runtime/src/z_Linux_util.cpp
+++ openmp/trunk/runtime/src/z_Linux_util.cpp
@@ -2516,7 +2516,7 @@
 
 #endif // USE_LOAD_BALANCE
 
-#if !(KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_MIC || (KMP_OS_LINUX && KMP_ARCH_AARCH64) || KMP_ARCH_PPC64)
+#if !(KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_MIC || ((KMP_OS_LINUX || KMP_OS_DARWIN) && KMP_ARCH_AARCH64) || KMP_ARCH_PPC64)
 
 // we really only need the case with 1 argument, because CLANG always build
 // a struct of pointers to shared variables referenced in the outlined function


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31923.95433.patch
Type: text/x-patch
Size: 2517 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20170417/ce28fb32/attachment.bin>


More information about the Openmp-commits mailing list