< prev index next > src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp
Print this page
assert_different_registers(header, object_mark_addr, current_header, tmp);
// markWord displaced_header = obj->mark().set_unlocked();
- // Load markWord from object into header.
- ld(header, oopDesc::mark_offset_in_bytes(), object);
-
if (DiagnoseSyncOnValueBasedClasses != 0) {
load_klass(tmp, object);
lwz(tmp, in_bytes(Klass::access_flags_offset()), tmp);
testbitdi(CCR0, R0, tmp, exact_log2(JVM_ACC_IS_VALUE_BASED_CLASS));
bne(CCR0, slow_case);
}
if (LockingMode == LM_LIGHTWEIGHT) {
- lightweight_lock(object, /* mark word */ header, tmp, slow_case);
+ lightweight_lock(object, header, tmp, slow_case);
b(count_locking);
} else if (LockingMode == LM_LEGACY) {
+ // Load markWord from object into header.
+ ld(header, oopDesc::mark_offset_in_bytes(), object);
// Set displaced_header to be (markWord of object | UNLOCK_VALUE).
ori(header, header, markWord::unlocked_value);
// monitor->lock()->set_displaced_header(displaced_header);
// The object address from the monitor is in object.
ld(object, in_bytes(BasicObjectLock::obj_offset()), monitor);
if (LockingMode == LM_LIGHTWEIGHT) {
- // Check for non-symmetric locking. This is allowed by the spec and the interpreter
- // must handle it.
- Register tmp = current_header;
- // First check for lock-stack underflow.
- lwz(tmp, in_bytes(JavaThread::lock_stack_top_offset()), R16_thread);
- cmplwi(CCR0, tmp, (unsigned)LockStack::start_offset());
- ble(CCR0, slow_case);
- // Then check if the top of the lock-stack matches the unlocked object.
- addi(tmp, tmp, -oopSize);
- ldx(tmp, tmp, R16_thread);
- cmpd(CCR0, tmp, object);
- bne(CCR0, slow_case);
-
- ld(header, oopDesc::mark_offset_in_bytes(), object);
- andi_(R0, header, markWord::monitor_value);
- bne(CCR0, slow_case);
lightweight_unlock(object, header, slow_case);
} else {
addi(object_mark_addr, object, oopDesc::mark_offset_in_bytes());
// We have the displaced header in displaced_header. If the lock is still
< prev index next >