aboutsummaryrefslogtreecommitdiff
path: root/target-sparc/exec.h
diff options
context:
space:
mode:
Diffstat (limited to 'target-sparc/exec.h')
-rw-r--r--target-sparc/exec.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/target-sparc/exec.h b/target-sparc/exec.h
index 36fd117..f37c8ad 100644
--- a/target-sparc/exec.h
+++ b/target-sparc/exec.h
@@ -24,10 +24,17 @@ static inline void regs_to_env(void)
/* op_helper.c */
void do_interrupt(CPUState *env);
+static inline int cpu_has_work(CPUState *env1)
+{
+ return (env1->interrupt_request & CPU_INTERRUPT_HARD) &&
+ (env1->psret != 0);
+}
+
+
static inline int cpu_halted(CPUState *env1) {
if (!env1->halted)
return 0;
- if ((env1->interrupt_request & CPU_INTERRUPT_HARD) && (env1->psret != 0)) {
+ if (cpu_has_work(env1)) {
env1->halted = 0;
return 0;
}