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>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Aurelien Jarno" <aurelien@aurel32.net>
Subject: [PATCH 06/13] target/mips: Convert Rel6 Special2 opcode to decodetree
Date: Tue,  8 Dec 2020 21:36:57 +0100	[thread overview]
Message-ID: <20201208203704.243704-7-f4bug@amsat.org> (raw)
In-Reply-To: <20201208203704.243704-1-f4bug@amsat.org>

Special2 opcode have been removed from the Release 6.
Add a single decodetree entry for all the opcode class,
triggering Reserved Instruction if ever used.

Remove unreachable check_insn_opc_removed() call.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/mips/isa-mips32r6.decode       | 2 ++
 target/mips/isa-mips_rel6_translate.c | 7 +++++++
 target/mips/translate.c               | 2 --
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/target/mips/isa-mips32r6.decode b/target/mips/isa-mips32r6.decode
index 027585ee042..259bac612ab 100644
--- a/target/mips/isa-mips32r6.decode
+++ b/target/mips/isa-mips32r6.decode
@@ -15,3 +15,5 @@
 @lsa                ...... rs:5 rt:5 rd:5 ... sa:2 ......   &lsa
 
 LSA                 000000 ..... ..... ..... 000 .. 000101  @lsa
+
+REMOVED             011100 ----- ----- ----- ----- ------   # SPECIAL2
diff --git a/target/mips/isa-mips_rel6_translate.c b/target/mips/isa-mips_rel6_translate.c
index c77f3ed57e0..9ac906b1f33 100644
--- a/target/mips/isa-mips_rel6_translate.c
+++ b/target/mips/isa-mips_rel6_translate.c
@@ -20,6 +20,13 @@
 #include "decode-isa-mips64r6.c.inc"
 #endif /* TARGET_MIPS64 */
 
+bool trans_REMOVED(DisasContext *ctx, arg_REMOVED *a)
+{
+    gen_reserved_instruction(ctx);
+
+    return true;
+}
+
 static bool trans_LSA(DisasContext *ctx, arg_LSA *a)
 {
     return gen_LSA(ctx, a->rd, a->rt, a->rs, a->sa);
diff --git a/target/mips/translate.c b/target/mips/translate.c
index 8f0a0a3830c..788b5112a80 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -27145,8 +27145,6 @@ static void decode_opc_special2_legacy(CPUMIPSState *env, DisasContext *ctx)
     int rs, rt, rd;
     uint32_t op1;
 
-    check_insn_opc_removed(ctx, ISA_MIPS32R6);
-
     rs = (ctx->opcode >> 21) & 0x1f;
     rt = (ctx->opcode >> 16) & 0x1f;
     rd = (ctx->opcode >> 11) & 0x1f;
-- 
2.26.2



  parent reply	other threads:[~2020-12-08 21:48 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08 20:36 [PATCH 00/13] target/mips: Convert LSA/DLSA and part of the Rel6 removed opcodes Philippe Mathieu-Daudé
2020-12-08 20:36 ` [PATCH 01/13] !fixup "target/mips/translate: Add declarations for generic code" Philippe Mathieu-Daudé
2020-12-09  0:09   ` Richard Henderson
2020-12-08 20:36 ` [PATCH 02/13] target/mips: Extract LSA/DLSA translation generators Philippe Mathieu-Daudé
2020-12-09  0:16   ` Richard Henderson
2020-12-08 20:36 ` [PATCH 03/13] target/mips: Introduce decodetree helpers for MSA LSA/DLSA opcodes Philippe Mathieu-Daudé
2020-12-09  0:22   ` Richard Henderson
2020-12-09 14:14   ` Richard Henderson
2020-12-08 20:36 ` [PATCH 04/13] target/mips: Introduce decodetree helpers for Release6 " Philippe Mathieu-Daudé
2020-12-09 14:21   ` Richard Henderson
2020-12-08 20:36 ` [PATCH 05/13] target/mips: Remove now unreachable LSA/DLSA opcodes code Philippe Mathieu-Daudé
2020-12-09 14:22   ` Richard Henderson
2020-12-08 20:36 ` Philippe Mathieu-Daudé [this message]
2020-12-09 14:23   ` [PATCH 06/13] target/mips: Convert Rel6 Special2 opcode to decodetree Richard Henderson
2020-12-08 20:36 ` [PATCH 07/13] target/mips: Convert Rel6 COP1X " Philippe Mathieu-Daudé
2020-12-09 14:23   ` Richard Henderson
2020-12-08 20:36 ` [PATCH 08/13] target/mips: Convert Rel6 CACHE/PREF opcodes " Philippe Mathieu-Daudé
2020-12-09 14:24   ` Richard Henderson
2020-12-08 20:37 ` [PATCH 09/13] target/mips: Convert Rel6 LWL/LWR/SWL/SWR " Philippe Mathieu-Daudé
2020-12-09 14:24   ` Richard Henderson
2020-12-08 20:37 ` [PATCH 10/13] target/mips: Convert Rel6 LWLE/LWRE/SWLE/SWRE " Philippe Mathieu-Daudé
2020-12-09 14:35   ` Richard Henderson
2020-12-08 20:37 ` [PATCH 11/13] target/mips: Convert Rel6 LDL/LDR/SDL/SDR " Philippe Mathieu-Daudé
2020-12-09 14:39   ` Richard Henderson
2020-12-08 20:37 ` [PATCH 12/13] target/mips: Convert Rel6 LLD/SCD " Philippe Mathieu-Daudé
2020-12-09 14:40   ` Richard Henderson
2020-12-08 20:37 ` [PATCH 13/13] target/mips: Convert Rel6 LL/SC " Philippe Mathieu-Daudé
2020-12-09 14:40   ` Richard Henderson
2021-01-07 18:48 ` [PATCH 00/13] target/mips: Convert LSA/DLSA and part of the Rel6 removed opcodes 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=20201208203704.243704-7-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=aleksandar.rikalo@syrmia.com \
    --cc=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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.