@@ -515,11 +515,11 @@ static inline void cpu_handle_interrupt(CPUState *cpu,
}
}
-static inline void cpu_loop_exec_tb(CPUState *cpu, TranslationBlock *tb,
- TranslationBlock **last_tb, int *tb_exit,
- SyncClocks *sc)
+static inline void cpu_loop_exec_tb(CPUState *cpu, TranslationBlock **last_tb,
+ int *tb_exit, SyncClocks *sc)
{
uintptr_t ret;
+ TranslationBlock *tb = *last_tb;
if (unlikely(cpu->exit_request)) {
return;
@@ -609,7 +609,7 @@ int cpu_exec(CPUState *cpu)
for(;;) {
/* prepare setjmp context for exception handling */
if (sigsetjmp(cpu->jmp_env, 0) == 0) {
- TranslationBlock *tb, *last_tb = NULL;
+ TranslationBlock *tb = NULL;
int tb_exit = 0;
/* if an exception is pending, we execute it here */
@@ -619,9 +619,9 @@ int cpu_exec(CPUState *cpu)
cpu->tb_flushed = false; /* reset before first TB lookup */
for(;;) {
- cpu_handle_interrupt(cpu, &last_tb);
- tb = tb_find_fast(cpu, last_tb, tb_exit);
- cpu_loop_exec_tb(cpu, tb, &last_tb, &tb_exit, &sc);
+ cpu_handle_interrupt(cpu, &tb);
+ tb = tb_find_fast(cpu, tb, tb_exit);
+ cpu_loop_exec_tb(cpu, &tb, &tb_exit, &sc);
/* Try to align the host and virtual clocks
if the guest is in advance */
align_clocks(&sc, cpu);