aboutsummaryrefslogtreecommitdiff
path: root/cpu-exec.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-05-14 12:52:35 +0000
committerBlue Swirl <blauwirbel@gmail.com>2011-06-26 18:25:13 +0000
commit1162c041c11a49b8ba50bf5f73a72352421787a8 (patch)
treee4511db4385cbded0166d064bd292082a9d8f438 /cpu-exec.c
parent4d2c2b77f3d0c59642dd2ce799a0fb4c2a91aca8 (diff)
cpu_loop_exit: avoid using AREG0
Make cpu_loop_exit() take a parameter for CPUState instead of relying on global env. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'cpu-exec.c')
-rw-r--r--cpu-exec.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/cpu-exec.c b/cpu-exec.c
index 7aa1d004e8..d5f492f9a5 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -37,10 +37,10 @@ int qemu_cpu_has_work(CPUState *env)
return cpu_has_work(env);
}
-void cpu_loop_exit(void)
+void cpu_loop_exit(CPUState *env1)
{
- env->current_tb = NULL;
- longjmp(env->jmp_env, 1);
+ env1->current_tb = NULL;
+ longjmp(env1->jmp_env, 1);
}
/* exit the current TB from a signal handler. The host registers are
@@ -327,7 +327,7 @@ int cpu_exec(CPUState *env1)
if (interrupt_request & CPU_INTERRUPT_DEBUG) {
env->interrupt_request &= ~CPU_INTERRUPT_DEBUG;
env->exception_index = EXCP_DEBUG;
- cpu_loop_exit();
+ cpu_loop_exit(env);
}
#if defined(TARGET_ARM) || defined(TARGET_SPARC) || defined(TARGET_MIPS) || \
defined(TARGET_PPC) || defined(TARGET_ALPHA) || defined(TARGET_CRIS) || \
@@ -336,7 +336,7 @@ int cpu_exec(CPUState *env1)
env->interrupt_request &= ~CPU_INTERRUPT_HALT;
env->halted = 1;
env->exception_index = EXCP_HLT;
- cpu_loop_exit();
+ cpu_loop_exit(env);
}
#endif
#if defined(TARGET_I386)
@@ -344,7 +344,7 @@ int cpu_exec(CPUState *env1)
svm_check_intercept(SVM_EXIT_INIT);
do_cpu_init(env);
env->exception_index = EXCP_HALTED;
- cpu_loop_exit();
+ cpu_loop_exit(env);
} else if (interrupt_request & CPU_INTERRUPT_SIPI) {
do_cpu_sipi(env);
} else if (env->hflags2 & HF2_GIF_MASK) {
@@ -564,7 +564,7 @@ int cpu_exec(CPUState *env1)
if (unlikely(env->exit_request)) {
env->exit_request = 0;
env->exception_index = EXCP_INTERRUPT;
- cpu_loop_exit();
+ cpu_loop_exit(env);
}
#if defined(DEBUG_DISAS) || defined(CONFIG_DEBUG_EXEC)
if (qemu_loglevel_mask(CPU_LOG_TB_CPU)) {
@@ -647,7 +647,7 @@ int cpu_exec(CPUState *env1)
}
env->exception_index = EXCP_INTERRUPT;
next_tb = 0;
- cpu_loop_exit();
+ cpu_loop_exit(env);
}
}
}