|
From: | Richard Henderson |
Subject: | Re: [PATCH 4/4] target/ppc: Move VSX fp compare insns to decodetree. |
Date: | Fri, 7 Jun 2024 08:55:50 -0700 |
User-agent: | Mozilla Thunderbird |
On 6/7/24 07:49, Chinmay Rath wrote:
+static bool do_cmp(DisasContext *ctx, arg_XX3_rc *a, + void (*helper)(TCGv_i32, TCGv_ptr, TCGv_ptr, TCGv_ptr, TCGv_ptr)) +{ + TCGv_i32 ignored; + TCGv_ptr xt, xa, xb; + REQUIRE_VSX(ctx); + xt = gen_vsr_ptr(a->xt); + xa = gen_vsr_ptr(a->xa); + xb = gen_vsr_ptr(a->xb); + if (a->rc) { + helper(cpu_crf[6], tcg_env, xt, xa, xb); + } else { + ignored = tcg_temp_new_i32(); + helper(ignored, tcg_env, xt, xa, xb); + }
Better to unify the helper call. E.g. dest = a->rc ? cpu_crf[6] : tcg_temp_new_i32(); helper(dest, ...) Anyway, Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
[Prev in Thread] | Current Thread | [Next in Thread] |