提交 74f10515 编写于 作者: A Andreas Färber

translate-all: Change cpu_restore_state_from_tb() argument to CPUState

And normalize the argument order.
Signed-off-by: NAndreas Färber <afaerber@suse.de>
上级 3f38f309
...@@ -197,10 +197,10 @@ int cpu_gen_code(CPUArchState *env, TranslationBlock *tb, int *gen_code_size_ptr ...@@ -197,10 +197,10 @@ int cpu_gen_code(CPUArchState *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.
*/ */
static int cpu_restore_state_from_tb(TranslationBlock *tb, CPUArchState *env, static int cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb,
uintptr_t searched_pc) uintptr_t searched_pc)
{ {
CPUState *cpu = ENV_GET_CPU(env); CPUArchState *env = cpu->env_ptr;
TCGContext *s = &tcg_ctx; TCGContext *s = &tcg_ctx;
int j; int j;
uintptr_t tc_ptr; uintptr_t tc_ptr;
...@@ -255,12 +255,11 @@ static int cpu_restore_state_from_tb(TranslationBlock *tb, CPUArchState *env, ...@@ -255,12 +255,11 @@ static int cpu_restore_state_from_tb(TranslationBlock *tb, CPUArchState *env,
bool cpu_restore_state(CPUState *cpu, uintptr_t retaddr) bool cpu_restore_state(CPUState *cpu, uintptr_t retaddr)
{ {
CPUArchState *env = cpu->env_ptr;
TranslationBlock *tb; TranslationBlock *tb;
tb = tb_find_pc(retaddr); tb = tb_find_pc(retaddr);
if (tb) { if (tb) {
cpu_restore_state_from_tb(tb, env, retaddr); cpu_restore_state_from_tb(cpu, tb, retaddr);
return true; return true;
} }
return false; return false;
...@@ -1075,7 +1074,7 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end, ...@@ -1075,7 +1074,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_from_tb(current_tb, env, cpu->mem_io_pc); cpu_restore_state_from_tb(cpu, current_tb, cpu->mem_io_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);
} }
...@@ -1194,7 +1193,7 @@ static void tb_invalidate_phys_page(tb_page_addr_t addr, ...@@ -1194,7 +1193,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_from_tb(current_tb, env, pc); cpu_restore_state_from_tb(cpu, current_tb, 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);
} }
...@@ -1382,7 +1381,7 @@ void tb_check_watchpoint(CPUArchState *env) ...@@ -1382,7 +1381,7 @@ void tb_check_watchpoint(CPUArchState *env)
cpu_abort(env, "check_watchpoint: could not find TB for pc=%p", cpu_abort(env, "check_watchpoint: could not find TB for pc=%p",
(void *)cpu->mem_io_pc); (void *)cpu->mem_io_pc);
} }
cpu_restore_state_from_tb(tb, env, cpu->mem_io_pc); cpu_restore_state_from_tb(cpu, tb, cpu->mem_io_pc);
tb_phys_invalidate(tb, -1); tb_phys_invalidate(tb, -1);
} }
...@@ -1434,7 +1433,7 @@ void cpu_io_recompile(CPUArchState *env, uintptr_t retaddr) ...@@ -1434,7 +1433,7 @@ void cpu_io_recompile(CPUArchState *env, uintptr_t retaddr)
(void *)retaddr); (void *)retaddr);
} }
n = cpu->icount_decr.u16.low + tb->icount; n = cpu->icount_decr.u16.low + tb->icount;
cpu_restore_state_from_tb(tb, env, retaddr); cpu_restore_state_from_tb(cpu, tb, 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 - cpu->icount_decr.u16.low; n = n - cpu->icount_decr.u16.low;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册