]> git.proxmox.com Git - qemu.git/commitdiff
irq: Introduce and use CPU_INTERRUPT_SSTEP_MASK.
authorRichard Henderson <rth@twiddle.net>
Wed, 4 May 2011 20:34:25 +0000 (13:34 -0700)
committerBlue Swirl <blauwirbel@gmail.com>
Sun, 8 May 2011 16:55:23 +0000 (16:55 +0000)
This mask contains all of the bits that should be ignored while single
stepping in the debugger.  The mask contains 2 bits that are not currently
cleared, but are also never set.  The bits are included in the mask for
consistency in handling of the CPU_INTERRUPT_TGT_EXT_N bits.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
cpu-all.h
cpu-exec.c

index dd9c230540337ceb76f70e225691939eb5bf9d68..bc0dad8714d416a6f5028984d407250cbf599f93 100644 (file)
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -837,6 +837,14 @@ extern CPUState *cpu_single_env;
 #define CPU_INTERRUPT_SIPI        CPU_INTERRUPT_TGT_INT_2
 #define CPU_INTERRUPT_MCE         CPU_INTERRUPT_TGT_EXT_4
 
+/* The set of all bits that should be masked when single-stepping.  */
+#define CPU_INTERRUPT_SSTEP_MASK \
+    (CPU_INTERRUPT_HARD          \
+     | CPU_INTERRUPT_TGT_EXT_0   \
+     | CPU_INTERRUPT_TGT_EXT_1   \
+     | CPU_INTERRUPT_TGT_EXT_2   \
+     | CPU_INTERRUPT_TGT_EXT_3   \
+     | CPU_INTERRUPT_TGT_EXT_4)
 
 #ifndef CONFIG_USER_ONLY
 typedef void (*CPUInterruptHandler)(CPUState *, int);
index 395cd8cf9047bc1eec16290ffbb638afe251a0ea..5b42b2581a414c49bba2d137e88d5ad4dc7e0c53 100644 (file)
@@ -360,10 +360,7 @@ int cpu_exec(CPUState *env1)
                 if (unlikely(interrupt_request)) {
                     if (unlikely(env->singlestep_enabled & SSTEP_NOIRQ)) {
                         /* Mask out external interrupts for this step. */
-                        interrupt_request &= ~(CPU_INTERRUPT_HARD |
-                                               CPU_INTERRUPT_FIQ |
-                                               CPU_INTERRUPT_SMI |
-                                               CPU_INTERRUPT_NMI);
+                        interrupt_request &= ~CPU_INTERRUPT_SSTEP_MASK;
                     }
                     if (interrupt_request & CPU_INTERRUPT_DEBUG) {
                         env->interrupt_request &= ~CPU_INTERRUPT_DEBUG;