diff --git a/libr/arch/p/arm/pseudo.c b/libr/arch/p/arm/pseudo.c index e4450564dabb9..5592406470ffb 100644 --- a/libr/arch/p/arm/pseudo.c +++ b/libr/arch/p/arm/pseudo.c @@ -16,9 +16,12 @@ static int replace(int argc, const char *argv[], char *newstr) { const char *str; int args[MAXPSEUDOOPS]; } ops[] = { + { 2, "uxtb", "# = #", { 1, 2 } }, { 0, "abs", "# = abs(#)", { 1, 1 } }, { 0, "adc", "# = # + #", { 1, 2, 3 } }, { 3, "add", "# = # + #", { 1, 2, 3 } }, + { 0, "fcvtzs", "# = #", { 1, 2 } }, + { 0, "scvtf", "# = #", { 1, 2 } }, { 2, "add", "# += #", { 1, 2 } }, { 2, "adds", "# += #", { 1, 2 } }, { 4, "madd", "# = (# * #) + #", { 1, 2, 3, 4 } }, @@ -43,6 +46,7 @@ static int replace(int argc, const char *argv[], char *newstr) { { 0, "b.gt", "if (a > b) goto #", { 1 } }, { 0, "b.le", "if (a <= b) goto #", { 1 } }, { 0, "b.lt", "if (a < b) goto #", { 1 } }, + { 0, "b.ls", "if (a < b) goto #", { 1 } }, { 0, "b.ge", "if (a >= b) goto #", { 1 } }, { 0, "beq lr", "ifeq ret", {0} }, { 0, "beq", "je #", { 1 } }, @@ -76,6 +80,9 @@ static int replace(int argc, const char *argv[], char *newstr) { { 2, "sxth", "# = (short) #", { 1, 2 } }, { 0, "fdv", "# = # / #", { 1, 2, 3 } }, { 0, "fml", "# = # * #", { 1, 2, 3 } }, + { 3, "ldurb", "# = (byte) # #", { 1, 2, 3 } }, + { 3, "ldur", "# = # #", { 1, 2, 3 } }, + { 3, "ldursw", "# = # #", { 1, 2, 3 } }, { 2, "ldr", "# = #", { 1, 2 } }, { 2, "ldrh", "# = (word) #", { 1, 2 } }, { 3, "ldrh", "# = (word) # + #", { 1, 2, 3 } }, @@ -347,7 +354,7 @@ static char *mount_oldstr(RParse* p, const char *reg, st64 delta, bool ucase) { } static bool subvar(RParse *p, RAnalFunction *f, ut64 addr, int oplen, char *data, char *str, int len) { - r_return_val_if_fail (p, false); + R_RETURN_VAL_IF_FAIL (p, false); RList *spargs = NULL; RList *bpargs = NULL; RListIter *iter; diff --git a/libr/core/pseudo.c b/libr/core/pseudo.c index e2d78e32b7c08..a7b212ce4d20b 100644 --- a/libr/core/pseudo.c +++ b/libr/core/pseudo.c @@ -518,14 +518,16 @@ R_API int r_core_pseudo_code(RCore *core, const char *input) { indent--; continue; } +#if 0 if (sdb_num_get (db, K_ELSE (bb->addr), 0)) { NEWLINE (addr, indent); if (!strcmp (blocktype, "else")) { - PRINTF (" // } %s {", blocktype); + PRINTF (" // %s", blocktype); } else { - PRINTF (" // } %s (?);", blocktype); + PRINTF (" // %s ();", blocktype); } } +#endif if (addr != bb->addr) { queuegoto = addr; // r_cons_printf ("\n%s goto loc_0x%"PFMT64x, indentstr, addr); diff --git a/test/db/cmd/cmd_pdc b/test/db/cmd/cmd_pdc index 33cae3008ba5e..bfb87c5d840cd 100644 --- a/test/db/cmd/cmd_pdc +++ b/test/db/cmd/cmd_pdc @@ -118,7 +118,6 @@ int entry0 (int stack, int stack) { var = si - 0 if (var > 0) goto loc_0x402018 // unlikely goto loc_0x00402042; - // } while (?); goto loc_0x00402042; } return eax; @@ -170,7 +169,6 @@ int sym.func.100003a54 (int x0, int x1) { x1 = x0 + 0x68 // arg1 x0 = x8 goto sym.imp.strcoll // int strcoll("", "") - // } else { } return x0; loc_0x100003a6c: // orphan