< prev index next >

src/hotspot/share/c1/c1_LIRGenerator.cpp

c1_root_access
   }
 
   // FIXME T_ADDRESS should actually be T_METADATA but it can't because the
   // meaning of these two is mixed up (see JDK-8026837).
   __ move(new LIR_Address(rcvr.result(), oopDesc::klass_offset_in_bytes(), T_ADDRESS), temp, info);
-  __ move_wide(new LIR_Address(temp, in_bytes(Klass::java_mirror_offset()), T_ADDRESS), result);
+  __ move_wide(new LIR_Address(temp, in_bytes(Klass::java_mirror_offset()), T_ADDRESS), temp);
   // mirror = ((OopHandle)mirror)->resolve();
-  __ move_wide(new LIR_Address(result, T_OBJECT), result);
+  access_load(IN_NATIVE, T_OBJECT,
+              LIR_OprFact::address(new LIR_Address(temp, T_OBJECT)), result);
 }
 
 // java.lang.Class::isPrimitive()
 void LIRGenerator::do_isPrimitive(Intrinsic* x) {
   assert(x->number_of_arguments() == 1, "wrong type");

@@ -1621,10 +1622,22 } else { _barrier_set->load_at(access, result); } } +void LIRGenerator::access_load(DecoratorSet decorators, BasicType type, + LIR_Opr addr, LIR_Opr result) { + decorators |= C1_READ_ACCESS; + LIRAccess access(this, decorators, LIR_OprFact::illegalOpr, LIR_OprFact::illegalOpr, type); + access.set_resolved_addr(addr); + if (access.is_raw()) { + _barrier_set->BarrierSetC1::load(access, result); + } else { + _barrier_set->load(access, result); + } +} + void LIRGenerator::access_store_at(DecoratorSet decorators, BasicType type, LIRItem& base, LIR_Opr offset, LIR_Opr value, CodeEmitInfo* patch_info, CodeEmitInfo* store_emit_info) { decorators |= C1_WRITE_ACCESS; LIRAccess access(this, decorators, base, offset, type, patch_info, store_emit_info);
< prev index next >