diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-12-19 00:46:22 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-12-19 00:46:22 +0000 |
commit | 99bbda49e05021a1d49959bc718ff27b571fc232 (patch) | |
tree | 8e864b7405c9b876ce526829827cb3f147b0cb2f /sys/arch | |
parent | a541134ec51668693d86e7d16c5baa22da12b450 (diff) |
setregs: put the whole frame setup into one place
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hppa/hppa/machdep.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c index 4f38ff76ff3..97aa80b8f41 100644 --- a/sys/arch/hppa/hppa/machdep.c +++ b/sys/arch/hppa/hppa/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.92 2002/12/19 00:41:20 mickey Exp $ */ +/* $OpenBSD: machdep.c,v 1.93 2002/12/19 00:46:21 mickey Exp $ */ /* * Copyright (c) 1999-2002 Michael Shalayeff @@ -1178,7 +1178,6 @@ setregs(p, pack, stack, retval) p, pack, stack, retval, pack->ep_entry, tf->tf_cr30); */ #endif - tf->tf_flags = TFF_SYS|TFF_LAST; tf->tf_iioq_tail = 4 + (tf->tf_iioq_head = pack->ep_entry | HPPA_PC_PRIV_USER); @@ -1186,6 +1185,13 @@ setregs(p, pack, stack, retval) tf->tf_arg0 = (u_long)PS_STRINGS; tf->tf_arg1 = tf->tf_arg2 = 0; /* XXX dynload stuff */ + /* setup terminal stack frame */ + stack = hppa_round_page(stack); + tf->tf_r3 = stack; + tf->tf_sp = stack += HPPA_FRAME_SIZE; + suword((caddr_t)(stack - HPPA_FRAME_SIZE), 0); + suword((caddr_t)(stack + HPPA_FRAME_CRP), 0); + /* reset any of the pending FPU exceptions */ pcb->pcb_fpregs[0] = ((u_int64_t)HPPA_FPU_INIT) << 32; pcb->pcb_fpregs[1] = 0; @@ -1198,14 +1204,6 @@ setregs(p, pack, stack, retval) mtctl(0, CR_CCR); } - /* setup terminal stack frame */ - stack = hppa_round_page(stack); - tf->tf_r3 = stack; - suword((caddr_t)(stack), 0); - stack += HPPA_FRAME_SIZE; - suword((caddr_t)(stack + HPPA_FRAME_CRP), 0); - tf->tf_sp = stack; - retval[1] = 0; } |