On 9/7/23 01:31, Song Gao wrote:
+static bool trans_xvinsgr2vr_w(DisasContext *ctx, arg_vr_i *a)
+{
+    if (!avail_LASX(ctx)) {
+        return false;
+    }
+    return trans_vinsgr2vr_w(ctx, a);
+}

Using the other translator doesn't help.

static bool trans_vinsgr2vr_w(DisasContext *ctx, arg_vr_i *a)
{
    TCGv src = gpr_src(ctx, a->rj, EXT_NONE);

    if (!avail_LSX(ctx)) {
        return false;
    }

    CHECK_SXE;

This portion doesn't apply, and you miss the check_vec for the larger LASX.

    tcg_gen_st32_i64(src, cpu_env,
                     offsetof(CPULoongArchState, fpr[a->vd].vreg.W(a->imm)));
    return true;
}

The only thing that is left is this one line, so I'm not sure it's worth splitting out a common helper function.


r~

Reply via email to