Answer the question
In order to leave comments, you need to log in
How to reverse bit fields under x86?
Can you please tell me how can I make the gcc compiler under x86 consider the uppermost bit field in the structure as the high bit, and not the low bit? Conditional compilation is not suitable, because there are a lot of structures with bit fields! An internet search revealed that there was an option to reverse bitfields, but for gcc < 4 versions.
Answer the question
In order to leave comments, you need to log in
Change byte order (endianness)
MSB->LSB
LSB->MSB
?
1. There is an x86 machine instruction for changing the order of bytes in a word: bswap
2. Best Algorithm for Bit Reversal
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question