I observe that ARM v6 and later is bi-endian. Does the setend
instruction (link) change the byte-order, the bit-order, or both?
I'm working on a Pixel C, and I have input data that is bitwise little-endian and bytewise big-endian, and I'd like to just be able to work with that directly, but I don't suppose it's possible. I guess that the ARM CPU defaults to little-endian for both bit-order and byte-order. Is that correct?
TMI:
I'm pulling an audio stream from a USB device. It arrives as 16-bit values, with bits in the order 89abcdef01234567
(8 most significant bits, followed by 8 least significant bits). If I try to do any arithmetic on these shorts
, the CPU interprets the values incorrectly; it is using the bit order 01234556789abcdef
.
To be clear, I do not want to change the bit order; I do want to change the byte order.