src/hotspot/cpu/sparc/sharedRuntime_sparc.cpp
changeset 57777 90ead0febf56
parent 57710 05ff6e27de45
child 57811 947252a54b98
equal deleted inserted replaced
57774:21dccfac0ec5 57777:90ead0febf56
  1833     // Read the header and build a mask to get its hash field.  Give up if the object is not unlocked.
  1833     // Read the header and build a mask to get its hash field.  Give up if the object is not unlocked.
  1834     // We depend on hash_mask being at most 32 bits and avoid the use of
  1834     // We depend on hash_mask being at most 32 bits and avoid the use of
  1835     // hash_mask_in_place because it could be larger than 32 bits in a 64-bit
  1835     // hash_mask_in_place because it could be larger than 32 bits in a 64-bit
  1836     // vm: see markOop.hpp.
  1836     // vm: see markOop.hpp.
  1837     __ ld_ptr(obj_reg, oopDesc::mark_offset_in_bytes(), header);
  1837     __ ld_ptr(obj_reg, oopDesc::mark_offset_in_bytes(), header);
  1838     __ sethi(markOopDesc::hash_mask, mask);
  1838     __ sethi(markWord::hash_mask, mask);
  1839     __ btst(markOopDesc::unlocked_value, header);
  1839     __ btst(markWord::unlocked_value, header);
  1840     __ br(Assembler::zero, false, Assembler::pn, slowCase);
  1840     __ br(Assembler::zero, false, Assembler::pn, slowCase);
  1841     if (UseBiasedLocking) {
  1841     if (UseBiasedLocking) {
  1842       // Check if biased and fall through to runtime if so
  1842       // Check if biased and fall through to runtime if so
  1843       __ delayed()->nop();
  1843       __ delayed()->nop();
  1844       __ btst(markOopDesc::biased_lock_bit_in_place, header);
  1844       __ btst(markWord::biased_lock_bit_in_place, header);
  1845       __ br(Assembler::notZero, false, Assembler::pn, slowCase);
  1845       __ br(Assembler::notZero, false, Assembler::pn, slowCase);
  1846     }
  1846     }
  1847     __ delayed()->or3(mask, markOopDesc::hash_mask & 0x3ff, mask);
  1847     __ delayed()->or3(mask, markWord::hash_mask & 0x3ff, mask);
  1848 
  1848 
  1849     // Check for a valid (non-zero) hash code and get its value.
  1849     // Check for a valid (non-zero) hash code and get its value.
  1850     __ srlx(header, markOopDesc::hash_shift, hash);
  1850     __ srlx(header, markWord::hash_shift, hash);
  1851     __ andcc(hash, mask, hash);
  1851     __ andcc(hash, mask, hash);
  1852     __ br(Assembler::equal, false, Assembler::pn, slowCase);
  1852     __ br(Assembler::equal, false, Assembler::pn, slowCase);
  1853     __ delayed()->nop();
  1853     __ delayed()->nop();
  1854 
  1854 
  1855     // leaf return.
  1855     // leaf return.