-
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
CSR Registers access error #52
Comments
This is totally a bug. It seems to just be a matter of the assembler rejecting the CSR number as too big. I think I have it fixed locally, but I want to write some tests and check manually a little more thoroughly before I commit the changes. Thanks for your reports; you've helped improve RARS considerably. |
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 pushed the change I made 2 days ago. I think I will need to spend more time with CSRs, but I wanted to get this fix out as it may take some time to check/fix the other issues. |
It is OK now! |
Hi,
The program
.text
csrrs t0, 3072, x0 # trying to read CSR cycle register
causes: Error in riscv1.asm line 2 column 10: "3072": operand is out of range
The same for read instret, cycleh, and instreth registers.
[]
Marcus Vinicius
The text was updated successfully, but these errors were encountered: