diff --git a/qemu/target/mips/translate.c b/qemu/target/mips/translate.c index 6cb2f881..0a80e526 100644 --- a/qemu/target/mips/translate.c +++ b/qemu/target/mips/translate.c @@ -28550,9 +28550,12 @@ static void decode_opc(CPUMIPSState *env, DisasContext *ctx, bool *insn_need_pat break; case OPC_PREF: check_insn_opc_removed(ctx, ISA_MIPS32R6); - check_insn(ctx, ISA_MIPS4 | ISA_MIPS32 | - INSN_R5900); - /* Treat as NOP. */ + if (ctx->insn_flags & INSN_R5900) { + /* Treat as NOP. */ + } else { + check_insn(ctx, ISA_MIPS4 | ISA_MIPS32); + /* Treat as NOP. */ + } break; /* Floating point (COP1). */