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 do better even without a temporary: > > eor r8, rn, rn, ror #16 > bic r8, r8, #0x00ff0000 > mov rd, rn, ror #8 > eor rd, rd, r8, lsr #8 >
That's indeed much better, though it's still use one temporary (r8). I'll use that in the next version. Thanks. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurel...@aurel32.net http://www.aurel32.net