hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp
changeset 46449 7b2416f0f524
parent 46440 61025eecb743
child 46620 750c6edff33b
--- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp	Tue May 09 13:50:06 2017 -0400
+++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp	Thu Oct 13 11:27:20 2016 +0200
@@ -2372,7 +2372,7 @@
     __ movl(swap_reg, 1);
 
     // Load (object->mark() | 1) into swap_reg %rax
-    __ orptr(swap_reg, Address(obj_reg, 0));
+    __ orptr(swap_reg, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
 
     // Save (object->mark() | 1) into BasicLock's displaced header
     __ movptr(Address(lock_reg, mark_word_offset), swap_reg);
@@ -2382,7 +2382,7 @@
     }
 
     // src -> dest iff dest == rax else rax <- dest
-    __ cmpxchgptr(lock_reg, Address(obj_reg, 0));
+    __ cmpxchgptr(lock_reg, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
     __ jcc(Assembler::equal, lock_done);
 
     // Hmm should this move to the slow path code area???
@@ -2560,7 +2560,7 @@
     if (os::is_MP()) {
       __ lock();
     }
-    __ cmpxchgptr(old_hdr, Address(obj_reg, 0));
+    __ cmpxchgptr(old_hdr, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
     __ jcc(Assembler::notEqual, slow_path_unlock);
 
     // slow path re-enters here