fix register restore to be safe for n32 model.
This commit is contained in:
parent
4281f72137
commit
4f92d800a6
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: locore.S,v 1.72 1999/05/18 01:36:52 nisimura Exp $ */
|
/* $NetBSD: locore.S,v 1.73 1999/06/04 21:35:47 castor Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1992, 1993
|
* Copyright (c) 1992, 1993
|
||||||
|
@ -363,7 +363,7 @@ LEAF(switch_exit)
|
||||||
lw v0, _C_LABEL(proc0paddr) # get proc0 p_addr
|
lw v0, _C_LABEL(proc0paddr) # get proc0 p_addr
|
||||||
nop
|
nop
|
||||||
sw v0, _C_LABEL(curpcb) # set current pcb
|
sw v0, _C_LABEL(curpcb) # set current pcb
|
||||||
lw sp, U_PCB_CONTEXT+SF_REG_SP(v0) # restore stack pointer
|
REG_L sp, U_PCB_CONTEXT+SF_REG_SP(v0) # restore stack pointer
|
||||||
la ra, sw1 # rathole to cpu_switch()
|
la ra, sw1 # rathole to cpu_switch()
|
||||||
j _C_LABEL(exit2) # proc already in a0
|
j _C_LABEL(exit2) # proc already in a0
|
||||||
sub sp, sp, CALLFRAME_SIZ #BDSlot: set stack call frame
|
sub sp, sp, CALLFRAME_SIZ #BDSlot: set stack call frame
|
||||||
|
|
Loading…
Reference in New Issue