VAX: Convert CPU level debugging to use sim_debug instead of DEBUG_PRI for consistent CPU device debug output
This commit is contained in:
parent
83338d1d1a
commit
3c3c8d6e29
1 changed files with 5 additions and 10 deletions
|
@ -1145,8 +1145,7 @@ if (ei > 0) { /* if int, new IPL */
|
||||||
}
|
}
|
||||||
else PSL = newpsl | /* exc, old IPL/1F */
|
else PSL = newpsl | /* exc, old IPL/1F */
|
||||||
((newpc & 1)? PSL_IPL1F: (oldpsl & PSL_IPL)) | (oldcur << PSL_V_PRV);
|
((newpc & 1)? PSL_IPL1F: (oldpsl & PSL_IPL)) | (oldcur << PSL_V_PRV);
|
||||||
if (DEBUG_PRI (cpu_dev, LOG_CPU_I))
|
sim_debug (LOG_CPU_I, &cpu_dev, "PC=%08x, PSL=%08x, SP=%08x, VEC=%08x, nPSL=%08x, nSP=%08x\n",
|
||||||
fprintf (sim_deb, ">>IEX: PC=%08x, PSL=%08x, SP=%08x, VEC=%08x, nPSL=%08x, nSP=%08x\n",
|
|
||||||
PC, oldpsl, oldsp, vec, PSL, SP);
|
PC, oldpsl, oldsp, vec, PSL, SP);
|
||||||
acc = ACC_MASK (KERN); /* new mode is kernel */
|
acc = ACC_MASK (KERN); /* new mode is kernel */
|
||||||
Write (SP - 4, oldpsl, L_LONG, WA); /* push old PSL */
|
Write (SP - 4, oldpsl, L_LONG, WA); /* push old PSL */
|
||||||
|
@ -1251,8 +1250,7 @@ SP = SP + 8; /* pop stack */
|
||||||
if (PSL & PSL_IS) /* save stack */
|
if (PSL & PSL_IS) /* save stack */
|
||||||
IS = SP;
|
IS = SP;
|
||||||
else STK[oldcur] = SP;
|
else STK[oldcur] = SP;
|
||||||
if (DEBUG_PRI (cpu_dev, LOG_CPU_R))
|
sim_debug (LOG_CPU_R, &cpu_dev, "PC=%08x, PSL=%08x, SP=%08x, nPC=%08x, nPSL=%08x, nSP=%08x\n",
|
||||||
fprintf (sim_deb, ">>REI: PC=%08x, PSL=%08x, SP=%08x, nPC=%08x, nPSL=%08x, nSP=%08x\n",
|
|
||||||
PC, PSL, SP - 8, newpc, newpsl, ((newpsl & IS)? IS: STK[newcur]));
|
PC, PSL, SP - 8, newpc, newpsl, ((newpsl & IS)? IS: STK[newcur]));
|
||||||
PSL = (PSL & PSL_TP) | (newpsl & ~CC_MASK); /* set PSL */
|
PSL = (PSL & PSL_TP) | (newpsl & ~CC_MASK); /* set PSL */
|
||||||
if (PSL & PSL_IS) /* set new stack */
|
if (PSL & PSL_IS) /* set new stack */
|
||||||
|
@ -1260,8 +1258,7 @@ if (PSL & PSL_IS) /* set new stack */
|
||||||
else {
|
else {
|
||||||
SP = STK[newcur]; /* if ~IS, chk AST */
|
SP = STK[newcur]; /* if ~IS, chk AST */
|
||||||
if (newcur >= ASTLVL) {
|
if (newcur >= ASTLVL) {
|
||||||
if (DEBUG_PRI (cpu_dev, LOG_CPU_R))
|
sim_debug (LOG_CPU_R, &cpu_dev, "AST delivered\n");
|
||||||
fprintf (sim_deb, ">>REI: AST delivered\n");
|
|
||||||
SISR = SISR | SISR_2;
|
SISR = SISR | SISR_2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1320,8 +1317,7 @@ pme = (t >> 31) & 1; /* restore PME */
|
||||||
|
|
||||||
zap_tb (0); /* clear process TB */
|
zap_tb (0); /* clear process TB */
|
||||||
set_map_reg ();
|
set_map_reg ();
|
||||||
if (DEBUG_PRI (cpu_dev, LOG_CPU_P))
|
sim_debug (LOG_CPU_P, &cpu_dev, ">>LDP: PC=%08x, PSL=%08x, SP=%08x, nPC=%08x, nPSL=%08x, nSP=%08x\n",
|
||||||
fprintf (sim_deb, ">>LDP: PC=%08x, PSL=%08x, SP=%08x, nPC=%08x, nPSL=%08x, nSP=%08x\n",
|
|
||||||
PC, PSL, SP, newpc, newpsl, KSP);
|
PC, PSL, SP, newpc, newpsl, KSP);
|
||||||
if (PSL & PSL_IS) /* if istk, */
|
if (PSL & PSL_IS) /* if istk, */
|
||||||
IS = SP;
|
IS = SP;
|
||||||
|
@ -1342,8 +1338,7 @@ if (PSL & PSL_CUR) /* must be kernel */
|
||||||
RSVD_INST_FAULT;
|
RSVD_INST_FAULT;
|
||||||
savpc = Read (SP, L_LONG, RA); /* pop PC, PSL */
|
savpc = Read (SP, L_LONG, RA); /* pop PC, PSL */
|
||||||
savpsl = Read (SP + 4, L_LONG, RA);
|
savpsl = Read (SP + 4, L_LONG, RA);
|
||||||
if (DEBUG_PRI (cpu_dev, LOG_CPU_P))
|
sim_debug (LOG_CPU_P, &cpu_dev, ">>SVP: PC=%08x, PSL=%08x, SP=%08x, oPC=%08x, oPSL=%08x\n",
|
||||||
fprintf (sim_deb, ">>SVP: PC=%08x, PSL=%08x, SP=%08x, oPC=%08x, oPSL=%08x\n",
|
|
||||||
PC, PSL, SP, savpc, savpsl);
|
PC, PSL, SP, savpc, savpsl);
|
||||||
if (PSL & PSL_IS) /* int stack? */
|
if (PSL & PSL_IS) /* int stack? */
|
||||||
SP = SP + 8;
|
SP = SP + 8;
|
||||||
|
|
Loading…
Add table
Reference in a new issue