clang-fix-cmpxchg8-detection-on-i386
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Fri, 22 Dec 2017 10:42:46 +0000 (10:42 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Fri, 22 Dec 2017 10:42:46 +0000 (10:42 +0000)
commitae051065899578d064a2318239c8c13736f5b6ee
treeca3e9f9934509fc67213744d76e092f0f2d6503c
parent683fc826749869793711bcc332e66c2b9534d7fb
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