aboutsummaryrefslogtreecommitdiff
path: root/lldb
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2016-12-06 20:09:33 +0000
committerTom Stellard <thomas.stellard@amd.com>2016-12-06 20:09:33 +0000
commit41dbbb7c22da536b7f55da50293faa9aab51ef6d (patch)
tree000c07d8c1bdc77bc69ee6d784f9cc12a85a90db /lldb
parentf029bee7f59ac325ad580f757b807e93621b1e72 (diff)
downloadllvm-llvmorg-3.9.1-rc3.zip
llvm-llvmorg-3.9.1-rc3.tar.gz
llvm-llvmorg-3.9.1-rc3.tar.bz2
------------------------------------------------------------------------ r288433 | oranevskyy | 2016-12-01 14:58:35 -0800 (Thu, 01 Dec 2016) | 24 lines [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: 288847
Diffstat (limited to 'lldb')
0 files changed, 0 insertions, 0 deletions