8206975: AArch64: Fix CompareAndSwapOp when useLSE is enabled in Graal

Reviewed-by: adinn, aph
This commit is contained in:
Zhongwei Yao 2018-07-11 15:00:33 +08:00
parent 2e36eebdd2
commit 45158a4766

View File

@ -83,7 +83,7 @@ public class AArch64AtomicMove {
if (AArch64LIRFlagsVersioned.useLSE(masm.target.arch)) {
Register expected = asRegister(expectedValue);
masm.mov(size, result, expected);
masm.cas(size, expected, newVal, address, true /* acquire */, true /* release */);
masm.cas(size, result, newVal, address, true /* acquire */, true /* release */);
AArch64Compare.gpCompare(masm, resultValue, expectedValue);
} else {
// We could avoid using a scratch register here, by reusing resultValue for the