Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/m68k/fpe Terminate a loop in EXT_FRACBITS(64bits) i...



details:   https://anonhg.NetBSD.org/src/rev/cf076c661a66
branches:  trunk
changeset: 786214:cf076c661a66
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat Apr 20 04:54:22 2013 +0000

description:
Terminate a loop in EXT_FRACBITS(64bits) instead of FP_NMANT(83bits).
I don't know why the mantissa of the accumulator is 83bits, but 64bits
or more are not affected.

diffstat:

 sys/arch/m68k/fpe/fpu_exp.c    |  8 +++++---
 sys/arch/m68k/fpe/fpu_hyperb.c |  8 +++++---
 2 files changed, 10 insertions(+), 6 deletions(-)

diffs (58 lines):

diff -r ae664ea46f92 -r cf076c661a66 sys/arch/m68k/fpe/fpu_exp.c
--- a/sys/arch/m68k/fpe/fpu_exp.c       Sat Apr 20 04:38:51 2013 +0000
+++ b/sys/arch/m68k/fpe/fpu_exp.c       Sat Apr 20 04:54:22 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu_exp.c,v 1.7 2013/04/20 04:38:51 isaki Exp $        */
+/*     $NetBSD: fpu_exp.c,v 1.8 2013/04/20 04:54:22 isaki Exp $        */
 
 /*
  * Copyright (c) 1995  Ken Nakata
@@ -32,7 +32,9 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_exp.c,v 1.7 2013/04/20 04:38:51 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_exp.c,v 1.8 2013/04/20 04:54:22 isaki Exp $");
+
+#include <machine/ieee.h>
 
 #include "fpu_emulate.h"
 
@@ -80,7 +82,7 @@
                /* break if s1 is enough small */
                if (ISZERO(s1))
                        break;
-               if (res.fp_exp - s1->fp_exp >= FP_NMANT)
+               if (res.fp_exp - s1->fp_exp >= EXT_FRACBITS)
                        break;
 
                /* s0 := s1 for next loop */
diff -r ae664ea46f92 -r cf076c661a66 sys/arch/m68k/fpe/fpu_hyperb.c
--- a/sys/arch/m68k/fpe/fpu_hyperb.c    Sat Apr 20 04:38:51 2013 +0000
+++ b/sys/arch/m68k/fpe/fpu_hyperb.c    Sat Apr 20 04:54:22 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu_hyperb.c,v 1.11 2013/04/20 04:38:51 isaki Exp $    */
+/*     $NetBSD: fpu_hyperb.c,v 1.12 2013/04/20 04:54:22 isaki Exp $    */
 
 /*
  * Copyright (c) 1995  Ken Nakata
@@ -57,7 +57,9 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_hyperb.c,v 1.11 2013/04/20 04:38:51 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_hyperb.c,v 1.12 2013/04/20 04:54:22 isaki Exp $");
+
+#include <machine/ieee.h>
 
 #include "fpu_emulate.h"
 
@@ -180,7 +182,7 @@
                /* break if s1 is enough small */
                if (ISZERO(s1))
                        break;
-               if (res.fp_exp - s1->fp_exp >= FP_NMANT)
+               if (res.fp_exp - s1->fp_exp >= EXT_FRACBITS)
                        break;
 
                /* s0 := s1 for next loop */



Home | Main Index | Thread Index | Old Index