diff --git a/r2plugin/asm_adsp219x.c b/r2plugin/asm_adsp219x.c index db32a4a..ea66cce 100644 --- a/r2plugin/asm_adsp219x.c +++ b/r2plugin/asm_adsp219x.c @@ -113,6 +113,24 @@ decode (RArchSession *as, RAnalOp *op, RAnalOpMask mask) return true; } + /* Type 8: Compute | Dreg1 <- Dreg2 (00101Z) */ + /* Bits 23-18 = 001010 (Z=0) or 001011 (Z=1) */ + if ((ins >> 18) == 0x0A || (ins >> 18) == 0x0B) + { + ut32 z = (ins >> 18) & 1; + ut32 amf = (ins >> 12) & 0x1F; + const char *f = (amf < 16) ? amf_mac[amf] : amf_alu[amf-16]; + /* DDREG = bits 8-6 (dest), SDREG = bits 5-0 (src, masked) */ + ut32 ddreg = (ins >> 6) & 0x7; + ut32 sdreg = ins & 0x3F; + /* For NONE=ALU case: SDREG = 0x2A (101010) */ + if (sdreg == 0x2A) + op->mnemonic = r_str_newf ("NONE = %s", f); + else + op->mnemonic = r_str_newf ("%s, %s = %s", f, xop_alu[ddreg], reg0[sdreg & 0xF]); + return true; + } + /* Type 6/7/IO/System (010xxx / 011xxx) */ if (b23_22 == 1) {