From da3b7e31a22231bde27d9b5407e77051caa421d6 Mon Sep 17 00:00:00 2001 From: Daniel Beer Date: Wed, 13 Mar 2013 10:40:43 +1300 Subject: [PATCH] Partial revert of ce2e0a94f49e00f5ad312048739950257ef216b. Jump instruction offsets are relative to start of instruction. --- util/dis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/dis.c b/util/dis.c index d001240..c729940 100644 --- a/util/dis.c +++ b/util/dis.c @@ -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 + 4 + tgtrel * 2; + insn->dst_addr = offset + 2 + tgtrel * 2; insn->dst_mode = MSP430_AMODE_SYMBOLIC; insn->dst_reg = MSP430_REG_PC;