Fix PowerPC's SUBF esil and parse

This commit is contained in:
Giovanni 2017-04-27 14:55:22 +02:00 committed by radare
parent 51aaf24dc1
commit 883422082d
2 changed files with 24 additions and 24 deletions

View File

@ -665,7 +665,7 @@ static int analop(RAnal *a, RAnalOp *op, ut64 addr, const ut8 *buf, int len) {
case PPC_INS_SUBFIC:
case PPC_INS_SUBFZE:
op->type = R_ANAL_OP_TYPE_SUB;
esilprintf (op, "%s,%s,-,%s,=", ARG(2), ARG(1), ARG(0));
esilprintf (op, "%s,%s,-,%s,=", ARG(1), ARG(2), ARG(0));
break;
case PPC_INS_ADD:
case PPC_INS_ADDI:

View File

@ -1144,14 +1144,14 @@ static int replace(int argc, const char *argv[], char *newstr) {
{ "stxsdx", "vsx[C + B] = A", 3},
{ "stxvdbx", "vector double[C + B] = A", 3},
{ "stxvwdx", "vector word[C + B] = A", 3},
{ "sub", "A = B - C", 3},
{ "subc", "A = B - C", 3},
{ "subf", "A = B - C", 3},
{ "subfc", "A = B - C", 3},
{ "subfe", "A = B - C", 3},
{ "subfic", "A = B - C", 3},
{ "subfme", "A = B - C", 3},
{ "subfze", "A = B - C", 3},
{ "sub", "A = C - B", 3},
{ "subc", "A = C - B", 3},
{ "subf", "A = C - B", 3},
{ "subfc", "A = C - B", 3},
{ "subfe", "A = C - B", 3},
{ "subfic", "A = C - B", 3},
{ "subfme", "A = C - B", 3},
{ "subfze", "A = C - B", 3},
{ "sync", "sync_instr_cache", 0},
{ "tdeq", "if (A == B) trap", 2},
{ "tdeqi", "if (A == B) trap",2},
@ -1341,18 +1341,18 @@ static int replace(int argc, const char *argv[], char *newstr) {
{ "vsrh", "A = (half vector) B >> C", 3},
{ "vsro", "A = (vector) B >> (octet) C", 3},
{ "vsrw", "A = (word vector) B >> C", 3},
{ "vsubcuw", "A = (unsigned word vector) (B - C) & 1", 3},
{ "vsubfp", "A = (float vector) B - C", 3},
{ "vsubsbs", "A = (byte vector) B - C", 3},
{ "vsubshs", "A = (half vector) B - C", 3},
{ "vsubsws", "A = (word vector) B - C", 3},
{ "vsububm", "A = (byte vector) B - C", 3},
{ "vsububs", "A = (byte vector) B - C", 3},
{ "vsubudm", "A = (unsigned vector) B - C", 3},
{ "vsubuhm", "A = (unsigned half vector) B - C", 3},
{ "vsubuhs", "A = (unsigned half vector) B - C", 3},
{ "vsubuwm", "A = (unsigned word vector) B - C", 3},
{ "vsubuws", "A = (unsigned word vector) B - C", 3},
{ "vsubcuw", "A = (unsigned word vector) (C - B) & 1", 3},
{ "vsubfp", "A = (float vector) C - B", 3},
{ "vsubsbs", "A = (byte vector) C - B", 3},
{ "vsubshs", "A = (half vector) C - B", 3},
{ "vsubsws", "A = (word vector) C - B", 3},
{ "vsububm", "A = (byte vector) C - B", 3},
{ "vsububs", "A = (byte vector) C - B", 3},
{ "vsubudm", "A = (unsigned vector) C - B", 3},
{ "vsubuhm", "A = (unsigned half vector) C - B", 3},
{ "vsubuhs", "A = (unsigned half vector) C - B", 3},
{ "vsubuwm", "A = (unsigned word vector) C - B", 3},
{ "vsubuws", "A = (unsigned word vector) C - B", 3},
{ "vsumbsws", "A = (word vector) B + C", 3},
{ "vsumdsbs", "A = (byte vector) B + C", 3},
{ "vsumdshs", "A = (half vector) B + C", 3},
@ -1413,7 +1413,7 @@ static int replace(int argc, const char *argv[], char *newstr) {
{ "xsredp", "A = (double vector) 1/B", 2},
{ "xsrsqrtedp", "A = (double vector) 1/sqrt(B)", 2},
{ "xssqrtdp", "A = sqrt(B)", 2},
{ "xssubdp", "A = B - C", 3},
{ "xssubdp", "A = C - B", 3},
{ "xstdivdp", "A = test_sw_divide(B, C)", 3},
{ "xstsqrtdp", "A = test_sw_sqrt(B)", 2},
{ "xvabsdp", "A = (double vector) abs(B)", 2},
@ -1496,8 +1496,8 @@ static int replace(int argc, const char *argv[], char *newstr) {
{ "xvrsqrtesp", "A = (float vector) 1/sqrt(B)", 2},
{ "xvsqrtdp", "A = (double vector) sqrt(B)", 2},
{ "xvsqrtsp", "A = (float vector) sqrt(B)", 2},
{ "xvsubdp", "A = (double vector) B - C", 3},
{ "xvsubsp", "A = (float vector) B - C", 3},
{ "xvsubdp", "A = (double vector) C - B", 3},
{ "xvsubsp", "A = (float vector) C - B", 3},
{ "xvtdivdp", "A = (double vector) B / C", 3},
{ "xvtdivsp", "A = (float vector) B / C", 3},
{ "xvtsqrtdp", "A = (double vector) test_sw_sqrt(B)", 3},