< prev index next >

src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp

Print this page

        

*** 29,39 **** #include "c1/c1_Runtime1.hpp" #include "classfile/systemDictionary.hpp" #include "gc/shared/collectedHeap.hpp" #include "interpreter/interpreter.hpp" #include "oops/arrayOop.hpp" ! #include "oops/markWord.hpp" #include "runtime/basicLock.hpp" #include "runtime/biasedLocking.hpp" #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" --- 29,39 ---- #include "c1/c1_Runtime1.hpp" #include "classfile/systemDictionary.hpp" #include "gc/shared/collectedHeap.hpp" #include "interpreter/interpreter.hpp" #include "oops/arrayOop.hpp" ! #include "oops/markOop.hpp" #include "runtime/basicLock.hpp" #include "runtime/biasedLocking.hpp" #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp"
*** 108,123 **** if (UseBiasedLocking) { biased_locking_enter(CCR0, Roop, Rmark, Rscratch, R0, done, &slow_int); } // ... and mark it unlocked. ! ori(Rmark, Rmark, markWord::unlocked_value); // Save unlocked object header into the displaced header location on the stack. std(Rmark, BasicLock::displaced_header_offset_in_bytes(), Rbox); ! // Compare object markWord with Rmark and if equal exchange Rscratch with object markWord. assert(oopDesc::mark_offset_in_bytes() == 0, "cas must take a zero displacement"); cmpxchgd(/*flag=*/CCR0, /*current_value=*/Rscratch, /*compare_value=*/Rmark, /*exchange_value=*/Rbox, --- 108,123 ---- if (UseBiasedLocking) { biased_locking_enter(CCR0, Roop, Rmark, Rscratch, R0, done, &slow_int); } // ... and mark it unlocked. ! ori(Rmark, Rmark, markOopDesc::unlocked_value); // Save unlocked object header into the displaced header location on the stack. std(Rmark, BasicLock::displaced_header_offset_in_bytes(), Rbox); ! // Compare object markOop with Rmark and if equal exchange Rscratch with object markOop. assert(oopDesc::mark_offset_in_bytes() == 0, "cas must take a zero displacement"); cmpxchgd(/*flag=*/CCR0, /*current_value=*/Rscratch, /*compare_value=*/Rmark, /*exchange_value=*/Rbox,
*** 135,145 **** b(slow_case); // far bind(cas_failed); // We did not find an unlocked object so see if this is a recursive case. sub(Rscratch, Rscratch, R1_SP); ! load_const_optimized(R0, (~(os::vm_page_size()-1) | markWord::lock_mask_in_place)); and_(R0/*==0?*/, Rscratch, R0); std(R0/*==0, perhaps*/, BasicLock::displaced_header_offset_in_bytes(), Rbox); bne(CCR0, slow_int); bind(done); --- 135,145 ---- b(slow_case); // far bind(cas_failed); // We did not find an unlocked object so see if this is a recursive case. sub(Rscratch, Rscratch, R1_SP); ! load_const_optimized(R0, (~(os::vm_page_size()-1) | markOopDesc::lock_mask_in_place)); and_(R0/*==0?*/, Rscratch, R0); std(R0/*==0, perhaps*/, BasicLock::displaced_header_offset_in_bytes(), Rbox); bne(CCR0, slow_int); bind(done);
*** 169,179 **** ld(Roop, BasicObjectLock::obj_offset_in_bytes(), Rbox); verify_oop(Roop); } // Check if it is still a light weight lock, this is is true if we see ! // the stack address of the basicLock in the markWord of the object. cmpxchgd(/*flag=*/CCR0, /*current_value=*/R0, /*compare_value=*/Rbox, /*exchange_value=*/Rmark, /*where=*/Roop, --- 169,179 ---- ld(Roop, BasicObjectLock::obj_offset_in_bytes(), Rbox); verify_oop(Roop); } // Check if it is still a light weight lock, this is is true if we see ! // the stack address of the basicLock in the markOop of the object. cmpxchgd(/*flag=*/CCR0, /*current_value=*/R0, /*compare_value=*/Rbox, /*exchange_value=*/Rmark, /*where=*/Roop,
*** 213,223 **** void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register len, Register t1, Register t2) { assert_different_registers(obj, klass, len, t1, t2); if (UseBiasedLocking && !len->is_valid()) { ld(t1, in_bytes(Klass::prototype_header_offset()), klass); } else { ! load_const_optimized(t1, (intx)markWord::prototype().value()); } std(t1, oopDesc::mark_offset_in_bytes(), obj); store_klass(obj, klass); if (len->is_valid()) { stw(len, arrayOopDesc::length_offset_in_bytes(), obj); --- 213,223 ---- void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register len, Register t1, Register t2) { assert_different_registers(obj, klass, len, t1, t2); if (UseBiasedLocking && !len->is_valid()) { ld(t1, in_bytes(Klass::prototype_header_offset()), klass); } else { ! load_const_optimized(t1, (intx)markOopDesc::prototype()); } std(t1, oopDesc::mark_offset_in_bytes(), obj); store_klass(obj, klass); if (len->is_valid()) { stw(len, arrayOopDesc::length_offset_in_bytes(), obj);
< prev index next >