qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH 06/12] target/ppc: declare xscvspdpn helper with call flags


From: Richard Henderson
Subject: Re: [PATCH 06/12] target/ppc: declare xscvspdpn helper with call flags
Date: Tue, 17 May 2022 09:50:11 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 5/17/22 05:39, matheus.ferst@eldorado.org.br wrote:
-uint64_t helper_xscvspdpn(CPUPPCState *env, uint64_t xb)
+uint64_t helper_XSCVSPDPN(uint64_t xb)
  {
      return helper_todouble(xb >> 32);
  }

Ideally, this helper would not exist and you'd just use helper_todouble...

+bool trans_XSCVSPDPN(DisasContext *ctx, arg_XX2 *a)
+{
+    TCGv_i64 tmp;
+
+    REQUIRE_INSNS_FLAGS2(ctx, VSX207);
+    REQUIRE_VSX(ctx);
+
+    tmp = tcg_temp_new_i64();
+    get_cpu_vsr(tmp, a->xb, true);

... and here, you'd load the correct i32 value from VsrW(0) directly instead of loading an i64 value followed by a shift.

But this is still an improvement so,

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~



reply via email to

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