Missing instructions for ARM64
trufae opened this issue · 2 comments
Some pac instructions are still not handled by r2dec, these are some of them
[0x100003ab4]> pdd | grep asm|sort -u
__asm ("ldurh w0, [x29, -0x5e]");
__asm ("ccmp w10, 0, 0, ne");
__asm ("ccmp w12, 0, 0, ne");
__asm ("madd x11, x11, x12, x8");
__asm ("cneg x0, x11, ne");
madd
- stands for multiply+add
Multiply-Add multiplies two register values, adds a third register value, and writes the result to the destination register.
this is iirc x11, x11, x12, x8
=> x11 = (x11 * x12) + x8
cneg
Conditional Select Negation returns, in the destination register, the value of the first source register if the condition is TRUE, and otherwise returns the negated value of the second source register.
https://developer.arm.com/documentation/dui0801/h/A64-General-Instructions/CSNEG
conditional comparison
Documentation about ccmp
: https://devblogs.microsoft.com/oldnewthing/20220817-00/?p=106998
ignore pac instructions (signing = nop, handle return)
fixed in my PR below
__asm ("paciza x16");
__asm ("pacibsp");
__asm ("paciza x16");
__asm ("retab");
__asm ("ldurh w0, [x29, -0x5e]");
ccmp, madd and cneg are not yet implemented. Can you reopen or do you want me to create a new one?