qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH-for-5.2?] target/mips/translate: Check R6 reserved encoding for Load Linked Word
@ 2020-11-24 13:45 Philippe Mathieu-Daudé
  2020-11-24 15:59 ` Richard Henderson
  0 siblings, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-11-24 13:45 UTC (permalink / raw)
  To: qemu-devel
  Cc: Aleksandar Rikalo, Richard Henderson, Philippe Mathieu-Daudé,
	Mateja Marjanovic, Maciej W . Rozycki, Aurelien Jarno

Release 6 recoded the 'Load Linked Word' using SPECIAL3 opcode,
this opcode (0b110000) is now reserved.

Ref: A.2 Instruction Bit Encoding Tables:

  "6Rm instructions signal a Reserved Instruction exception
   when executed by a Release 6 implementation."

The check was added in commit 4368b29a26e ("target-mips: move
LL and SC instructions") but got lost during latter refactor
in commit d9224450208 ("target-mips: Tighten ISA level checks").

Fixes: d9224450208 ("target-mips: Tighten ISA level checks")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/mips/translate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/mips/translate.c b/target/mips/translate.c
index c64a1bc42e1..b1e7c674d3f 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -30993,6 +30993,7 @@ static void decode_opc(CPUMIPSState *env, DisasContext *ctx)
          break;
     case OPC_LL: /* Load and stores */
         check_insn(ctx, ISA_MIPS2);
+        check_insn_opc_removed(ctx, ISA_MIPS32R6);
         if (ctx->insn_flags & INSN_R5900) {
             check_insn_opc_user_only(ctx, INSN_R5900);
         }
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-12-08 19:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-24 13:45 [PATCH-for-5.2?] target/mips/translate: Check R6 reserved encoding for Load Linked Word Philippe Mathieu-Daudé
2020-11-24 15:59 ` Richard Henderson
2020-11-24 16:15   ` Philippe Mathieu-Daudé
2020-12-08 18:34     ` Philippe Mathieu-Daudé
2020-12-08 18:43       ` Maciej W. Rozycki
2020-12-08 19:12         ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).