summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2006-06-21 19:24:39 +0000
committerJason Wright <jason@cvs.openbsd.org>2006-06-21 19:24:39 +0000
commit5b634e84cdb0ff94cd3e1484eb9fbba54cc7a835 (patch)
tree1f288005e48807cb7d0483c09cbb4220280751e6 /sys/arch
parent3fdb32f92009b929a25182a1cc6b36061f51341d (diff)
There was hope, at one time, of sharing fpu/ with sparc. That's still
possible, but not with #ifdef SUN4U all over the place. The define should be _v9 or __sparc64__ since it will equally well apply to all v9 machines. We'll burn that bridge before we cross it.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc64/fpu/fpu.c8
-rw-r--r--sys/arch/sparc64/fpu/fpu_emu.h6
-rw-r--r--sys/arch/sparc64/fpu/fpu_explode.c8
-rw-r--r--sys/arch/sparc64/fpu/fpu_extern.h16
-rw-r--r--sys/arch/sparc64/fpu/fpu_implode.c6
5 files changed, 5 insertions, 39 deletions
diff --git a/sys/arch/sparc64/fpu/fpu.c b/sys/arch/sparc64/fpu/fpu.c
index f328d48865d..fe0b9acdd3b 100644
--- a/sys/arch/sparc64/fpu/fpu.c
+++ b/sys/arch/sparc64/fpu/fpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fpu.c,v 1.11 2006/05/14 21:58:05 kettenis Exp $ */
+/* $OpenBSD: fpu.c,v 1.12 2006/06/21 19:24:38 jason Exp $ */
/* $NetBSD: fpu.c,v 1.11 2000/12/06 01:47:50 mrg Exp $ */
/*
@@ -189,11 +189,7 @@ fpu_fcopy(src, dst, type)
void
fpu_cleanup(p, fs)
register struct proc *p;
-#ifndef SUN4U
- register struct fpstate *fs;
-#else /* SUN4U */
register struct fpstate64 *fs;
-#endif /* SUN4U */
{
register int i, fsr = fs->fs_fsr, error;
union instr instr;
@@ -222,14 +218,12 @@ fpu_cleanup(p, fs)
break; /* XXX should return, but queue remains */
case FSR_TT_UNFIN:
-#ifdef SUN4U
if (fs->fs_qsize == 0) {
printf("fpu_cleanup: unfinished fpop");
/* The book says reexecute or emulate. */
return;
}
break;
-#endif /* SUN4U */
case FSR_TT_UNIMP:
if (fs->fs_qsize == 0)
panic("fpu_cleanup: unimplemented fpop");
diff --git a/sys/arch/sparc64/fpu/fpu_emu.h b/sys/arch/sparc64/fpu/fpu_emu.h
index 23cad4fc05f..beee885c600 100644
--- a/sys/arch/sparc64/fpu/fpu_emu.h
+++ b/sys/arch/sparc64/fpu/fpu_emu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fpu_emu.h,v 1.4 2003/06/02 23:27:55 millert Exp $ */
+/* $OpenBSD: fpu_emu.h,v 1.5 2006/06/21 19:24:38 jason Exp $ */
/* $NetBSD: fpu_emu.h,v 1.4 2000/08/03 18:32:07 eeh Exp $ */
/*
@@ -136,11 +136,7 @@ struct fpn {
* Emulator state.
*/
struct fpemu {
-#ifndef SUN4U
- struct fpstate *fe_fpstate; /* registers, etc */
-#else /* SUN4U */
struct fpstate64 *fe_fpstate; /* registers, etc */
-#endif /* SUN4U */
int fe_fsr; /* fsr copy (modified during op) */
int fe_cx; /* exceptions */
struct fpn fe_f1; /* operand 1 */
diff --git a/sys/arch/sparc64/fpu/fpu_explode.c b/sys/arch/sparc64/fpu/fpu_explode.c
index e3c2fcf1b17..23ad3161b3b 100644
--- a/sys/arch/sparc64/fpu/fpu_explode.c
+++ b/sys/arch/sparc64/fpu/fpu_explode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fpu_explode.c,v 1.3 2003/06/02 23:27:55 millert Exp $ */
+/* $OpenBSD: fpu_explode.c,v 1.4 2006/06/21 19:24:38 jason Exp $ */
/* $NetBSD: fpu_explode.c,v 1.5 2000/08/03 18:32:08 eeh Exp $ */
/*
@@ -102,7 +102,6 @@ fpu_itof(fp, i)
return (FPC_NUM);
}
-#ifdef SUN4U
/*
* 64-bit int -> fpn.
*/
@@ -127,7 +126,6 @@ fpu_xtof(fp, i)
fpu_norm(fp);
return (FPC_NUM);
}
-#endif /* SUN4U */
#define mask(nbits) ((1L << (nbits)) - 1)
@@ -244,24 +242,20 @@ fpu_explode(fe, fp, type, reg)
int type, reg;
{
register u_int s, *space;
-#ifdef SUN4U
u_int64_t l, *xspace;
xspace = (u_int64_t *)&fe->fe_fpstate->fs_regs[reg & ~1];
l = xspace[0];
-#endif /* SUN4U */
space = &fe->fe_fpstate->fs_regs[reg];
s = space[0];
fp->fp_sign = s >> 31;
fp->fp_sticky = 0;
DPRINTF(FPE_INSN, ("fpu_explode: "));
switch (type) {
-#ifdef SUN4U
case FTYPE_LNG:
DPRINTF(FPE_INSN, ("LNG: %llx", l));
s = fpu_xtof(fp, l);
break;
-#endif /* SUN4U */
case FTYPE_INT:
DPRINTF(FPE_INSN, ("INT: %x", s));
diff --git a/sys/arch/sparc64/fpu/fpu_extern.h b/sys/arch/sparc64/fpu/fpu_extern.h
index 2a974f893b3..442a8ea957b 100644
--- a/sys/arch/sparc64/fpu/fpu_extern.h
+++ b/sys/arch/sparc64/fpu/fpu_extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fpu_extern.h,v 1.4 2002/08/03 15:22:06 jason Exp $ */
+/* $OpenBSD: fpu_extern.h,v 1.5 2006/06/21 19:24:38 jason Exp $ */
/* $NetBSD: fpu_extern.h,v 1.4 2000/08/03 18:32:08 eeh Exp $ */
/*-
@@ -38,25 +38,15 @@
*/
struct proc;
-#ifndef SUN4U
-struct fpstate;
-struct trapframe;
-#else /* SUN4U */
struct fpstate64;
struct trapframe64;
-#endif /* SUN4U */
union instr;
struct fpemu;
struct fpn;
/* fpu.c */
-#ifndef SUN4U
-void fpu_cleanup(struct proc *, struct fpstate *);
-int fpu_emulate(struct proc *, struct trapframe *, struct fpstate *);
-#else /* SUN4U */
void fpu_cleanup(struct proc *, struct fpstate64 *);
int fpu_emulate(struct proc *, struct trapframe64 *, struct fpstate64 *);
-#endif /* SUN4U */
int fpu_execute(struct proc *, struct fpemu *, union instr);
/* fpu_add.c */
@@ -70,9 +60,7 @@ struct fpn *fpu_div(struct fpemu *);
/* fpu_explode.c */
int fpu_itof(struct fpn *, u_int);
-#ifdef SUN4U
int fpu_xtof(struct fpn *, u_int64_t);
-#endif /* SUN4U */
int fpu_stof(struct fpn *, u_int);
int fpu_dtof(struct fpn *, u_int, u_int );
int fpu_qtof(struct fpn *, u_int, u_int , u_int , u_int );
@@ -80,9 +68,7 @@ void fpu_explode(struct fpemu *, struct fpn *, int, int );
/* fpu_implode.c */
u_int fpu_ftoi(struct fpemu *, struct fpn *);
-#ifdef SUN4U
u_int fpu_ftox(struct fpemu *, struct fpn *, u_int *);
-#endif /* SUN4U */
u_int fpu_ftos(struct fpemu *, struct fpn *);
u_int fpu_ftod(struct fpemu *, struct fpn *, u_int *);
u_int fpu_ftoq(struct fpemu *, struct fpn *, u_int *);
diff --git a/sys/arch/sparc64/fpu/fpu_implode.c b/sys/arch/sparc64/fpu/fpu_implode.c
index 68b9d726969..c693bfef777 100644
--- a/sys/arch/sparc64/fpu/fpu_implode.c
+++ b/sys/arch/sparc64/fpu/fpu_implode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fpu_implode.c,v 1.5 2003/06/02 23:27:55 millert Exp $ */
+/* $OpenBSD: fpu_implode.c,v 1.6 2006/06/21 19:24:38 jason Exp $ */
/* $NetBSD: fpu_implode.c,v 1.7 2000/08/03 18:32:08 eeh Exp $ */
/*
@@ -230,7 +230,6 @@ fpu_ftoi(fe, fp)
return (0x7fffffff + sign);
}
-#ifdef SUN4U
/*
* fpn -> extended int (high bits of int value returned as return value).
*
@@ -286,7 +285,6 @@ out:
res[1] = i & 0xffffffff;
return (i >> 32);
}
-#endif /* SUN4U */
/*
* fpn -> single (32 bit single returned as return value).
@@ -507,12 +505,10 @@ fpu_implode(fe, fp, type, space)
DPRINTF(FPE_INSN, ("fpu_implode: "));
switch (type) {
-#ifdef SUN4U
case FTYPE_LNG:
space[0] = fpu_ftox(fe, fp, space);
DPRINTF(FPE_INSN, ("LNG %x %x\n", space[0], space[1]));
break;
-#endif /* SUN4U */
case FTYPE_INT:
space[0] = fpu_ftoi(fe, fp);