changeset 56507:9c0715c5bbf3

8229470: Shenandoah: Fix C1 getAndSetObject() failure Reviewed-by: shade
author rkennke
date Tue, 13 Aug 2019 16:05:58 +0200
parents f3630a2d3d5c
children 0ec272e1822e
files src/hotspot/cpu/aarch64/gc/shenandoah/c1/shenandoahBarrierSetC1_aarch64.cpp src/hotspot/cpu/x86/gc/shenandoah/c1/shenandoahBarrierSetC1_x86.cpp
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 */);