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 Fix sign of zero in case of x > -(2^18).
details: https://anonhg.NetBSD.org/src/rev/61fd127ac37b
branches: trunk
changeset: 349336:61fd127ac37b
user: isaki <isaki%NetBSD.org@localhost>
date: Wed Dec 07 11:27:18 2016 +0000
description:
Fix sign of zero in case of x > -(2^18).
# By the way, I will modify this case later.
diffstat:
sys/arch/m68k/fpe/fpu_exp.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (33 lines):
diff -r 6c8a0c0575a6 -r 61fd127ac37b sys/arch/m68k/fpe/fpu_exp.c
--- a/sys/arch/m68k/fpe/fpu_exp.c Wed Dec 07 10:03:29 2016 +0000
+++ b/sys/arch/m68k/fpe/fpu_exp.c Wed Dec 07 11:27:18 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_exp.c,v 1.9 2016/12/05 15:31:01 isaki Exp $ */
+/* $NetBSD: fpu_exp.c,v 1.10 2016/12/07 11:27:18 isaki Exp $ */
/*
* Copyright (c) 1995 Ken Nakata
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_exp.c,v 1.9 2016/12/05 15:31:01 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_exp.c,v 1.10 2016/12/07 11:27:18 isaki Exp $");
#include <machine/ieee.h>
@@ -136,10 +136,12 @@
/* extract k as integer format from fpn format */
j = FP_LG - fp->fp_exp;
if (j < 0) {
- if (fp->fp_sign)
+ if (fp->fp_sign) {
fp->fp_class = FPC_ZERO; /* k < -2^18 */
- else
+ fp->fp_sign = 0;
+ } else {
fp->fp_class = FPC_INF; /* k > 2^18 */
+ }
return fp;
}
k = fp->fp_mant[0] >> j;
Home |
Main Index |
Thread Index |
Old Index