<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - 128-bit __atomic* intrinsics not implemented for x86_64"
href="http://llvm.org/bugs/show_bug.cgi?id=19149">19149</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>128-bit __atomic* intrinsics not implemented for x86_64
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.4
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>andysem@mail.ru
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>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:
<a href="http://www.boost.org/development/tests/develop/developer/atomic.html">http://www.boost.org/development/tests/develop/developer/atomic.html</a>
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:
<a href="http://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html">http://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html</a>
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>