Skip to content

Commit

Permalink
target/arc: Add arc_tr_disas_log function
Browse files Browse the repository at this point in the history
Signed-off-by: Yuriy Kolerov <[email protected]>
  • Loading branch information
kolerov committed Jul 16, 2024
1 parent 098e09e commit 4979870
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions target/arc/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1586,12 +1586,20 @@ static void arc_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
}
}

static void arc_tr_disas_log(const DisasContextBase *dcbase,
CPUState *cpu, FILE *logfile)
{
fprintf(logfile, "IN: %s\n", lookup_symbol(dcbase->pc_first));
target_disas(logfile, cpu, dcbase->pc_first, dcbase->tb->size);
}

static const TranslatorOps arc_translator_ops = {
.init_disas_context = arc_tr_init_disas_context,
.tb_start = arc_tr_tb_start,
.insn_start = arc_tr_insn_start,
.translate_insn = arc_tr_translate_insn,
.tb_stop = arc_tr_tb_stop,
.disas_log = arc_tr_disas_log,
};

/* generate intermediate code for basic block 'tb'. */
Expand Down

0 comments on commit 4979870

Please sign in to comment.