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.hender...@linaro.org> r~