Inline uc_tracecode when there is only exactly one hook

This commit is contained in:
2021-11-21 16:44:39 +01:00
parent 18d7f090ce
commit 87a391d549
31 changed files with 173 additions and 6 deletions

View File

@@ -856,6 +856,10 @@ static void riscv_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu)
} else {
// Unicorn: trace this instruction on request
if (HOOK_EXISTS_BOUNDED(uc, UC_HOOK_CODE, ctx->base.pc_next)) {
// Sync PC in advance
tcg_gen_movi_tl(tcg_ctx, tcg_ctx->cpu_pc, ctx->base.pc_next);
// save the last operand
prev_op = tcg_last_op(tcg_ctx);
insn_hook = true;