https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109933
--- Comment #8 from Rory Bolt <rory.bolt at gmail dot com> --- So... The logic for this is simple: For little endian the shift amount is ((address & 3) * 8) For big endian the shift amount is ((3 -(address & 3)) * 8) Unfortunately I have ZERO experience modifying GCC, and the mechanism to determine if it is generating big endian code or little endian code is not obvious to me... So working on this in my spare time it will be a while for me to create a patch. That said, I do have a full big endian linux environment so I can test a patch (relatively quickly - it takes a while to build GCC ;-)) if some one beats me to this.