From d147060762637a24b67102fb78be9b3e9dc93d3c Mon Sep 17 00:00:00 2001 From: pancake Date: Tue, 11 Jun 2024 18:14:35 +0200 Subject: [PATCH] Implement madd/msub/mneg support for arm64.pseudo ##disasm --- libr/arch/p/arm/pseudo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libr/arch/p/arm/pseudo.c b/libr/arch/p/arm/pseudo.c index 220b2532c8b39..086efc984f101 100644 --- a/libr/arch/p/arm/pseudo.c +++ b/libr/arch/p/arm/pseudo.c @@ -21,6 +21,9 @@ static int replace(int argc, const char *argv[], char *newstr) { { 3, "add", "# = # + #", { 1, 2, 3 } }, { 2, "add", "# += #", { 1, 2 } }, { 2, "adds", "# += #", { 1, 2 } }, + { 4, "madd", "# = (# * #) + #", { 1, 2, 3, 4 } }, + { 4, "msub", "# = (# * #) - #", { 1, 2, 3, 4 } }, + { 3, "mneg ", "# = -(# * #)", { 1, 2, 3 } }, { 3, "adds", "# = # + #", { 1, 2, 3 } }, { 3, "addw", "# = # + #", { 1, 2, 3 } }, { 3, "add.w", "# = # + #", { 1, 2, 3 } }, @@ -85,7 +88,7 @@ static int replace(int argc, const char *argv[], char *newstr) { // { 4, "movk", "# = # # #", { 1, 2, 3, 4 } }, { 3, "movk", "# = # #", { 1, 2, 3 } }, { 0, "movn", "# = ~#", { 1, 2 } }, - { 0, "neg", "# = !#", { 1, 2 } }, + { 0, "neg", "# = -#", { 1, 2 } }, { 0, "sxtw", "# = #", { 1, 2 } }, { 0, "stur", "# # = #", { 2, 3, 1 } }, { 4, "stp", "# + # = (#, 2)", { 3, 4, 1 } },