Signed-off-by: Fredrik Noring <noring@nocrew.org>
---
target/mips/translate.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/target/mips/translate.c b/target/mips/translate.c
index 6e5a8a2565..624e53644d 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -27992,7 +27992,8 @@ static void decode_opc(CPUMIPSState *env, DisasContext *ctx)
}
break;
case OPC_SPECIAL3:
- if (ctx->insn_flags & INSN_R5900) {
+ if ((ctx->insn_flags & INSN_R5900) &&
+ (ctx->insn_flags & ASE_MMI)) {
decode_tx79_sq(env, ctx); /* TX79_SQ */
} else {
decode_opc_special3(env, ctx);
@@ -28656,7 +28657,8 @@ static void decode_opc(CPUMIPSState *env, DisasContext *ctx)
}
break;
case OPC_MSA: /* OPC_MDMX */
- if (ctx->insn_flags & INSN_R5900) {
+ if ((ctx->insn_flags & INSN_R5900) &&
+ (ctx->insn_flags & ASE_MMI)) {
decode_tx79_lq(env, ctx); /* TX79_LQ */
} else {
/* MDMX: Not implemented. */
--
2.18.1