macro BITS_BIG_ENDIAN
James E Wilson
wilson@specifixinc.com
Thu Sep 9 22:50:00 GMT 2004
Sivan Balaji wrote:
> 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.
There is no way to control the order of bit-field allocation.
Bit-fields are always assigned to the first available bit, possibly
constrained by other factors, such as alignment. That means that they
start at the low order bit for little-endian, and the high order bit for
big-endian. This is the "right" way to do things. It is very unusual
for a compiler to do this differently.
The only thing controlled by BITS_BIG_ENDIAN is the bit numbering used
for bit-field instructions. Or more specifically, it controls how the
operands to ZERO_EXTRACT and SIGN_EXTRACT RTL operators are interpreted.
It has no other effect.
Apparently, Red Hat has patches that allow one to switch the order of
bit-field allocation, but these patches have not been contributed.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
More information about the Gcc
mailing list