From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O01Cr-0006IZ-R1 for qemu-devel@nongnu.org; Thu, 08 Apr 2010 19:32:17 -0400 Received: from [140.186.70.92] (port=58138 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O01Cq-0006IL-Ku for qemu-devel@nongnu.org; Thu, 08 Apr 2010 19:32:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O01Cp-0000i1-C1 for qemu-devel@nongnu.org; Thu, 08 Apr 2010 19:32:16 -0400 Received: from mx20.gnu.org ([199.232.41.8]:34164) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O01Cp-0000hx-9J for qemu-devel@nongnu.org; Thu, 08 Apr 2010 19:32:15 -0400 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1O01Co-0002RR-Nb for qemu-devel@nongnu.org; Thu, 08 Apr 2010 19:32:15 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 11/18] tcg/arm: add bswap ops Date: Fri, 9 Apr 2010 00:32:04 +0100 References: <1270662685-7379-1-git-send-email-aurelien@aurel32.net> <1270662685-7379-12-git-send-email-aurelien@aurel32.net> In-Reply-To: <1270662685-7379-12-git-send-email-aurelien@aurel32.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201004090032.05788.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Andrzej Zaborowski , Aurelien Jarno > +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 Paul