< prev index next >

src/share/vm/c1/c1_LIRGenerator.cpp

Print this page

        

*** 2220,2232 **** LIRItem off(x->offset(), this); off.load_item(); src.load_item(); LIR_Opr value = rlock_result(x, x->basic_type()); ! get_Object_unsafe(value, src.result(), off.result(), type, x->is_volatile()); #if INCLUDE_ALL_GCS // We might be reading the value of the referent field of a // Reference object in order to attach it back to the live // object graph. If G1 is enabled then we need to record --- 2220,2233 ---- LIRItem off(x->offset(), this); off.load_item(); src.load_item(); + LIR_Opr offset = unpack_offset(src.result(), off.result()); LIR_Opr value = rlock_result(x, x->basic_type()); ! get_Object_unsafe(value, src.result(), offset, type, x->is_volatile()); #if INCLUDE_ALL_GCS // We might be reading the value of the referent field of a // Reference object in order to attach it back to the live // object graph. If G1 is enabled then we need to record
*** 2246,2256 **** bool gen_pre_barrier = true; // Assume we need to generate pre_barrier. bool gen_offset_check = true; // Assume we need to generate the offset guard. bool gen_source_check = true; // Assume we need to check the src object for null. bool gen_type_check = true; // Assume we need to check the reference_type. ! if (off.is_constant()) { jlong off_con = (off.type()->is_int() ? (jlong) off.get_jint_constant() : off.get_jlong_constant()); --- 2247,2257 ---- bool gen_pre_barrier = true; // Assume we need to generate pre_barrier. bool gen_offset_check = true; // Assume we need to generate the offset guard. bool gen_source_check = true; // Assume we need to check the src object for null. bool gen_type_check = true; // Assume we need to check the reference_type. ! if (false /*off.is_constant()*/) { jlong off_con = (off.type()->is_int() ? (jlong) off.get_jint_constant() : off.get_jlong_constant());
*** 2323,2333 **** } else { assert(off.type()->is_long(), "what else?"); referent_off = new_register(T_LONG); __ move(LIR_OprFact::longConst(java_lang_ref_Reference::referent_offset), referent_off); } ! __ cmp(lir_cond_notEqual, off.result(), referent_off); __ branch(lir_cond_notEqual, as_BasicType(off.type()), Lcont->label()); } if (gen_source_check) { // offset is a const and equals referent offset // if (source == null) -> continue --- 2324,2334 ---- } else { assert(off.type()->is_long(), "what else?"); referent_off = new_register(T_LONG); __ move(LIR_OprFact::longConst(java_lang_ref_Reference::referent_offset), referent_off); } ! __ cmp(lir_cond_notEqual, offset, referent_off); __ branch(lir_cond_notEqual, as_BasicType(off.type()), Lcont->label()); } if (gen_source_check) { // offset is a const and equals referent offset // if (source == null) -> continue
*** 2374,2388 **** data.load_byte_item(); } else { data.load_item(); } off.load_item(); ! set_no_result(x); if (x->is_volatile() && os::is_MP()) __ membar_release(); ! put_Object_unsafe(src.result(), off.result(), data.result(), type, x->is_volatile()); if (x->is_volatile() && os::is_MP()) __ membar(); } void LIRGenerator::do_SwitchRanges(SwitchRangeArray* x, LIR_Opr value, BlockBegin* default_sux) { --- 2375,2389 ---- data.load_byte_item(); } else { data.load_item(); } off.load_item(); ! LIR_Opr offset = unpack_offset(src.result(), off.result()); set_no_result(x); if (x->is_volatile() && os::is_MP()) __ membar_release(); ! put_Object_unsafe(src.result(), offset, data.result(), type, x->is_volatile()); if (x->is_volatile() && os::is_MP()) __ membar(); } void LIRGenerator::do_SwitchRanges(SwitchRangeArray* x, LIR_Opr value, BlockBegin* default_sux) {
< prev index next >