From 19dfb6b64c0f11eb56187ffe3d15f20419bf3b32 Mon Sep 17 00:00:00 2001 From: "Peter A. Bigot" Date: Wed, 27 Jun 2012 01:54:09 -0500 Subject: [PATCH] Correct pushm.a count/register adjustment The adjustment was applied to the register instead of the count, causing 0x144b to decode as "PUSHM.A #4, R12". --- util/dis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/dis.c b/util/dis.c index c2d03c5..714789d 100644 --- a/util/dis.c +++ b/util/dis.c @@ -228,9 +228,9 @@ static int decode_14xx(const uint8_t *code, insn->itype = MSP430_ITYPE_DOUBLE; insn->op = op & 0xfe00; insn->dst_mode = MSP430_AMODE_REGISTER; - insn->dst_reg = 1 + (op & 0xf); + insn->dst_reg = op & 0xf; insn->src_mode = MSP430_AMODE_IMMEDIATE; - insn->src_addr = (op >> 4) & 0xf; + insn->src_addr = 1 + ((op >> 4) & 0xf); insn->dsize = (op & 0x0100) ? MSP430_DSIZE_WORD : MSP430_DSIZE_AWORD;