All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: "Aleksandar Rikalo" <aleksandar.rikalo@syrmia.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PATCH-for-6.2 1/4] target/mips: Simpify PREF opcode
Date: Mon,  2 Aug 2021 01:41:59 +0200	[thread overview]
Message-ID: <20210801234202.3167676-2-f4bug@amsat.org> (raw)
In-Reply-To: <20210801234202.3167676-1-f4bug@amsat.org>

check_insn() checks for any bit in the set, and INSN_R5900 is
just another bit added to the set. No need to special-case it.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/mips/tcg/translate.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c
index 34a96159d15..05efd25e29d 100644
--- a/target/mips/tcg/translate.c
+++ b/target/mips/tcg/translate.c
@@ -15738,12 +15738,8 @@ static bool decode_opc_legacy(CPUMIPSState *env, DisasContext *ctx)
         /* Treat as NOP. */
         break;
     case OPC_PREF:
-        if (ctx->insn_flags & INSN_R5900) {
-            /* Treat as NOP. */
-        } else {
-            check_insn(ctx, ISA_MIPS4 | ISA_MIPS_R1);
-            /* Treat as NOP. */
-        }
+        check_insn(ctx, ISA_MIPS4 | ISA_MIPS_R1 | INSN_R5900);
+        /* Treat as NOP. */
         break;
 
     /* Floating point (COP1). */
-- 
2.31.1



  reply	other threads:[~2021-08-01 23:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-01 23:41 [PATCH-for-6.2 0/4] target/mips: Decodetree housekeeping Philippe Mathieu-Daudé
2021-08-01 23:41 ` Philippe Mathieu-Daudé [this message]
2021-08-02 19:07   ` [PATCH-for-6.2 1/4] target/mips: Simpify PREF opcode Richard Henderson
2021-08-01 23:42 ` [PATCH-for-6.2 2/4] target/mips: Decode vendor extensions before MIPS ISAs Philippe Mathieu-Daudé
2021-08-02 19:08   ` Richard Henderson
2021-08-01 23:42 ` [PATCH-for-6.2 3/4] target/mips: Merge 32-bit/64-bit release6 decodetree definitions Philippe Mathieu-Daudé
2021-08-02 19:09   ` Richard Henderson
2021-08-01 23:42 ` [PATCH-for-6.2 4/4] target/mips: Rename 'rtype' as 'r' Philippe Mathieu-Daudé
2021-08-02 19:38   ` Richard Henderson
2021-08-06 20:51 ` [PATCH-for-6.2 0/4] target/mips: Decodetree housekeeping Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210801234202.3167676-2-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=aleksandar.rikalo@syrmia.com \
    --cc=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.