Skip to content

Commit

Permalink
target-ppc: Clean Up mullw
Browse files Browse the repository at this point in the history
Eliminate the unecessary ext32s TCG operation and make the multiplication
operation explicitly 32 bit.

Signed-off-by: Tom Musta <tommusta@gmail.com>
Suggested-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
  • Loading branch information
Tom Musta authored and agraf committed Sep 8, 2014
1 parent 57fca13 commit 03039e5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions target-ppc/translate.c
Expand Up @@ -1138,9 +1138,8 @@ static void gen_mullw(DisasContext *ctx)
tcg_temp_free(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)]);
tcg_gen_ext32s_tl(cpu_gpr[rD(ctx->opcode)], cpu_gpr[rD(ctx->opcode)]);
tcg_gen_mul_i32(cpu_gpr[rD(ctx->opcode)], cpu_gpr[rA(ctx->opcode)],
cpu_gpr[rB(ctx->opcode)]);
#endif
if (unlikely(Rc(ctx->opcode) != 0))
gen_set_Rc0(ctx, cpu_gpr[rD(ctx->opcode)]);
Expand Down

0 comments on commit 03039e5

Please sign in to comment.