diff options
author | 2023-11-28 17:45:38 +0000 | |
---|---|---|
committer | 2023-11-29 08:02:42 +0000 | |
commit | 09eb6f0e9e8d49d5381934bcfb710aea5dbcd139 (patch) | |
tree | 7a21b1921eca230ecb95a97e5c8f7569397da9f7 /compiler/optimizing | |
parent | 51f8a5ee6c83cc7a63d757036a7ec317cfe60d13 (diff) |
riscv64: Disable VarHandle.compareAndSet intrinsics.
Strong CAS is known to be broken.
Test: buildbot-build.sh --target
Bug: 283082089
Change-Id: I5517b1bc7d0e74639b6247e0c371ac13896de2c3
Diffstat (limited to 'compiler/optimizing')
-rw-r--r-- | compiler/optimizing/intrinsics_riscv64.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/optimizing/intrinsics_riscv64.cc b/compiler/optimizing/intrinsics_riscv64.cc index c5aed1b1da..3af187dbf8 100644 --- a/compiler/optimizing/intrinsics_riscv64.cc +++ b/compiler/optimizing/intrinsics_riscv64.cc @@ -2215,6 +2215,13 @@ static void CreateVarHandleCompareAndSetOrExchangeLocations(HInvoke* invoke, return; } + if ((true)) { + // FIXME(riscv64): Fix the register allocation for strong CAS (SC failure sets the result + // to success, so comparison failure on retry returns "true" for a failed CAS). + // Review register allocation for weak CAS to make sure it's OK. + return; + } + LocationSummary* locations = CreateVarHandleCommonLocations(invoke, codegen); DCHECK_EQ(expected_index, 1u + GetExpectedVarHandleCoordinatesCount(invoke)); |