From: Alexey Samsonov Date: Thu, 22 May 2014 22:02:38 +0000 (+0000) Subject: [TSan] ifdef out certain functions if 128-bit ints are not supported. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=958a59b77750702a4cda83c1dcf3efc26747d391;p=platform%2Fupstream%2Fllvm.git [TSan] ifdef out certain functions if 128-bit ints are not supported. llvm-svn: 209476 --- diff --git a/compiler-rt/lib/tsan/rtl/tsan_interface_atomic.cc b/compiler-rt/lib/tsan/rtl/tsan_interface_atomic.cc index 5472b2b..2de0c4f 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_interface_atomic.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_interface_atomic.cc @@ -274,10 +274,12 @@ static T NoTsanAtomicLoad(const volatile T *a, morder mo) { 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 static T AtomicLoad(ThreadState *thr, uptr pc, const volatile T *a, @@ -302,10 +304,12 @@ static void NoTsanAtomicStore(volatile T *a, T v, morder mo) { 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 static void AtomicStore(ThreadState *thr, uptr pc, volatile T *a, T v, @@ -434,6 +438,7 @@ static bool NoTsanAtomicCAS(volatile T *a, T *c, T v, morder mo, morder fmo) { 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 a128 *a, a128 *c, a128 v, *c = cur; return false; } +#endif template static bool NoTsanAtomicCAS(volatile T *a, T c, T v, morder mo, morder fmo) {