Line 27... |
Line 27... |
|
|
extern int cont_run;
|
extern int cont_run;
|
extern struct iqueue_entry iqueue[20];
|
extern struct iqueue_entry iqueue[20];
|
extern unsigned long pc;
|
extern unsigned long pc;
|
extern unsigned long pcnext;
|
extern unsigned long pcnext;
|
|
extern unsigned long pc_phy;
|
extern struct iqueue_entry iqueue[];
|
extern struct iqueue_entry iqueue[];
|
|
|
extern int delay_insn;
|
extern int delay_insn;
|
|
int cycle_delay = 0; /* Added by CZ 27/05/01 */
|
|
|
/* Handle OR1K exceptions. */
|
/* Handle OR1K exceptions. */
|
void except_handle(int except, unsigned long ea)
|
void except_handle(int except, unsigned long ea)
|
{
|
{
|
unsigned long pc_saved;
|
unsigned long pc_saved;
|
Line 76... |
Line 78... |
mtspr(SPR_SR, mfspr(SPR_SR) & ~(SPR_SR_IME));
|
mtspr(SPR_SR, mfspr(SPR_SR) & ~(SPR_SR_IME));
|
|
|
mtspr(SPR_SR, mfspr(SPR_SR) | SPR_SR_SUPV); /* SUPV mode */
|
mtspr(SPR_SR, mfspr(SPR_SR) | SPR_SR_SUPV); /* SUPV mode */
|
mtspr(SPR_SR, mfspr(SPR_SR) & ~SPR_SR_EXR); /* Disable except. */
|
mtspr(SPR_SR, mfspr(SPR_SR) & ~SPR_SR_EXR); /* Disable except. */
|
pc = (unsigned long)except;
|
pc = (unsigned long)except;
|
pcnext = (unsigned long)except;
|
|
|
/* MM: We do pc update after the execute (in the simulator), so we
|
|
decrease it by 4 so that next instruction points to first exception
|
|
instruction. */
|
|
if (except == EXCEPT_SYSCALL)
|
|
pc -= 4;
|
|
pcnext = pc+4;
|
|
|
|
/* Added by CZ 27/05/01 */
|
|
pc_phy = pc;
|
|
cycle_delay = 7; /* An exception stalls the CPU 7 clock cycles */
|
#endif
|
#endif
|
}
|
}
|
|
|
No newline at end of file
|
No newline at end of file
|