ALL: make sure all useful state is in simh registers while processing events
This commit is contained in:
parent
0d41242520
commit
5551a0dd9c
19 changed files with 63 additions and 0 deletions
|
@ -309,6 +309,8 @@ t_stat sim_instr (void)
|
||||||
|
|
||||||
while (reason == 0) { /* loop until halted */
|
while (reason == 0) { /* loop until halted */
|
||||||
if (sim_interval <= 0) { /* check clock queue */
|
if (sim_interval <= 0) { /* check clock queue */
|
||||||
|
/* make sure all useful state is in simh registers while processing events */
|
||||||
|
saved_PC = PC;
|
||||||
if ((reason = sim_process_event ())) break;
|
if ((reason = sim_process_event ())) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -417,6 +417,9 @@ ao_update (); /* update AO */
|
||||||
while (reason == 0) { /* loop until halted */
|
while (reason == 0) { /* loop until halted */
|
||||||
|
|
||||||
if (sim_interval <= 0) { /* check clock queue */
|
if (sim_interval <= 0) { /* check clock queue */
|
||||||
|
/* make sure all useful state is in simh registers while processing events */
|
||||||
|
ao_update (); /* update AO */
|
||||||
|
scq_r->qptr = scq_p; /* update sc q ptr */
|
||||||
if ((reason = sim_process_event ()))
|
if ((reason = sim_process_event ()))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -441,6 +441,11 @@ reason = 0;
|
||||||
while (reason == 0) { /* loop until halted */
|
while (reason == 0) { /* loop until halted */
|
||||||
|
|
||||||
if (sim_interval <= 0) { /* check clock queue */
|
if (sim_interval <= 0) { /* check clock queue */
|
||||||
|
/* make sure all useful state is in simh registers while processing events */
|
||||||
|
saved_AR = AR & DMASK;
|
||||||
|
saved_BR = BR & DMASK;
|
||||||
|
saved_XR = XR & DMASK;
|
||||||
|
pcq_r->qptr = pcq_p; /* update pc q ptr */
|
||||||
if ((reason = sim_process_event ()))
|
if ((reason = sim_process_event ()))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -550,6 +550,12 @@ while (reason == 0) { /* loop until halted */
|
||||||
|
|
||||||
saved_IS = IS; /* commit prev instr */
|
saved_IS = IS; /* commit prev instr */
|
||||||
if (sim_interval <= 0) { /* check clock queue */
|
if (sim_interval <= 0) { /* check clock queue */
|
||||||
|
/* make sure all useful state is in simh registers while processing events */
|
||||||
|
as_err = ADDR_ERR (AS); /* get addr err flags */
|
||||||
|
bs_err = ADDR_ERR (BS);
|
||||||
|
AS = AS & ADDRMASK; /* clean addresses */
|
||||||
|
BS = BS & ADDRMASK;
|
||||||
|
pcq_r->qptr = pcq_p; /* update pc q ptr */
|
||||||
if ((reason = sim_process_event ()))
|
if ((reason = sim_process_event ()))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -488,6 +488,9 @@ while (reason == 0) { /* loop until halted */
|
||||||
|
|
||||||
saved_PC = PC; /* commit prev instr */
|
saved_PC = PC; /* commit prev instr */
|
||||||
if (sim_interval <= 0) { /* check clock queue */
|
if (sim_interval <= 0) { /* check clock queue */
|
||||||
|
/* make sure all useful state is in simh registers while processing events */
|
||||||
|
pcq_r->qptr = pcq_p; /* update pc q ptr */
|
||||||
|
upd_ind ();
|
||||||
if ((reason = sim_process_event ()))
|
if ((reason = sim_process_event ()))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -659,6 +659,8 @@ while (reason == SCPE_OK) { /* loop until error */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sim_interval <= 0) { /* intv cnt expired? */
|
if (sim_interval <= 0) { /* intv cnt expired? */
|
||||||
|
/* make sure all useful state is in simh registers while processing events */
|
||||||
|
pcq_r->qptr = pcq_p; /* update pc q ptr */
|
||||||
if ((reason = sim_process_event ())) /* process events */
|
if ((reason = sim_process_event ())) /* process events */
|
||||||
break;
|
break;
|
||||||
chtr_pend = chtr_eval (NULL); /* eval chan traps */
|
chtr_pend = chtr_eval (NULL); /* eval chan traps */
|
||||||
|
|
|
@ -599,6 +599,10 @@ while (reason == 0) { /* loop until halted */
|
||||||
int32 sr, st;
|
int32 sr, st;
|
||||||
|
|
||||||
if (sim_interval <= 0) { /* check clock queue */
|
if (sim_interval <= 0) { /* check clock queue */
|
||||||
|
/* make sure all useful state is in simh registers while processing events */
|
||||||
|
PSW = BUILD_PSW (cc);
|
||||||
|
PC = PC & VAMASK;
|
||||||
|
pcq_r->qptr = pcq_p; /* update pc q ptr */
|
||||||
if ((reason = sim_process_event ()))
|
if ((reason = sim_process_event ()))
|
||||||
break;
|
break;
|
||||||
int_eval ();
|
int_eval ();
|
||||||
|
|
|
@ -658,6 +658,11 @@ while (reason == 0) { /* loop until halted */
|
||||||
int32 sr, st;
|
int32 sr, st;
|
||||||
|
|
||||||
if (sim_interval <= 0) { /* check clock queue */
|
if (sim_interval <= 0) { /* check clock queue */
|
||||||
|
/* make sure all useful state is in simh registers while processing events */
|
||||||
|
PSW = BUILD_PSW (cc);
|
||||||
|
PC = PC & VAMASK;
|
||||||
|
set_r_display (R);
|
||||||
|
pcq_r->qptr = pcq_p; /* update pc q ptr */
|
||||||
if ((reason = sim_process_event ()))
|
if ((reason = sim_process_event ()))
|
||||||
break;
|
break;
|
||||||
int_eval ();
|
int_eval ();
|
||||||
|
|
|
@ -283,6 +283,8 @@ if (lgp21_sov) { /* stop sense pending? *
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (sim_interval <= 0) { /* check clock queue */
|
if (sim_interval <= 0) { /* check clock queue */
|
||||||
|
/* make sure all useful state is in simh registers while processing events */
|
||||||
|
pcq_r->qptr = pcq_p; /* update pc q ptr */
|
||||||
if ((r = sim_process_event ()))
|
if ((r = sim_process_event ()))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -737,6 +737,8 @@ if (MapInit == 0) {
|
||||||
|
|
||||||
while (reason == 0) { /* loop until halted */
|
while (reason == 0) { /* loop until halted */
|
||||||
if (sim_interval <= 0) { /* check clock queue */
|
if (sim_interval <= 0) { /* check clock queue */
|
||||||
|
/* make sure all useful state is in simh registers while processing events */
|
||||||
|
saved_PC = PC;
|
||||||
if ((reason = sim_process_event ()))
|
if ((reason = sim_process_event ()))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -428,6 +428,9 @@ reason = 0;
|
||||||
while (reason == 0) { /* loop until halted */
|
while (reason == 0) { /* loop until halted */
|
||||||
|
|
||||||
if (sim_interval <= 0) { /* check clock queue */
|
if (sim_interval <= 0) { /* check clock queue */
|
||||||
|
/* make sure all useful state is in simh registers while processing events */
|
||||||
|
saved_PC = PC;
|
||||||
|
pcq_r->qptr = pcq_p; /* update pc q ptr */
|
||||||
if ( (reason = sim_process_event ()) )
|
if ( (reason = sim_process_event ()) )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -546,6 +546,8 @@ reason = 0;
|
||||||
while (reason == 0) { /* loop until halted */
|
while (reason == 0) { /* loop until halted */
|
||||||
|
|
||||||
if (sim_interval <= 0) { /* check clock queue */
|
if (sim_interval <= 0) { /* check clock queue */
|
||||||
|
/* Make sure all intermediate state is visible in simh registers */
|
||||||
|
pcq_r->qptr = pcq_p; /* update pc q ptr */
|
||||||
if ((reason = sim_process_event ()))
|
if ((reason = sim_process_event ()))
|
||||||
break;
|
break;
|
||||||
sbs_lvl = sbs_eval (); /* eval sbs system */
|
sbs_lvl = sbs_eval (); /* eval sbs system */
|
||||||
|
|
|
@ -597,6 +597,9 @@ while (reason == 0) { /* loop until halted */
|
||||||
int32 link_init, fill;
|
int32 link_init, fill;
|
||||||
|
|
||||||
if (sim_interval <= 0) { /* check clock queue */
|
if (sim_interval <= 0) { /* check clock queue */
|
||||||
|
/* Make sure all intermediate state is visible in simh registers */
|
||||||
|
iors = upd_iors (); /* get IORS */
|
||||||
|
pcq_r->qptr = pcq_p; /* update pc q ptr */
|
||||||
if ((reason = sim_process_event ()))
|
if ((reason = sim_process_event ()))
|
||||||
break;
|
break;
|
||||||
api_int = api_eval (&int_pend); /* eval API */
|
api_int = api_eval (&int_pend); /* eval API */
|
||||||
|
|
|
@ -339,6 +339,12 @@ reason = 0;
|
||||||
while (reason == 0) { /* loop until halted */
|
while (reason == 0) { /* loop until halted */
|
||||||
|
|
||||||
if (sim_interval <= 0) { /* check clock queue */
|
if (sim_interval <= 0) { /* check clock queue */
|
||||||
|
/* Make sure all intermediate state is visible in simh registers */
|
||||||
|
saved_PC = IF | (PC & 07777); /* save copies */
|
||||||
|
saved_DF = DF & 070000;
|
||||||
|
saved_LAC = LAC & 017777;
|
||||||
|
saved_MQ = MQ & 07777;
|
||||||
|
pcq_r->qptr = pcq_p; /* update pc q ptr */
|
||||||
if ((reason = sim_process_event ()))
|
if ((reason = sim_process_event ()))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -521,6 +521,8 @@ reason = 0;
|
||||||
|
|
||||||
while (reason == 0) { /* loop until halted */
|
while (reason == 0) { /* loop until halted */
|
||||||
if (sim_interval <= 0) { /* check clock queue */
|
if (sim_interval <= 0) { /* check clock queue */
|
||||||
|
/* make sure all useful state is in simh registers while processing events */
|
||||||
|
saved_PC = PC;
|
||||||
if ((reason = sim_process_event ())) break;
|
if ((reason = sim_process_event ())) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -382,6 +382,8 @@ while (reason == 0) { /* loop until halted */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sim_interval <= 0) { /* event queue? */
|
if (sim_interval <= 0) { /* event queue? */
|
||||||
|
/* make sure all useful state is in simh registers while processing events */
|
||||||
|
pcq_r->qptr = pcq_p; /* update pc q ptr */
|
||||||
if ((reason = sim_process_event ())) /* process */
|
if ((reason = sim_process_event ())) /* process */
|
||||||
break;
|
break;
|
||||||
int_reqhi = api_findreq (); /* recalc int req */
|
int_reqhi = api_findreq (); /* recalc int req */
|
||||||
|
|
|
@ -462,6 +462,8 @@ t_stat sim_instr (void)
|
||||||
while (reason == 0) { /* loop until halted */
|
while (reason == 0) { /* loop until halted */
|
||||||
|
|
||||||
if (sim_interval <= 0) { /* check clock queue */
|
if (sim_interval <= 0) { /* check clock queue */
|
||||||
|
/* make sure all useful state is in simh registers while processing events */
|
||||||
|
pcq_r->qptr = pcq_p; /* update pc q ptr */
|
||||||
reason = sim_process_event ();
|
reason = sim_process_event ();
|
||||||
if (reason != SCPE_OK)
|
if (reason != SCPE_OK)
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -393,6 +393,11 @@ while (reason == 0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sim_interval <= 0) { /* chk clock queue */
|
if (sim_interval <= 0) { /* chk clock queue */
|
||||||
|
/* make sure all useful state is in simh registers while processing events */
|
||||||
|
pcc_l = pcc_l & M32;
|
||||||
|
pcq_r->qptr = pcq_p; /* update pc q ptr */
|
||||||
|
pc_align = ((uint32) PC) & 3; /* separate PC<1:0> */
|
||||||
|
PC = PC & 0xFFFFFFFFFFFFFFFC;
|
||||||
if ((reason = sim_process_event ())) break;
|
if ((reason = sim_process_event ())) break;
|
||||||
intr_summ = pal_eval_intr (1); /* eval interrupts */
|
intr_summ = pal_eval_intr (1); /* eval interrupts */
|
||||||
}
|
}
|
||||||
|
|
|
@ -433,6 +433,10 @@ while (reason == 0) { /* loop until stop */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sim_interval <= 0) { /* event queue? */
|
if (sim_interval <= 0) { /* event queue? */
|
||||||
|
/* make sure all useful state is in simh registers while processing events */
|
||||||
|
pcq_r->qptr = pcq_p; /* update pc q ptr */
|
||||||
|
cpu_assemble_PSD (); /* visible PSD */
|
||||||
|
set_rf_display (R); /* visible registers */
|
||||||
if (reason = sim_process_event ()) /* process */
|
if (reason = sim_process_event ()) /* process */
|
||||||
break;
|
break;
|
||||||
int_hireq = io_eval_int (); /* re-evaluate intr */
|
int_hireq = io_eval_int (); /* re-evaluate intr */
|
||||||
|
|
Loading…
Add table
Reference in a new issue