From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mtp98-0002OO-5W for qemu-devel@nongnu.org; Fri, 02 Oct 2009 16:54:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mtp96-0002ND-Kq for qemu-devel@nongnu.org; Fri, 02 Oct 2009 16:54:33 -0400 Received: from [199.232.76.173] (port=34347 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mtp96-0002N1-DO for qemu-devel@nongnu.org; Fri, 02 Oct 2009 16:54:32 -0400 Received: from hall.aurel32.net ([88.191.82.174]:47587) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mtp95-0005ik-LE for qemu-devel@nongnu.org; Fri, 02 Oct 2009 16:54:32 -0400 Date: Fri, 2 Oct 2009 22:54:29 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 1/3] tcg: add ext{8,16,32}u_i{32,64} TCG ops Message-ID: <20091002205429.GD6691@hall.aurel32.net> References: <20091002200712.GC9327@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20091002200712.GC9327@codesourcery.com> Sender: Aurelien Jarno List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Nathan Froyd On Fri, Oct 02, 2009 at 01:07:12PM -0700, Nathan Froyd wrote: > On Wed, Sep 30, 2009 at 11:09:35PM +0200, Aurelien Jarno wrote: > > Currently zero extensions ops are implemented by a and op with a > > constant. This is then catched in some backend, and replaced by > > a zero extension instruction. While this works well on RISC > > machines, this adds a useless register move on non-RISC machines. > > > > This patch adds ext{8,16,32}u_i{32,64} TCG ops that can be > > implemented in the backends to avoid emitting useless register > > moves. > > I have to ask--does this make things go faster? > It depends on the target, it needs to use zero extension (MIPS for example almost only does sign extension). It gives a 1.5% gain on my test with qemu-86_64. It should also give a gain on 64 bit system targets running a 32 bit OS (i386 on x86_64, ppc on ppc64), as they are doing a zero extension on a lot of instruction. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net