aboutsummaryrefslogtreecommitdiff
path: root/target-sparc
diff options
context:
space:
mode:
Diffstat (limited to 'target-sparc')
-rw-r--r--target-sparc/exec.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/target-sparc/exec.h b/target-sparc/exec.h
index 8a9fa89ec6..0305a0498f 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