diff --git a/r2plugin/asm_adsp219x.c b/r2plugin/asm_adsp219x.c index 55ffd61..146a04e 100644 --- a/r2plugin/asm_adsp219x.c +++ b/r2plugin/asm_adsp219x.c @@ -74,7 +74,7 @@ decode (RArchSession *as, RAnalOp *op, RAnalOpMask mask) ins2 = ((ut32) b[3] << 16) | ((ut32) b[4] << 8) | (ut32) b[5]; op->size = 3; op->type = R_ANAL_OP_TYPE_UNK; - if (!(mask & R_ARCH_OP_MASK_DISASM)) return true; + (void) mask; /* decode always runs full; r2 frees mnemonic */ /* Priority check: High bits */ ut32 b23_22 = (ins >> 22) & 0x3; @@ -352,6 +352,8 @@ decode (RArchSession *as, RAnalOp *op, RAnalOpMask mask) op->type = s_bit ? R_ANAL_OP_TYPE_CALL : R_ANAL_OP_TYPE_JMP; op->jump = addr; + if (!s_bit) + op->eob = true; return true; } @@ -416,6 +418,8 @@ decode (RArchSession *as, RAnalOp *op, RAnalOpMask mask) op->type = s_bit ? R_ANAL_OP_TYPE_CALL : R_ANAL_OP_TYPE_JMP; op->jump = target; + if (!s_bit) + op->eob = true; return true; } /* Type 10: bits 23-19 = 00011, bit18 = 0 (conditional 13-bit rel) */ @@ -466,6 +470,7 @@ decode (RArchSession *as, RAnalOp *op, RAnalOpMask mask) cond_str[cond], ret, b_bit ? " (DB)" : ""); op->type = R_ANAL_OP_TYPE_RET; + op->eob = true; return true; } @@ -629,6 +634,10 @@ decode (RArchSession *as, RAnalOp *op, RAnalOpMask mask) b_bit ? " (DB)" : ""); op->type = s_bit ? R_ANAL_OP_TYPE_CALL : R_ANAL_OP_TYPE_JMP; + if (!s_bit && cond == 15) + op->eob = true; + if (cond != 15) + op->fail = op->addr + 3; return true; }