hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp
changeset 46449 7b2416f0f524
parent 46440 61025eecb743
child 46494 3fdd343bc5ea
--- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp	Tue May 09 13:50:06 2017 -0400
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp	Thu Oct 13 11:27:20 2016 +0200
@@ -1484,7 +1484,7 @@
     movl(retry_on_abort_count_Reg, RTMRetryCount); // Retry on abort
     bind(L_rtm_retry);
   }
-  movptr(tmpReg, Address(objReg, 0));
+  movptr(tmpReg, Address(objReg, oopDesc::mark_offset_in_bytes()));
   testptr(tmpReg, markOopDesc::monitor_value);  // inflated vs stack-locked|neutral|biased
   jcc(Assembler::notZero, IsInflated);
 
@@ -1499,7 +1499,7 @@
     bind(L_noincrement);
   }
   xbegin(L_on_abort);
-  movptr(tmpReg, Address(objReg, 0));       // fetch markword
+  movptr(tmpReg, Address(objReg, oopDesc::mark_offset_in_bytes()));       // fetch markword
   andptr(tmpReg, markOopDesc::biased_lock_mask_in_place); // look at 3 lock bits
   cmpptr(tmpReg, markOopDesc::unlocked_value);            // bits = 001 unlocked
   jcc(Assembler::equal, DONE_LABEL);        // all done if unlocked
@@ -1560,7 +1560,7 @@
     bind(L_noincrement);
   }
   xbegin(L_on_abort);
-  movptr(tmpReg, Address(objReg, 0));
+  movptr(tmpReg, Address(objReg, oopDesc::mark_offset_in_bytes()));
   movptr(tmpReg, Address(tmpReg, owner_offset));
   testptr(tmpReg, tmpReg);
   jcc(Assembler::zero, DONE_LABEL);
@@ -1753,7 +1753,7 @@
     }
 #endif // INCLUDE_RTM_OPT
 
-    movptr(tmpReg, Address(objReg, 0));          // [FETCH]
+    movptr(tmpReg, Address(objReg, oopDesc::mark_offset_in_bytes()));          // [FETCH]
     testptr(tmpReg, markOopDesc::monitor_value); // inflated vs stack-locked|neutral|biased
     jccb(Assembler::notZero, IsInflated);
 
@@ -1763,7 +1763,7 @@
     if (os::is_MP()) {
       lock();
     }
-    cmpxchgptr(boxReg, Address(objReg, 0));      // Updates tmpReg
+    cmpxchgptr(boxReg, Address(objReg, oopDesc::mark_offset_in_bytes()));      // Updates tmpReg
     if (counters != NULL) {
       cond_inc32(Assembler::equal,
                  ExternalAddress((address)counters->fast_path_entry_count_addr()));
@@ -1984,7 +1984,7 @@
     if (UseRTMForStackLocks && use_rtm) {
       assert(!UseBiasedLocking, "Biased locking is not supported with RTM locking");
       Label L_regular_unlock;
-      movptr(tmpReg, Address(objReg, 0));           // fetch markword
+      movptr(tmpReg, Address(objReg, oopDesc::mark_offset_in_bytes()));           // fetch markword
       andptr(tmpReg, markOopDesc::biased_lock_mask_in_place); // look at 3 lock bits
       cmpptr(tmpReg, markOopDesc::unlocked_value);            // bits = 001 unlocked
       jccb(Assembler::notEqual, L_regular_unlock);  // if !HLE RegularLock
@@ -1996,7 +1996,7 @@
 
     cmpptr(Address(boxReg, 0), (int32_t)NULL_WORD); // Examine the displaced header
     jcc   (Assembler::zero, DONE_LABEL);            // 0 indicates recursive stack-lock
-    movptr(tmpReg, Address(objReg, 0));             // Examine the object's markword
+    movptr(tmpReg, Address(objReg, oopDesc::mark_offset_in_bytes()));             // Examine the object's markword
     testptr(tmpReg, markOopDesc::monitor_value);    // Inflated?
     jccb  (Assembler::zero, Stacked);
 
@@ -2150,7 +2150,7 @@
     if (os::is_MP()) {
       lock();
     }
-    cmpxchgptr(tmpReg, Address(objReg, 0)); // Uses RAX which is box
+    cmpxchgptr(tmpReg, Address(objReg, oopDesc::mark_offset_in_bytes())); // Uses RAX which is box
     // Intention fall-thru into DONE_LABEL
 
     // DONE_LABEL is a hot target - we'd really like to place it at the
@@ -2247,7 +2247,7 @@
     bind  (Stacked);
     movptr(tmpReg, Address (boxReg, 0));      // re-fetch
     if (os::is_MP()) { lock(); }
-    cmpxchgptr(tmpReg, Address(objReg, 0)); // Uses RAX which is box
+    cmpxchgptr(tmpReg, Address(objReg, oopDesc::mark_offset_in_bytes())); // Uses RAX which is box
 
     if (EmitSync & 65536) {
        bind (CheckSucc);