[compiler-rt] r313248 - [mips] Fix sem_init_glibc test for MIPS.
Simon Dardis via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 14 03:36:04 PDT 2017
Author: sdardis
Date: Thu Sep 14 03:36:04 2017
New Revision: 313248
URL: http://llvm.org/viewvc/llvm-project?rev=313248&view=rev
Log:
[mips] Fix sem_init_glibc test for MIPS.
glibc changed the implementation of semaphores for glibc 2.21 requiring
some target specific changes for this compiler-rt test. Modify the test
to cope with MIPS64 and do some future/correctness work by tying the
define for MIPS64 to exactly the define of __HAVE_64B_ATOMICS in glibc.
Contributions from Nitesh Jain.
Reviewers: eugenis
Differential Revision: https://reviews.llvm.org/D37829
Modified:
compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc?rev=313248&r1=313247&r2=313248&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/sem_init_glibc.cc Thu Sep 14 03:36:04 2017
@@ -13,9 +13,11 @@
typedef uint64_t semval_t;
// This condition needs to correspond to __HAVE_64B_ATOMICS macro in glibc.
-#elif (defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__) || \
- defined(__s390x__) || defined(__sparc64__) || defined(__alpha__) || \
- defined(__ia64__) || defined(__m68k__)) && __GLIBC_PREREQ(2, 21)
+#elif (defined(__x86_64__) || defined(__aarch64__) || \
+ defined(__powerpc64__) || defined(__s390x__) || defined(__sparc64__) || \
+ defined(__alpha__) || defined(__ia64__) || defined(__m68k__) || \
+ (defined(__mips64) || _MIPS_SIM == _ABI64)) && \
+ __GLIBC_PREREQ(2, 21)
typedef uint64_t semval_t;
#else
typedef unsigned semval_t;
More information about the llvm-commits
mailing list