< prev index next >

src/hotspot/cpu/x86/sharedRuntime_x86.cpp

Print this page
@@ -74,12 +74,17 @@
    // 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);
+   if (UseCompactObjectHeaders) {
+     __ 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 >