Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/arch/m68k/fpe pullup 1.1->1.2 (briggs): fix FPE
details: https://anonhg.NetBSD.org/src/rev/3a2c732abd98
branches: netbsd-1-4
changeset: 468798:3a2c732abd98
user: perry <perry%NetBSD.org@localhost>
date: Mon Jun 21 15:18:10 1999 +0000
description:
pullup 1.1->1.2 (briggs): fix FPE
diffstat:
sys/arch/m68k/fpe/fpu_div.c | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
diffs (80 lines):
diff -r 810d12372563 -r 3a2c732abd98 sys/arch/m68k/fpe/fpu_div.c
--- a/sys/arch/m68k/fpe/fpu_div.c Mon Jun 21 15:17:54 1999 +0000
+++ b/sys/arch/m68k/fpe/fpu_div.c Mon Jun 21 15:18:10 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_div.c,v 1.1 1995/11/03 04:47:02 briggs Exp $ */
+/* $NetBSD: fpu_div.c,v 1.1.24.1 1999/06/21 15:18:10 perry Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -156,7 +156,7 @@
{
register struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2;
register u_int q, bit;
- register u_int r0, r1, r2, r3, d0, d1, d2, d3, y0, y1, y2, y3;
+ register u_int r0, r1, r2, d0, d1, d2, y0, y1, y2;
FPU_DECL_CARRY
fe->fe_fpsr &= ~FPSR_EXCP; /* clear all exceptions */
@@ -205,7 +205,7 @@
*/
#define SUBTRACT /* D = R - Y */ \
- FPU_SUBS(d3, r3, y3); FPU_SUBCS(d2, r2, y2); \
+ FPU_SUBS(d2, r2, y2); \
FPU_SUBCS(d1, r1, y1); FPU_SUBC(d0, r0, y0)
#define NONNEGATIVE /* D >= 0 */ \
@@ -213,12 +213,12 @@
#ifdef FPU_SHL1_BY_ADD
#define SHL1 /* R <<= 1 */ \
- FPU_ADDS(r3, r3, r3); FPU_ADDCS(r2, r2, r2); \
+ FPU_ADDS(r2, r2, r2); \
FPU_ADDCS(r1, r1, r1); FPU_ADDC(r0, r0, r0)
#else
#define SHL1 \
r0 = (r0 << 1) | (r1 >> 31), r1 = (r1 << 1) | (r2 >> 31), \
- r2 = (r2 << 1) | (r3 >> 31), r3 <<= 1
+ r2 <<= 1
#endif
#define LOOP /* do ... while (bit >>= 1) */ \
@@ -227,7 +227,7 @@
SUBTRACT; \
if (NONNEGATIVE) { \
q |= bit; \
- r0 = d0, r1 = d1, r2 = d2, r3 = d3; \
+ r0 = d0, r1 = d1, r2 = d2; \
} \
} while ((bit >>= 1) != 0)
@@ -241,17 +241,15 @@
r0 = x->fp_mant[0];
r1 = x->fp_mant[1];
r2 = x->fp_mant[2];
- r3 = x->fp_mant[3];
y0 = y->fp_mant[0];
y1 = y->fp_mant[1];
y2 = y->fp_mant[2];
- y3 = y->fp_mant[3];
bit = FP_1;
SUBTRACT;
if (NONNEGATIVE) {
x->fp_exp -= y->fp_exp;
- r0 = d0, r1 = d1, r2 = d2, r3 = d3;
+ r0 = d0, r1 = d1, r2 = d2;
q = bit;
bit >>= 1;
} else {
@@ -262,8 +260,7 @@
x->fp_mant[0] = q;
WORD(x, 1);
WORD(x, 2);
- WORD(x, 3);
- x->fp_sticky = r0 | r1 | r2 | r3;
+ x->fp_sticky = r0 | r1 | r2;
return (x);
}
Home |
Main Index |
Thread Index |
Old Index