On R6, SPECIAL funct 0x05 is LSA, which decodetree matches only
when bits 10:8 are zero. Other encodings fell through to the
non-standard PMON hook instead of raising Reserved Instruction.
Fixes: 0e9524af2dd5 ("target/mips: Remove unreachable [D]LSA code")
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
target/mips/tcg/translate.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c
index c434da714b0c..d1be32bfd9f5 100644
--- a/target/mips/tcg/translate.c
+++ b/target/mips/tcg/translate.c
@@ -13301,6 +13301,10 @@ static void decode_opc_special(CPUMIPSState *env,
DisasContext *ctx)
MIPS_INVAL("PMON / selsl");
gen_reserved_instruction(ctx);
#else
+ if (ctx->insn_flags & ISA_MIPS_R6) {
+ gen_reserved_instruction(ctx);
+ break;
+ }
gen_helper_pmon(tcg_env, tcg_constant_i32(sa));
#endif
break;
--
2.55.0