[Spice-devel] [PATCH spice-common v2 1/3] Make the compiler work out better way to write unaligned memory

Christophe Fergeau cfergeau at redhat.com
Mon Sep 25 15:13:08 UTC 2017


On Mon, Sep 25, 2017 at 04:37:43PM +0200, Christophe Fergeau wrote:
> On Mon, Sep 25, 2017 at 10:22:57AM -0400, Frediano Ziglio wrote:
> > > 
> > > On Mon, Sep 25, 2017 at 09:04:16AM -0400, Frediano Ziglio wrote:
> > > > Yes, intentional and consistent with previous code.
> > > > The usage of unsigned for BYTESWAP avoid sign extension during arithmetic.
> > > 
> > > If BYTESWAP has such issues (and I don't think it does), then this should be
> > > fixed.
> > > ack on being consistent with what was done before.
> > > 
> > > Christophe
> > > 
> > 
> > Looking at macro sources do not seem to have such issue.
> > 
> > OT: Looking at macro sources why don't we use asm/swab.h or byteswap.h on Linux?
> > They provide support for more architectures. Or something like
> 
> Even el6 has gcc 4.4, I'd just drop the whole #elif defined (__GNUC__) && (__GNUC__ >= 2) && defined (__OPTIMIZE__)
> block and only keep __builtin_bswap*() and the generic fallback.


by the way, for the series,
Acked-by: Christophe Fergeau <cfergeau at redhat.com>

> 
> Christophe
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list