equal
deleted
inserted
replaced
29 #include "gc/shared/barrierSet.hpp" |
29 #include "gc/shared/barrierSet.hpp" |
30 #include "gc/shared/barrierSetAssembler.hpp" |
30 #include "gc/shared/barrierSetAssembler.hpp" |
31 #include "gc/shared/collectedHeap.hpp" |
31 #include "gc/shared/collectedHeap.hpp" |
32 #include "interpreter/interpreter.hpp" |
32 #include "interpreter/interpreter.hpp" |
33 #include "oops/arrayOop.hpp" |
33 #include "oops/arrayOop.hpp" |
34 #include "oops/markOop.hpp" |
34 #include "oops/markWord.hpp" |
35 #include "runtime/basicLock.hpp" |
35 #include "runtime/basicLock.hpp" |
36 #include "runtime/biasedLocking.hpp" |
36 #include "runtime/biasedLocking.hpp" |
37 #include "runtime/os.hpp" |
37 #include "runtime/os.hpp" |
38 #include "runtime/sharedRuntime.hpp" |
38 #include "runtime/sharedRuntime.hpp" |
39 #include "runtime/stubRoutines.hpp" |
39 #include "runtime/stubRoutines.hpp" |
59 } |
59 } |
60 |
60 |
61 // Load object header |
61 // Load object header |
62 movptr(hdr, Address(obj, hdr_offset)); |
62 movptr(hdr, Address(obj, hdr_offset)); |
63 // and mark it as unlocked |
63 // and mark it as unlocked |
64 orptr(hdr, markOopDesc::unlocked_value); |
64 orptr(hdr, markWord::unlocked_value); |
65 // save unlocked object header into the displaced header location on the stack |
65 // save unlocked object header into the displaced header location on the stack |
66 movptr(Address(disp_hdr, 0), hdr); |
66 movptr(Address(disp_hdr, 0), hdr); |
67 // test if object header is still the same (i.e. unlocked), and if so, store the |
67 // test if object header is still the same (i.e. unlocked), and if so, store the |
68 // displaced header address in the object header - if it is not the same, get the |
68 // displaced header address in the object header - if it is not the same, get the |
69 // object header instead |
69 // object header instead |
154 assert_different_registers(obj, klass, len, t1, t2); |
154 assert_different_registers(obj, klass, len, t1, t2); |
155 movptr(t1, Address(klass, Klass::prototype_header_offset())); |
155 movptr(t1, Address(klass, Klass::prototype_header_offset())); |
156 movptr(Address(obj, oopDesc::mark_offset_in_bytes()), t1); |
156 movptr(Address(obj, oopDesc::mark_offset_in_bytes()), t1); |
157 } else { |
157 } else { |
158 // This assumes that all prototype bits fit in an int32_t |
158 // This assumes that all prototype bits fit in an int32_t |
159 movptr(Address(obj, oopDesc::mark_offset_in_bytes ()), (int32_t)(intptr_t)markOopDesc::prototype()); |
159 movptr(Address(obj, oopDesc::mark_offset_in_bytes ()), (int32_t)(intptr_t)markWord::prototype().value()); |
160 } |
160 } |
161 #ifdef _LP64 |
161 #ifdef _LP64 |
162 if (UseCompressedClassPointers) { // Take care not to kill klass |
162 if (UseCompressedClassPointers) { // Take care not to kill klass |
163 movptr(t1, klass); |
163 movptr(t1, klass); |
164 encode_klass_not_null(t1); |
164 encode_klass_not_null(t1); |