Re: [Spice-devel] [PATCH spice-common] codegen: Make the compiler work about better way to write unaligned memory

2017-09-12 Thread Christophe Fergeau
On Tue, Sep 12, 2017 at 03:14:22AM -0400, Frediano Ziglio wrote: > > > > On Mon, Sep 11, 2017 at 11:13:04AM +0100, Frediano Ziglio wrote: > > > Instead of assuming that the system can safely do unaligned access > > > to memory use packed structures to allow the compiler generate > > > best code

Re: [Spice-devel] [PATCH spice-common] codegen: Make the compiler work about better way to write unaligned memory

2017-09-12 Thread Frediano Ziglio
> > On Mon, Sep 11, 2017 at 11:13:04AM +0100, Frediano Ziglio wrote: > > Instead of assuming that the system can safely do unaligned access > > to memory use packed structures to allow the compiler generate > > best code possible. > > It will generate the best code possible, but assuming all

Re: [Spice-devel] [PATCH spice-common] codegen: Make the compiler work about better way to write unaligned memory

2017-09-12 Thread Christophe Fergeau
On Mon, Sep 11, 2017 at 11:13:04AM +0100, Frediano Ziglio wrote: > Instead of assuming that the system can safely do unaligned access > to memory use packed structures to allow the compiler generate > best code possible. It will generate the best code possible, but assuming all accesses are

[Spice-devel] [PATCH spice-common] codegen: Make the compiler work about better way to write unaligned memory

2017-09-11 Thread Frediano Ziglio
Instead of assuming that the system can safely do unaligned access to memory use packed structures to allow the compiler generate best code possible. For instance ARM7 can use unaligned access but not for 64 bit numbers (currently these accesses are emulated by Linux kernel with obvious