aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorFredrik Noring <noring@nocrew.org>2018-10-21 17:36:23 +0200
committerAleksandar Markovic <amarkovic@wavecomp.com>2018-10-24 15:20:30 +0200
commit71b8a6b3f3d89283b094e04962c077aa01401438 (patch)
tree566930164f8291107ab7b2309a621fb57a85f95d /target
parentf08099ad7a4dd32e12a3f9d4b4b04c32d7522b03 (diff)
target/mips: Add a placeholder for R5900 MMI instruction class
Add a placeholder for MMI class. This is the main palceholder for MMI ASE. Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by: Fredrik Noring <noring@nocrew.org> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Diffstat (limited to 'target')
-rw-r--r--target/mips/translate.c45
1 files changed, 44 insertions, 1 deletions
diff --git a/target/mips/translate.c b/target/mips/translate.c
index 2318116d31..6cb6966f0f 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -24420,6 +24420,45 @@ static void decode_opc_special3_legacy(CPUMIPSState *env, DisasContext *ctx)
}
}
+static void decode_tx79_mmi(CPUMIPSState *env, DisasContext *ctx)
+{
+ uint32_t opc = MASK_TX79_MMI(ctx->opcode);
+
+ switch (opc) {
+ case TX79_MMI_MADD: /* TODO: TX79_MMI_MADD */
+ case TX79_MMI_MADDU: /* TODO: TX79_MMI_MADDU */
+ case TX79_MMI_PLZCW: /* TODO: TX79_MMI_PLZCW */
+ case TX79_MMI_CLASS_MMI0: /* TODO: TX79_MMI_CLASS_MMI0 */
+ case TX79_MMI_CLASS_MMI2: /* TODO: TX79_MMI_CLASS_MMI2 */
+ case TX79_MMI_MFHI1: /* TODO: TX79_MMI_MFHI1 */
+ case TX79_MMI_MTHI1: /* TODO: TX79_MMI_MTHI1 */
+ case TX79_MMI_MFLO1: /* TODO: TX79_MMI_MFLO1 */
+ case TX79_MMI_MTLO1: /* TODO: TX79_MMI_MTLO1 */
+ case TX79_MMI_MULT1: /* TODO: TX79_MMI_MULT1 */
+ case TX79_MMI_MULTU1: /* TODO: TX79_MMI_MULTU1 */
+ case TX79_MMI_DIV1: /* TODO: TX79_MMI_DIV1 */
+ case TX79_MMI_DIVU1: /* TODO: TX79_MMI_DIVU1 */
+ case TX79_MMI_MADD1: /* TODO: TX79_MMI_MADD1 */
+ case TX79_MMI_MADDU1: /* TODO: TX79_MMI_MADDU1 */
+ case TX79_MMI_CLASS_MMI1: /* TODO: TX79_MMI_CLASS_MMI1 */
+ case TX79_MMI_CLASS_MMI3: /* TODO: TX79_MMI_CLASS_MMI3 */
+ case TX79_MMI_PMFHL: /* TODO: TX79_MMI_PMFHL */
+ case TX79_MMI_PMTHL: /* TODO: TX79_MMI_PMTHL */
+ case TX79_MMI_PSLLH: /* TODO: TX79_MMI_PSLLH */
+ case TX79_MMI_PSRLH: /* TODO: TX79_MMI_PSRLH */
+ case TX79_MMI_PSRAH: /* TODO: TX79_MMI_PSRAH */
+ case TX79_MMI_PSLLW: /* TODO: TX79_MMI_PSLLW */
+ case TX79_MMI_PSRLW: /* TODO: TX79_MMI_PSRLW */
+ case TX79_MMI_PSRAW: /* TODO: TX79_MMI_PSRAW */
+ generate_exception_end(ctx, EXCP_RI); /* TODO: TX79_CLASS_MMI */
+ break;
+ default:
+ MIPS_INVAL("TX79 MMI class");
+ generate_exception_end(ctx, EXCP_RI);
+ break;
+ }
+}
+
static void decode_tx79_lq(CPUMIPSState *env, DisasContext *ctx)
{
generate_exception_end(ctx, EXCP_RI); /* TODO: TX79_LQ */
@@ -25769,7 +25808,11 @@ static void decode_opc(CPUMIPSState *env, DisasContext *ctx)
decode_opc_special(env, ctx);
break;
case OPC_SPECIAL2:
- decode_opc_special2_legacy(env, ctx);
+ if ((ctx->insn_flags & INSN_R5900) && (ctx->insn_flags & ASE_MMI)) {
+ decode_tx79_mmi(env, ctx);
+ } else {
+ decode_opc_special2_legacy(env, ctx);
+ }
break;
case OPC_SPECIAL3:
if (ctx->insn_flags & INSN_R5900) {