Skip to content

Commit 1c2b479

Browse files
author
duke
committed
Backport ed68096
1 parent d620426 commit 1c2b479

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,11 @@ int LIR_Assembler::emit_unwind_handler() {
229229
if (method()->is_synchronized()) {
230230
monitor_address(0, FrameMap::R4_opr);
231231
stub = new MonitorExitStub(FrameMap::R4_opr, true, 0);
232-
__ unlock_object(R5, R6, R4, *stub->entry());
232+
if (LockingMode == LM_MONITOR) {
233+
__ b(*stub->entry());
234+
} else {
235+
__ unlock_object(R5, R6, R4, *stub->entry());
236+
}
233237
__ bind(*stub->continuation());
234238
}
235239

src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ void C1_MacroAssembler::lock_object(Register Rmark, Register Roop, Register Rbox
114114
/*check without membar and ldarx first*/true);
115115
// If compare/exchange succeeded we found an unlocked object and we now have locked it
116116
// hence we are done.
117+
} else {
118+
assert(false, "Unhandled LockingMode:%d", LockingMode);
117119
}
118120
b(done);
119121

@@ -168,6 +170,8 @@ void C1_MacroAssembler::unlock_object(Register Rmark, Register Roop, Register Rb
168170
MacroAssembler::cmpxchgx_hint_release_lock(),
169171
noreg,
170172
&slow_int);
173+
} else {
174+
assert(false, "Unhandled LockingMode:%d", LockingMode);
171175
}
172176
b(done);
173177
bind(slow_int);

0 commit comments

Comments
 (0)