@@ -1639,7 +1639,6 @@ static void fill_continuation_entry(MacroAssembler* masm, Register reg_cont_obj,
16391639 assert_different_registers (reg_cont_obj, reg_flags);
16401640 Register zero = R8_ARG6;
16411641 Register tmp2 = R9_ARG7;
1642- Register tmp3 = R10_ARG8;
16431642
16441643 DEBUG_ONLY (__ block_comment (" fill {" ));
16451644#ifdef ASSERT
@@ -1655,12 +1654,9 @@ static void fill_continuation_entry(MacroAssembler* masm, Register reg_cont_obj,
16551654 __ stw (zero, in_bytes (ContinuationEntry::pin_count_offset ()), R1_SP);
16561655
16571656 __ ld_ptr (tmp2, JavaThread::cont_fastpath_offset (), R16_thread);
1658- __ ld (tmp3, in_bytes (JavaThread::held_monitor_count_offset ()), R16_thread);
16591657 __ st_ptr (tmp2, ContinuationEntry::parent_cont_fastpath_offset (), R1_SP);
1660- __ std (tmp3, in_bytes (ContinuationEntry::parent_held_monitor_count_offset ()), R1_SP);
16611658
16621659 __ st_ptr (zero, JavaThread::cont_fastpath_offset (), R16_thread);
1663- __ std (zero, in_bytes (JavaThread::held_monitor_count_offset ()), R16_thread);
16641660 DEBUG_ONLY (__ block_comment (" } fill" ));
16651661}
16661662
@@ -1681,7 +1677,6 @@ static void fill_continuation_entry(MacroAssembler* masm, Register reg_cont_obj,
16811677static void continuation_enter_cleanup (MacroAssembler* masm) {
16821678 Register tmp1 = R8_ARG6;
16831679 Register tmp2 = R9_ARG7;
1684- Register tmp3 = R10_ARG8;
16851680
16861681#ifdef ASSERT
16871682 __ block_comment (" clean {" );
@@ -1692,57 +1687,8 @@ static void continuation_enter_cleanup(MacroAssembler* masm) {
16921687
16931688 __ ld_ptr (tmp1, ContinuationEntry::parent_cont_fastpath_offset (), R1_SP);
16941689 __ st_ptr (tmp1, JavaThread::cont_fastpath_offset (), R16_thread);
1695-
1696- if (CheckJNICalls) {
1697- // Check if this is a virtual thread continuation
1698- Label L_skip_vthread_code;
1699- __ lwz (R0, in_bytes (ContinuationEntry::flags_offset ()), R1_SP);
1700- __ cmpwi (CR0, R0, 0 );
1701- __ beq (CR0, L_skip_vthread_code);
1702-
1703- // If the held monitor count is > 0 and this vthread is terminating then
1704- // it failed to release a JNI monitor. So we issue the same log message
1705- // that JavaThread::exit does.
1706- __ ld (R0, in_bytes (JavaThread::jni_monitor_count_offset ()), R16_thread);
1707- __ cmpdi (CR0, R0, 0 );
1708- __ beq (CR0, L_skip_vthread_code);
1709-
1710- // Save return value potentially containing the exception oop
1711- Register ex_oop = R15_esp; // nonvolatile register
1712- __ mr (ex_oop, R3_RET);
1713- __ call_VM_leaf (CAST_FROM_FN_PTR (address, SharedRuntime::log_jni_monitor_still_held));
1714- // Restore potental return value
1715- __ mr (R3_RET, ex_oop);
1716-
1717- // For vthreads we have to explicitly zero the JNI monitor count of the carrier
1718- // on termination. The held count is implicitly zeroed below when we restore from
1719- // the parent held count (which has to be zero).
1720- __ li (tmp1, 0 );
1721- __ std (tmp1, in_bytes (JavaThread::jni_monitor_count_offset ()), R16_thread);
1722-
1723- __ bind (L_skip_vthread_code);
1724- }
1725- #ifdef ASSERT
1726- else {
1727- // Check if this is a virtual thread continuation
1728- Label L_skip_vthread_code;
1729- __ lwz (R0, in_bytes (ContinuationEntry::flags_offset ()), R1_SP);
1730- __ cmpwi (CR0, R0, 0 );
1731- __ beq (CR0, L_skip_vthread_code);
1732-
1733- // See comment just above. If not checking JNI calls the JNI count is only
1734- // needed for assertion checking.
1735- __ li (tmp1, 0 );
1736- __ std (tmp1, in_bytes (JavaThread::jni_monitor_count_offset ()), R16_thread);
1737-
1738- __ bind (L_skip_vthread_code);
1739- }
1740- #endif
1741-
1742- __ ld (tmp2, in_bytes (ContinuationEntry::parent_held_monitor_count_offset ()), R1_SP);
1743- __ ld_ptr (tmp3, ContinuationEntry::parent_offset (), R1_SP);
1744- __ std (tmp2, in_bytes (JavaThread::held_monitor_count_offset ()), R16_thread);
1745- __ st_ptr (tmp3, JavaThread::cont_entry_offset (), R16_thread);
1690+ __ ld_ptr (tmp2, ContinuationEntry::parent_offset (), R1_SP);
1691+ __ st_ptr (tmp2, JavaThread::cont_entry_offset (), R16_thread);
17461692 DEBUG_ONLY (__ block_comment (" } clean" ));
17471693}
17481694
0 commit comments