diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-06-03 17:44:37 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-06-03 17:44:37 +0000 |
commit | bfed01fc79cb2da1c6ca700bb0ce9238ce2974c7 (patch) | |
tree | 4260b2f4481ff9250eaacf143273a8c21796c5bf /target-i386 | |
parent | 08ab123c2dba80cf6b7f0df563af14a7d902f759 (diff) | |
download | qemu-bfed01fc79cb2da1c6ca700bb0ce9238ce2974c7.zip qemu-bfed01fc79cb2da1c6ca700bb0ce9238ce2974c7.tar.gz qemu-bfed01fc79cb2da1c6ca700bb0ce9238ce2974c7.tar.bz2 |
Clean up of some target specifics in exec.c/cpu-exec.c.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2936 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/exec.h | 13 | ||||
-rw-r--r-- | target-i386/helper.c | 8 |
2 files changed, 13 insertions, 8 deletions
diff --git a/target-i386/exec.h b/target-i386/exec.h index 377f7bd..f1cf2b9 100644 --- a/target-i386/exec.h +++ b/target-i386/exec.h @@ -575,3 +575,16 @@ static inline void regs_to_env(void) env->regs[R_EDI] = EDI; #endif } + +static inline int cpu_halted(CPUState *env) { + /* handle exit of HALTED state */ + if (env->hflags & HF_HALTED_MASK) + return 0; + /* disable halt condition */ + if ((env->interrupt_request & CPU_INTERRUPT_HARD) && + (env->eflags & IF_MASK)) { + env->hflags &= ~HF_HALTED_MASK; + return 0; + } + return EXCP_HALTED; +} diff --git a/target-i386/helper.c b/target-i386/helper.c index ef4b77e..951fdc5 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -106,14 +106,6 @@ void cpu_unlock(void) spin_unlock(&global_cpu_lock); } -void cpu_loop_exit(void) -{ - /* NOTE: the register at this point must be saved by hand because - longjmp restore them */ - regs_to_env(); - longjmp(env->jmp_env, 1); -} - /* return non zero if error */ static inline int load_segment(uint32_t *e1_ptr, uint32_t *e2_ptr, int selector) |