clang-fix-cmpxchg8-detection-on-i386
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Fri, 13 Oct 2017 19:20:24 +0000 (20:20 +0100)
committerSylvestre Ledru <sylvestre@debian.org>
Fri, 13 Oct 2017 19:20:24 +0000 (20:20 +0100)
commite1c30c1b691fba798b076e57a183d890e84a0e0e
tree65dd26e0fc2ad74da5295d4d0d2dc65ab5c18256
parent7cdc7c0b11b5fdc6265a0b6eb398b55d77c001fd
clang-fix-cmpxchg8-detection-on-i386

libcxx atomic tests for old i386 fail with wrong Atomic inline width.
cmpxchg8b instruction is required for 8 byte atomics that clang was
assuming.

Too bad _GCC_ATOMIC_LLONG_LOCK_FREE 2 isn't supported even with this change
because llvm doesn't support unaligned atomic compare and exchange operation.
Fallback calls to libatomic.so should handle long long lock free but clang
can't tell program if libatomic is always lock free.

Related bug: https://llvm.org/bugs/show_bug.cgi?id=19355

Gbp-Pq: Name clang-fix-cmpxchg8-detection-on-i386.patch
clang/lib/Basic/Targets.cpp