This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: IEEE extended real formats


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]