< prev index next >

src/hotspot/share/opto/library_call.cpp

Print this page
*** 4538,12 ***
  
    // Get the hash value and check to see that it has been properly assigned.
    // We 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.
!   Node *hash_mask      = _gvn.intcon(markWord::hash_mask);
!   Node *hash_shift     = _gvn.intcon(markWord::hash_shift);
    Node *hshifted_header= _gvn.transform(new URShiftXNode(header, hash_shift));
    // This hack lets the hash bits live anywhere in the mark object now, as long
    // as the shift drops the relevant bits into the low 32 bits.  Note that
    // Java spec says that HashCode is an int so there's no point in capturing
    // an 'X'-sized hashcode (32 in 32-bit build or 64 in 64-bit build).
--- 4538,12 ---
  
    // Get the hash value and check to see that it has been properly assigned.
    // We 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.
!   Node *hash_mask      = _gvn.intcon(UseCompactObjectHeaders ? markWord::hash_mask_compact  : markWord::hash_mask);
!   Node *hash_shift     = _gvn.intcon(UseCompactObjectHeaders ? markWord::hash_shift_compact : markWord::hash_shift);
    Node *hshifted_header= _gvn.transform(new URShiftXNode(header, hash_shift));
    // This hack lets the hash bits live anywhere in the mark object now, as long
    // as the shift drops the relevant bits into the low 32 bits.  Note that
    // Java spec says that HashCode is an int so there's no point in capturing
    // an 'X'-sized hashcode (32 in 32-bit build or 64 in 64-bit build).
< prev index next >