[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL for-2.0-rc0 41/58] translate-all: Change cpu_restore_
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PULL for-2.0-rc0 41/58] translate-all: Change cpu_restore_state_from_tb() argument to CPUState |
Date: |
Thu, 13 Mar 2014 15:54:44 +0100 |
And normalize the argument order.
Signed-off-by: Andreas Färber <address@hidden>
---
translate-all.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/translate-all.c b/translate-all.c
index 70d8229..adcef83 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -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.
*/
-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)
{
- CPUState *cpu = ENV_GET_CPU(env);
+ CPUArchState *env = cpu->env_ptr;
TCGContext *s = &tcg_ctx;
int j;
uintptr_t tc_ptr;
@@ -255,12 +255,11 @@ static int cpu_restore_state_from_tb(TranslationBlock
*tb, CPUArchState *env,
bool cpu_restore_state(CPUState *cpu, uintptr_t retaddr)
{
- CPUArchState *env = cpu->env_ptr;
TranslationBlock *tb;
tb = tb_find_pc(retaddr);
if (tb) {
- cpu_restore_state_from_tb(tb, env, retaddr);
+ cpu_restore_state_from_tb(cpu, tb, retaddr);
return true;
}
return false;
@@ -1075,7 +1074,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_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, ¤t_pc, ¤t_cs_base,
¤t_flags);
}
@@ -1194,7 +1193,7 @@ static void tb_invalidate_phys_page(tb_page_addr_t addr,
restore the CPU state */
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, ¤t_pc, ¤t_cs_base,
¤t_flags);
}
@@ -1382,7 +1381,7 @@ void tb_check_watchpoint(CPUArchState *env)
cpu_abort(env, "check_watchpoint: could not find TB for pc=%p",
(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);
}
@@ -1434,7 +1433,7 @@ void cpu_io_recompile(CPUArchState *env, uintptr_t
retaddr)
(void *)retaddr);
}
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
occurred. */
n = n - cpu->icount_decr.u16.low;
--
1.8.4.5
- [Qemu-devel] [PULL for-2.0-rc0 31/58] cpu: Move icount_decr field from CPU_COMMON to CPUState, (continued)
- [Qemu-devel] [PULL for-2.0-rc0 31/58] cpu: Move icount_decr field from CPU_COMMON to CPUState, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 30/58] cpu: Move icount_extra field from CPU_COMMON to CPUState, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 32/58] cpu: Move tb_jmp_cache field from CPU_COMMON to CPUState, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 33/58] cpu: Move jmp_env field from CPU_COMMON to CPUState, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 36/58] cpu: Move watchpoint fields from CPU_COMMON to CPUState, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 35/58] cpu: Move opaque field from CPU_COMMON to CPUState, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 37/58] cpu: Move breakpoints field from CPU_COMMON to CPUState, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 34/58] cpu: Move exception_index field from CPU_COMMON to CPUState, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 39/58] cpu-exec: Change cpu_loop_exit() argument to CPUState, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 38/58] exec: Change tlb_fill() argument to CPUState, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 41/58] translate-all: Change cpu_restore_state_from_tb() argument to CPUState,
Andreas Färber <=
- [Qemu-devel] [PULL for-2.0-rc0 42/58] translate-all: Change tb_check_watchpoint() argument to CPUState, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 43/58] translate-all: Change cpu_io_recompile() argument to CPUState, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 40/58] translate-all: Change cpu_restore_state() argument to CPUState, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 44/58] translate-all: Change tb_gen_code() argument to CPUState, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 45/58] translate-all: Change tb_flush_jmp_cache() argument to CPUState, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 48/58] exec: Change cpu_breakpoint_{insert, remove{, _by_ref, _all}} argument, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 51/58] exec: Change memory_region_section_get_iotlb() argument to CPUState, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 47/58] exec: Change cpu_watchpoint_{insert, remove{, _by_ref, _all}} argument, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 46/58] target-ppc: Use PowerPCCPU in PowerPCCPUClass::handle_mmu_fault hook, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 49/58] cpu-exec: Change cpu_resume_from_signal() argument to CPUState, Andreas Färber, 2014/03/13