diff --git a/cpu-exec.c b/cpu-exec.c index d57afef6424b07db908b2767f2126d21028d8aa2..395cd8cf9047bc1eec16290ffbb638afe251a0ea 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -808,7 +808,7 @@ static inline int handle_cpu_signal(unsigned long pc, unsigned long address, if (tb) { /* the PC is inside the translated code. It means that we have a virtual CPU fault */ - cpu_restore_state(tb, env, pc, puc); + cpu_restore_state(tb, env, pc); } /* we restore the process signal mask as the sigreturn should diff --git a/exec-all.h b/exec-all.h index 29fd322347ce6b97ea2e9662d930a8c9d284da3a..7c2d29ff9831c6458f65fb8d03f94a0e353dd094 100644 --- a/exec-all.h +++ b/exec-all.h @@ -84,8 +84,7 @@ void cpu_gen_init(void); int cpu_gen_code(CPUState *env, struct TranslationBlock *tb, int *gen_code_size_ptr); int cpu_restore_state(struct TranslationBlock *tb, - CPUState *env, unsigned long searched_pc, - void *puc); + CPUState *env, unsigned long searched_pc); void cpu_resume_from_signal(CPUState *env1, void *puc); void cpu_io_recompile(CPUState *env, void *retaddr); TranslationBlock *tb_gen_code(CPUState *env, diff --git a/exec.c b/exec.c index b1ee52a4d00406065e089024a3f7645bd081cf7b..c3dc68ae092509e2abdba4d2ca97b2ecd9a4aa19 100644 --- a/exec.c +++ b/exec.c @@ -1070,8 +1070,7 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end, restore the CPU state */ current_tb_modified = 1; - cpu_restore_state(current_tb, env, - env->mem_io_pc, NULL); + cpu_restore_state(current_tb, env, env->mem_io_pc); cpu_get_tb_cpu_state(env, ¤t_pc, ¤t_cs_base, ¤t_flags); } @@ -1179,7 +1178,7 @@ static void tb_invalidate_phys_page(tb_page_addr_t addr, restore the CPU state */ current_tb_modified = 1; - cpu_restore_state(current_tb, env, pc, puc); + cpu_restore_state(current_tb, env, pc); cpu_get_tb_cpu_state(env, ¤t_pc, ¤t_cs_base, ¤t_flags); } @@ -3266,7 +3265,7 @@ static void check_watchpoint(int offset, int len_mask, int flags) cpu_abort(env, "check_watchpoint: could not find TB for " "pc=%p", (void *)env->mem_io_pc); } - cpu_restore_state(tb, env, env->mem_io_pc, NULL); + cpu_restore_state(tb, env, env->mem_io_pc); tb_phys_invalidate(tb, -1); if (wp->flags & BP_STOP_BEFORE_ACCESS) { env->exception_index = EXCP_DEBUG; @@ -4301,7 +4300,7 @@ void cpu_io_recompile(CPUState *env, void *retaddr) retaddr); } n = env->icount_decr.u16.low + tb->icount; - cpu_restore_state(tb, env, (unsigned long)retaddr, NULL); + cpu_restore_state(tb, env, (unsigned long)retaddr); /* Calculate how many instructions had been executed before the fault occurred. */ n = n - env->icount_decr.u16.low; diff --git a/target-alpha/op_helper.c b/target-alpha/op_helper.c index 9f71db4c3a8e72fda129d67036856934167639a0..4ccb10b0f42d329fe398127279521ea865a8007d 100644 --- a/target-alpha/op_helper.c +++ b/target-alpha/op_helper.c @@ -1374,7 +1374,7 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr) if (likely(tb)) { /* the PC is inside the translated code. It means that we have a virtual CPU fault */ - cpu_restore_state(tb, env, pc, NULL); + cpu_restore_state(tb, env, pc); } } /* Exception index and error code are already set */ diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index ee7286b77ab3320b1a33c540b76482ef244d59b0..8334fbcf6d987515a52b22251631b21a61f3e730 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_helper.c @@ -90,7 +90,7 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr) if (tb) { /* the PC is inside the translated code. It means that we have a virtual CPU fault */ - cpu_restore_state(tb, env, pc, NULL); + cpu_restore_state(tb, env, pc); } } raise_exception(env->exception_index); diff --git a/target-cris/op_helper.c b/target-cris/op_helper.c index be9eb06fd06a29fd19e4e2bd3db2cc13d2dde281..34329e2a602200c598ba864a6b2134d42bb9cf05 100644 --- a/target-cris/op_helper.c +++ b/target-cris/op_helper.c @@ -77,7 +77,7 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr) if (tb) { /* the PC is inside the translated code. It means that we have a virtual CPU fault */ - cpu_restore_state(tb, env, pc, NULL); + cpu_restore_state(tb, env, pc); /* Evaluate flags after retranslation. */ helper_top_evaluate_flags(); diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c index a73427fe457d198be129ccacb1c24462d748ef70..fba536f0fbf6a640c523cd2bdca55c56708a8f89 100644 --- a/target-i386/op_helper.c +++ b/target-i386/op_helper.c @@ -4835,7 +4835,7 @@ void tlb_fill(target_ulong addr, int is_write, int mmu_idx, void *retaddr) if (tb) { /* the PC is inside the translated code. It means that we have a virtual CPU fault */ - cpu_restore_state(tb, env, pc, NULL); + cpu_restore_state(tb, env, pc); } } raise_exception_err(env->exception_index, env->error_code); diff --git a/target-lm32/op_helper.c b/target-lm32/op_helper.c index e84ba488be33d9a2b3e540c8932430a49da78ddb..c72b1df47b1bc2fcc56337f8814dccd4acbfb266 100644 --- a/target-lm32/op_helper.c +++ b/target-lm32/op_helper.c @@ -95,7 +95,7 @@ void tlb_fill(target_ulong addr, int is_write, int mmu_idx, void *retaddr) if (tb) { /* the PC is inside the translated code. It means that we have a virtual CPU fault */ - cpu_restore_state(tb, env, pc, NULL); + cpu_restore_state(tb, env, pc); } } cpu_loop_exit(); diff --git a/target-m68k/op_helper.c b/target-m68k/op_helper.c index 07111073f81af975e90ed6f190feba3ecbf4e53c..9b13bdbcc24680fe2f7770b0eb5f6df4045353a8 100644 --- a/target-m68k/op_helper.c +++ b/target-m68k/op_helper.c @@ -68,7 +68,7 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr) if (tb) { /* the PC is inside the translated code. It means that we have a virtual CPU fault */ - cpu_restore_state(tb, env, pc, NULL); + cpu_restore_state(tb, env, pc); } } cpu_loop_exit(); diff --git a/target-microblaze/op_helper.c b/target-microblaze/op_helper.c index b7cd6b288fc4f1fa1a0116b7ec8eb3e6af2566ef..c7b2f97d96f1054a159e204a5747fc8c5f5529b5 100644 --- a/target-microblaze/op_helper.c +++ b/target-microblaze/op_helper.c @@ -60,7 +60,7 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr) if (tb) { /* the PC is inside the translated code. It means that we have a virtual CPU fault */ - cpu_restore_state(tb, env, pc, NULL); + cpu_restore_state(tb, env, pc); } } cpu_loop_exit(); diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index 8cba535a328577ca3c9c38b170e671443db5f0c2..b8e4991f32b3a768ba820c2754e5cafc514b5cf6 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -54,7 +54,7 @@ static void do_restore_state (void *pc_ptr) tb = tb_find_pc (pc); if (tb) { - cpu_restore_state (tb, env, pc, NULL); + cpu_restore_state(tb, env, pc); } } #endif @@ -1972,7 +1972,7 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr) if (tb) { /* the PC is inside the translated code. It means that we have a virtual CPU fault */ - cpu_restore_state(tb, env, pc, NULL); + cpu_restore_state(tb, env, pc); } } helper_raise_exception_err(env->exception_index, env->error_code); diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index 28d40ac9aa9a6043960540fe9f93511802d029d6..d5db484b4aa755e3afe628d4c91ce1f62c2c25db 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -3741,7 +3741,7 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr) if (likely(tb)) { /* the PC is inside the translated code. It means that we have a virtual CPU fault */ - cpu_restore_state(tb, env, pc, NULL); + cpu_restore_state(tb, env, pc); } } helper_raise_exception_err(env->exception_index, env->error_code); diff --git a/target-s390x/op_helper.c b/target-s390x/op_helper.c index 402df2d85e50819e71c754d361d68e5b1e00b56f..be455b9de23cff49b2af4d42c144cefcc9e27956 100644 --- a/target-s390x/op_helper.c +++ b/target-s390x/op_helper.c @@ -61,7 +61,7 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr) if (likely(tb)) { /* the PC is inside the translated code. It means that we have a virtual CPU fault */ - cpu_restore_state(tb, env, pc, NULL); + cpu_restore_state(tb, env, pc); } } /* XXX */ diff --git a/target-sh4/op_helper.c b/target-sh4/op_helper.c index c127860cd9f866866b2fe34f4afa4ab34730d57f..b909d18bc451b9ab8570c0475151cb28a07a7f30 100644 --- a/target-sh4/op_helper.c +++ b/target-sh4/op_helper.c @@ -32,7 +32,7 @@ static void cpu_restore_state_from_retaddr(void *retaddr) if (tb) { /* the PC is inside the translated code. It means that we have a virtual CPU fault */ - cpu_restore_state(tb, env, pc, NULL); + cpu_restore_state(tb, env, pc); } } } diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index 854f168c60c7a0381960f90f30166f954825c0d1..ffffb8c0bd544ab479a7a32a208d9de13aff62d9 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -4375,7 +4375,7 @@ static void cpu_restore_state2(void *retaddr) if (tb) { /* the PC is inside the translated code. It means that we have a virtual CPU fault */ - cpu_restore_state(tb, env, pc, (void *)(long)env->cond); + cpu_restore_state(tb, env, pc); } } } diff --git a/translate-all.c b/translate-all.c index 97668b2c8e2a828c92c52f47d86234a43c5dffe1..2ca190ca8fe8ab010200f7280dca0bbac20f5bb6 100644 --- a/translate-all.c +++ b/translate-all.c @@ -112,8 +112,7 @@ int cpu_gen_code(CPUState *env, TranslationBlock *tb, int *gen_code_size_ptr) /* The cpu state corresponding to 'searched_pc' is restored. */ int cpu_restore_state(TranslationBlock *tb, - CPUState *env, unsigned long searched_pc, - void *puc) + CPUState *env, unsigned long searched_pc) { TCGContext *s = &tcg_ctx; int j;