-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix various inaccuracies in the RISC-V lifter (#64)
* Fix signedness handling in comparison instructions * Fix extraction of shift value for immediate instructions The shift value must be treated as an unsigned integer otherwise a shift value such as '0b11111' would be interpreted as -1 instead of 31. * Fix lifting of shift instructions For arithmetic shift instructions, use the .sra() method provided by VexValue. For R-type shift instructions, extract the shift amount by reading the lower 5 bits of the register (previously the shift amount was incorrectly extracted from the register index, not the register value). * Fix zero- and sign-extension of load instructions
- Loading branch information
Showing
3 changed files
with
15 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters