diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2011-05-14 12:52:35 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-06-26 18:25:13 +0000 |
commit | 1162c041c11a49b8ba50bf5f73a72352421787a8 (patch) | |
tree | e4511db4385cbded0166d064bd292082a9d8f438 /user-exec.c | |
parent | 4d2c2b77f3d0c59642dd2ce799a0fb4c2a91aca8 (diff) | |
download | qemu-1162c041c11a49b8ba50bf5f73a72352421787a8.tar.gz qemu-1162c041c11a49b8ba50bf5f73a72352421787a8.tar.bz2 qemu-1162c041c11a49b8ba50bf5f73a72352421787a8.zip |
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 'user-exec.c')
-rw-r--r-- | user-exec.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/user-exec.c b/user-exec.c index d4a6abb8f5..02c2f8ba43 100644 --- a/user-exec.c +++ b/user-exec.c @@ -37,13 +37,14 @@ //#define DEBUG_SIGNAL +static void exception_action(CPUState *env1) +{ #if defined(TARGET_I386) -#define EXCEPTION_ACTION \ - raise_exception_err(env->exception_index, env->error_code) + raise_exception_err(env1->exception_index, env1->error_code); #else -#define EXCEPTION_ACTION \ - cpu_loop_exit() + cpu_loop_exit(env1); #endif +} /* exit the current TB from a signal handler. The host registers are restored in a state compatible with the CPU emulator @@ -118,7 +119,7 @@ static inline int handle_cpu_signal(unsigned long pc, unsigned long address, /* we restore the process signal mask as the sigreturn should do it (XXX: use sigsetjmp) */ sigprocmask(SIG_SETMASK, old_set, NULL); - EXCEPTION_ACTION; + exception_action(env); /* never comes here */ return 1; |