This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: IEEE extended real formats
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 15 Jun 2004 00:04:49 -0400
- Subject: Re: IEEE extended real formats
- References: <873c4x32cz.fsf@taltos.codesourcery.com>
Zack Weinberg <zack@codesourcery.com> writes:
> (Motorola) SEEE 0000 MMMM MMMM MMMM MMMM (big-endian)
> MMMM MMMM MMMM MMMM 0000 EEES (little-endian)
Note that there is no little endian case for m68k.
> (Intel 96) SEEE 0000 MMMM MMMM MMMM MMMM (big)
> MMMM MMMM MMMM MMMM 0000 EEES (little)
I don't think that's right. The code at the end of
encode_ieee_extended() is this:
if (FLOAT_WORDS_BIG_ENDIAN)
buf[0] = image_hi << 16, buf[1] = sig_hi, buf[2] = sig_lo;
else
buf[0] = sig_lo, buf[1] = sig_hi, buf[2] = image_hi;
Big endian is the m68k case, with the gap between the mantissa and the
exponent (caused by the << 16). In the little endian case, which is
the x86, there is no such gap. I think the bit pattern comes out like
this:
(Intel 96) MMMM MMMM MMMM MMMM EEES 0000 (little)
There is no big endian case for the x86. I don't know about the ia64.
Ian