qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 17/33] target/mips: Convert MSA FILL opcode to decodetree


From: Richard Henderson
Subject: Re: [PATCH 17/33] target/mips: Convert MSA FILL opcode to decodetree
Date: Sun, 24 Oct 2021 10:26:42 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 10/24/21 9:44 AM, Philippe Mathieu-Daudé wrote:
On 10/24/21 07:04, Richard Henderson wrote:
On 10/23/21 2:47 PM, Philippe Mathieu-Daudé wrote:
Convert the FILL opcode (Vector Fill from GPR) to decodetree.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
   target/mips/tcg/msa.decode      |  2 ++
   target/mips/tcg/msa_translate.c | 40 +++++++++++++++++++++++----------
   2 files changed, 30 insertions(+), 12 deletions(-)

   +static bool trans_FILL(DisasContext *ctx, arg_msa_r *a)
+{
+    TCGv_i32 twd;
+    TCGv_i32 tws;
+    TCGv_i32 tdf;
+
+    if (!check_msa_access(ctx)) {
+        return false;
+    }
+
+    if (TARGET_LONG_BITS != 64 && a->df == DF_DOUBLE) {
+        /* Double format valid only for MIPS64 */
+        gen_reserved_instruction(ctx);
+        return true;
+    }

I expect this reserved check should be above the MSA is disabled check,
within check_msa_access.

+    twd = tcg_const_i32(a->wd);
+    tws = tcg_const_i32(a->ws);

tcg_constant_i32.

Hmm I am confused here, only 'df' is constant, 'ws' is GPR[$rs].
Since it is limited in [0,32[ and used read-only by the helper,
we can also pass it as constant?

What? You're passing the constant ws to the helper, not the contents of the gpr -- that's what the helper is expecting.


r~



reply via email to

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