This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Followup on i386 vs. m68k floating point crap
- To: egcs at cygnus dot com, rth at cygnus dot com
- Subject: Followup on i386 vs. m68k floating point crap
- From: "Charles M. Hannum" <root at ihack dot net>
- Date: Sun, 27 Sep 1998 00:45:14 -0400 (EDT)
`So I was bored.'
If you compare figure 1-12 in the `M68000 Family Programmer's
Reference Manual' and figure 6-11 in the `Pentium Processor Reference
Manual, Vol 3', you'll see that the two extended-precision formats
really are the same. Or at least they look that way.
It turns out there's a difference in underflow handling.
On the i387, all positive extended-precision values below 2^-16382 are
represented with a biased exponent of 0 and an integer bit of 0;
i.e. they are denormalized. Numbers with a biased exponent of 0 and
the integer bit set to 1 are undefined.
On the m68882, extended-precision numbers with an exponent of 0 and
the integer bit set to 1 are valid, and are consider normalized.
Thus, on the i387, the smallest normalized number is 2^-16382, whereas
on the m68882 it's 2^-16383.
I believe the i387 behaviour is actually the correct one according to
IEEE 854, but that's sort of a moot point.
So, I retract my previous comment. Your include files are correct.
B-)