diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-02-04 23:42:47 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-02-04 23:42:47 +0000 |
commit | c55d56a0850535e259938812f88b4e4b7a269d2f (patch) | |
tree | b60e1c89be0b429193da94120925c3655fd1f871 /sys | |
parent | 20f0df5e2850d4ed7f0742a2e53ff737eb2533c6 (diff) |
provide fpe fault addr; thanks for help from torek@bsdi.com
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc/fpu/fpu.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/sparc/fpu/fpu.c b/sys/arch/sparc/fpu/fpu.c index dd634891240..6a502402613 100644 --- a/sys/arch/sparc/fpu/fpu.c +++ b/sys/arch/sparc/fpu/fpu.c @@ -110,6 +110,7 @@ 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 */ struct fpemu fe; switch ((fsr >> FSR_FTT_SHIFT) & FSR_FTT_MASK) { @@ -119,10 +120,9 @@ fpu_cleanup(p, fs) break; case FSR_TT_IEEE: - /* XXX missing trap address! */ if ((i = fsr & FSR_CX) == 0) panic("fpu ieee trap, but no exception"); - trapsignal(p, SIGFPE, fpu_codes[i - 1], fpu_types[i - i], 0); + trapsignal(p, SIGFPE, fpu_codes[i - 1], fpu_types[i - i], pc); break; /* XXX should return, but queue remains */ case FSR_TT_UNFIN: @@ -139,7 +139,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, 0); /* ??? */ + trapsignal(p, SIGFPE, -1, FPE_FLTINV, pc); /* ??? */ goto out; default: @@ -164,11 +164,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], 0); + fpu_types[(fs->fs_fsr & FSR_CX) - 1], pc); break; case NOTFPU: - trapsignal(p, SIGILL, 0, ILL_COPROC, 0); + trapsignal(p, SIGILL, 0, ILL_COPROC, pc); break; default: |