summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2012-08-07 19:55:58 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2012-08-07 19:55:58 +0000
commit709fbd7e42b0516b31c9becec7683058f84a7cba (patch)
tree7ea0bbd90024d87eab73eca78f93724b93a496e5
parent030f298c8382a798fd024872370231715cc325a8 (diff)
Handle __syscall as syscall, since these are identical on 64-bit platforms,
fixing an old n32-inherited bug in the process. Spotted during guenther@'s syscall factorization work.
-rw-r--r--sys/arch/mips64/mips64/trap.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/sys/arch/mips64/mips64/trap.c b/sys/arch/mips64/mips64/trap.c
index c5b73a3b3ba..5204a1996a6 100644
--- a/sys/arch/mips64/mips64/trap.c
+++ b/sys/arch/mips64/mips64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.82 2012/08/07 05:16:54 guenther Exp $ */
+/* $OpenBSD: trap.c,v 1.83 2012/08/07 19:55:57 miod Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -417,6 +417,7 @@ printf("SIG-BUSB @%p pc %p, ra %p\n", trapframe->badvaddr, trapframe->pc, trapfr
code = locr0->v0;
switch (code) {
case SYS_syscall:
+ case SYS___syscall:
/*
* Code is first argument, followed by actual args.
*/
@@ -439,33 +440,6 @@ printf("SIG-BUSB @%p pc %p, ra %p\n", trapframe->badvaddr, trapframe->pc, trapfr
goto bad;
}
break;
-
- case SYS___syscall:
- /*
- * Like syscall, but code is a quad, so as to maintain
- * quad alignment for the rest of the arguments.
- */
- code = locr0->a0;
- args.i[0] = locr0->a1;
- args.i[1] = locr0->a2;
- args.i[2] = locr0->a3;
-
- if (code >= numsys)
- callp += p->p_emul->e_nosys; /* (illegal) */
- else
- callp += code;
- i = callp->sy_argsize / sizeof(int);
- if (i > 3) {
- args.i[3] = locr0->a4;
- args.i[4] = locr0->a5;
- args.i[5] = locr0->a6;
- args.i[6] = locr0->a7;
- if ((error = copyin((void *)locr0->sp,
- &args.i[7], sizeof(register_t))))
- goto bad;
- }
- break;
-
default:
if (code >= numsys)
callp += p->p_emul->e_nosys; /* (illegal) */