fix load_helper & store_helper for PC sync
This commit is contained in:
@@ -1521,7 +1521,7 @@ load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi,
|
||||
continue;
|
||||
if (!HOOK_BOUND_CHECK(hook, paddr))
|
||||
continue;
|
||||
if (!synced && retaddr) {
|
||||
if (!synced && !uc->skip_sync_pc_on_exit && retaddr) {
|
||||
cpu_restore_state(uc->cpu, retaddr, false);
|
||||
synced = true;
|
||||
}
|
||||
@@ -1542,7 +1542,7 @@ load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi,
|
||||
continue;
|
||||
if (!HOOK_BOUND_CHECK(hook, paddr))
|
||||
continue;
|
||||
if (!synced && retaddr) {
|
||||
if (!synced &&!uc->skip_sync_pc_on_exit && retaddr) {
|
||||
cpu_restore_state(uc->cpu, retaddr, false);
|
||||
synced = true;
|
||||
}
|
||||
@@ -1610,7 +1610,7 @@ load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi,
|
||||
continue;
|
||||
if (!HOOK_BOUND_CHECK(hook, paddr))
|
||||
continue;
|
||||
if (!synced && retaddr) {
|
||||
if (!synced && !uc->skip_sync_pc_on_exit && retaddr) {
|
||||
cpu_restore_state(uc->cpu, retaddr, false);
|
||||
synced = true;
|
||||
}
|
||||
@@ -1642,7 +1642,7 @@ load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi,
|
||||
continue;
|
||||
if (!HOOK_BOUND_CHECK(hook, paddr))
|
||||
continue;
|
||||
if (!synced && retaddr) {
|
||||
if (!synced && !uc->skip_sync_pc_on_exit && retaddr) {
|
||||
cpu_restore_state(uc->cpu, retaddr, false);
|
||||
synced = true;
|
||||
}
|
||||
@@ -1692,7 +1692,7 @@ load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi,
|
||||
continue;
|
||||
if (!HOOK_BOUND_CHECK(hook, paddr))
|
||||
continue;
|
||||
if (!synced && retaddr) {
|
||||
if (!synced && !uc->skip_sync_pc_on_exit && retaddr) {
|
||||
cpu_restore_state(uc->cpu, retaddr, false);
|
||||
synced = true;
|
||||
}
|
||||
@@ -1806,6 +1806,10 @@ _out:
|
||||
continue;
|
||||
if (!HOOK_BOUND_CHECK(hook, paddr))
|
||||
continue;
|
||||
if (!synced && !uc->skip_sync_pc_on_exit && retaddr) {
|
||||
cpu_restore_state(uc->cpu, retaddr, false);
|
||||
synced = true;
|
||||
}
|
||||
JIT_CALLBACK_GUARD(((uc_cb_hookmem_t)hook->callback)(env->uc, UC_MEM_READ_AFTER, paddr, size, res, hook->user_data));
|
||||
// the last callback may already asked to stop emulation
|
||||
if (uc->stop_request)
|
||||
@@ -2150,7 +2154,7 @@ store_helper(CPUArchState *env, target_ulong addr, uint64_t val,
|
||||
continue;
|
||||
if (!HOOK_BOUND_CHECK(hook, paddr))
|
||||
continue;
|
||||
if (!synced && retaddr) {
|
||||
if (!synced && !uc->skip_sync_pc_on_exit && retaddr) {
|
||||
cpu_restore_state(uc->cpu, retaddr, false);
|
||||
synced = true;
|
||||
}
|
||||
@@ -2169,7 +2173,7 @@ store_helper(CPUArchState *env, target_ulong addr, uint64_t val,
|
||||
continue;
|
||||
if (!HOOK_BOUND_CHECK(hook, paddr))
|
||||
continue;
|
||||
if (!synced && retaddr) {
|
||||
if (!synced && !uc->skip_sync_pc_on_exit && retaddr) {
|
||||
cpu_restore_state(uc->cpu, retaddr, false);
|
||||
synced = true;
|
||||
}
|
||||
@@ -2222,7 +2226,7 @@ store_helper(CPUArchState *env, target_ulong addr, uint64_t val,
|
||||
continue;
|
||||
if (!HOOK_BOUND_CHECK(hook, paddr))
|
||||
continue;
|
||||
if (!synced && retaddr) {
|
||||
if (!synced && !uc->skip_sync_pc_on_exit && retaddr) {
|
||||
cpu_restore_state(uc->cpu, retaddr, false);
|
||||
synced = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user