[Openmp-commits] [openmp] [llvm] [openmp][wasm] Allow compiling OpenMP to WebAssembly (PR #71297)
Jonathan Peyton via Openmp-commits
openmp-commits at lists.llvm.org
Wed Dec 13 08:18:01 PST 2023
================
@@ -2286,7 +2286,27 @@ KMP_PREFIX_UNDERSCORE(__kmp_unnamed_critical_addr):
#if KMP_OS_LINUX
# if KMP_ARCH_ARM || KMP_ARCH_AARCH64
.section .note.GNU-stack,"",%progbits
-# else
+# elif !KMP_ARCH_WASM
.section .note.GNU-stack,"", at progbits
# endif
#endif
+
+#if KMP_ARCH_WASM
+.data
+.global .gomp_critical_user_
+.global .gomp_critical_user_.var
+.global .gomp_critical_user_.reduction.var
+.global __kmp_unnamed_critical_addr
+.gomp_critical_user_:
+.zero 4
+.size .gomp_critical_user_, 4
+.gomp_critical_user_.var:
+.zero 4
+.size .gomp_critical_user_.var, 4
+.gomp_critical_user_.reduction.var:
+.zero 4
+.size .gomp_critical_user_.reduction.var, 4
+__kmp_unnamed_critical_addr:
+ .4byte .gomp_critical_user_
+ .size __kmp_unnamed_critical_addr, 4
+#endif
----------------
jpeyton52 wrote:
Ah OK, I understand the limitation now.
https://github.com/llvm/llvm-project/pull/71297
More information about the Openmp-commits
mailing list