Skip to content

riscv64: fix shift amount for shift and shiftw#77

Merged
rhelmot merged 2 commits into
angr:masterfrom
Cskorpion:fix-shift
Sep 29, 2025
Merged

riscv64: fix shift amount for shift and shiftw#77
rhelmot merged 2 commits into
angr:masterfrom
Cskorpion:fix-shift

Conversation

@Cskorpion

Copy link
Copy Markdown
Contributor

Only use the lowest 6 bits for sll, srl, sra and the lowest 5 bits for sllw, srlw, sraw as shift amount, by masking the rs2 register accordingly.

Fix for #76

@rhelmot

rhelmot commented Sep 8, 2025

Copy link
Copy Markdown
Member

if this can be accompanied with a dead-simple testcase in pyvex then I will gladly merge it!

@rhelmot rhelmot merged commit 61f2373 into angr:master Sep 29, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants