8229470: Shenandoah: Fix C1 getAndSetObject() failure
authorrkennke
Tue, 13 Aug 2019 16:05:58 +0200
changeset 57729 9c0715c5bbf3
parent 57728 f3630a2d3d5c
child 57730 0ec272e1822e
8229470: Shenandoah: Fix C1 getAndSetObject() failure Reviewed-by: shade
src/hotspot/cpu/aarch64/gc/shenandoah/c1/shenandoahBarrierSetC1_aarch64.cpp
src/hotspot/cpu/x86/gc/shenandoah/c1/shenandoahBarrierSetC1_x86.cpp
--- a/src/hotspot/cpu/aarch64/gc/shenandoah/c1/shenandoahBarrierSetC1_aarch64.cpp	Tue Aug 13 14:59:29 2019 +0200
+++ b/src/hotspot/cpu/aarch64/gc/shenandoah/c1/shenandoahBarrierSetC1_aarch64.cpp	Tue Aug 13 16:05:58 2019 +0200
@@ -100,6 +100,9 @@
 
   if (access.is_oop()) {
     result = load_reference_barrier(access.gen(), result);
+    LIR_Opr tmp = gen->new_register(type);
+    __ move(result, tmp);
+    result = tmp;
     if (ShenandoahSATBBarrier) {
       pre_barrier(access.gen(), access.access_emit_info(), access.decorators(), LIR_OprFact::illegalOpr,
                   result /* pre_val */);
--- a/src/hotspot/cpu/x86/gc/shenandoah/c1/shenandoahBarrierSetC1_x86.cpp	Tue Aug 13 14:59:29 2019 +0200
+++ b/src/hotspot/cpu/x86/gc/shenandoah/c1/shenandoahBarrierSetC1_x86.cpp	Tue Aug 13 16:05:58 2019 +0200
@@ -111,6 +111,9 @@
 
   if (access.is_oop()) {
     result = load_reference_barrier(access.gen(), result);
+    LIR_Opr tmp = gen->new_register(type);
+    __ move(result, tmp);
+    result = tmp;
     if (ShenandoahSATBBarrier) {
       pre_barrier(access.gen(), access.access_emit_info(), access.decorators(), LIR_OprFact::illegalOpr,
                   result /* pre_val */);