# HG changeset patch # User enevill # Date 1459425632 0 # Node ID 45dcf0c16193736a006210a3fff10127d148cc26 # Parent b4b83dd8f47129a0b7342d6e0386c10f0ba084eb 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 diff -r b4b83dd8f471 -r 45dcf0c16193 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) {