[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/6] target/riscv: add support for zdinx

From: Richard Henderson
Subject: Re: [PATCH 4/6] target/riscv: add support for zdinx
Date: Fri, 24 Dec 2021 14:30:56 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0

On 12/23/21 7:49 PM, liweiwei wrote:
  static bool trans_fsgnj_d(DisasContext *ctx, arg_fsgnj_d *a)
+    TCGv_i64 dest = dest_fpr(ctx, a->rd);
+    TCGv_i64 src1 = get_fpr_d(ctx, a->rs1);
+    TCGv_i64 src2 = get_fpr_d(ctx, a->rs2);
      if (a->rs1 == a->rs2) { /* FMOV */

Applies to the F version as well, but we should not assemble src2 when we don't 
need it.

-        tcg_gen_mov_i64(cpu_fpr[a->rd], cpu_fpr[a->rs1]);
+        tcg_gen_mov_i64(dest, src1);

I think this can just be dest = get_fpr_d(ctx, a->src1), leaving the final "move" to gen_set_fpr_d.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]