diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc/fpu/fpu.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/arch/sparc/fpu/fpu.c b/sys/arch/sparc/fpu/fpu.c index 9c7a7dd17d6..fbf5d7bddae 100644 --- a/sys/arch/sparc/fpu/fpu.c +++ b/sys/arch/sparc/fpu/fpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpu.c,v 1.8 1998/01/13 22:54:36 jason Exp $ */ +/* $OpenBSD: fpu.c,v 1.9 1998/03/01 09:05:29 johns Exp $ */ /* $NetBSD: fpu.c,v 1.6 1997/07/29 10:09:51 fair Exp $ */ /* @@ -111,9 +111,11 @@ fpu_cleanup(p, fs) { register int i, fsr = fs->fs_fsr, error; union instr instr; - caddr_t pc = (caddr_t)p->p_md.md_tf->tf_pc; /* XXX only approximate */ + union sigval sv; struct fpemu fe; + sv.sival_int = p->p_md.md_tf->tf_pc; /* XXX only approximate */ + switch ((fsr >> FSR_FTT_SHIFT) & FSR_FTT_MASK) { case FSR_TT_NONE: @@ -130,7 +132,7 @@ fpu_cleanup(p, fs) case FSR_TT_IEEE: if ((i = fsr & FSR_CX) == 0) panic("fpu ieee trap, but no exception"); - trapsignal(p, SIGFPE, fpu_codes[i - 1], fpu_types[i - i], pc); + trapsignal(p, SIGFPE, fpu_codes[i - 1], fpu_types[i - i], sv); break; /* XXX should return, but queue remains */ case FSR_TT_UNFIN: @@ -147,7 +149,7 @@ fpu_cleanup(p, fs) log(LOG_ERR, "fpu hardware error (%s[%d])\n", p->p_comm, p->p_pid); uprintf("%s[%d]: fpu hardware error\n", p->p_comm, p->p_pid); - trapsignal(p, SIGFPE, -1, FPE_FLTINV, pc); /* ??? */ + trapsignal(p, SIGFPE, -1, FPE_FLTINV, sv); /* ??? */ goto out; default: @@ -172,11 +174,11 @@ fpu_cleanup(p, fs) case FPE: trapsignal(p, SIGFPE, fpu_codes[(fs->fs_fsr & FSR_CX) - 1], - fpu_types[(fs->fs_fsr & FSR_CX) - 1], pc); + fpu_types[(fs->fs_fsr & FSR_CX) - 1], sv); break; case NOTFPU: - trapsignal(p, SIGILL, 0, ILL_COPROC, pc); + trapsignal(p, SIGILL, 0, ILL_COPROC, sv); break; default: |