From 101274a8b47917d9497045e3fdc0dfc404df193d Mon Sep 17 00:00:00 2001 From: Richard Cornwell Date: Fri, 23 Apr 2021 21:46:40 -0400 Subject: [PATCH] KA10: Move some debuging under DEBUG to improve speed. --- PDP10/kx10_cpu.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/PDP10/kx10_cpu.c b/PDP10/kx10_cpu.c index ec5b1d1..85ac7e1 100644 --- a/PDP10/kx10_cpu.c +++ b/PDP10/kx10_cpu.c @@ -824,8 +824,10 @@ void set_interrupt(int dev, int lvl) { dev_irq[dev>>2] = 0200 >> lvl; #endif pi_pending = 1; +#if DEBUG sim_debug(DEBUG_IRQ, &cpu_dev, "set irq %o %o %03o %03o %03o\n", dev & 0774, lvl, PIE, PIR, PIH); +#endif } } @@ -837,8 +839,10 @@ void set_interrupt_mpx(int dev, int lvl, int mpx) { if (lvl == 1 && mpx != 0) dev_irq[dev>>2] |= mpx << 8; pi_pending = 1; +#if DEBUG sim_debug(DEBUG_IRQ, &cpu_dev, "set mpx irq %o %o %o %03o %03o %03o\n", dev & 0774, lvl, mpx, PIE, PIR, PIH); +#endif } } #endif @@ -848,8 +852,10 @@ void set_interrupt_mpx(int dev, int lvl, int mpx) { */ void clr_interrupt(int dev) { dev_irq[dev>>2] = 0; +#if DEBUG if (dev > 4) sim_debug(DEBUG_IRQ, &cpu_dev, "clear irq %o\n", dev & 0774); +#endif } /* @@ -930,7 +936,9 @@ void restore_pi_hold() { for(lvl = 0100; lvl != 0; lvl >>= 1) { if (lvl & PIH) { PIR &= ~lvl; +#if DEBUG sim_debug(DEBUG_IRQ, &cpu_dev, "restore irq %o %03o\n", lvl, PIH); +#endif PIH &= ~lvl; break; } @@ -4594,8 +4602,10 @@ in_loop: #if KA | PDP6 st_pi: #endif +#if DEBUG sim_debug(DEBUG_IRQ, &cpu_dev, "trap irq %o %03o %03o \n", pi_enc, PIR, PIH); +#endif pi_cycle = 1; pi_rq = 0; pi_hold = 0; @@ -4614,7 +4624,9 @@ st_pi: if (new_lvl != 0) pi_pending = 1; } +#if DEBUG sim_debug(DEBUG_IRQ, &cpu_dev, "vect irq %o %06o\n", pi_enc, AB); +#endif } goto fetch; #endif @@ -4626,8 +4638,10 @@ st_pi: for (f = 0; f < MAX_DEV; f++) { if (dev_irqv[f] != 0 && dev_irq[f] & pi_mask) { AB = dev_irqv[f](f << 2, AB); +#if DEBUG sim_debug(DEBUG_IRQ, &cpu_dev, "vect irq %o %03o %06o\n", pi_enc, dev_irq[f], AB); +#endif break; } }