Re: [Qemu-devel] [PATCH v2 3/3] move unaligned memory access functions to bswap.h

2011-06-07 Thread malc
On Tue, 7 Jun 2011, Richard Henderson wrote: > On 06/06/2011 04:07 PM, malc wrote: > > Depends on how bswap_16 is defined. If it is __builtin_bswap16 > > then 4.5.0 and 4.6.0 generate byte reversed loads, and previous > > versions lack that builtin, so i don't think this generic code > > should go

Re: [Qemu-devel] [PATCH v2 3/3] move unaligned memory access functions to bswap.h

2011-06-07 Thread Richard Henderson
On 06/06/2011 04:07 PM, malc wrote: > Depends on how bswap_16 is defined. If it is __builtin_bswap16 > then 4.5.0 and 4.6.0 generate byte reversed loads, and previous > versions lack that builtin, so i don't think this generic code > should go in. It would continue to be defined as-is, without dir

Re: [Qemu-devel] [PATCH v2 3/3] move unaligned memory access functions to bswap.h

2011-06-06 Thread malc
On Mon, 6 Jun 2011, Richard Henderson wrote: > Patches 1-3: > Reviewed-by: Richard Henderson > > That said, > > On 06/06/2011 09:25 AM, Paolo Bonzini wrote: > > +/* conservative code for little endian unaligned accesses */ > > +static inline int lduw_le_p(const void *ptr) > > +{ > > +#ifdef _AR

Re: [Qemu-devel] [PATCH v2 3/3] move unaligned memory access functions to bswap.h

2011-06-06 Thread Richard Henderson
On 06/06/2011 01:27 PM, Paolo Bonzini wrote: > On 06/06/2011 09:56 PM, Richard Henderson wrote: >> Can we add a patch 4/3 that removes this sort of hard-coded >> assembly stuff in favour of generic gcc code. > > Then it's also possible to commit patch 2 from this submission, and > wait while I rew

Re: [Qemu-devel] [PATCH v2 3/3] move unaligned memory access functions to bswap.h

2011-06-06 Thread Paolo Bonzini
On 06/06/2011 09:56 PM, Richard Henderson wrote: Can we add a patch 4/3 that removes this sort of hard-coded assembly stuff in favour of generic gcc code. Then it's also possible to commit patch 2 from this submission, and wait while I rework the other two to use generic GCC code. Paolo

Re: [Qemu-devel] [PATCH v2 3/3] move unaligned memory access functions to bswap.h

2011-06-06 Thread Richard Henderson
Patches 1-3: Reviewed-by: Richard Henderson That said, On 06/06/2011 09:25 AM, Paolo Bonzini wrote: > +/* conservative code for little endian unaligned accesses */ > +static inline int lduw_le_p(const void *ptr) > +{ > +#ifdef _ARCH_PPC > +int val; > +__asm__ __volatile__ ("lhbrx %0,0,%1

[Qemu-devel] [PATCH v2 3/3] move unaligned memory access functions to bswap.h

2011-06-06 Thread Paolo Bonzini
This is just code movement, and moving the fpu/ include path from target-dependent to target-independent Make variables. Signed-off-by: Paolo Bonzini --- Makefile.hw |2 +- bswap.h | 474 +++ configure |3 +- cpu-all.h | 4