Re: [PATCH] Fix big-endian bswap

2016-06-28 Thread Richard Biener
On Thu, Jun 23, 2016 at 6:34 PM, Wilco Dijkstra wrote: > This patch fixes a bug in the bswap pass. In big-endian BIT_FIELD_REF uses > big-endian bit numbering so we need to adjust the bit position. > The existing version could potentially generate incorrect code however GCC > doesn't > emit a BI

[PATCH] Fix big-endian bswap

2016-06-23 Thread Wilco Dijkstra
This patch fixes a bug in the bswap pass. In big-endian BIT_FIELD_REF uses big-endian bit numbering so we need to adjust the bit position. The existing version could potentially generate incorrect code however GCC doesn't emit a BIT_FIELD_REF to access the low byte in a register, so the symbolic