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".
This commit is contained in:
Peter A. Bigot 2012-06-27 01:54:09 -05:00 committed by Daniel Beer
parent 7c04f72397
commit 19dfb6b64c
1 changed files with 2 additions and 2 deletions

View File

@ -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;