On Tue, Nov 20, 2012 at 6:21 PM, Julius Baxter <[email protected]>wrote:

> This is probably a contentious point, but why shouldn't writing to
> unimplemented SPRs be alright? Does it say anything about this in the
> spec?
>

I remember coming across this problem in the past, and I think my initial
implementation of mtspr would trigger an error or something like that for
unknown SPRs, because it wasn't clear what else should happen.  Then I
found the mtspr we're talking about now, and so I explicitly allowed zero
to be written to the TTMR register without raising an error.  At some point
I changed it so they don't raise an error, but instead just print a warning
to the screen and resume with no other effect.  I think this is the only
time an unimplemented SPR gets written to in libgloss, newlib, or libgcc.

I don't think the manual explicitly states that writing unimplemented SPRs
has no effect.  A search of a few related terms didn't bring it up, and
it's not in section 4.3.

-Pete
_______________________________________________
OpenRISC mailing list
[email protected]
http://lists.openrisc.net/listinfo/openrisc

Reply via email to