[LLVMbugs] [Bug 19149] New: 128-bit __atomic* intrinsics not implemented for x86_64
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Mar 15 04:10:47 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19149
Bug ID: 19149
Summary: 128-bit __atomic* intrinsics not implemented for
x86_64
Product: clang
Version: 3.4
Hardware: PC
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: andysem at mail.ru
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Currently, Boost.Atomic tests are failing for Darwin on x86_64 with linking
failures such as:
"/Volumes/TwoTB/LLVM/bin/bin/clang++" -o
"/Volumes/TwoTB/boost/regression/develop/results/boost/bin.v2/libs/atomic/test/native_api.test/clang-darwin-asan11/debug/threading-multi/native_api"
"/Volumes/TwoTB/boost/regression/develop/results/boost/bin.v2/libs/atomic/test/native_api.test/clang-darwin-asan11/debug/threading-multi/native_api.o"
"/Volumes/TwoTB/boost/regression/develop/results/boost/bin.v2/libs/chrono/build/clang-darwin-asan11/debug/threading-multi/libboost_chrono.dylib"
"/Volumes/TwoTB/boost/regression/develop/results/boost/bin.v2/libs/thread/build/clang-darwin-asan11/debug/threading-multi/libboost_thread.dylib"
"/Volumes/TwoTB/boost/regression/develop/results/boost/bin.v2/libs/atomic/build/clang-darwin-asan11/debug/threading-multi/libboost_atomic.dylib"
"/Volumes/TwoTB/boost/regression/develop/results/boost/bin.v2/libs/system/build/clang-darwin-asan11/debug/threading-multi/libboost_system.dylib"
-g -stdlib=libc++ -fsanitize=address
Undefined symbols for architecture x86_64:
"___atomic_compare_exchange", referenced from:
boost::atomics::detail::base_atomic<test_struct<unsigned __int128>, void,
16u, false>::compare_exchange_weak(test_struct<unsigned __int128>&,
test_struct<unsigned __int128> const&, boost::memory_order,
boost::memory_order) volatile in native_api.o
boost::atomics::detail::base_atomic<test_struct<unsigned __int128>, void,
16u, false>::compare_exchange_strong(test_struct<unsigned __int128>&,
test_struct<unsigned __int128> const&, boost::memory_order,
boost::memory_order) volatile in native_api.o
boost::atomics::detail::base_atomic<unsigned __int128, int, 16u,
false>::compare_exchange_strong(unsigned __int128&, unsigned __int128,
boost::memory_order, boost::memory_order) volatile in native_api.o
boost::atomics::detail::base_atomic<unsigned __int128, int, 16u,
false>::compare_exchange_weak(unsigned __int128&, unsigned __int128,
boost::memory_order, boost::memory_order) volatile in native_api.o
boost::atomics::detail::base_atomic<__int128, int, 16u,
true>::compare_exchange_strong(__int128&, __int128, boost::memory_order,
boost::memory_order) volatile in native_api.o
boost::atomics::detail::base_atomic<__int128, int, 16u,
true>::compare_exchange_weak(__int128&, __int128, boost::memory_order,
boost::memory_order) volatile in native_api.o
"___atomic_exchange", referenced from:
boost::atomics::detail::base_atomic<test_struct<unsigned __int128>, void,
16u, false>::exchange(test_struct<unsigned __int128> const&,
boost::memory_order) volatile in native_api.o
boost::atomics::detail::base_atomic<unsigned __int128, int, 16u,
false>::exchange(unsigned __int128, boost::memory_order) volatile in
native_api.o
boost::atomics::detail::base_atomic<__int128, int, 16u,
true>::exchange(__int128, boost::memory_order) volatile in native_api.o
"___atomic_fetch_add_16", referenced from:
boost::atomics::detail::base_atomic<unsigned __int128, int, 16u,
false>::fetch_add(unsigned __int128, boost::memory_order) volatile in
native_api.o
boost::atomics::detail::base_atomic<__int128, int, 16u,
true>::fetch_add(__int128, boost::memory_order) volatile in native_api.o
"___atomic_fetch_and_16", referenced from:
boost::atomics::detail::base_atomic<unsigned __int128, int, 16u,
false>::fetch_and(unsigned __int128, boost::memory_order) volatile in
native_api.o
boost::atomics::detail::base_atomic<__int128, int, 16u,
true>::fetch_and(__int128, boost::memory_order) volatile in native_api.o
"___atomic_fetch_or_16", referenced from:
boost::atomics::detail::base_atomic<unsigned __int128, int, 16u,
false>::fetch_or(unsigned __int128, boost::memory_order) volatile in
native_api.o
boost::atomics::detail::base_atomic<__int128, int, 16u,
true>::fetch_or(__int128, boost::memory_order) volatile in native_api.o
"___atomic_fetch_sub_16", referenced from:
boost::atomics::detail::base_atomic<unsigned __int128, int, 16u,
false>::fetch_sub(unsigned __int128, boost::memory_order) volatile in
native_api.o
boost::atomics::detail::base_atomic<__int128, int, 16u,
true>::fetch_sub(__int128, boost::memory_order) volatile in native_api.o
"___atomic_fetch_xor_16", referenced from:
boost::atomics::detail::base_atomic<unsigned __int128, int, 16u,
false>::fetch_xor(unsigned __int128, boost::memory_order) volatile in
native_api.o
boost::atomics::detail::base_atomic<__int128, int, 16u,
true>::fetch_xor(__int128, boost::memory_order) volatile in native_api.o
"___atomic_is_lock_free", referenced from:
boost::atomics::detail::base_atomic<test_struct<unsigned __int128>, void,
16u, false>::is_lock_free() const volatile in native_api.o
boost::atomics::detail::base_atomic<unsigned __int128, int, 16u,
false>::is_lock_free() const volatile in native_api.o
"___atomic_load", referenced from:
boost::atomics::detail::base_atomic<test_struct<unsigned __int128>, void,
16u, false>::load(boost::memory_order) const volatile in native_api.o
boost::atomics::detail::base_atomic<unsigned __int128, int, 16u,
false>::load(boost::memory_order) const volatile in native_api.o
boost::atomics::detail::base_atomic<__int128, int, 16u,
true>::load(boost::memory_order) const volatile in native_api.o
"___atomic_store", referenced from:
boost::atomics::detail::base_atomic<test_struct<unsigned __int128>, void,
16u, false>::store(test_struct<unsigned __int128> const&, boost::memory_order)
volatile in native_api.o
boost::atomics::detail::base_atomic<unsigned __int128, int, 16u,
false>::store(unsigned __int128, boost::memory_order) volatile in native_api.o
boost::atomics::detail::base_atomic<__int128, int, 16u,
true>::store(__int128, boost::memory_order) volatile in native_api.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
You can see the actual test results on this page:
http://www.boost.org/development/tests/develop/developer/atomic.html
See marshall-mac tester, the failing tests are lockfree and native_api.
Boost.Atomic detects presence of 128-bit atomics by checking for the
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 macro, which is defined to 1 for the target
architecture. According to GCC docs here:
http://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html
say: "Target architectures are encouraged to provide their own patterns for
each of these built-in functions. If no target is provided, the original
non-memory model set of ‘__sync’ atomic built-in functions are utilized, along
with any required synchronization fences surrounding it in order to achieve the
proper behavior."
__atomic* intrinsics, if not implemented for a particular target architecture,
should fall back to the __sync* intrinsics, so presence of the
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 macro should guarantee that the __atomic*
intrinsics are also supported, one way or another.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140315/2b93895f/attachment.html>
More information about the llvm-bugs
mailing list