-
Notifications
You must be signed in to change notification settings - Fork 50
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
Parsing fixes for riscv64: lui, loads #285
Conversation
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.
Please note that these are quick & dirty fixes by person inexperienced with js, to make it work and be less annoying when decompilation & translation process goes. |
do you have a test? you can generate it using |
This generates a really long single line, potentially with sensitive data included about my project. How shall I proceed? |
I generated one for random riscv64 binary on my system here: https://rys.strlcat.eu/pddi.json.xz |
i get a 403. can you just upload it here? |
There's still problem with construct like:
gives me
but shall be
(if assuming uint32_t, I don't know how typing here works, for uint64_t it shall produce |
true. the sign should extend |
lui decompilation is wrong:
l{d,w,h,b}[u] decompilation is wrong: