d-iii-s / msim

Light-weight MIPS R4000 and RISC-V system simulator
https://d3s.mff.cuni.cz/software/msim/
GNU General Public License v2.0
5 stars 4 forks source link

Add XCRV instruction for dumping CP0 registers #11

Closed vhotspur closed 3 years ago

vhotspur commented 3 years ago

Add a special instruction that prints contents of CP0 registers.

Thus, it is possible to print all CPU registers with following two instructions:

.word 0x37
.word 0x0e
ceresek commented 3 years ago

Just how do we choose the opcodes ? :-)

vhotspur commented 3 years ago

Just by finding unused instructions.

Perhaps next time this could be split into two pull requests as ExCode description is orthogonal to this.

ceresek commented 3 years ago

Sure :) so, merge, or, split and merge, or ?

vhotspur commented 3 years ago

Hopefully rebased correctly. Thanks!