URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 192 |
Rev 242 |
Line 98... |
Line 98... |
{
|
{
|
printf("SIMON: EPCR = ext_int\n");
|
printf("SIMON: EPCR = ext_int\n");
|
cont_run = 0;
|
cont_run = 0;
|
}
|
}
|
break;
|
break;
|
}
|
case SPR_PC:
|
|
|
/* CZ 21/06/01 ... the debugger wants to do this! */
|
|
if(GlobalMode)
|
|
{
|
{
|
extern unsigned long pc;
|
extern unsigned long pc;
|
extern unsigned long pcnext;
|
extern unsigned long pcnext;
|
extern int delay_insn;
|
extern int delay_insn;
|
extern unsigned long pcdelay;
|
extern unsigned long pcdelay;
|
|
|
if(regno == SPR_PC)
|
|
{
|
|
sprs[SPR_PC] = value;
|
sprs[SPR_PC] = value;
|
|
|
/* The debugger has redirected us to a new address */
|
/* The debugger has redirected us to a new address */
|
/* This is usually done to reissue an instruction
|
/* This is usually done to reissue an instruction
|
which just caused a breakpoint exception. */
|
which just caused a breakpoint exception. */
|
pcnext = value;
|
pcnext = value;
|
|
|
if(!value)
|
if(!value)
|
{
|
printf("WARNING: PC just set to 0!\n");
|
printf("WARNING: Debugger just set us to 0!\n");
|
|
}
|
|
|
|
/* Clear any pending delay slot jumps also */
|
/* Clear any pending delay slot jumps also */
|
delay_insn = 0;
|
delay_insn = 0;
|
pcdelay = value+4;
|
pcdelay = value+4;
|
|
|
return;
|
|
}
|
|
}
|
}
|
|
break;
|
/* printf("mtspr(%x, %x)\n", regno, value);
|
default:
|
*/ if (regno < MAX_SPRS)
|
if (regno < MAX_SPRS)
|
sprs[regno] = value;
|
sprs[regno] = value;
|
else {
|
else {
|
printf("\nABORT: write out of SPR range %08X\n", regno);
|
printf("\nABORT: write out of SPR range %08X\n", regno);
|
cont_run = 0;
|
cont_run = 0;
|
}
|
}
|
}
|
}
|
|
}
|
|
|
/* Get a specific SPR. */
|
/* Get a specific SPR. */
|
inline sprword
|
inline sprword
|
mfspr_(const int regno)
|
mfspr_(const int regno)
|
{
|
{
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.