From c5643956e3f6d5dad9fbcd35b3f839608a3fe8da Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Tue, 6 Mar 2018 08:24:04 -0500 Subject: [PATCH] target/m68k: add cpush/cinv Add cache lines invalidate and cache lines push as no-op operations, as we don't have cache. These instructions are 68040 only. Backports commit f58ed1c50add3e76331afdc92387c0da9dd9e443 from qemu --- qemu/target/m68k/translate.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/qemu/target/m68k/translate.c b/qemu/target/m68k/translate.c index f339c9be..3dee2abf 100644 --- a/qemu/target/m68k/translate.c +++ b/qemu/target/m68k/translate.c @@ -4677,6 +4677,24 @@ DISAS_INSN(cpushl) /* Cache push/invalidate. Implement as no-op. */ } +DISAS_INSN(cpush) +{ + if (IS_USER(s)) { + gen_exception(s, s->insn_pc, EXCP_PRIVILEGE); + return; + } + /* Cache push/invalidate. Implement as no-op. */ +} + +DISAS_INSN(cinv) +{ + if (IS_USER(s)) { + gen_exception(s, s->insn_pc, EXCP_PRIVILEGE); + return; + } + /* Invalidate cache line. Implement as no-op. */ +} + DISAS_INSN(wddata) { gen_exception(s, s->insn_pc, EXCP_PRIVILEGE); @@ -5884,6 +5902,8 @@ void register_m68k_insns (CPUM68KState *env) INSN(fsave, f300, ffc0, FPU); INSN(intouch, f340, ffc0, CF_ISA_A); INSN(cpushl, f428, ff38, CF_ISA_A); + INSN(cpush, f420, ff20, M68040); + INSN(cinv, f400, ff20, M68040); INSN(wddata, fb00, ff00, CF_ISA_A); INSN(wdebug, fbc0, ffc0, CF_ISA_A); #endif