1
0
mirror of https://github.com/rcornwell/sims.git synced 2026-02-27 00:59:57 +00:00

KA10: Move some debuging under DEBUG to improve speed.

This commit is contained in:
Richard Cornwell
2021-04-23 21:46:40 -04:00
parent 21d524eda0
commit 101274a8b4

View File

@@ -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;
}
}