8206975: AArch64: Fix CompareAndSwapOp when useLSE is enabled in Graal
authorzyao
Wed, 11 Jul 2018 15:00:33 +0800
changeset 51080 6ec8d47cb021
parent 51079 9e19d3a1a69d
child 51081 7b4cc0cd6fe6
8206975: AArch64: Fix CompareAndSwapOp when useLSE is enabled in Graal Reviewed-by: adinn, aph
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64AtomicMove.java
--- 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