Skip to content

Commit 101274a

Browse files
committed
KA10: Move some debuging under DEBUG to improve speed.
1 parent 21d524e commit 101274a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

PDP10/kx10_cpu.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,8 +824,10 @@ void set_interrupt(int dev, int lvl) {
824824
dev_irq[dev>>2] = 0200 >> lvl;
825825
#endif
826826
pi_pending = 1;
827+
#if DEBUG
827828
sim_debug(DEBUG_IRQ, &cpu_dev, "set irq %o %o %03o %03o %03o\n",
828829
dev & 0774, lvl, PIE, PIR, PIH);
830+
#endif
829831
}
830832
}
831833

@@ -837,8 +839,10 @@ void set_interrupt_mpx(int dev, int lvl, int mpx) {
837839
if (lvl == 1 && mpx != 0)
838840
dev_irq[dev>>2] |= mpx << 8;
839841
pi_pending = 1;
842+
#if DEBUG
840843
sim_debug(DEBUG_IRQ, &cpu_dev, "set mpx irq %o %o %o %03o %03o %03o\n",
841844
dev & 0774, lvl, mpx, PIE, PIR, PIH);
845+
#endif
842846
}
843847
}
844848
#endif
@@ -848,8 +852,10 @@ void set_interrupt_mpx(int dev, int lvl, int mpx) {
848852
*/
849853
void clr_interrupt(int dev) {
850854
dev_irq[dev>>2] = 0;
855+
#if DEBUG
851856
if (dev > 4)
852857
sim_debug(DEBUG_IRQ, &cpu_dev, "clear irq %o\n", dev & 0774);
858+
#endif
853859
}
854860

855861
/*
@@ -930,7 +936,9 @@ void restore_pi_hold() {
930936
for(lvl = 0100; lvl != 0; lvl >>= 1) {
931937
if (lvl & PIH) {
932938
PIR &= ~lvl;
939+
#if DEBUG
933940
sim_debug(DEBUG_IRQ, &cpu_dev, "restore irq %o %03o\n", lvl, PIH);
941+
#endif
934942
PIH &= ~lvl;
935943
break;
936944
}
@@ -4594,8 +4602,10 @@ if ((reason = build_dev_tab ()) != SCPE_OK) /* build, chk dib_tab */
45944602
#if KA | PDP6
45954603
st_pi:
45964604
#endif
4605+
#if DEBUG
45974606
sim_debug(DEBUG_IRQ, &cpu_dev, "trap irq %o %03o %03o \n",
45984607
pi_enc, PIR, PIH);
4608+
#endif
45994609
pi_cycle = 1;
46004610
pi_rq = 0;
46014611
pi_hold = 0;
@@ -4614,7 +4624,9 @@ if ((reason = build_dev_tab ()) != SCPE_OK) /* build, chk dib_tab */
46144624
if (new_lvl != 0)
46154625
pi_pending = 1;
46164626
}
4627+
#if DEBUG
46174628
sim_debug(DEBUG_IRQ, &cpu_dev, "vect irq %o %06o\n", pi_enc, AB);
4629+
#endif
46184630
}
46194631
goto fetch;
46204632
#endif
@@ -4626,8 +4638,10 @@ if ((reason = build_dev_tab ()) != SCPE_OK) /* build, chk dib_tab */
46264638
for (f = 0; f < MAX_DEV; f++) {
46274639
if (dev_irqv[f] != 0 && dev_irq[f] & pi_mask) {
46284640
AB = dev_irqv[f](f << 2, AB);
4641+
#if DEBUG
46294642
sim_debug(DEBUG_IRQ, &cpu_dev, "vect irq %o %03o %06o\n",
46304643
pi_enc, dev_irq[f], AB);
4644+
#endif
46314645
break;
46324646
}
46334647
}

0 commit comments

Comments
 (0)