dis: fix constant generation for single-operand.

Indexed mode with R3 shouldn't consume an index word, because this is
the combination used for generating the constant #1.
This commit is contained in:
Daniel Beer 2013-01-15 11:47:50 +13:00
parent db94eab4b2
commit 65b2e94a2e
1 changed files with 4 additions and 1 deletions

View File

@ -263,8 +263,11 @@ static int decode_single(const uint8_t *code, address_t offset,
if (insn->dst_reg == MSP430_REG_PC) {
insn->dst_addr = offset + 2;
insn->dst_mode = MSP430_AMODE_SYMBOLIC;
} else if (insn->dst_reg == MSP430_REG_SR)
} else if (insn->dst_reg == MSP430_REG_SR) {
insn->dst_mode = MSP430_AMODE_ABSOLUTE;
} else if (insn->dst_reg == MSP430_REG_R3) {
need_arg = 0; /* constant generator: #1 */
}
break;
case MSP430_AMODE_INDIRECT: break;