< prev index next >

src/hotspot/cpu/x86/sharedRuntime_x86.cpp

Print this page
*** 60,13 ***
  
    __ movptr(result, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
  
  
    if (LockingMode == LM_LIGHTWEIGHT) {
!     // check if monitor
!     __ testptr(result, markWord::monitor_value);
!     __ jcc(Assembler::notZero, slowCase);
    } else {
      // check if locked
      __ testptr(result, markWord::unlocked_value);
      __ jcc(Assembler::zero, slowCase);
    }
--- 60,15 ---
  
    __ movptr(result, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
  
  
    if (LockingMode == LM_LIGHTWEIGHT) {
!     if (!UseObjectMonitorTable) {
!       // check if monitor
!       __ testptr(result, markWord::monitor_value);
+       __ jcc(Assembler::notZero, slowCase);
+     }
    } else {
      // check if locked
      __ testptr(result, markWord::unlocked_value);
      __ jcc(Assembler::zero, slowCase);
    }

*** 74,12 ***
    // get hash
  #ifdef _LP64
    // Read the header and build a mask to get its hash field.
    // Depend on hash_mask being at most 32 bits and avoid the use of hash_mask_in_place
    // because it could be larger than 32 bits in a 64-bit vm. See markWord.hpp.
!   __ shrptr(result, markWord::hash_shift);
!   __ andptr(result, markWord::hash_mask);
  #else
    __ andptr(result, markWord::hash_mask_in_place);
  #endif //_LP64
  
    // test if hashCode exists
--- 76,18 ---
    // get hash
  #ifdef _LP64
    // Read the header and build a mask to get its hash field.
    // Depend on hash_mask being at most 32 bits and avoid the use of hash_mask_in_place
    // because it could be larger than 32 bits in a 64-bit vm. See markWord.hpp.
!   if (UseCompactObjectHeaders) {
!     STATIC_ASSERT(markWord::hash_mask_compact < nth_bit(32));
+     __ shrptr(result, markWord::hash_shift_compact);
+     __ andptr(result, markWord::hash_mask_compact);
+   } else {
+     __ shrptr(result, markWord::hash_shift);
+     __ andptr(result, markWord::hash_mask);
+   }
  #else
    __ andptr(result, markWord::hash_mask_in_place);
  #endif //_LP64
  
    // test if hashCode exists
< prev index next >