Go to file
Oleg Ranevskyy e2ae41519f [ARM] Fix for 64-bit CAS expansion on ARM32 with -O0
Summary:
This patch fixes comparison of 64-bit atomic with its expected value in CMP_SWAP_64 expansion.

Currently, the low words are compared with CMP, while the high words are compared with SBC. SBC expects the carry flag to be set if CMP detects a difference. CMP might leave the carry unset for unequal arguments though if the first one is >= than the second. This might cause the comparison logic to detect false equality.

Example of the broken C++ code:
```
std::atomic<long long> at(2);

long long ll = 1;
std::atomic_compare_exchange_strong(&at, &ll, 3);
```
Even though the atomic `at` and the expected value `ll` are not equal and `atomic_compare_exchange_strong` returns `false`, `at` is changed to 3.

The patch replaces SBC with CMPEQ.

Reviewers: t.p.northover

Subscribers: aemerson, rengolin, llvm-commits, asl

Differential Revision: https://reviews.llvm.org/D27315

llvm-svn: 288433
2016-12-01 22:58:35 +00:00
clang Add a space in a run line. NFC. 2016-12-01 20:16:56 +00:00
clang-tools-extra Add a blank line to make sphinx happy. 2016-12-01 17:38:54 +00:00
compiler-rt build: fix building for Windows after SVN r287465 2016-12-01 22:00:54 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Fix build since r286752. 2016-11-14 16:06:33 +00:00
libcxx Protect sequences test under libcpp-no-exceptions 2016-12-01 17:36:41 +00:00
libcxxabi __cxa_demangle: use default member initialization 2016-11-18 19:01:53 +00:00
libunwind EHABI: mark some functions as exported 2016-11-17 23:53:35 +00:00
lld Add an assert instead of ignoring an impossible condition. 2016-12-01 21:41:06 +00:00
lldb Handle empty strings when looking for a CFString's encoding. 2016-12-01 19:14:55 +00:00
llgo [llgo] add llgo source path to LLVM_GO_PACKAGES 2016-07-27 03:01:00 +00:00
llvm [ARM] Fix for 64-bit CAS expansion on ARM32 with -O0 2016-12-01 22:58:35 +00:00
openmp fixed type in Windows-specific code 2016-12-01 16:08:52 +00:00
parallel-libs [Acxxel] Remove setActiveDeviceForThread 2016-10-28 00:54:02 +00:00
polly [NFC] Check for feasibility prior to the profitability check 2016-12-01 11:12:14 +00:00