-
Notifications
You must be signed in to change notification settings - Fork 309
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
rv32_i slli/srli/srai should not pseudo_op from rv64_i #111
Comments
@ZenithalHourlyRate even prior to #106 the Right now the parse.py script is not going to dump any pseudo-ops into the code if the original instruction is already present. This is because there are instructions like If you want to build a decoder for rv32 you can use the following command : |
Thanks for this information! Unfortunately rocket chip uses the same
Is it possible that the |
If you are maintaining a single decoder for both RV32 and RV64 , then it would make sense to include the xlen checks in your decoder itself instead of overloading it in the inst.chisel. For example in rocket maybe moving this check inside this class would solve the problem ? This is similar to what spike does when encodings vary based on XLEN - it has further explicit encoding checks based on XLEN.
This is achievable but this would affect other artifacts as well - like the latex table generation. The instruction names in those tables will also change to |
Thanks! I will try to refactor that. Closing this issue now as it is deemed as an API change instead of a bug. |
I'm trying to update rocket chip's
Instructions.scala
since the merge of #106. I found thatSLLI_RV32
,SRLI_RV32
,SRAI_RV32
are not generated. It turns out thatrv32_i
uses the opcode fromrv64_i
directlyriscv-opcodes/rv32_i
Lines 1 to 3 in 833ba82
However, this would cause problem. In RV32 if the decoder is fed
slli rd, rs, 32
as encoded below, the result would beslli rd, rs, 0
whereas originally this would cause an illegal instruction exception.Cc @neelgala
FYI
The text was updated successfully, but these errors were encountered: