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/aef8a995df4a
branches:  netbsd-1-4
changeset: 468808:aef8a995df4a
user:      perry <perry%NetBSD.org@localhost>
date:      Mon Jun 21 15:20:39 1999 +0000

description:
pullup 1.1->1.2 (briggs): fix FPE

diffstat:

 sys/arch/m68k/fpe/fpu_mul.c |  25 +++++++------------------
 1 files changed, 7 insertions(+), 18 deletions(-)

diffs (79 lines):

diff -r c6440ad10608 -r aef8a995df4a sys/arch/m68k/fpe/fpu_mul.c
--- a/sys/arch/m68k/fpe/fpu_mul.c       Mon Jun 21 15:20:25 1999 +0000
+++ b/sys/arch/m68k/fpe/fpu_mul.c       Mon Jun 21 15:20:39 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu_mul.c,v 1.1 1995/11/03 04:47:16 briggs Exp $ */
+/*     $NetBSD: fpu_mul.c,v 1.1.24.1 1999/06/21 15:20:39 perry Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -104,7 +104,7 @@
        register struct fpemu *fe;
 {
        register struct fpn *x = &fe->fe_f1, *y = &fe->fe_f2;
-       register u_int a3, a2, a1, a0, x3, x2, x1, x0, bit, m;
+       register u_int a2, a1, a0, x2, x1, x0, bit, m;
        register int sticky;
        FPU_DECL_CARRY
 
@@ -145,24 +145,22 @@
         * mantissa byte from y.  The variable `bit' denotes the bit
         * within m.  We also define some macros to deal with everything.
         */
-       x3 = x->fp_mant[3];
        x2 = x->fp_mant[2];
        x1 = x->fp_mant[1];
        x0 = x->fp_mant[0];
-       sticky = a3 = a2 = a1 = a0 = 0;
+       sticky = a2 = a1 = a0 = 0;
 
 #define        ADD     /* A += X */ \
-       FPU_ADDS(a3, a3, x3); \
-       FPU_ADDCS(a2, a2, x2); \
+       FPU_ADDS(a2, a2, x2); \
        FPU_ADDCS(a1, a1, x1); \
        FPU_ADDC(a0, a0, x0)
 
 #define        SHR1    /* A >>= 1, with sticky */ \
-       sticky |= a3 & 1, a3 = (a3 >> 1) | (a2 << 31), \
+       sticky |= a2 & 1, \
        a2 = (a2 >> 1) | (a1 << 31), a1 = (a1 >> 1) | (a0 << 31), a0 >>= 1
 
 #define        SHR32   /* A >>= 32, with sticky */ \
-       sticky |= a3, a3 = a2, a2 = a1, a1 = a0, a0 = 0
+       sticky |= a2, a2 = a1, a1 = a0, a0 = 0
 
 #define        STEP    /* each 1-bit step of the multiplication */ \
        SHR1; if (bit & m) { ADD; }; bit <<= 1
@@ -175,7 +173,7 @@
         * The last word of y has its highest 1-bit in position FP_NMANT-1,
         * so we stop the loop when we move past that bit.
         */
-       if ((m = y->fp_mant[3]) == 0) {
+       if ((m = y->fp_mant[2]) == 0) {
                /* SHR32; */                    /* unneeded since A==0 */
        } else {
                bit = 1 << FP_NG;
@@ -183,14 +181,6 @@
                        STEP;
                } while (bit != 0);
        }
-       if ((m = y->fp_mant[2]) == 0) {
-               SHR32;
-       } else {
-               bit = 1;
-               do {
-                       STEP;
-               } while (bit != 0);
-       }
        if ((m = y->fp_mant[1]) == 0) {
                SHR32;
        } else {
@@ -218,7 +208,6 @@
        x->fp_sign ^= y->fp_sign;
        x->fp_exp = m;
        x->fp_sticky = sticky;
-       x->fp_mant[3] = a3;
        x->fp_mant[2] = a2;
        x->fp_mant[1] = a1;
        x->fp_mant[0] = a0;



Home | Main Index | Thread Index | Old Index