]> git.proxmox.com Git - qemu.git/blobdiff - target-ppc/exec.h
qemu: per-arch cpu_has_work (Marcelo Tosatti)
[qemu.git] / target-ppc / exec.h
index d89698c63a2f4f67020317297a998e1463297290..f6b9ee6c83a2bba53a5cb38951a319fe55656293 100644 (file)
@@ -44,11 +44,17 @@ static always_inline void regs_to_env (void)
 {
 }
 
+static always_inline int cpu_has_work(CPUState *env)
+{
+    return (msr_ee && (env->interrupt_request & CPU_INTERRUPT_HARD));
+}
+
+
 static always_inline int cpu_halted (CPUState *env)
 {
     if (!env->halted)
         return 0;
-    if (msr_ee && (env->interrupt_request & CPU_INTERRUPT_HARD)) {
+    if (cpu_has_work(env)) {
         env->halted = 0;
         return 0;
     }