8206975: AArch64: Fix CompareAndSwapOp when useLSE is enabled in Graal
Reviewed-by: adinn, aph
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64AtomicMove.java Fri Jul 13 01:31:23 2018 -0700
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64AtomicMove.java Wed Jul 11 15:00:33 2018 +0800
@@ -83,7 +83,7 @@
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