diff options
author | robert <robert@FreeBSD.org> | 2002-11-14 17:06:01 +0000 |
---|---|---|
committer | robert <robert@FreeBSD.org> | 2002-11-14 17:06:01 +0000 |
commit | 1b5855b59733445585fc8985b8c7e4a44c21a3d7 (patch) | |
tree | 13af17f952c65e5e15a400ebd88825bfe8543e01 /lib/libc | |
parent | 6bce41dbe0c44950686bd7b136c004e7130f9dd6 (diff) | |
download | FreeBSD-src-1b5855b59733445585fc8985b8c7e4a44c21a3d7.zip FreeBSD-src-1b5855b59733445585fc8985b8c7e4a44c21a3d7.tar.gz |
Define `Sudden_Underflow' when compiling for the Alpha
architecture, mainly to avoid getting a SIGFPE signal sent
when calling strtod(3) with certain input.
The SIGFPE has been sent because the code was not aware that
a Gradual Underflow is handled in software via traps on the
Alpha architecture, but is not implemented in our Alpha kernel
layer.
With `Sudden_Underflow' defined, strtod(3) should not depend
on Gradual Underflow and adjust its calculations accordingly,
which means that other, more subtle errors than the sending of
SIGFPE could be solved by this.
Discussed with: bde
PR: alpha/12623
PR: alpha/17032
PR: alpha/43567
MFC after: 7 days
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/stdlib/strtod.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libc/stdlib/strtod.c b/lib/libc/stdlib/strtod.c index 62f8f2a..d1a0b21 100644 --- a/lib/libc/stdlib/strtod.c +++ b/lib/libc/stdlib/strtod.c @@ -127,6 +127,9 @@ __FBSDID("$FreeBSD$"); #else #define IEEE_LITTLE_ENDIAN #endif +#if defined(__alpha__) +#define Sudden_Underflow +#endif #endif /* defined(__i386__) ... */ typedef int32_t Long; |