From 25f6df0d0fd95c6799e16e8dbb4431a8c5f72dc2 Mon Sep 17 00:00:00 2001 From: "Peter A. Bigot" Date: Sat, 2 Jun 2012 09:34:04 -0500 Subject: [PATCH] fix disassembly of 20-bit calla operands --- util/dis.c | 1 + util/output_util.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/util/dis.c b/util/dis.c index 0214694..c2d03c5 100644 --- a/util/dis.c +++ b/util/dis.c @@ -212,6 +212,7 @@ static int decode_13xx(const uint8_t *code, address_t len, if (len < 4) return -1; + insn->dsize = MSP430_DSIZE_AWORD; insn->dst_addr |= code[2]; insn->dst_addr |= code[3] << 8; diff --git a/util/output_util.c b/util/output_util.c index 485f873..c30f408 100644 --- a/util/output_util.c +++ b/util/output_util.c @@ -24,7 +24,7 @@ #include "stab.h" #include "util.h" -static int format_addr(msp430_amode_t amode, uint16_t addr) +static int format_addr(msp430_amode_t amode, address_t addr) { char name[64]; const char *prefix = ""; @@ -91,7 +91,7 @@ static int format_reg(msp430_amode_t amode, msp430_reg_t reg) * * Returns the number of characters printed. */ -static int format_operand(msp430_amode_t amode, uint16_t addr, +static int format_operand(msp430_amode_t amode, address_t addr, msp430_reg_t reg) { int len = 0;