qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 20/21] Hexagon (target/hexagon) Move pkt_has_store_s1 to Disa


From: Richard Henderson
Subject: Re: [PATCH 20/21] Hexagon (target/hexagon) Move pkt_has_store_s1 to DisasContext
Date: Thu, 27 Apr 2023 12:11:18 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

On 4/26/23 01:42, Taylor Simpson wrote:
+static TCGv gen_slotval(DisasContext *ctx)
+{
+    TCGv slotval = tcg_temp_new();
+    tcg_gen_movi_tl(slotval, ctx->pkt->pkt_has_store_s1 & 1);
+    tcg_gen_ori_tl(slotval, slotval, ctx->insn->slot << 1);
+    return slotval;
+}

This can be entirely constant:

    int slotval = (ctx->pkt->pkt_has_store_s1 & 1)
                | (ctx->insn->slot << 1);
    return tcg_constant_tl(slotval);


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


r~





reply via email to

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