-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Control and Status Register issues #2
Comments
Realted with CSR instructions I have found a bug with the compilation of the instruction CSRW. Given the following code:
it should be compiled to (compiled with riscv32-unknown-elf-as):
but with the RARS compiler we get:
|
Thanks for the report. I think I have fixed the problem in c762e55. All of the CSRR instructions had the first and second arguments flipped. |
Progress towards #52. I would like to include tests for CSR instructions in this, but I realized that RARS has possibly incorrect behaviour in several ways. Writing a test that ensures correctness might be kindof hard so I am pushing this out to solve th3e immediate problems. Problems I think RARS currently has: - writing to intret (and others) should be an error - uip (and others) should have write protection on some bits - csrrs might set the value of rd to the wrong version of the CSR eg after the instruction rather than before These should be added to #2.
I don't know of any remaining issues with the way CSRs are handled. The Zicsr extension should now be fully and correctly implemented. The issue of RDTIME still exists, but that is not an issue with the CSR part, but rather with the time counter. |
There are a few issues with the control and status register implementation. All of these are solvable, but there is a little awkwardness involved with each.
The text was updated successfully, but these errors were encountered: