qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH RESEND v5 51/57] target/loongarch: Implement xvinsgr2vr xvpic


From: Richard Henderson
Subject: Re: [PATCH RESEND v5 51/57] target/loongarch: Implement xvinsgr2vr xvpickve2gr
Date: Mon, 11 Sep 2023 15:27:42 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0

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

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