OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_47/] [or1ksim/] [cpu/] [or1k/] [sprs.c] - Diff between revs 63 and 77

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 63 Rev 77
Line 31... Line 31...
/* Set a specific SPR with a value. */
/* Set a specific SPR with a value. */
void mtspr(int regno, sprword value)
void mtspr(int regno, sprword value)
{
{
        int ofs = regno % MAX_SPRS_PER_GRP;
        int ofs = regno % MAX_SPRS_PER_GRP;
 
 
 
        if (regno == 0x1234)
 
                printf("MTSPR(0x1234, %x);\n", value);
 
 
        regno /= MAX_SPRS_PER_GRP;
        regno /= MAX_SPRS_PER_GRP;
        regno += ofs;
        regno += ofs;
 
 
/*      printf("mtspr(%x, %x)\n", regno, value);
/*      printf("mtspr(%x, %x)\n", regno, value);
*/      if (regno < MAX_SPRS)
*/      if (regno < MAX_SPRS)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.