[5657] target-ppc: optimize mullw and make the code more readable
Revision: 5657
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5657 Author: aurel32 Date: 2008-11-09 17:27:11 +0000 (Sun, 09 Nov 2008)
Log Message:
-----------
target-ppc: optimize mullw and make the code more readable
Signed-off-by Aurelien Jarno <[email protected]>
Modified Paths:
--------------
trunk/target-ppc/translate.c
Modified: trunk/target-ppc/translate.c
===================================================================
target-ppc/translate.c +1 -12
@@ -1234,20 +1234,9 @@/* mullw mullw. */ GEN_HANDLER(mullw, 0x1F, 0x0B, 0x07, 0x00000000, PPC_INTEGER) { -#if defined(TARGET_PPC64 ) -TCGv t0, t1; - t0 =tcg_temp_new (TCG_TYPE_TL ); - t1 =tcg_temp_new (TCG_TYPE_TL ); -tcg_gen_ext32s_tl (t0, cpu_gpr[rA (ctx->opcode)]); -tcg_gen_ext32s_tl (t1, cpu_gpr[rB (ctx->opcode)]); -tcg_gen_mul_tl (t0, t0, t1); -tcg_temp_free (t0); -tcg_gen_ext32s_tl (cpu_gpr[rD (ctx->opcode)], t0); -tcg_temp_free (t1); -#else tcg_gen_mul_tl (cpu_gpr[rD (ctx->opcode)], cpu_gpr[rA (ctx->opcode)], cpu_gpr[rB (ctx->opcode)]); -#endif +tcg_gen_ext32s_tl (cpu_gpr[rD (ctx->opcode)], cpu_gpr[rD (ctx->opcode)]);if (unlikely (Rc (ctx->opcode) !=0 ))gen_set_Rc0 (ctx, cpu_gpr[rD (ctx->opcode)]); }