@@ -1980,34 +1980,38 @@ static void gen_continuation_yield(MacroAssembler* masm,
1980
1980
1981
1981
Label L_pinned;
1982
1982
1983
- __ cmpdi (CCR0, R3_RET, 0 );
1983
+ __ cmpwi (CCR0, R3_RET, 0 );
1984
1984
__ bne (CCR0, L_pinned);
1985
1985
1986
+ // yield succeeded
1987
+
1986
1988
// Pop frames of continuation including this stub's frame
1987
1989
__ ld_ptr (R1_SP, JavaThread::cont_entry_offset (), R16_thread);
1988
1990
// The frame pushed by gen_continuation_enter is on top now again
1989
1991
continuation_enter_cleanup (masm);
1990
1992
1991
- __ bind (L_pinned); // pinned -- return to caller
1993
+ // Pop frame and return
1994
+ Label L_return;
1995
+ __ bind (L_return);
1996
+ __ pop_frame ();
1997
+ __ ld (R0, _abi0 (lr), R1_SP); // Return pc
1998
+ __ mtlr (R0);
1999
+ __ blr ();
2000
+
2001
+ // yield failed - continuation is pinned
2002
+
2003
+ __ bind (L_pinned);
1992
2004
1993
2005
// handle pending exception thrown by freeze
1994
- Label ok;
1995
2006
__ ld (tmp, in_bytes (JavaThread::pending_exception_offset ()), R16_thread);
1996
2007
__ cmpdi (CCR0, tmp, 0 );
1997
- __ beq (CCR0, ok);
2008
+ __ beq (CCR0, L_return); // return if no exception is pending
1998
2009
__ pop_frame ();
1999
2010
__ ld (R0, _abi0 (lr), R1_SP); // Return pc
2000
2011
__ mtlr (R0);
2001
2012
__ load_const_optimized (tmp, StubRoutines::forward_exception_entry (), R0);
2002
2013
__ mtctr (tmp);
2003
2014
__ bctr ();
2004
- __ bind (ok);
2005
-
2006
- // Pop frame and return
2007
- __ pop_frame ();
2008
- __ ld (R0, _abi0 (lr), R1_SP); // Return pc
2009
- __ mtlr (R0);
2010
- __ blr ();
2011
2015
}
2012
2016
2013
2017
// ---------------------------------------------------------------------------
0 commit comments