Skip to contentSkip to conversation

Fix interrupt masking

PATCH In review Ralf Baechle 1 participant 1 message Aug 15, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 Fix interrupt masking

Only take interrupts that are actually enabled in the CPU's interrupt mask in c0_status.

 cpu-exec.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
cpu-exec.c +1 -1
Index: qemu-mips/cpu-exec.c
===================================================================
@@ -307,7 +307,7 @@ int cpu_exec(CPUState *env1)
 #elif defined(TARGET_MIPS)
                     if ((interrupt_request & CPU_INTERRUPT_HARD) &&
                         (env->CP0_Status & (1 << CP0St_IE)) &&
-                        (env->CP0_Cause & 0x0000FF00) &&
+                        (env->CP0_Status & env->CP0_Cause & 0x0000FF00) &&
                         !(env->hflags & MIPS_HFLAG_EXL) &&
                         !(env->hflags & MIPS_HFLAG_ERL) &&
                         !(env->hflags & MIPS_HFLAG_DM)) {