diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-11-19 20:13:55 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-11-19 20:13:55 +0000 |
commit | caef78a243ae42b3eac78ec5120f6fa768e82a48 (patch) | |
tree | f3b6ebe59fcdaca9dbfe67c6aaadb601368825b8 /sys/arch/mips64 | |
parent | abf7583934232cf6d4e39dd3e69eced896aa4cd2 (diff) |
Remove code allowing native binaries with O32 ABI to run, there aren't any...
Diffstat (limited to 'sys/arch/mips64')
-rw-r--r-- | sys/arch/mips64/include/exec.h | 5 | ||||
-rw-r--r-- | sys/arch/mips64/include/proc.h | 4 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/trap.c | 76 |
3 files changed, 18 insertions, 67 deletions
diff --git a/sys/arch/mips64/include/exec.h b/sys/arch/mips64/include/exec.h index 3c63f743523..bf91f90dcb3 100644 --- a/sys/arch/mips64/include/exec.h +++ b/sys/arch/mips64/include/exec.h @@ -1,4 +1,4 @@ -/* $OpenBSD: exec.h,v 1.1 2004/10/18 19:05:36 grange Exp $ */ +/* $OpenBSD: exec.h,v 1.2 2009/11/19 20:13:51 miod Exp $ */ /* * Copyright (c) 1996-2004 Per Fogelstrom, Opsycon AB @@ -62,9 +62,6 @@ #if defined(_LP64) #define _KERN_DO_ELF64 -#if defined(COMPAT_O32) -#define _KERN_DO_ELF -#endif #else #define _KERN_DO_ELF #endif diff --git a/sys/arch/mips64/include/proc.h b/sys/arch/mips64/include/proc.h index bbdd8f4a1af..587ee4be25f 100644 --- a/sys/arch/mips64/include/proc.h +++ b/sys/arch/mips64/include/proc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.h,v 1.3 2009/06/10 18:05:30 miod Exp $ */ +/* $OpenBSD: proc.h,v 1.4 2009/11/19 20:13:51 miod Exp $ */ /* * Copyright (c) 1992, 1993 @@ -57,8 +57,6 @@ struct mdproc { /* md_flags */ #define MDP_FPUSED 0x00000001 /* floating point coprocessor used */ -#define MDP_O32 0x00000002 /* Uses 32 bit syscall interface */ -#define MDP_64 0x00000004 /* Uses new 64 bit syscall interface */ #define MDP_PERF 0x00010000 /* Performance counter used */ #define MDP_WATCH1 0x00020000 /* Watch register 1 used */ #define MDP_WATCH2 0x00040000 /* Watch register 1 used */ diff --git a/sys/arch/mips64/mips64/trap.c b/sys/arch/mips64/mips64/trap.c index 95ee0ca4638..c39409c9279 100644 --- a/sys/arch/mips64/mips64/trap.c +++ b/sys/arch/mips64/mips64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.47 2009/11/18 20:58:52 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.48 2009/11/19 20:13:52 miod Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -447,24 +447,12 @@ printf("SIG-BUSB @%p pc %p, ra %p\n", trapframe->badvaddr, trapframe->pc, trapfr args.i[1] = locr0->a2; args.i[2] = locr0->a3; if (i > 3) { - if (p->p_md.md_flags & MDP_O32) { - int32_t p[5]; - - i = copyin((int32_t *)locr0->sp + 4, - p, 5 * sizeof(int32_t)); - args.i[3] = p[0]; - args.i[4] = p[1]; - args.i[5] = p[2]; - args.i[6] = p[3]; - args.i[7] = p[4]; - } else { - args.i[3] = locr0->a4; - args.i[4] = locr0->a5; - args.i[5] = locr0->a6; - args.i[6] = locr0->a7; - i = copyin((void *)locr0->sp, - &args.i[7], sizeof(register_t)); - } + args.i[3] = locr0->a4; + args.i[4] = locr0->a5; + args.i[5] = locr0->a6; + args.i[6] = locr0->a7; + i = copyin((void *)locr0->sp, + &args.i[7], sizeof(register_t)); } break; @@ -473,38 +461,17 @@ printf("SIG-BUSB @%p pc %p, ra %p\n", trapframe->badvaddr, trapframe->pc, trapfr * Like syscall, but code is a quad, so as to maintain * quad alignment for the rest of the arguments. */ - if (p->p_md.md_flags & MDP_O32) { - if (_QUAD_LOWWORD == 0) { - code = locr0->a0; - } else { - code = locr0->a1; - } - args.i[0] = locr0->a2; - args.i[1] = locr0->a3; - } else { - code = locr0->a0; - args.i[0] = locr0->a1; - args.i[1] = locr0->a2; - args.i[2] = locr0->a3; - } + 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 > 2 && p->p_md.md_flags & MDP_O32) { - int32_t p[6]; - - i = copyin((int32_t *)locr0->sp + 4, - p, 6 * sizeof(int32_t)); - args.i[2] = p[0]; - args.i[3] = p[1]; - args.i[4] = p[2]; - args.i[5] = p[3]; - args.i[6] = p[4]; - args.i[7] = p[5]; - } else if (i > 3) { + if (i > 3) { args.i[3] = locr0->a4; args.i[4] = locr0->a5; args.i[5] = locr0->a6; @@ -526,21 +493,10 @@ printf("SIG-BUSB @%p pc %p, ra %p\n", trapframe->badvaddr, trapframe->pc, trapfr args.i[2] = locr0->a2; args.i[3] = locr0->a3; if (i > 4) { - if (p->p_md.md_flags & MDP_O32) { - int32_t p[4]; - - i = copyin((int32_t *)locr0->sp + 4, - p, 4 * sizeof(int32_t)); - args.i[4] = p[0]; - args.i[5] = p[1]; - args.i[6] = p[2]; - args.i[7] = p[3]; - } else { - args.i[4] = locr0->a4; - args.i[5] = locr0->a5; - args.i[6] = locr0->a6; - args.i[7] = locr0->a7; - } + args.i[4] = locr0->a4; + args.i[5] = locr0->a5; + args.i[6] = locr0->a6; + args.i[7] = locr0->a7; } } #ifdef SYSCALL_DEBUG |