public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* macro BITS_BIG_ENDIAN
@ 2004-09-09 10:25 Sivan Balaji
  2004-09-09 22:50 ` James E Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Sivan Balaji @ 2004-09-09 10:25 UTC (permalink / raw)
  To: gcc

Hi all,
I am porting GCC to a new architecture.

I have been through GCC internals documentation and I am not clear about BITS_BIG_ENDIAN. does BITS_BIG_ENDIAN related to the order of bit field members allocation.

i.e

struct str
{
	int a: 3 ;
} svar ;

Note: 'int' size is 32bits

big-endian:
31                               0
+---+-----------------------------+
| a |				  |
+---+-----------------------------+

little-endian:
31                               0
+-----------------------------+---+
|                             | a |
+-----------------------------+---+

If not, what is to be done to get the above behaviour.

When I tried defining BITS_BIG_ENDIAN with one and zero the behaviour is as big-endian above.

I would like to know the behaviour for BITS_BIG_ENDIAN with examples.

Thanks in advance.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-09-10 19:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-09 10:25 macro BITS_BIG_ENDIAN Sivan Balaji
2004-09-09 22:50 ` James E Wilson
2004-09-09 23:08   ` DJ Delorie
2004-09-10  6:53   ` Sivan Balaji
2004-09-10 19:39     ` James E Wilson
2004-09-10  7:31   ` macro BITS_BIG_ENDIAN (re send) Sivan Balaji

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).