This adds an extra op to translator to allow the block hook sync pc in the very begining
This commit is contained in:
2025-01-18 15:07:22 +08:00
parent a78d690da5
commit 0c512f91a1
12 changed files with 85 additions and 0 deletions

View File

@@ -74,6 +74,7 @@ void translator_loop(const TranslatorOps *ops, DisasContextBase *db,
* full translation cache
*/
if (HOOK_EXISTS_BOUNDED(uc, UC_HOOK_BLOCK, tb->pc)) {
ops->pc_sync(db, cpu);
prev_op = tcg_last_op(tcg_ctx);
block_hook = true;
gen_uc_tracecode(tcg_ctx, 0xf8f8f8f8, UC_HOOK_BLOCK_IDX, uc, db->pc_first);