jupiter icon indicating copy to clipboard operation
jupiter copied to clipboard

Zicsr extension is left unimplemented

Open TheThirdOne opened this issue 4 years ago • 1 comments

I have been working on making sure the Zicsr extension is fully implemented in RARS and so I tried out Jupiter confirm my expectations from my reading of the specification.

I was very surprised when i tried to use FRCSR x5, saw that it compiled to csrrs x5, 11, x0 and when executed didn't change t0. I expected it to use csrrs x5, 3, x0.

When I looked into the code I found https://github.com/andrescv/Jupiter/blob/00041f32017a010077397640c673dbc541406962/src/main/java/jupiter/riscv/instructions/itype/CSRRC.java#L39-L42

It would be nice if there was some indication that CSR instructions were not expected to work. A warning when assembled or a note in the documentation would be enough (I guess this issue now serves that purpose).

TheThirdOne avatar Oct 05 '19 22:10 TheThirdOne

Thanks for the recommendation, I left the Zicsr extension there as a placeholder for a future implementation. I will add a warning message.

andrescv avatar Oct 07 '19 14:10 andrescv