@@ -6049,16 +6049,6 @@ void register_m68k_insns (CPUM68KState *env)
#undef INSN
}
-/* ??? Some of this implementation is not exception safe. We should always
- write back the result to memory before setting the condition codes. */
-static void disas_m68k_insn(CPUM68KState * env, DisasContext *s)
-{
- uint16_t insn = read_im16(env, s);
- opcode_table[insn](env, s, insn);
- do_writebacks(s);
- do_release(s);
-}
-
static void m68k_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu)
{
DisasContext *dc = container_of(dcbase, DisasContext, base);
@@ -6101,8 +6091,13 @@ static bool m68k_tr_breakpoint_check(DisasContextBase *dcbase, CPUState *cpu,
static void m68k_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu)
{
DisasContext *dc = container_of(dcbase, DisasContext, base);
+ CPUM68KState *env = cpu->env_ptr;
+ uint16_t insn = read_im16(env, dc);
+
+ opcode_table[insn](env, dc, insn);
+ do_writebacks(dc);
+ do_release(dc);
- disas_m68k_insn(cpu->env_ptr, dc);
dc->base.pc_next = dc->pc;
if (dc->base.is_jmp == DISAS_NEXT) {
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/m68k/translate.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) -- 2.17.0