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-sparc/exec.h | |
parent | Avoid compiler warning. (diff) | |
download | qemu-kvm-bfed01fc79cb2da1c6ca700bb0ce9238ce2974c7.tar.gz qemu-kvm-bfed01fc79cb2da1c6ca700bb0ce9238ce2974c7.tar.bz2 qemu-kvm-bfed01fc79cb2da1c6ca700bb0ce9238ce2974c7.zip |
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-sparc/exec.h')
-rw-r--r-- | target-sparc/exec.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/target-sparc/exec.h b/target-sparc/exec.h index 8a9fa89ec..0305a0498 100644 --- a/target-sparc/exec.h +++ b/target-sparc/exec.h @@ -115,4 +115,14 @@ static inline void regs_to_env(void) int cpu_sparc_handle_mmu_fault(CPUState *env, target_ulong address, int rw, int is_user, int is_softmmu); +static inline int cpu_halted(CPUState *env) { + if (!env->halted) + return 0; + if ((env->interrupt_request & CPU_INTERRUPT_HARD) && (env->psret != 0)) { + env->halted = 0; + return 0; + } + return EXCP_HALTED; +} + #endif |