Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O0Hk6-00067A-MQ for qemu-devel@nongnu.org; Fri, 09 Apr 2010 13:11:42 -0400 Received: from [140.186.70.92] (port=48700 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0Hk4-00066f-T6 for qemu-devel@nongnu.org; Fri, 09 Apr 2010 13:11:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O0Hjz-0008JL-GA for qemu-devel@nongnu.org; Fri, 09 Apr 2010 13:11:40 -0400 Received: from hall.aurel32.net ([88.191.82.174]:53719) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0Hjz-0008J2-B7 for qemu-devel@nongnu.org; Fri, 09 Apr 2010 13:11:35 -0400 Date: Fri, 9 Apr 2010 19:11:32 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 11/18] tcg/arm: add bswap ops Message-ID: <20100409171132.GE17204@hall.aurel32.net> References: <1270662685-7379-1-git-send-email-aurelien@aurel32.net> <1270662685-7379-12-git-send-email-aurelien@aurel32.net> <201004090032.05788.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <201004090032.05788.paul@codesourcery.com> Sender: Aurelien Jarno List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: Andrzej Zaborowski , qemu-devel@nongnu.org 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 aurelien@aurel32.net http://www.aurel32.net