[compiler-rt] 9339f68 - [compiler-rt] [tsan] [netbsd] Catch unsupported LONG_JMP_SP_ENV_SLOT
Kamil Rytarowski via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 17 07:28:42 PDT 2020
Author: Kamil Rytarowski
Date: 2020-09-17T16:28:11+02:00
New Revision: 9339f68f21facc34fb0901045d571c818e1fa84a
URL: https://github.com/llvm/llvm-project/commit/9339f68f21facc34fb0901045d571c818e1fa84a
DIFF: https://github.com/llvm/llvm-project/commit/9339f68f21facc34fb0901045d571c818e1fa84a.diff
LOG: [compiler-rt] [tsan] [netbsd] Catch unsupported LONG_JMP_SP_ENV_SLOT
Error out during build for unsupported CPU.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D87602
Added:
Modified:
compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
index 645152a06c39..710e7ec97b70 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
@@ -384,12 +384,16 @@ static uptr UnmangleLongJmpSp(uptr mangled_sp) {
#endif
}
-#ifdef __powerpc__
+#if SANITIZER_NETBSD
+# ifdef __x86_64__
+# define LONG_JMP_SP_ENV_SLOT 6
+# else
+# error unsupported
+# endif
+#elif defined(__powerpc__)
# define LONG_JMP_SP_ENV_SLOT 0
#elif SANITIZER_FREEBSD
# define LONG_JMP_SP_ENV_SLOT 2
-#elif SANITIZER_NETBSD
-# define LONG_JMP_SP_ENV_SLOT 6
#elif SANITIZER_LINUX
# ifdef __aarch64__
# define LONG_JMP_SP_ENV_SLOT 13
More information about the llvm-commits
mailing list