set a0 to be the initial sp, and set pv to be program entry point.

This commit is contained in:
cgd 1996-09-10 19:13:42 +00:00
parent 65f3b15dc2
commit 0b77b04b6e

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.40 1996/08/20 23:16:27 cgd Exp $ */
/* $NetBSD: machdep.c,v 1.41 1996/09/10 19:13:42 cgd Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@ -1304,6 +1304,10 @@ setregs(p, pack, stack, retval)
tfp->tf_regs[FRAME_PS] = ALPHA_PSL_USERSET;
tfp->tf_regs[FRAME_PC] = pack->ep_entry & ~3;
tfp->tf_regs[FRAME_A0] = stack;
/* a1 and a2 already zeroed */
tfp->tf_regs[FRAME_T12] = tfp->tf_regs[FRAME_PC]; /* a.k.a. PV */
p->p_md.md_flags &= ~MDP_FPUSED;
if (fpcurproc == p)
fpcurproc = NULL;