summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorjohns <johns@cvs.openbsd.org>1998-03-01 09:05:30 +0000
committerjohns <johns@cvs.openbsd.org>1998-03-01 09:05:30 +0000
commit3a440629bf2e7c4b55a8da3dfb58948600f526e6 (patch)
treee99755b81cfa00fd3d3f59fc3e9198b81ee3f9b0 /sys/arch/sparc
parentcd3ccb7c85dd1c0f2030d9a36fca6f5f2bcccd92 (diff)
trapsignal() requires parameter five to be of type "union sigval".
gcc 2.8 will not allow us to pass in a caddr_t, changes based on Niklas' stuff in i386 trap.c
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/fpu/fpu.c14
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: