From 0352e0fd7b21e354c694474f09a2301bca7a70f6 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Thu, 25 Aug 2016 14:27:02 -0700 Subject: [PATCH] PDP11: Move history entry pointer initialization out of instruction loop. This will be slightly more efficient for the normal case where history isn't being recorded. --- PDP11/pdp11_cpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PDP11/pdp11_cpu.c b/PDP11/pdp11_cpu.c index 5a9033ad..7d7ea35a 100644 --- a/PDP11/pdp11_cpu.c +++ b/PDP11/pdp11_cpu.c @@ -665,6 +665,7 @@ t_stat sim_instr (void) int abortval, i; volatile int32 trapea; /* used by setjmp */ t_stat reason; +InstHistory *hst_ent = NULL; sim_vm_pc_value = &pdp11_pc_value; @@ -745,7 +746,6 @@ while (reason == 0) { int32 IR, srcspec, srcreg, dstspec, dstreg; int32 src, src2, dst, ea; int32 i, t, sign, oldrs, trapnum; - InstHistory *hst_ent; if (cpu_astop) { cpu_astop = 0; @@ -902,7 +902,6 @@ while (reason == 0) { if (hst_p >= hst_lnt) hst_p = 0; } - else hst_ent = NULL; PC = (PC + 2) & 0177777; /* incr PC, mod 65k */ switch ((IR >> 12) & 017) { /* decode IR<15:12> */