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

@@ -7633,6 +7633,10 @@ static void ppc_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs)
// Unicorn: trace this instruction on request
if (HOOK_EXISTS_BOUNDED(uc, UC_HOOK_CODE, ctx->base.pc_next)) {
// Sypc PC in advance
gen_update_nip(ctx, ctx->base.pc_next);
gen_uc_tracecode(tcg_ctx, 4, UC_HOOK_CODE_IDX, uc, ctx->base.pc_next);
// the callback might want to stop emulation immediately
check_exit_request(tcg_ctx);