20 * or visit www.oracle.com if you need additional information or have any |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 * |
22 * |
23 */ |
23 */ |
24 |
24 |
25 #include "incls/_precompiled.incl" |
25 #include "precompiled.hpp" |
26 #include "incls/_c1_MacroAssembler_x86.cpp.incl" |
26 #include "c1/c1_MacroAssembler.hpp" |
|
27 #include "c1/c1_Runtime1.hpp" |
|
28 #include "classfile/systemDictionary.hpp" |
|
29 #include "gc_interface/collectedHeap.hpp" |
|
30 #include "interpreter/interpreter.hpp" |
|
31 #include "oops/arrayOop.hpp" |
|
32 #include "oops/markOop.hpp" |
|
33 #include "runtime/basicLock.hpp" |
|
34 #include "runtime/biasedLocking.hpp" |
|
35 #include "runtime/os.hpp" |
|
36 #include "runtime/stubRoutines.hpp" |
27 |
37 |
28 int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr, Register scratch, Label& slow_case) { |
38 int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr, Register scratch, Label& slow_case) { |
29 const int aligned_mask = BytesPerWord -1; |
39 const int aligned_mask = BytesPerWord -1; |
30 const int hdr_offset = oopDesc::mark_offset_in_bytes(); |
40 const int hdr_offset = oopDesc::mark_offset_in_bytes(); |
31 assert(hdr == rax, "hdr must be rax, for the cmpxchg instruction"); |
41 assert(hdr == rax, "hdr must be rax, for the cmpxchg instruction"); |