8229258: Rework markOop and markOopDesc into a simpler mark word value carrier

Reviewed-by: rkennke, coleenp, kbarrett, dcubed
This commit is contained in:
Stefan Karlsson 2019-08-06 10:48:21 +02:00
parent f075a3278b
commit ae5615c614
132 changed files with 1215 additions and 1236 deletions

View file

@ -1835,19 +1835,19 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
// hash_mask_in_place because it could be larger than 32 bits in a 64-bit
// vm: see markOop.hpp.
__ ld_ptr(obj_reg, oopDesc::mark_offset_in_bytes(), header);
__ sethi(markOopDesc::hash_mask, mask);
__ btst(markOopDesc::unlocked_value, header);
__ sethi(markWord::hash_mask, mask);
__ btst(markWord::unlocked_value, header);
__ br(Assembler::zero, false, Assembler::pn, slowCase);
if (UseBiasedLocking) {
// Check if biased and fall through to runtime if so
__ delayed()->nop();
__ btst(markOopDesc::biased_lock_bit_in_place, header);
__ btst(markWord::biased_lock_bit_in_place, header);
__ br(Assembler::notZero, false, Assembler::pn, slowCase);
}
__ delayed()->or3(mask, markOopDesc::hash_mask & 0x3ff, mask);
__ delayed()->or3(mask, markWord::hash_mask & 0x3ff, mask);
// Check for a valid (non-zero) hash code and get its value.
__ srlx(header, markOopDesc::hash_shift, hash);
__ srlx(header, markWord::hash_shift, hash);
__ andcc(hash, mask, hash);
__ br(Assembler::equal, false, Assembler::pn, slowCase);
__ delayed()->nop();