Re: Bitfield for GDT structure?
Posted: Fri Apr 26, 2013 10:51 pm
I found these two:
http://stackoverflow.com/questions/6728 ... -bit-order
http://gcc.gnu.org/onlinedocs/gccint/St ... ayout.html
So according to this, everything should be fine if the machine is Little Endian?
http://stackoverflow.com/questions/6728 ... -bit-order
http://gcc.gnu.org/onlinedocs/gccint/St ... ayout.html
So according to this, everything should be fine if the machine is Little Endian?
GNU Online Docs wrote:— Macro: BITS_BIG_ENDIAN
Define this macro to have the value 1 if the most significant bit in a byte has the lowest number; otherwise define it to have the value zero. This means that bit-field instructions count from the most significant bit. If the machine has no bit-field instructions, then this must still be defined, but it doesn't matter which value it is defined to. This macro need not be a constant.
This macro does not affect the way structure fields are packed into bytes or words; that is controlled by BYTES_BIG_ENDIAN.
— Macro: BYTES_BIG_ENDIAN
Define this macro to have the value 1 if the most significant byte in a word has the lowest number. This macro need not be a constant.