8153172: aarch64: hotspot crashes after the 8.1 LSE patch is merged
authorenevill
Thu, 31 Mar 2016 12:00:32 +0000
changeset 37274 45dcf0c16193
parent 37273 b4b83dd8f471
child 37276 f61297514617
8153172: aarch64: hotspot crashes after the 8.1 LSE patch is merged Summary: Fix scratch register usage in C1 atomic_op to avoid unpredictable instruction Reviewed-by: aph Contributed-by: felix.yang@linaro.org
hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
--- a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp	Thu Mar 31 09:26:13 2016 +0200
+++ b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp	Thu Mar 31 12:00:32 2016 +0000
@@ -3134,10 +3134,10 @@
       Register obj = as_reg(data);
       Register dst = as_reg(dest);
       if (is_oop && UseCompressedOops) {
-        __ encode_heap_oop(rscratch1, obj);
-        obj = rscratch1;
+        __ encode_heap_oop(rscratch2, obj);
+        obj = rscratch2;
       }
-      assert_different_registers(obj, addr.base(), tmp, rscratch2, dst);
+      assert_different_registers(obj, addr.base(), tmp, rscratch1, dst);
       __ lea(tmp, addr);
       (_masm->*xchg)(dst, obj, tmp);
       if (is_oop && UseCompressedOops) {