Remove unused function parameter from cpu_restore_state

The previous patch removed the need for parameter puc.
Is is now unused, so remove it.

Cc: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
This commit is contained in:
Stefan Weil 2011-04-18 06:39:53 +00:00
parent e87b7cb0f0
commit 618ba8e6a1
16 changed files with 20 additions and 23 deletions

View File

@ -808,7 +808,7 @@ static inline int handle_cpu_signal(unsigned long pc, unsigned long address,
if (tb) { if (tb) {
/* the PC is inside the translated code. It means that we have /* the PC is inside the translated code. It means that we have
a virtual CPU fault */ 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 /* we restore the process signal mask as the sigreturn should

View File

@ -84,8 +84,7 @@ void cpu_gen_init(void);
int cpu_gen_code(CPUState *env, struct TranslationBlock *tb, int cpu_gen_code(CPUState *env, struct TranslationBlock *tb,
int *gen_code_size_ptr); int *gen_code_size_ptr);
int cpu_restore_state(struct TranslationBlock *tb, int cpu_restore_state(struct TranslationBlock *tb,
CPUState *env, unsigned long searched_pc, CPUState *env, unsigned long searched_pc);
void *puc);
void cpu_resume_from_signal(CPUState *env1, void *puc); void cpu_resume_from_signal(CPUState *env1, void *puc);
void cpu_io_recompile(CPUState *env, void *retaddr); void cpu_io_recompile(CPUState *env, void *retaddr);
TranslationBlock *tb_gen_code(CPUState *env, TranslationBlock *tb_gen_code(CPUState *env,

9
exec.c
View File

@ -1070,8 +1070,7 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,
restore the CPU state */ restore the CPU state */
current_tb_modified = 1; current_tb_modified = 1;
cpu_restore_state(current_tb, env, cpu_restore_state(current_tb, env, env->mem_io_pc);
env->mem_io_pc, NULL);
cpu_get_tb_cpu_state(env, &current_pc, &current_cs_base, cpu_get_tb_cpu_state(env, &current_pc, &current_cs_base,
&current_flags); &current_flags);
} }
@ -1179,7 +1178,7 @@ static void tb_invalidate_phys_page(tb_page_addr_t addr,
restore the CPU state */ restore the CPU state */
current_tb_modified = 1; 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, &current_pc, &current_cs_base, cpu_get_tb_cpu_state(env, &current_pc, &current_cs_base,
&current_flags); &current_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 " cpu_abort(env, "check_watchpoint: could not find TB for "
"pc=%p", (void *)env->mem_io_pc); "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); tb_phys_invalidate(tb, -1);
if (wp->flags & BP_STOP_BEFORE_ACCESS) { if (wp->flags & BP_STOP_BEFORE_ACCESS) {
env->exception_index = EXCP_DEBUG; env->exception_index = EXCP_DEBUG;
@ -4301,7 +4300,7 @@ void cpu_io_recompile(CPUState *env, void *retaddr)
retaddr); retaddr);
} }
n = env->icount_decr.u16.low + tb->icount; 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 /* Calculate how many instructions had been executed before the fault
occurred. */ occurred. */
n = n - env->icount_decr.u16.low; n = n - env->icount_decr.u16.low;

View File

@ -1374,7 +1374,7 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr)
if (likely(tb)) { if (likely(tb)) {
/* the PC is inside the translated code. It means that we have /* the PC is inside the translated code. It means that we have
a virtual CPU fault */ 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 */ /* Exception index and error code are already set */

View File

@ -90,7 +90,7 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr)
if (tb) { if (tb) {
/* the PC is inside the translated code. It means that we have /* the PC is inside the translated code. It means that we have
a virtual CPU fault */ a virtual CPU fault */
cpu_restore_state(tb, env, pc, NULL); cpu_restore_state(tb, env, pc);
} }
} }
raise_exception(env->exception_index); raise_exception(env->exception_index);

View File

