-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
Disassembler does not correctly disassemble some RVC instructions #166
Comments
Working on it at the moment; there are indeed some issues in both how bitfields are compared together as well as how the instruction matcher generates its match tree. Interesting that this has been highlighted through the C extension but wasn't an issue in the other parts of the ISA! |
I believe it is because for normal ISA the opcode is 7 bits and it is always set from bit 6 to 0, which is not the case for RVC. |
We need to match on all provided op parts, even if there is no aliasing purely based on comparisons with the opcodes of other instructions. It might be that different instructions alias across non-opcode fields such as immediates or registers. If the ISA is valid, matching on all opcode parts should yield the correct instruction.
Should hopefully be fixed in the above set of commits... |
With this example it worked, but loading the Starting Ripes with the program
|
yep, found that as well, and trying to fix it know... It's like playing whack-a-mole! |
Everything working, problem solved. |
Some RVC instructions do not disassemble correctly: c.addi, c.lui, c.li, c.mv, c.srli and c.jal.
An example program below. The program works perfectly, the problem is only in the disassembly.
`
The text was updated successfully, but these errors were encountered: