target/mips: Guard check_insn with INSN_R5900 check

Explicitely mark handling of PREF instruction for R5900 as
treating the same as NOP.

Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Signed-off-by: Fredrik Noring <noring@nocrew.org>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
This commit is contained in:
Fredrik Noring 2018-11-07 20:19:45 +01:00 committed by Aleksandar Markovic
parent 55fc7a69aa
commit 992e8176d3
1 changed files with 6 additions and 3 deletions

View File

@ -28357,9 +28357,12 @@ static void decode_opc(CPUMIPSState *env, DisasContext *ctx)
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). */