This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bytes order and words order
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: nathan at cs dot bris dot ac dot uk
- Cc: Gabriel Dos Reis <gdr at integrable-solutions dot net>, Richard dot Earnshaw at arm dot com, gcc at gcc dot gnu dot org
- Date: Fri, 23 Aug 2002 14:14:44 +0100
- Subject: Re: Bytes order and words order
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> 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.