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: Bytes order and words order


> I'm a bit confused
> about what exactly you mean by word order for a floating point type.
> But you and Richard seem to know what you're talking about.
> 

A double on a 32-bit machine takes two words of memory.  Word order for a 
double says whether the word with the sign bit, exponent etc is at the 
lower address or the higher address.  For example, a word-big-endian 
double would have the sign bit somewhere in word[0], while a 
word-little-endian double would have it somewhere in word[1] in the 
following union:

union x
{
  double d;
  uint_32 word[2];
};


R.


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