Re: [PATCH] powerpc: Optimize __arch_swab32 and __arch_swab16

2011-09-11 Thread Joakim Tjernlund
Benjamin Herrenschmidt wrote on 2011/09/10 11:24:39: > > On Fri, 2011-09-09 at 14:10 +0200, Joakim Tjernlund wrote: > > PPC __arch_swab32 and __arch_swab16 generates non optimal code. > > They do not schedule very well, need to copy its input register > > and swab16 needs an extra insn to clear it

Re: [PATCH] powerpc: Optimize __arch_swab32 and __arch_swab16

2011-09-10 Thread Benjamin Herrenschmidt
On Fri, 2011-09-09 at 14:10 +0200, Joakim Tjernlund wrote: > PPC __arch_swab32 and __arch_swab16 generates non optimal code. > They do not schedule very well, need to copy its input register > and swab16 needs an extra insn to clear its upper bits. > Fix this with better inline ASM. > > Signed-off

[PATCH] powerpc: Optimize __arch_swab32 and __arch_swab16

2011-09-09 Thread Joakim Tjernlund
PPC __arch_swab32 and __arch_swab16 generates non optimal code. They do not schedule very well, need to copy its input register and swab16 needs an extra insn to clear its upper bits. Fix this with better inline ASM. Signed-off-by: Joakim Tjernlund --- arch/powerpc/include/asm/swab.h | 28