[Openmp-commits] [PATCH] D138703: [openmp] Fix build break for less common architectures

Martin Storsjö via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Nov 25 04:38:52 PST 2022


mstorsjo updated this revision to Diff 477918.
mstorsjo added a comment.

Sharing `.macro COMMON`, fixed the `#else` comment


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138703

Files:
  openmp/runtime/src/z_Linux_asm.S


Index: openmp/runtime/src/z_Linux_asm.S
===================================================================
--- openmp/runtime/src/z_Linux_asm.S
+++ openmp/runtime/src/z_Linux_asm.S
@@ -117,9 +117,6 @@
 .macro ALIGN
 	.align $0
 .endmacro
-.macro COMMON name, size, align_power
-	.comm \name, \size
-.endm
 
 .macro DEBUG_INFO
 /* Not sure what .size does in icc, not sure if we need to do something
@@ -140,9 +137,6 @@
 .macro ALIGN size
 	.align 1<<(\size)
 .endm
-.macro COMMON name, size, align_power
-	.comm \name, \size, \align_power
-.endm
 
 .macro DEBUG_INFO proc
 	ALIGN 2
@@ -161,9 +155,6 @@
 .macro ALIGN size
 	.align 1<<(\size)
 .endm
-.macro COMMON name, size, align_power
-	.comm \name, \size, (1<<(\align_power))
-.endm
 
 .macro DEBUG_INFO proc
 	.cfi_endproc
@@ -183,6 +174,16 @@
 
 #endif // (KMP_OS_LINUX || KMP_OS_DARWIN || KMP_OS_WINDOWS) && KMP_ARCH_AARCH64
 
+.macro COMMON name, size, align_power
+#if KMP_OS_DARWIN
+	.comm \name, \size
+#elif KMP_OS_WINDOWS
+	.comm \name, \size, \align_power
+#else // !KMP_OS_DARWIN && !KMP_OS_WINDOWS
+	.comm \name, \size, (1<<(\align_power))
+#endif
+.endm
+
 // -----------------------------------------------------------------------
 // data
 // -----------------------------------------------------------------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138703.477918.patch
Type: text/x-patch
Size: 1284 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20221125/ff92ec97/attachment.bin>


More information about the Openmp-commits mailing list