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.diff -r1.3 -r1.4 src/lib/libc/arch/i386/gen/infinityl.c
(drochner)
--- src/lib/libc/arch/i386/gen/infinityl.c 2011/04/06 21:55:36 1.3
+++ src/lib/libc/arch/i386/gen/infinityl.c 2011/06/06 17:02:30 1.4
@@ -1,16 +1,16 @@ | @@ -1,16 +1,16 @@ | |||
1 | /* $NetBSD: infinityl.c,v 1.3 2011/04/06 21:55:36 christos Exp $ */ | 1 | /* $NetBSD: infinityl.c,v 1.4 2011/06/06 17:02:30 drochner Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * IEEE-compatible infinityl.c for little-endian 80-bit format -- public domain. | 4 | * IEEE-compatible infinityl.c for little-endian 80-bit format -- public domain. | |
5 | * Note that the representation includes 16 bits of tail padding per i386 ABI. | 5 | * Note that the representation includes 16 bits of tail padding per i386 ABI. | |
6 | */ | 6 | */ | |
7 | 7 | |||
8 | #include <sys/cdefs.h> | 8 | #include <sys/cdefs.h> | |
9 | #if defined(LIBC_SCCS) && !defined(lint) | 9 | #if defined(LIBC_SCCS) && !defined(lint) | |
10 | __RCSID("$NetBSD: infinityl.c,v 1.3 2011/04/06 21:55:36 christos Exp $"); | 10 | __RCSID("$NetBSD: infinityl.c,v 1.4 2011/06/06 17:02:30 drochner Exp $"); | |
11 | #endif /* LIBC_SCCS and not lint */ | 11 | #endif /* LIBC_SCCS and not lint */ | |
12 | 12 | |||
13 | #include <math.h> | 13 | #include <math.h> | |
14 | 14 | |||
15 | const union __long_double_u __infinityl = | 15 | const union __long_double_u __infinityl = | |
16 | { { 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0x7f, 0, 0 } }; | 16 | { { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 } }; |
--- src/lib/libc/arch/x86_64/gen/infinityl.c 2011/04/10 13:51:18 1.3
+++ src/lib/libc/arch/x86_64/gen/infinityl.c 2011/06/06 17:02:29 1.4
@@ -1,16 +1,16 @@ | @@ -1,16 +1,16 @@ | |||
1 | /* $NetBSD: infinityl.c,v 1.3 2011/04/10 13:51:18 christos Exp $ */ | 1 | /* $NetBSD: infinityl.c,v 1.4 2011/06/06 17:02:29 drochner Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * IEEE-compatible infinityl.c for little-endian 80-bit format -- public domain. | 4 | * IEEE-compatible infinityl.c for little-endian 80-bit format -- public domain. | |
5 | * Note that the representation includes 48 bits of tail padding per amd64 ABI. | 5 | * Note that the representation includes 48 bits of tail padding per amd64 ABI. | |
6 | */ | 6 | */ | |
7 | 7 | |||
8 | #include <sys/cdefs.h> | 8 | #include <sys/cdefs.h> | |
9 | #if defined(LIBC_SCCS) && !defined(lint) | 9 | #if defined(LIBC_SCCS) && !defined(lint) | |
10 | __RCSID("$NetBSD: infinityl.c,v 1.3 2011/04/10 13:51:18 christos Exp $"); | 10 | __RCSID("$NetBSD: infinityl.c,v 1.4 2011/06/06 17:02:29 drochner Exp $"); | |
11 | #endif /* LIBC_SCCS and not lint */ | 11 | #endif /* LIBC_SCCS and not lint */ | |
12 | 12 | |||
13 | #include <math.h> | 13 | #include <math.h> | |
14 | 14 | |||
15 | const union __long_double_u __infinityl = | 15 | const union __long_double_u __infinityl = | |
16 | { { 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0x7f, 0, 0, 0, 0, 0, 0 } }; | 16 | { { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0, 0, 0, 0, 0 } }; |