summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-09 17:27:11 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-09 17:27:11 +0000
commit1e4c090f7d204a65c6f0a851255b3f48192f08a4 (patch)
tree5585e1ef341fbc2e8795a998cf4d60e87c85ed17
parentbdc4e053d15f6edd09f8600c93f0a4ba49065cff (diff)
downloadqemu-1e4c090f7d204a65c6f0a851255b3f48192f08a4.zip
target-ppc: optimize mullw and make the code more readable
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5657 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--target-ppc/translate.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 480c3119a9..0a67423412 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -1234,20 +1234,9 @@ GEN_HANDLER(mulhwu, 0x1F, 0x0B, 0x00, 0x00000400, PPC_INTEGER)
/* 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)]);
}