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]

macro BITS_BIG_ENDIAN


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.


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