@ -77,7 +77,7 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr)
if (tb) { if (tb) {
/* the PC is inside the translated code. It means that we have /* the PC is inside the translated code. It means that we have
a virtual CPU fault */ a virtual CPU fault */
cpu_restore_state(tb, env, pc, NULL); cpu_restore_state(tb, env, pc);
/* Evaluate flags after retranslation. */ /* Evaluate flags after retranslation. */
helper_top_evaluate_flags(); helper_top_evaluate_flags();

View File

@ -4835,7 +4835,7 @@ void tlb_fill(target_ulong addr, int is_write, int mmu_idx, void *retaddr)
if (tb) { if (tb) {
/* the PC is inside the translated code. It means that we have /* the PC is inside the translated code. It means that we have
a virtual CPU fault */ 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); raise_exception_err(env->exception_index, env->error_code);

View File

@ -95,7 +95,7 @@ void tlb_fill(target_ulong addr, int is_write, int mmu_idx, void *retaddr)
if (tb) { if (tb) {
/* the PC is inside the translated code. It means that we have /* the PC is inside the translated code. It means that we have
a virtual CPU fault */ a virtual CPU fault */
cpu_restore_state(tb, env, pc, NULL); cpu_restore_state(tb, env, pc);
} }
} }
cpu_loop_exit(); cpu_loop_exit();

View File

@ -68,7 +68,7 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr)
if (tb) { if (tb) {
/* the PC is inside the translated code. It means that we have /* the PC is inside the translated code. It means that we have
a virtual CPU fault */ a virtual CPU fault */
cpu_restore_state(tb, env, pc, NULL); cpu_restore_state(tb, env, pc);
} }
} }
cpu_loop_exit(); cpu_loop_exit();

View File

@ -60,7 +60,7 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr)
if (tb) { if (tb) {
/* the PC is inside the translated code. It means that we have /* the PC is inside the translated code. It means that we have
a virtual CPU fault */ a virtual CPU fault */
cpu_restore_state(tb, env, pc, NULL); cpu_restore_state(tb, env, pc);
} }
} }
cpu_loop_exit(); cpu_loop_exit();

View File

@ -54,7 +54,7 @@ static void do_restore_state (void *pc_ptr)
tb = tb_find_pc (pc); tb = tb_find_pc (pc);
if (tb) { if (tb) {
cpu_restore_state (tb, env, pc, NULL); cpu_restore_state(tb, env, pc);
} }
} }
#endif #endif
@ -1972,7 +1972,7 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr)
if (tb) { if (tb) {
/* the PC is inside the translated code. It means that we have /* the PC is inside the translated code. It means that we have
a virtual CPU fault */ 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); helper_raise_exception_err(env->exception_index, env->error_code);

View File

@ -3741,7 +3741,7 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr)
if (likely(tb)) { if (likely(tb)) {
/* the PC is inside the translated code. It means that we have /* the PC is inside the translated code. It means that we have
a virtual CPU fault */ 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); helper_raise_exception_err(env->exception_index, env->error_code);

View File

@ -61,7 +61,7 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr)
if (likely(tb)) { if (likely(tb)) {
/* the PC is inside the translated code. It means that we have /* the PC is inside the translated code. It means that we have
a virtual CPU fault */ a virtual CPU fault */
cpu_restore_state(tb, env, pc, NULL); cpu_restore_state(tb, env, pc);
} }
} }
/* XXX */ /* XXX */

View File

@ -32,7 +32,7 @@ static void cpu_restore_state_from_retaddr(void *retaddr)
if (tb) { if (tb) {
/* the PC is inside the translated code. It means that we have /* the PC is inside the translated code. It means that we have
a virtual CPU fault */ a virtual CPU fault */
cpu_restore_state(tb, env, pc, NULL); cpu_restore_state(tb, env, pc);
} }
} }
} }

View File

@ -4375,7 +4375,7 @@ static void cpu_restore_state2(void *retaddr)
if (tb) { if (tb) {
/* the PC is inside the translated code. It means that we have /* the PC is inside the translated code. It means that we have
a virtual CPU fault */ a virtual CPU fault */
cpu_restore_state(tb, env, pc, (void *)(long)env->cond); cpu_restore_state(tb, env, pc);
} }
} }
} }

View File

@ -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. /* The cpu state corresponding to 'searched_pc' is restored.
*/ */
int cpu_restore_state(TranslationBlock *tb, int cpu_restore_state(TranslationBlock *tb,
CPUState *env, unsigned long searched_pc, CPUState *env, unsigned long searched_pc)
void *puc)
{ {
TCGContext *s = &tcg_ctx; TCGContext *s = &tcg_ctx;
int j; int j;