From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MoJyF-0002WG-OR for qemu-devel@nongnu.org; Thu, 17 Sep 2009 12:36:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MoJyB-0002Ur-6m for qemu-devel@nongnu.org; Thu, 17 Sep 2009 12:36:35 -0400 Received: from [199.232.76.173] (port=39463 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MoJyA-0002Uj-Vg for qemu-devel@nongnu.org; Thu, 17 Sep 2009 12:36:31 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:45563) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MoJyA-000487-Hp for qemu-devel@nongnu.org; Thu, 17 Sep 2009 12:36:30 -0400 From: Andreas Schwab References: <20090909120628.J4195@stanley.csl.cornell.edu> <20090916195242.GE770@volta.aurel32.net> <20090916163826.M50839@stanley.csl.cornell.edu> <20090916205646.GA28487@hall.aurel32.net> <20090917120406.J54069@stanley.csl.cornell.edu> Date: Thu, 17 Sep 2009 18:35:32 +0200 In-Reply-To: <20090917120406.J54069@stanley.csl.cornell.edu> (Vince Weaver's message of "Thu, 17 Sep 2009 12:07:23 -0400 (EDT)") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH] Fix extlh instruction on Alpha List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vince Weaver Cc: qemu-devel@nongnu.org, Aurelien Jarno Vince Weaver writes: > tcg_gen_andi_i64(tmp1, cpu_ir[rb], 7); > tcg_gen_shli_i64(tmp1, tmp1, 3); > - tmp2 = tcg_const_i64(64); > - tcg_gen_sub_i64(tmp1, tmp2, tmp1); > - tcg_temp_free(tmp2); > + tcg_gen_andi_i64(tmp1, tmp1, 0x3f); > + tcg_gen_neg_i64(tmp1, tmp1); > + tcg_gen_addi_i64(tmp1, tmp1, 64); This wastes an operation. If you switch andi and neg you don't need to add 64. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."