URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 1550 |
Rev 1551 |
Line 201... |
Line 201... |
}
|
}
|
|
|
/* Get a specific SPR. */
|
/* Get a specific SPR. */
|
uorreg_t mfspr(const uint16_t regno)
|
uorreg_t mfspr(const uint16_t regno)
|
{
|
{
|
extern oraddr_t pcprev;
|
|
uorreg_t ret;
|
uorreg_t ret;
|
|
|
ret = cpu_state.sprs[regno];
|
ret = cpu_state.sprs[regno];
|
|
|
switch (regno) {
|
switch (regno) {
|
case SPR_NPC:
|
case SPR_NPC:
|
ret = cpu_state.pc;
|
ret = cpu_state.pc;
|
case SPR_PPC:
|
|
ret = pcprev;
|
|
case SPR_TTCR:
|
case SPR_TTCR:
|
ret = spr_read_ttcr();
|
ret = spr_read_ttcr();
|
default:
|
default:
|
/* Links to GPRS */
|
/* Links to GPRS */
|
if(regno >= 0x0400 && regno < 0x0420)
|
if(regno >= 0x0400 && regno < 0x0420)
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.