< prev index next >

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

Print this page




  82   return BarrierSetC1::atomic_cmpxchg_at_resolved(access, cmp_value, new_value);
  83 }
  84 
  85 LIR_Opr ShenandoahBarrierSetC1::atomic_xchg_at_resolved(LIRAccess& access, LIRItem& value) {
  86   LIRGenerator* gen = access.gen();
  87   BasicType type = access.type();
  88 
  89   LIR_Opr result = gen->new_register(type);
  90   value.load_item();
  91   LIR_Opr value_opr = value.result();
  92 
  93   if (access.is_oop()) {
  94     value_opr = storeval_barrier(access.gen(), value_opr, access.access_emit_info(), access.decorators());
  95   }
  96 
  97   assert(type == T_INT || type == T_OBJECT || type == T_ARRAY LP64_ONLY( || type == T_LONG ), "unexpected type");
  98   LIR_Opr tmp = gen->new_register(T_INT);
  99   __ xchg(access.resolved_addr(), value_opr, result, tmp);
 100 
 101   if (access.is_oop()) {
 102     result = load_reference_barrier(access.gen(), result);
 103     LIR_Opr tmp = gen->new_register(type);
 104     __ move(result, tmp);
 105     result = tmp;
 106     if (ShenandoahSATBBarrier) {
 107       pre_barrier(access.gen(), access.access_emit_info(), access.decorators(), LIR_OprFact::illegalOpr,
 108                   result /* pre_val */);
 109     }
 110   }
 111 
 112   return result;
 113 }


  82   return BarrierSetC1::atomic_cmpxchg_at_resolved(access, cmp_value, new_value);
  83 }
  84 
  85 LIR_Opr ShenandoahBarrierSetC1::atomic_xchg_at_resolved(LIRAccess& access, LIRItem& value) {
  86   LIRGenerator* gen = access.gen();
  87   BasicType type = access.type();
  88 
  89   LIR_Opr result = gen->new_register(type);
  90   value.load_item();
  91   LIR_Opr value_opr = value.result();
  92 
  93   if (access.is_oop()) {
  94     value_opr = storeval_barrier(access.gen(), value_opr, access.access_emit_info(), access.decorators());
  95   }
  96 
  97   assert(type == T_INT || type == T_OBJECT || type == T_ARRAY LP64_ONLY( || type == T_LONG ), "unexpected type");
  98   LIR_Opr tmp = gen->new_register(T_INT);
  99   __ xchg(access.resolved_addr(), value_opr, result, tmp);
 100 
 101   if (access.is_oop()) {
 102     result = load_reference_barrier(access.gen(), result, LIR_OprFact::addressConst(0));
 103     LIR_Opr tmp = gen->new_register(type);
 104     __ move(result, tmp);
 105     result = tmp;
 106     if (ShenandoahSATBBarrier) {
 107       pre_barrier(access.gen(), access.access_emit_info(), access.decorators(), LIR_OprFact::illegalOpr,
 108                   result /* pre_val */);
 109     }
 110   }
 111 
 112   return result;
 113 }
< prev index next >