From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KwYES-0007f4-Vm for qemu-devel@nongnu.org; Sun, 02 Nov 2008 03:22:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KwYES-0007el-2J for qemu-devel@nongnu.org; Sun, 02 Nov 2008 03:22:48 -0500 Received: from [199.232.76.173] (port=44934 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KwYER-0007eg-TK for qemu-devel@nongnu.org; Sun, 02 Nov 2008 03:22:47 -0500 Received: from savannah.gnu.org ([199.232.41.3]:52649 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 1KwYER-0003ZR-Bv for qemu-devel@nongnu.org; Sun, 02 Nov 2008 03:22:47 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KwYEQ-0006qy-Mf for qemu-devel@nongnu.org; Sun, 02 Nov 2008 08:22:46 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KwYEQ-0006qb-5d for qemu-devel@nongnu.org; Sun, 02 Nov 2008 08:22:46 +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:22:46 +0000 Subject: [Qemu-devel] [5597] target-ppc: simplify slw, srw, sld, srd 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: 5597 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5597 Author: aurel32 Date: 2008-11-02 08:22:45 +0000 (Sun, 02 Nov 2008) Log Message: ----------- target-ppc: simplify slw, srw, sld, srd 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:22:34 UTC (rev 5596) +++ trunk/target-ppc/translate.c 2008-11-02 08:22:45 UTC (rev 5597) @@ -1959,12 +1959,11 @@ l2 = gen_new_label(); t0 = tcg_temp_local_new(TCG_TYPE_TL); - tcg_gen_andi_tl(t0, cpu_gpr[rB(ctx->opcode)], 0x20); - tcg_gen_brcondi_tl(TCG_COND_EQ, t0, 0, l1); + tcg_gen_andi_tl(t0, cpu_gpr[rB(ctx->opcode)], 0x3f); + tcg_gen_brcondi_tl(TCG_COND_LT, t0, 0x20, l1); tcg_gen_movi_tl(cpu_gpr[rA(ctx->opcode)], 0); tcg_gen_br(l2); gen_set_label(l1); - tcg_gen_andi_tl(t0, cpu_gpr[rB(ctx->opcode)], 0x3f); tcg_gen_shl_tl(cpu_gpr[rA(ctx->opcode)], cpu_gpr[rS(ctx->opcode)], t0); tcg_gen_ext32u_tl(cpu_gpr[rA(ctx->opcode)], cpu_gpr[rA(ctx->opcode)]); gen_set_label(l2); @@ -2018,12 +2017,11 @@ l2 = gen_new_label(); t0 = tcg_temp_local_new(TCG_TYPE_TL); - tcg_gen_andi_tl(t0, cpu_gpr[rB(ctx->opcode)], 0x20); - tcg_gen_brcondi_tl(TCG_COND_EQ, t0, 0, l1); + tcg_gen_andi_tl(t0, cpu_gpr[rB(ctx->opcode)], 0x3f); + tcg_gen_brcondi_tl(TCG_COND_LT, t0, 0x20, l1); tcg_gen_movi_tl(cpu_gpr[rA(ctx->opcode)], 0); tcg_gen_br(l2); gen_set_label(l1); - tcg_gen_andi_tl(t0, cpu_gpr[rB(ctx->opcode)], 0x3f); t1 = tcg_temp_new(TCG_TYPE_TL); tcg_gen_ext32u_tl(t1, cpu_gpr[rS(ctx->opcode)]); tcg_gen_shr_tl(cpu_gpr[rA(ctx->opcode)], t1, t0); @@ -2043,12 +2041,11 @@ l2 = gen_new_label(); t0 = tcg_temp_local_new(TCG_TYPE_TL); - tcg_gen_andi_tl(t0, cpu_gpr[rB(ctx->opcode)], 0x40); - tcg_gen_brcondi_tl(TCG_COND_EQ, t0, 0, l1); + tcg_gen_andi_tl(t0, cpu_gpr[rB(ctx->opcode)], 0x7f); + tcg_gen_brcondi_tl(TCG_COND_LT, t0, 0x40, l1); tcg_gen_movi_tl(cpu_gpr[rA(ctx->opcode)], 0); tcg_gen_br(l2); gen_set_label(l1); - tcg_gen_andi_tl(t0, cpu_gpr[rB(ctx->opcode)], 0x7f); tcg_gen_shl_tl(cpu_gpr[rA(ctx->opcode)], cpu_gpr[rS(ctx->opcode)], t0); gen_set_label(l2); tcg_temp_free(t0); @@ -2106,12 +2103,11 @@ l2 = gen_new_label(); t0 = tcg_temp_local_new(TCG_TYPE_TL); - tcg_gen_andi_tl(t0, cpu_gpr[rB(ctx->opcode)], 0x40); - tcg_gen_brcondi_tl(TCG_COND_EQ, t0, 0, l1); + tcg_gen_andi_tl(t0, cpu_gpr[rB(ctx->opcode)], 0x7f); + tcg_gen_brcondi_tl(TCG_COND_LT, t0, 0x40, l1); tcg_gen_movi_tl(cpu_gpr[rA(ctx->opcode)], 0); tcg_gen_br(l2); gen_set_label(l1); - tcg_gen_andi_tl(t0, cpu_gpr[rB(ctx->opcode)], 0x7f); tcg_gen_shr_tl(cpu_gpr[rA(ctx->opcode)], cpu_gpr[rS(ctx->opcode)], t0); gen_set_label(l2); tcg_temp_free(t0);