Build COMPAT_LINUX again on mips after the siginfo change.

This commit is contained in:
manu 2004-06-19 18:45:30 +00:00
parent e89e654031
commit b2563527a8
1 changed files with 24 additions and 24 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_machdep.c,v 1.20 2003/12/04 19:38:22 atatat Exp $ */
/* $NetBSD: linux_machdep.c,v 1.21 2004/06/19 18:45:30 manu Exp $ */
/*-
* Copyright (c) 1995, 2000, 2001 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.20 2003/12/04 19:38:22 atatat Exp $");
__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.21 2004/06/19 18:45:30 manu Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -121,11 +121,11 @@ linux_setregs(l, pack, stack)
*/
void
linux_sendsig(sig, mask, code) /* XXX Check me */
int sig;
linux_sendsig(ksi, mask)
const ksiginfo_t *ksi;
const sigset_t *mask;
u_long code;
{
const int sig = ksi->ksi_signo;
struct lwp *l = curlwp;
struct proc *p = l->l_proc;
struct linux_sigframe *fp;
@ -161,7 +161,7 @@ linux_sendsig(sig, mask, code) /* XXX Check me */
+ p->p_sigctx.ps_sigstk.ss_size);
else
/* cast for _MIPS_BSD_API == _MIPS_BSD_API_LP32_64CLEAN case */
fp = (struct linux_sigframe *)(u_int32_t)f->f_regs[SP];
fp = (struct linux_sigframe *)(u_int32_t)f->f_regs[_R_SP];
/*
* Build stack frame for signal trampoline.
@ -179,12 +179,12 @@ linux_sendsig(sig, mask, code) /* XXX Check me */
for (i=0; i<32; i++) {
sf.lsf_sc.lsc_regs[i] = f->f_regs[i];
}
sf.lsf_sc.lsc_mdhi = f->f_regs[MULHI];
sf.lsf_sc.lsc_mdlo = f->f_regs[MULLO];
sf.lsf_sc.lsc_pc = f->f_regs[PC];
sf.lsf_sc.lsc_status = f->f_regs[SR];
sf.lsf_sc.lsc_cause = f->f_regs[CAUSE];
sf.lsf_sc.lsc_badvaddr = f->f_regs[BADVADDR];
sf.lsf_sc.lsc_mdhi = f->f_regs[_R_MULHI];
sf.lsf_sc.lsc_mdlo = f->f_regs[_R_MULLO];
sf.lsf_sc.lsc_pc = f->f_regs[_R_PC];
sf.lsf_sc.lsc_status = f->f_regs[_R_SR];
sf.lsf_sc.lsc_cause = f->f_regs[_R_CAUSE];
sf.lsf_sc.lsc_badvaddr = f->f_regs[_R_BADVADDR];
/*
* Save signal stack. XXX broken
@ -208,19 +208,19 @@ linux_sendsig(sig, mask, code) /* XXX Check me */
}
/* Set up the registers to return to sigcode. */
f->f_regs[A0] = native_to_linux_signo[sig];
f->f_regs[A1] = 0;
f->f_regs[A2] = (unsigned long)&fp->lsf_sc;
f->f_regs[_R_A0] = native_to_linux_signo[sig];
f->f_regs[_R_A1] = 0;
f->f_regs[_R_A2] = (unsigned long)&fp->lsf_sc;
#ifdef DEBUG_LINUX
printf("sigcontext is at %p\n", &fp->lsf_sc);
#endif /* DEBUG_LINUX */
f->f_regs[SP] = (unsigned long)fp;
f->f_regs[_R_SP] = (unsigned long)fp;
/* Signal trampoline code is at base of user stack. */
f->f_regs[RA] = (unsigned long)p->p_sigctx.ps_sigcode;
f->f_regs[T9] = (unsigned long)catcher;
f->f_regs[PC] = (unsigned long)catcher;
f->f_regs[_R_RA] = (unsigned long)p->p_sigctx.ps_sigcode;
f->f_regs[_R_T9] = (unsigned long)catcher;
f->f_regs[_R_PC] = (unsigned long)catcher;
/* Remember that we're now on the signal stack. */
if (onstack)
@ -267,11 +267,11 @@ linux_sys_sigreturn(l, v, retval)
f = (struct frame *)l->l_md.md_regs;
for (i=0; i<32; i++)
f->f_regs[i] = ksf.lsf_sc.lsc_regs[i];
f->f_regs[MULLO] = ksf.lsf_sc.lsc_mdlo;
f->f_regs[MULHI] = ksf.lsf_sc.lsc_mdhi;
f->f_regs[PC] = ksf.lsf_sc.lsc_pc;
f->f_regs[BADVADDR] = ksf.lsf_sc.lsc_badvaddr;
f->f_regs[CAUSE] = ksf.lsf_sc.lsc_cause;
f->f_regs[_R_MULLO] = ksf.lsf_sc.lsc_mdlo;
f->f_regs[_R_MULHI] = ksf.lsf_sc.lsc_mdhi;
f->f_regs[_R_PC] = ksf.lsf_sc.lsc_pc;
f->f_regs[_R_BADVADDR] = ksf.lsf_sc.lsc_badvaddr;
f->f_regs[_R_CAUSE] = ksf.lsf_sc.lsc_cause;
/* Restore signal stack. */
p->p_sigctx.ps_sigstk.ss_flags &= ~SS_ONSTACK;