dis: correct offset for symbolic single-operand and jumps.

This commit is contained in:
Daniel Beer 2013-02-25 15:39:21 +13:00
parent a304b60dc9
commit ce2e0a94f4
1 changed files with 2 additions and 2 deletions

View File

@ -269,7 +269,7 @@ static int decode_single(const uint8_t *code, address_t offset,
case MSP430_AMODE_INDEXED:
need_arg = 1;
if (insn->dst_reg == MSP430_REG_PC) {
insn->dst_addr = offset + 2;
insn->dst_addr = offset + 4;
insn->dst_mode = MSP430_AMODE_SYMBOLIC;
} else if (insn->dst_reg == MSP430_REG_SR) {
insn->dst_mode = MSP430_AMODE_ABSOLUTE;
@ -413,7 +413,7 @@ static int decode_jump(const uint8_t *code, address_t offset,
insn->op = op & 0xfc00;
insn->itype = MSP430_ITYPE_JUMP;
insn->dst_addr = offset + 2 + tgtrel * 2;
insn->dst_addr = offset + 4 + tgtrel * 2;
insn->dst_mode = MSP430_AMODE_SYMBOLIC;
insn->dst_reg = MSP430_REG_PC;