Fix m68k test
This commit is contained in:
parent
0698f0b8f9
commit
d9dcba4031
|
@ -209,13 +209,19 @@ static int analop(RAnal *a, RAnalOp *op, ut64 addr, const ut8 *buf, int len, RAn
|
||||||
cs_option (handle, CS_OPT_DETAIL, CS_OPT_ON);
|
cs_option (handle, CS_OPT_DETAIL, CS_OPT_ON);
|
||||||
}
|
}
|
||||||
n = cs_disasm (handle, (ut8*)buf, len, addr, 1, &insn);
|
n = cs_disasm (handle, (ut8*)buf, len, addr, 1, &insn);
|
||||||
|
if (!strncmp (insn->mnemonic, "dc.w", 4)) {
|
||||||
if (mask & R_ANAL_OP_MASK_DISASM) {
|
if (mask & R_ANAL_OP_MASK_DISASM) {
|
||||||
|
op->mnemonic = strdup ("invlad");
|
||||||
|
}
|
||||||
|
n = -1;
|
||||||
|
} else if (mask & R_ANAL_OP_MASK_DISASM) {
|
||||||
char *str = r_str_newf ("%s%s%s", insn->mnemonic, insn->op_str[0]? " ": "", insn->op_str);
|
char *str = r_str_newf ("%s%s%s", insn->mnemonic, insn->op_str[0]? " ": "", insn->op_str);
|
||||||
if (str) {
|
if (str) {
|
||||||
char *p = r_str_replace (strdup (str), "$", "0x", true);
|
char *p = r_str_replace (str, "$", "0x", true);
|
||||||
if (p) {
|
if (p) {
|
||||||
r_str_replace_char (p, '#', 0);
|
r_str_replace_char (p, '#', 0);
|
||||||
op->mnemonic = p;
|
op->mnemonic = p;
|
||||||
|
} else {
|
||||||
free (str);
|
free (str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -723,6 +729,7 @@ static bool set_reg_profile(RAnal *anal) {
|
||||||
"=PC pc\n"
|
"=PC pc\n"
|
||||||
"=SP a7\n"
|
"=SP a7\n"
|
||||||
"=BP a6\n"
|
"=BP a6\n"
|
||||||
|
"=R0 a0\n"
|
||||||
"=A0 a0\n"
|
"=A0 a0\n"
|
||||||
"=A1 a1\n"
|
"=A1 a1\n"
|
||||||
"=A2 a2\n"
|
"=A2 a2\n"
|
||||||
|
|
Loading…
Reference in New Issue