Skip to content

Commit

Permalink
Fix disas error
Browse files Browse the repository at this point in the history
  • Loading branch information
imbillow committed Jan 22, 2024
1 parent 64a8777 commit 04d0cc9
Show file tree
Hide file tree
Showing 6 changed files with 412 additions and 438 deletions.
30 changes: 15 additions & 15 deletions librz/analysis/arch/v850/v850_esil.inc
Original file line number Diff line number Diff line change
Expand Up @@ -189,49 +189,49 @@ static void v850_esil(RzStrBuf *out, ut8 opcode, ut16 word1, ut16 word2, V850_In
destaddrs = destaddr;
}
switch (F3_COND(word1)) {
case V850_COND_V:
case V850_COND_BV:
rz_strbuf_appendf(out, "ov");
break;
case V850_COND_CL:
case V850_COND_BL:
rz_strbuf_appendf(out, "cy");
break;
case V850_COND_ZE:
case V850_COND_BE:
rz_strbuf_appendf(out, "z");
break;
case V850_COND_NH:
case V850_COND_BNH:
rz_strbuf_appendf(out, "cy,z,|");
break;
case V850_COND_N:
case V850_COND_BN:
rz_strbuf_appendf(out, "s");
break;
case V850_COND_AL: // Always
case V850_COND_BR: // Always
rz_strbuf_appendf(out, "1");
break;
case V850_COND_LT:
case V850_COND_BLT:
rz_strbuf_appendf(out, "s,ov,^");
break;
case V850_COND_LE:
case V850_COND_BLE:
rz_strbuf_appendf(out, "s,ov,^,z,|");
break;
case V850_COND_NV:
case V850_COND_BNV:
rz_strbuf_appendf(out, "ov,!");
break;
case V850_COND_NL:
case V850_COND_BNL:
rz_strbuf_appendf(out, "cy,!");
break;
case V850_COND_NE:
case V850_COND_BNE:
rz_strbuf_appendf(out, "z,!");
break;
case V850_COND_H:
case V850_COND_BH:
rz_strbuf_appendf(out, "cy,z,|,!");
break;
case V850_COND_P:
case V850_COND_BP:
rz_strbuf_appendf(out, "s,!");
break;
case V850_COND_GE:
case V850_COND_BGE:
rz_strbuf_appendf(out, "s,ov,^,!");
break;
case V850_COND_GT:
case V850_COND_BGT:
rz_strbuf_appendf(out, "s,ov,^,z,|,!");
break;
}
Expand Down
5 changes: 0 additions & 5 deletions librz/analysis/arch/v850/v850_il.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,6 @@ static RzILOpPure *set_nth(RzILOpPure *x, unsigned n, bool v) {
return LOGAND(x, U32(~((ut32)(v) << n)));
}

static inline int32_t sext32(uint32_t X, unsigned B) {
rz_warn_if_fail(B > 0 && B <= 32);
return (int32_t)(X << (32 - B)) >> (32 - B);
}

#define LH(x) LOGAND(x, U32(0xffff))

#define PSW_NP nth(VARG("PSW"), 7)
Expand Down
Loading

0 comments on commit 04d0cc9

Please sign in to comment.