summaryrefslogtreecommitdiff
path: root/sys/arch/mac68k/mac68k/fpu.c
diff options
context:
space:
mode:
authorbriggs <briggs@cvs.openbsd.org>1996-05-26 18:14:44 +0000
committerbriggs <briggs@cvs.openbsd.org>1996-05-26 18:14:44 +0000
commitb6700f4a6dad1f781af611627f1b245f0bfcb1f2 (patch)
treeeafc30749b1b1fd3d326929c6c45a42e7c0c5050 /sys/arch/mac68k/mac68k/fpu.c
parent7aade6e6e58d423c865758a97a7ba25c54343b63 (diff)
Sync with NetBSD-current.
Diffstat (limited to 'sys/arch/mac68k/mac68k/fpu.c')
-rw-r--r--sys/arch/mac68k/mac68k/fpu.c31
1 files changed, 20 insertions, 11 deletions
diff --git a/sys/arch/mac68k/mac68k/fpu.c b/sys/arch/mac68k/mac68k/fpu.c
index 847ae46a235..c5011dbb779 100644
--- a/sys/arch/mac68k/mac68k/fpu.c
+++ b/sys/arch/mac68k/mac68k/fpu.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu.c,v 1.10 1995/08/12 04:10:37 briggs Exp $ */
+/* $NetBSD: fpu.c,v 1.15 1996/05/05 17:19:04 briggs Exp $ */
/*
* Copyright (c) 1995 Gordon W. Ross
@@ -45,18 +45,28 @@
#include <machine/cpu.h>
#include <machine/frame.h>
-#include <setjmp.h>
-
extern int fpu_type;
extern int *nofault;
-extern int matchbyname __P((struct device *, void *, void *));
+static int fpu_match __P((struct device *, void *, void *));
static void fpu_attach __P((struct device *, struct device *, void *));
static int fpu_probe __P((void));
-struct cfdriver fpucd = {
- NULL, "fpu", matchbyname, fpu_attach,
- DV_DULL, sizeof(struct device), 0 };
+struct cfattach fpu_ca = {
+ sizeof(struct device), fpu_match, fpu_attach
+};
+
+struct cfdriver fpu_cd = {
+ NULL, "fpu", DV_DULL, 0
+};
+
+static int
+fpu_match(pdp, match, auxp)
+ struct device *pdp;
+ void *match, *auxp;
+{
+ return 1;
+}
static char *fpu_descr[] = {
#ifdef FPU_EMULATE
@@ -76,7 +86,6 @@ fpu_attach(parent, self, args)
void *args;
{
char *descr;
- int enab_reg;
fpu_type = fpu_probe();
if ((0 <= fpu_type) && (fpu_type <= 2))
@@ -95,11 +104,11 @@ fpu_probe()
* We, of course, need to have enough room for either.
*/
int fpframe[60 / sizeof(int)];
- jmp_buf faultbuf;
+ label_t faultbuf;
u_char b;
nofault = (int *) &faultbuf;
- if (setjmp(faultbuf)) {
+ if (setjmp(&faultbuf)) {
nofault = (int *) 0;
return(0);
}
@@ -135,7 +144,7 @@ fpu_probe()
* Now, restore a NULL state to reset the FPU.
*/
fpframe[0] = fpframe[1] = 0;
- m68881_restore(fpframe);
+ m68881_restore((struct fpframe *) fpframe);
/*
* The size of a 68881 IDLE frame is 0x18