Am Montag, 14. Oktober 2013, 19:05:25 schrieb Richard Henderson:
> On 10/14/2013 09:29 AM, Michael Walle wrote:
> > +#ifndef HOST_WORDS_BIGENDIAN
> > +rgb565 = bswap16(rgb565);
> > +#endif
>
> be16_to_cpu, no ifdef needed.
>
>
> r~
Thanks. I'll update the patch.
--
michael
On 10/14/2013 09:29 AM, Michael Walle wrote:
> +#ifndef HOST_WORDS_BIGENDIAN
> +rgb565 = bswap16(rgb565);
> +#endif
be16_to_cpu, no ifdef needed.
r~
In commit fc97bb5ba3e7239c0b6d24095df6784868dfebbf the lduw_raw() call was
eliminated. But we are reading from the target buffer a 16-bit value, which
is in big-endian format. Therefore, swap the bytes if we are building for a
little-endian host.
Cc: Paolo Bonzini
Signed-off-by: Michael Walle
--