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:
@@ -31063,6 +31063,13 @@ static void mips_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs)
|
||||
}
|
||||
}
|
||||
|
||||
static void mips_sync_pc(DisasContextBase *db, CPUState *cpu)
|
||||
{
|
||||
DisasContext *s = container_of(db, DisasContext, base);
|
||||
|
||||
gen_save_pc(s->uc->tcg_ctx, s->base.pc_next);
|
||||
}
|
||||
|
||||
static const TranslatorOps mips_tr_ops = {
|
||||
.init_disas_context = mips_tr_init_disas_context,
|
||||
.tb_start = mips_tr_tb_start,
|
||||
@@ -31070,6 +31077,7 @@ static const TranslatorOps mips_tr_ops = {
|
||||
.breakpoint_check = mips_tr_breakpoint_check,
|
||||
.translate_insn = mips_tr_translate_insn,
|
||||
.tb_stop = mips_tr_tb_stop,
|
||||
.pc_sync = mips_sync_pc
|
||||
};
|
||||
|
||||
void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns)
|
||||
|
||||
Reference in New Issue
Block a user