1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

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
This commit is contained in:
Robert Drehmel 2002-11-14 17:06:01 +00:00
parent 01ee43955c
commit 7ea630865e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106918

View File

@ -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;