summaryrefslogtreecommitdiff
path: root/target-sh4/exec.h
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-22 10:11:48 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-06-22 10:11:48 +0000
commitd10927f86bd2458fd154fc5a8b529d7e54846c14 (patch)
tree68e26b98bfb20203c565d1841a16cc2c64deceb4 /target-sh4/exec.h
parent8b6e0729aa1965e3db366887ca47ec3c96f0ab2a (diff)
downloadqemu-d10927f86bd2458fd154fc5a8b529d7e54846c14.tar.gz
Add missing cpu_halted function, by Magnus Damm.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2998 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sh4/exec.h')
-rw-r--r--target-sh4/exec.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/target-sh4/exec.h b/target-sh4/exec.h
index 3563300307..84f29319e2 100644
--- a/target-sh4/exec.h
+++ b/target-sh4/exec.h
@@ -36,6 +36,16 @@ register uint32_t T1 asm(AREG2);
#include "cpu.h"
#include "exec-all.h"
+static inline int cpu_halted(CPUState *env) {
+ if (!env->halted)
+ return 0;
+ if (env->interrupt_request & CPU_INTERRUPT_HARD) {
+ env->halted = 0;
+ return 0;
+ }
+ return EXCP_HALTED;
+}
+
#ifndef CONFIG_USER_ONLY
#include "softmmu_exec.h"
#endif