Skip to content

Commit

Permalink
Parsing fixes for riscv64: lui, loads (#285)
Browse files Browse the repository at this point in the history
lui decompilation is wrong:
* original produces "a0 = 0x429a000; return;" for "lui a0, 0x17050; ret", but shall produce "a0 = 0x17050000; return;"
* Note that lui followed by addi is correct and is unaffected.

l{d,w,h,b}[u] decompilation is wrong:
* original produces "ra = *((sp + 0x40));" for "ld ra, 40(sp)"
(note that '40' decimal is simply left unaffected and gets substituted to '0x40' in result,
giving impression that this is now correct hex value), but shall produce "ra = *((sp + 0x28));".
This affects all load insns of all types.
* Note that store insns are unaffected by this bug.
  • Loading branch information
strlcat authored Apr 22, 2023
1 parent 50832cc commit 8624d3f
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 8624d3f

Please sign in to comment.