summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2001-08-30 15:26:58 +0000
committerJason Wright <jason@cvs.openbsd.org>2001-08-30 15:26:58 +0000
commita7d16317059f85fcc99953f55ddd4c717206eff6 (patch)
treec9548dba92c5ada9c0de10b295985916157dc99b
parent1ec9a9d3a9591aecd63ceb30372605d4fad3ecfa (diff)
intialize g2 and g7 in trapframe setregs from tf pc so that pc isn't set to
zero when syscall of execve returns.
-rw-r--r--sys/arch/sparc64/sparc64/machdep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c
index d79630859fe..dadaee3060f 100644
--- a/sys/arch/sparc64/sparc64/machdep.c
+++ b/sys/arch/sparc64/sparc64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.11 2001/08/24 00:05:19 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.12 2001/08/30 15:26:57 jason Exp $ */
/* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */
/*-
@@ -479,6 +479,7 @@ setregs(p, pack, stack, retval)
tf->tf_global[4] = 0;
tf->tf_pc = pack->ep_entry & ~3;
tf->tf_npc = tf->tf_pc + 4;
+ tf->tf_global[2] = tf->tf_global[7] = tf->tf_pc;
stack -= sizeof(struct rwindow);
tf->tf_out[6] = stack - STACK_OFFSET;
tf->tf_out[7] = NULL;