< prev index next >
src/hotspot/share/c1/c1_LIRGenerator.cpp
Print this page
*** 1249,1259 ****
LIR_Opr result = rlock_result(x);
__ load(referent_field_adr, result, info);
! if (UseLoadBarrier) {
load_barrier(result, LIR_OprFact::address(referent_field_adr), lir_patch_none, NULL, true /* weak */);
}
// Register the value in the referent field with the pre-barrier
pre_barrier(LIR_OprFact::illegalOpr /* addr_opr */,
--- 1249,1259 ----
LIR_Opr result = rlock_result(x);
__ load(referent_field_adr, result, info);
! if (UseZGC) {
load_barrier(result, LIR_OprFact::address(referent_field_adr), lir_patch_none, NULL, true /* weak */);
}
// Register the value in the referent field with the pre-barrier
pre_barrier(LIR_OprFact::illegalOpr /* addr_opr */,
*** 1497,1507 ****
ShouldNotReachHere();
}
}
void LIRGenerator::load_barrier(LIR_Opr ref, LIR_Opr ref_addr, LIR_PatchCode patch_code, CodeEmitInfo* info, bool weak) {
! assert(UseLoadBarrier, "invariant");
assert(ref->is_register(), "invariant");
__ load_barrier_test(ref);
CodeStub* slow;
--- 1497,1507 ----
ShouldNotReachHere();
}
}
void LIRGenerator::load_barrier(LIR_Opr ref, LIR_Opr ref_addr, LIR_PatchCode patch_code, CodeEmitInfo* info, bool weak) {
! assert(UseZGC, "invariant");
assert(ref->is_register(), "invariant");
__ load_barrier_test(ref);
CodeStub* slow;
*** 1896,1906 ****
} else {
LIR_PatchCode patch_code = needs_patching ? lir_patch_normal : lir_patch_none;
__ load(address, reg, info, patch_code);
}
! if (is_oop && UseLoadBarrier) {
LIR_PatchCode patch_code = needs_patching ? lir_patch_normal : lir_patch_none;
load_barrier(reg, LIR_OprFact::address(address),
patch_code, (info ? new CodeEmitInfo(info) : NULL));
}
--- 1896,1906 ----
} else {
LIR_PatchCode patch_code = needs_patching ? lir_patch_normal : lir_patch_none;
__ load(address, reg, info, patch_code);
}
! if (is_oop && UseZGC) {
LIR_PatchCode patch_code = needs_patching ? lir_patch_normal : lir_patch_none;
load_barrier(reg, LIR_OprFact::address(address),
patch_code, (info ? new CodeEmitInfo(info) : NULL));
}
*** 2026,2036 ****
}
LIR_Opr result = rlock_result(x, element_type);
__ move(array_addr, result, null_check_info);
! if (is_oop && UseLoadBarrier) {
load_barrier(result, LIR_OprFact::address(array_addr),
lir_patch_none, (null_check_info ? new CodeEmitInfo(null_check_info) : NULL));
}
}
--- 2026,2036 ----
}
LIR_Opr result = rlock_result(x, element_type);
__ move(array_addr, result, null_check_info);
! if (is_oop && UseZGC) {
load_barrier(result, LIR_OprFact::address(array_addr),
lir_patch_none, (null_check_info ? new CodeEmitInfo(null_check_info) : NULL));
}
}
< prev index next >