Skip to content
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

Missing instructions for ARM64 #297

Open
trufae opened this issue Nov 24, 2023 · 2 comments · Fixed by #301
Open

Missing instructions for ARM64 #297

trufae opened this issue Nov 24, 2023 · 2 comments · Fixed by #301

Comments

@trufae
Copy link
Contributor

trufae commented Nov 24, 2023

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]");
@trufae
Copy link
Contributor Author

trufae commented Nov 25, 2023

PAC and LDURH ones are solved here #301

@trufae
Copy link
Contributor Author

trufae commented Nov 26, 2023

ccmp, madd and cneg are not yet implemented. Can you reopen or do you want me to create a new one?

@wargio wargio reopened this Nov 26, 2023
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 a pull request may close this issue.

2 participants