diff --git a/libr/anal/p/anal_cris.c b/libr/anal/p/anal_cris.c index 1615b22715..c8706e0299 100644 --- a/libr/anal/p/anal_cris.c +++ b/libr/anal/p/anal_cris.c @@ -220,7 +220,7 @@ static int analop(RAnal *a, RAnalOp *op, ut64 addr, const ut8 *buf, int len) { } #endif op->size = opsize; - op->delay = 1; + //op->delay = 1; return opsize; } diff --git a/libr/anal/p/anal_mips_cs.c b/libr/anal/p/anal_mips_cs.c index 28d72923ce..4c61b5bb53 100644 --- a/libr/anal/p/anal_mips_cs.c +++ b/libr/anal/p/anal_mips_cs.c @@ -92,6 +92,7 @@ static int analop_esil(RAnal *a, RAnalOp *op, ut64 addr, const ut8 *buf, int len case MIPS_INS_BAL: case MIPS_INS_JAL: case MIPS_INS_JALR: + case MIPS_INS_JALRS: case MIPS_INS_JALRC: case MIPS_INS_BLTZAL: // Branch on less than zero and link r_strbuf_appendf (&op->esil, "pc,8,+,ra,=,%s,pc,=", ARG(0)); @@ -375,9 +376,13 @@ static int analop(RAnal *a, RAnalOp *op, ut64 addr, const ut8 *buf, int len) { op->type = R_ANAL_OP_TYPE_UCALL; op->delay = 1; break; - case MIPS_INS_BAL: case MIPS_INS_JAL: - case MIPS_INS_JALRC: + case MIPS_INS_JALS: + case MIPS_INS_JALX: + case MIPS_INS_JIALC: + case MIPS_INS_JIC: + case MIPS_INS_JRADDIUSP: + case MIPS_INS_BAL: case MIPS_INS_BGEZAL: // Branch on less than zero and link op->type = R_ANAL_OP_TYPE_CALL; op->delay = 1; diff --git a/libr/anal/p/anal_mips_gnu.c b/libr/anal/p/anal_mips_gnu.c index 4d2628c152..1994e2bc2a 100644 --- a/libr/anal/p/anal_mips_gnu.c +++ b/libr/anal/p/anal_mips_gnu.c @@ -88,11 +88,6 @@ static int mips_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *b_in, int len break; case 7: // srav break; - case 9: // jalr - //eprintf ("%llx jalr\n", addr); - op->type = R_ANAL_OP_TYPE_UCALL; - op->delay = 1; - break; case 8: // jr //eprintf ("%llx jr\n", addr); // TODO: check return value or gtfo @@ -103,6 +98,11 @@ static int mips_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *b_in, int len } op->delay = 1; break; + case 9: // jalr + //eprintf ("%llx jalr\n", addr); + op->type = R_ANAL_OP_TYPE_UCALL; + op->delay = 1; + break; case 12: // syscall op->type = R_ANAL_OP_TYPE_SWI; break; @@ -308,6 +308,12 @@ static int mips_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *b_in, int len case 49: // lwc1 case 57: // swc1 break; + case 29: // jalx + op->type = R_ANAL_OP_TYPE_CALL; + op->jump = addr + 4*((b[3] | b[2]<<8 | b[1]<<16)); + op->fail = addr + 8; + op->delay = 1; + break; } //family = 'I'; } diff --git a/libr/asm/arch/mips/gnu/mips-dis.c b/libr/asm/arch/mips/gnu/mips-dis.c index 4dcdf4de15..8087063ccb 100644 --- a/libr/asm/arch/mips/gnu/mips-dis.c +++ b/libr/asm/arch/mips/gnu/mips-dis.c @@ -998,9 +998,9 @@ print_insn_args (const char *d, info->target = (((pc + 4) & ~(bfd_vma) 0x0fffffff) | (((l >> OP_SH_TARGET) & OP_MASK_TARGET) << 2)); /* For gdb disassembler, force odd address on jalx. */ - if (info->flavour == bfd_target_unknown_flavour - && strcmp (opp->name, "jalx") == 0) - info->target |= 1; + //if (info->flavour == bfd_target_unknown_flavour + // && strcmp (opp->name, "jalx") == 0) + //info->target |= 1; (*info->print_address_func) (info->target, info); break;