< prev index next >

src/hotspot/cpu/aarch64/gc/shenandoah/c1/shenandoahBarrierSetC1_aarch64.cpp

Print this page
*** 85,14 ***
        LIR_Opr t2 = gen->new_register(T_OBJECT);
        LIR_Opr addr = access.resolved_addr()->as_address_ptr()->base();
        LIR_Opr result = gen->new_register(T_INT);
  
        __ append(new LIR_OpShenandoahCompareAndSwap(addr, cmp_value.result(), new_value.result(), t1, t2, result));
        return result;
      }
    }
!   return BarrierSetC1::atomic_cmpxchg_at_resolved(access, cmp_value, new_value);
  }
  
  LIR_Opr ShenandoahBarrierSetC1::atomic_xchg_at_resolved(LIRAccess& access, LIRItem& value) {
    LIRGenerator* gen = access.gen();
    BasicType type = access.type();
--- 85,23 ---
        LIR_Opr t2 = gen->new_register(T_OBJECT);
        LIR_Opr addr = access.resolved_addr()->as_address_ptr()->base();
        LIR_Opr result = gen->new_register(T_INT);
  
        __ append(new LIR_OpShenandoahCompareAndSwap(addr, cmp_value.result(), new_value.result(), t1, t2, result));
+ 
+       post_barrier(access, access.resolved_addr(), new_value.result());
        return result;
      }
    }
! 
+   LIR_Opr result =  BarrierSetC1::atomic_cmpxchg_at_resolved(access, cmp_value, new_value);
+ 
+   if (access.is_oop()) {
+     post_barrier(access, access.resolved_addr(), new_value.result());
+   }
+ 
+   return result;
  }
  
  LIR_Opr ShenandoahBarrierSetC1::atomic_xchg_at_resolved(LIRAccess& access, LIRItem& value) {
    LIRGenerator* gen = access.gen();
    BasicType type = access.type();

*** 116,9 ***
--- 125,10 ---
      result = tmp;
      if (ShenandoahSATBBarrier) {
        pre_barrier(access.gen(), access.access_emit_info(), access.decorators(), LIR_OprFact::illegalOpr,
                    result /* pre_val */);
      }
+     post_barrier(access, access.resolved_addr(), result);
    }
  
    return result;
  }
< prev index next >