endiannessbit-shiftmicroblaze

Barrelshifter bitshifting and endianess


I am correct in assuming that using the Microblaze barrelshifter to do a bitshift does not have endianness complications for simple shifting, eg

bslli r11, r11, 1

Would be the equivalent of r11 == r11 * 2 regardless of the endianess selected?


Solution

  • Endianness is only a concern when loading and storing words from and to byte-oriented memory. Once you have the value in a register, endianness is not an issue, and left-shifting will always move bits one step "upwards".