Re: [Qemu-devel] [PATCH 11/18] tcg/arm: add bswap ops

2010-04-09 Thread Aurelien Jarno
On Fri, Apr 09, 2010 at 12:32:04AM +0100, Paul Brook wrote: +static inline void tcg_out_bswap32(TCGContext *s, int cond, int rd, int rn) +#else +/* This code only uses one temporary register. There is probably + a faster way to do that with more temporary registers. */ You can

[Qemu-devel] [PATCH 11/18] tcg/arm: add bswap ops

2010-04-07 Thread Aurelien Jarno
Add an bswap16 and bswap32 ops, either using the rev and rev16 instructions on ARMv6+ or shifts and logical operations on previous ARM versions. In both cases the result use less instructions than the pure TCG version. These ops are also needed by the qemu_ld/st functions. Signed-off-by: