Line 57... |
Line 57... |
pending.address = ea;
|
pending.address = ea;
|
if (delay_insn)
|
if (delay_insn)
|
pending.saved = pc - 4;
|
pending.saved = pc - 4;
|
else
|
else
|
pending.saved = pc;
|
pending.saved = pc;
|
printf("Exception 0x%x (%s): insn_addr 0x%x, EA 0x%x, pc: 0x%x, pcnext: 0x%x\n",
|
if (config.sim.verbose) printf("Exception 0x%x (%s) at 0x%x, EA: 0x%x, pc: 0x%x, pcnext: 0x%x\n",
|
except, EXCEPT_NAME(except), iqueue[0].insn_addr, ea, pc, pcnext);
|
except, EXCEPT_NAME(except), iqueue[0].insn_addr, ea, pc, pcnext);
|
}
|
}
|
}
|
}
|
|
|
/* Actually handles exception */
|
/* Actually handles exception */
|
Line 71... |
Line 71... |
fprintf(stderr, "WARNING: No exception processing while ONLY_VIRTUAL_MACHINE is defined.\n");
|
fprintf(stderr, "WARNING: No exception processing while ONLY_VIRTUAL_MACHINE is defined.\n");
|
cont_run = 0;
|
cont_run = 0;
|
#else
|
#else
|
|
|
if (delay_insn) {
|
if (delay_insn) {
|
printf("INFO: Exception during execution of delay slot insn.\n");
|
if (config.sim.verbose) printf("INFO: Exception during execution of delay slot insn.\n");
|
pc -= 4;
|
pc -= 4;
|
}
|
}
|
#if 0
|
|
if ((pcnext != (pc + 4)) && (except != EXCEPT_ITLBMISS)) { /* Always execute delay slot insn */
|
|
printf("XXXXXXXXXXXXXX\n");
|
|
fetch(); /* before starting with exception */
|
|
decode(&iqueue[0]); /* (itlbmiss is special case) */
|
|
execute();
|
|
}
|
|
#endif
|
|
|
|
pc_saved = pc & ~0x3;
|
pc_saved = pc & ~0x3;
|
if (except == EXCEPT_ILLEGAL)
|
if (except == EXCEPT_ILLEGAL)
|
mtspr(SPR_EPCR_BASE, pending.saved);
|
mtspr(SPR_EPCR_BASE, pending.saved);
|
else if (except == EXCEPT_ALIGN)
|
else if (except == EXCEPT_ALIGN)
|