< prev index next >

src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp

Print this page
@@ -497,10 +497,14 @@
    jccb(Assembler::notZero, IsInflated);
  
    if (!UseHeavyMonitors) {
      // Attempt stack-locking ...
      orptr (tmpReg, markWord::unlocked_value);
+     if (EnableValhalla) {
+       // Mask inline_type bit such that we go to the slow path if object is an inline type
+       andptr(tmpReg, ~((int) markWord::inline_type_bit_in_place));
+     }
      movptr(Address(boxReg, 0), tmpReg);          // Anticipate successful CAS
      lock();
      cmpxchgptr(boxReg, Address(objReg, oopDesc::mark_offset_in_bytes()));      // Updates tmpReg
      jcc(Assembler::equal, DONE_LABEL);           // Success
  
< prev index next >