Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/arch make sure the infinity returned by HUGE_VALL h...



details:   https://anonhg.NetBSD.org/src/rev/b5d369b65158
branches:  trunk
changeset: 765805:b5d369b65158
user:      drochner <drochner%NetBSD.org@localhost>
date:      Mon Jun 06 17:02:29 2011 +0000

description:
make sure the infinity returned by HUGE_VALL has the "implicit"
bit set, otherwise it is invalid
This code is unlikely to be hit because gcc (and clang) use
their builtins for these special values.

diffstat:

 lib/libc/arch/i386/gen/infinityl.c   |  6 +++---
 lib/libc/arch/x86_64/gen/infinityl.c |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (44 lines):

diff -r 566005fa9e7e -r b5d369b65158 lib/libc/arch/i386/gen/infinityl.c
--- a/lib/libc/arch/i386/gen/infinityl.c        Mon Jun 06 16:52:18 2011 +0000
+++ b/lib/libc/arch/i386/gen/infinityl.c        Mon Jun 06 17:02:29 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: infinityl.c,v 1.3 2011/04/06 21:55:36 christos Exp $   */
+/*     $NetBSD: infinityl.c,v 1.4 2011/06/06 17:02:30 drochner Exp $   */
 
 /*
  * IEEE-compatible infinityl.c for little-endian 80-bit format -- public domain.
@@ -7,10 +7,10 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: infinityl.c,v 1.3 2011/04/06 21:55:36 christos Exp $");
+__RCSID("$NetBSD: infinityl.c,v 1.4 2011/06/06 17:02:30 drochner Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <math.h>
 
 const union __long_double_u __infinityl =
-       { { 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0x7f, 0, 0 } };
+       { { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 } };
diff -r 566005fa9e7e -r b5d369b65158 lib/libc/arch/x86_64/gen/infinityl.c
--- a/lib/libc/arch/x86_64/gen/infinityl.c      Mon Jun 06 16:52:18 2011 +0000
+++ b/lib/libc/arch/x86_64/gen/infinityl.c      Mon Jun 06 17:02:29 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: infinityl.c,v 1.3 2011/04/10 13:51:18 christos Exp $   */
+/*     $NetBSD: infinityl.c,v 1.4 2011/06/06 17:02:29 drochner Exp $   */
 
 /*
  * IEEE-compatible infinityl.c for little-endian 80-bit format -- public domain.
@@ -7,10 +7,10 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: infinityl.c,v 1.3 2011/04/10 13:51:18 christos Exp $");
+__RCSID("$NetBSD: infinityl.c,v 1.4 2011/06/06 17:02:29 drochner Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <math.h>
 
 const union __long_double_u __infinityl =
-       { { 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0x7f, 0, 0, 0, 0, 0, 0 } };
+       { { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0, 0, 0, 0, 0 } };



Home | Main Index | Thread Index | Old Index