Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KwYEv-0007qq-RI for qemu-devel@nongnu.org; Sun, 02 Nov 2008 03:23:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KwYEu-0007qX-R6 for qemu-devel@nongnu.org; Sun, 02 Nov 2008 03:23:17 -0500 Received: from [199.232.76.173] (port=44937 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KwYEu-0007qS-Fe for qemu-devel@nongnu.org; Sun, 02 Nov 2008 03:23:16 -0500 Received: from savannah.gnu.org ([199.232.41.3]:52658 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KwYEt-0003aU-VG for qemu-devel@nongnu.org; Sun, 02 Nov 2008 03:23:16 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KwYEt-00079O-7Y for qemu-devel@nongnu.org; Sun, 02 Nov 2008 08:23:15 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KwYEs-000793-Mp for qemu-devel@nongnu.org; Sun, 02 Nov 2008 08:23:15 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Sun, 02 Nov 2008 08:23:14 +0000 Subject: [Qemu-devel] [5600] target-ppc: use the new subfi wrapper Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5600 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5600 Author: aurel32 Date: 2008-11-02 08:23:14 +0000 (Sun, 02 Nov 2008) Log Message: ----------- target-ppc: use the new subfi wrapper (...and fix rldnm) Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/target-ppc/translate.c Modified: trunk/target-ppc/translate.c =================================================================== --- trunk/target-ppc/translate.c 2008-11-02 08:23:04 UTC (rev 5599) +++ trunk/target-ppc/translate.c 2008-11-02 08:23:14 UTC (rev 5600) @@ -1747,7 +1747,7 @@ GEN_HANDLER(rlwnm, 0x17, 0xFF, 0xFF, 0x00000000, PPC_INTEGER) { uint32_t mb, me; - TCGv t0, t1, t2, t3; + TCGv t0, t1, t2; mb = MB(ctx->opcode); me = ME(ctx->opcode); @@ -1757,9 +1757,7 @@ tcg_gen_ext32u_tl(t1, cpu_gpr[rS(ctx->opcode)]); t2 = tcg_temp_new(TCG_TYPE_TL); tcg_gen_shl_tl(t2, t1, t0); - t3 = tcg_const_tl(32); - tcg_gen_sub_tl(t0, t3, t0); - tcg_temp_free(t3); + tcg_gen_subfi_tl(t0, 32, t0); tcg_gen_shr_tl(t1, t1, t0); tcg_temp_free(t0); tcg_gen_or_tl(t2, t2, t1); @@ -1872,7 +1870,7 @@ static always_inline void gen_rldnm (DisasContext *ctx, uint32_t mb, uint32_t me) { - TCGv t0, t1, t2; + TCGv t0, t1; mb = MB(ctx->opcode); me = ME(ctx->opcode); @@ -1880,9 +1878,7 @@ tcg_gen_andi_tl(t0, cpu_gpr[rB(ctx->opcode)], 0x3f); t1 = tcg_temp_new(TCG_TYPE_TL); tcg_gen_shl_tl(t1, cpu_gpr[rS(ctx->opcode)], t0); - t2 = tcg_const_tl(32); - tcg_gen_sub_tl(t0, t2, t0); - tcg_temp_free(t2); + tcg_gen_subfi_tl(t0, 64, t0); tcg_gen_shr_tl(t0, cpu_gpr[rS(ctx->opcode)], t0); tcg_gen_or_tl(t1, t1, t0); tcg_temp_free(t0);