|
From: | Richard Henderson |
Subject: | Re: [Qemu-devel] [RFC v1 12/13] target-ppc: add maddhd and maddhdu instruction |
Date: | Thu, 21 Jul 2016 12:32:01 +0530 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 |
On 07/18/2016 10:35 PM, Nikunj A Dadhania wrote:
+ tcg_gen_movi_i64(t2, -1); + tcg_gen_movcond_i64(TCG_COND_GE, t2, cpu_gpr[rC(ctx->opcode)], zero, zero, neg);
This is a simple sign-extension of rC. Better as tcg_gen_sari_i64(t2, cpu_gpr[rC(ctx->opcode)], 63);
+ tcg_gen_mov_i64(t1, zero); + tcg_gen_add2_i64(t1, cpu_gpr[rD(ctx->opcode)], lo, hi, cpu_gpr[rC(ctx->opcode)], t2);
Pointless store of t1.Indeed, since we're discarding the value of t1, you might as well re-use t2 in the output and drop the t1 variable altogether. And, thus, rename t2 to something else. ;-)
r~
[Prev in Thread] | Current Thread | [Next in Thread] |