Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch Revert previous and make frach be 0xc0000000 f...
details: https://anonhg.NetBSD.org/src/rev/1b6151d3febf
branches: trunk
changeset: 765765:1b6151d3febf
user: christos <christos%NetBSD.org@localhost>
date: Sun Jun 05 14:43:12 2011 +0000
description:
Revert previous and make frach be 0xc0000000 for NAN's generated by strtold()
as suggested by tron.
diffstat:
lib/libc/arch/i386/gdtoa/gd_qnan.h | 4 ++--
lib/libc/arch/i386/gen/isnanl.c | 9 +++++----
lib/libc/arch/x86_64/gdtoa/gd_qnan.h | 4 ++--
lib/libc/arch/x86_64/gen/isnanl.c | 9 +++++----
4 files changed, 14 insertions(+), 12 deletions(-)
diffs (90 lines):
diff -r 0561ee2b0be3 -r 1b6151d3febf lib/libc/arch/i386/gdtoa/gd_qnan.h
--- a/lib/libc/arch/i386/gdtoa/gd_qnan.h Sun Jun 05 14:13:53 2011 +0000
+++ b/lib/libc/arch/i386/gdtoa/gd_qnan.h Sun Jun 05 14:43:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gd_qnan.h,v 1.1 2006/01/25 15:33:28 kleink Exp $ */
+/* $NetBSD: gd_qnan.h,v 1.2 2011/06/05 14:43:12 christos Exp $ */
#define f_QNAN 0x7fc00000
#define d_QNAN0 0x0
@@ -6,6 +6,6 @@
#define ldus_QNAN0 0x0
#define ldus_QNAN1 0x0
#define ldus_QNAN2 0x0
-#define ldus_QNAN3 0x4000
+#define ldus_QNAN3 0xc000
#define ldus_QNAN4 0x7fff
/* 2 bytes of tail padding follow, per i386 ABI */
diff -r 0561ee2b0be3 -r 1b6151d3febf lib/libc/arch/i386/gen/isnanl.c
--- a/lib/libc/arch/i386/gen/isnanl.c Sun Jun 05 14:13:53 2011 +0000
+++ b/lib/libc/arch/i386/gen/isnanl.c Sun Jun 05 14:43:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isnanl.c,v 1.7 2011/06/04 15:45:41 christos Exp $ */
+/* $NetBSD: isnanl.c,v 1.8 2011/06/05 14:43:13 christos Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)isinf.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: isnanl.c,v 1.7 2011/06/04 15:45:41 christos Exp $");
+__RCSID("$NetBSD: isnanl.c,v 1.8 2011/06/05 14:43:13 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -58,6 +58,7 @@
u.extu_ld = x;
- return u.extu_ext.ext_exp == EXT_EXP_INFNAN &&
- (u.extu_ext.ext_frach != 0 || u.extu_ext.ext_fracl != 0);
+ return (u.extu_ext.ext_exp == EXT_EXP_INFNAN &&
+ (u.extu_ext.ext_frach & 0x80000000) != 0 &&
+ (u.extu_ext.ext_frach != 0x80000000 || u.extu_ext.ext_fracl != 0));
}
diff -r 0561ee2b0be3 -r 1b6151d3febf lib/libc/arch/x86_64/gdtoa/gd_qnan.h
--- a/lib/libc/arch/x86_64/gdtoa/gd_qnan.h Sun Jun 05 14:13:53 2011 +0000
+++ b/lib/libc/arch/x86_64/gdtoa/gd_qnan.h Sun Jun 05 14:43:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gd_qnan.h,v 1.2 2011/03/20 23:16:07 christos Exp $ */
+/* $NetBSD: gd_qnan.h,v 1.3 2011/06/05 14:43:13 christos Exp $ */
#define f_QNAN 0x7fc00000
#define d_QNAN0 0x0
@@ -10,6 +10,6 @@
#define ldus_QNAN0 0x0
#define ldus_QNAN1 0x0
#define ldus_QNAN2 0x0
-#define ldus_QNAN3 0x4000
+#define ldus_QNAN3 0xc000
#define ldus_QNAN4 0x7fff
/* 6 bytes of tail padding follow, per AMD64 ABI */
diff -r 0561ee2b0be3 -r 1b6151d3febf lib/libc/arch/x86_64/gen/isnanl.c
--- a/lib/libc/arch/x86_64/gen/isnanl.c Sun Jun 05 14:13:53 2011 +0000
+++ b/lib/libc/arch/x86_64/gen/isnanl.c Sun Jun 05 14:43:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isnanl.c,v 1.7 2011/06/04 15:45:41 christos Exp $ */
+/* $NetBSD: isnanl.c,v 1.8 2011/06/05 14:43:13 christos Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)isinf.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: isnanl.c,v 1.7 2011/06/04 15:45:41 christos Exp $");
+__RCSID("$NetBSD: isnanl.c,v 1.8 2011/06/05 14:43:13 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -58,6 +58,7 @@
u.extu_ld = x;
- return u.extu_ext.ext_exp == EXT_EXP_INFNAN &&
- (u.extu_ext.ext_frach != 0 || u.extu_ext.ext_fracl != 0);
+ return (u.extu_ext.ext_exp == EXT_EXP_INFNAN &&
+ (u.extu_ext.ext_frach & 0x80000000) != 0 &&
+ (u.extu_ext.ext_frach != 0x80000000 || u.extu_ext.ext_fracl != 0));
}
Home |
Main Index |
Thread Index |
Old Index