< prev index next > src/hotspot/cpu/x86/interp_masm_x86.cpp
Print this page
}
if (LockingMode == LM_LIGHTWEIGHT) {
#ifdef _LP64
const Register thread = r15_thread;
+ lightweight_lock(lock_reg, obj_reg, swap_reg, thread, tmp_reg, slow_case);
#else
- const Register thread = lock_reg;
- get_thread(thread);
+ // Lacking registers and thread on x86_32. Always take slow path.
+ jmp(slow_case);
#endif
- lightweight_lock(obj_reg, swap_reg, thread, tmp_reg, slow_case);
} else if (LockingMode == LM_LEGACY) {
// Load immediate 1 into swap_reg %rax
movl(swap_reg, 1);
// Load (object->mark() | 1) into swap_reg %rax
jmp(done);
bind(slow_case);
// Call the runtime routine for slow case
- if (LockingMode == LM_LIGHTWEIGHT) {
- call_VM(noreg,
- CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorenter_obj),
- obj_reg);
- } else {
- call_VM(noreg,
- CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorenter),
- lock_reg);
- }
+ call_VM(noreg,
+ CAST_FROM_FN_PTR(address, InterpreterRuntime::monitorenter),
+ lock_reg);
bind(done);
}
}
if (LockingMode == LM_LIGHTWEIGHT) {
#ifdef _LP64
lightweight_unlock(obj_reg, swap_reg, r15_thread, header_reg, slow_case);
#else
- // This relies on the implementation of lightweight_unlock being able to handle
- // that the reg_rax and thread Register parameters may alias each other.
- get_thread(swap_reg);
- lightweight_unlock(obj_reg, swap_reg, swap_reg, header_reg, slow_case);
+ // Lacking registers and thread on x86_32. Always take slow path.
+ jmp(slow_case);
#endif
} else if (LockingMode == LM_LEGACY) {
// Load the old header from BasicLock structure
movptr(header_reg, Address(swap_reg,
BasicLock::displaced_header_offset_in_bytes()));
< prev index next >