Fix #1643
This adds an extra op to translator to allow the block hook sync pc in the very begining
This commit is contained in:
@@ -6414,6 +6414,13 @@ static void m68k_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
|
||||
}
|
||||
}
|
||||
|
||||
void m68k_sync_pc(DisasContextBase *db, CPUState *cpu)
|
||||
{
|
||||
DisasContext *dc = container_of(db, DisasContext, base);
|
||||
|
||||
tcg_gen_movi_i32(dc->uc->tcg_ctx, QREG_PC, dc->base.pc_next);
|
||||
}
|
||||
|
||||
static const TranslatorOps m68k_tr_ops = {
|
||||
.init_disas_context = m68k_tr_init_disas_context,
|
||||
.tb_start = m68k_tr_tb_start,
|
||||
@@ -6421,6 +6428,7 @@ static const TranslatorOps m68k_tr_ops = {
|
||||
.breakpoint_check = m68k_tr_breakpoint_check,
|
||||
.translate_insn = m68k_tr_translate_insn,
|
||||
.tb_stop = m68k_tr_tb_stop,
|
||||
.pc_sync = m68k_sync_pc
|
||||
};
|
||||
|
||||
void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int max_insns)
|
||||
|
||||
Reference in New Issue
Block a user