[compiler-rt] r209476 - [TSan] ifdef out certain functions if 128-bit ints are not supported.
Alexey Samsonov
vonosmas at gmail.com
Thu May 22 15:02:38 PDT 2014
Author: samsonov
Date: Thu May 22 17:02:38 2014
New Revision: 209476
URL: http://llvm.org/viewvc/llvm-project?rev=209476&view=rev
Log:
[TSan] ifdef out certain functions if 128-bit ints are not supported.
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_interface_atomic.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_interface_atomic.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_interface_atomic.cc?rev=209476&r1=209475&r2=209476&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interface_atomic.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interface_atomic.cc Thu May 22 17:02:38 2014
@@ -274,10 +274,12 @@ static T NoTsanAtomicLoad(const volatile
return atomic_load(to_atomic(a), to_mo(mo));
}
+#if __TSAN_HAS_INT128
static a128 NoTsanAtomicLoad(const volatile a128 *a, morder mo) {
SpinMutexLock lock(&mutex128);
return *a;
}
+#endif
template<typename T>
static T AtomicLoad(ThreadState *thr, uptr pc, const volatile T *a,
@@ -302,10 +304,12 @@ static void NoTsanAtomicStore(volatile T
atomic_store(to_atomic(a), v, to_mo(mo));
}
+#if __TSAN_HAS_INT128
static void NoTsanAtomicStore(volatile a128 *a, a128 v, morder mo) {
SpinMutexLock lock(&mutex128);
*a = v;
}
+#endif
template<typename T>
static void AtomicStore(ThreadState *thr, uptr pc, volatile T *a, T v,
@@ -434,6 +438,7 @@ static bool NoTsanAtomicCAS(volatile T *
return atomic_compare_exchange_strong(to_atomic(a), c, v, to_mo(mo));
}
+#if __TSAN_HAS_INT128
static bool NoTsanAtomicCAS(volatile a128 *a, a128 *c, a128 v,
morder mo, morder fmo) {
a128 old = *c;
@@ -443,6 +448,7 @@ static bool NoTsanAtomicCAS(volatile a12
*c = cur;
return false;
}
+#endif
template<typename T>
static bool NoTsanAtomicCAS(volatile T *a, T c, T v, morder mo, morder fmo) {
More information about the llvm-commits
mailing list