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 FLOGNP1(-0.0) is -0.0, not +0.0. Found by...
details: https://anonhg.NetBSD.org/src/rev/7eda764fd65b
branches: trunk
changeset: 325726:7eda764fd65b
user: isaki <isaki%NetBSD.org@localhost>
date: Sat Jan 04 13:23:22 2014 +0000
description:
FLOGNP1(-0.0) is -0.0, not +0.0. Found by XM6i.
diffstat:
sys/arch/m68k/fpe/fpu_log.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 8882fc4d6d08 -r 7eda764fd65b sys/arch/m68k/fpe/fpu_log.c
--- a/sys/arch/m68k/fpe/fpu_log.c Sat Jan 04 12:36:49 2014 +0000
+++ b/sys/arch/m68k/fpe/fpu_log.c Sat Jan 04 13:23:22 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_log.c,v 1.17 2013/04/20 05:27:05 isaki Exp $ */
+/* $NetBSD: fpu_log.c,v 1.18 2014/01/04 13:23:22 isaki Exp $ */
/*
* Copyright (c) 1995 Ken Nakata
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_log.c,v 1.17 2013/04/20 05:27:05 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_log.c,v 1.18 2014/01/04 13:23:22 isaki Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@@ -593,6 +593,10 @@
{
struct fpn *fp;
+ /* if src is +0/-0, return +0/-0 */
+ if (ISZERO(&fe->fe_f2))
+ return &fe->fe_f2;
+
/* build a 1.0 */
fp = fpu_const(&fe->fe_f1, FPU_CONST_1);
/* fp = 1.0 + f2 */
Home |
Main Index |
Thread Index |
Old Index