Improve architectural compliance of mfspr and mtspr
authorPaul Mackerras <paulus@ozlabs.org>
Sat, 2 May 2020 10:08:10 +0000 (20:08 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Fri, 8 May 2020 02:12:01 +0000 (12:12 +1000)
commit5d282a950c5be5a92b2d705f529f13fc55cd0c59
tree113bcab4f0f2f1a08868ff65aa6f5d95eb5759ba
parent517a91ce5ef492574d2fc8db2d7e18a66ef4cbd9
Improve architectural compliance of mfspr and mtspr

Mfspr from an unimplemented SPR should be a no-op in privileged state,
so in this case we need to write back whatever was previously in the
destination register.  For problem state, both mtspr and mfspr to
unimplemented SPRs should cause a program interrupt.

There are special cases in the architecture for SPRs 0, 4 5 and 6
which we still don't implement.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
decode1.vhdl
execute1.vhdl