changeset 37274:45dcf0c16193

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
author enevill
date Thu, 31 Mar 2016 12:00:32 +0000
parents b4b83dd8f471
children f61297514617
files hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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) {