macro BITS_BIG_ENDIAN

Sivan Balaji Sivanßalaji@acmet.com
Thu Sep 9 10:25:00 GMT 2004


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.



More information about the Gcc mailing list