From ab0d02b2b385cf16483b75f6ec9460d6aae87a6e Mon Sep 17 00:00:00 2001 From: Daniel Beer Date: Tue, 10 Aug 2010 14:41:47 +1200 Subject: [PATCH] dis: handle RETI specially. --- dis.c | 6 +++++- dis.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dis.c b/dis.c index 3daaa90..a62fd4c 100644 --- a/dis.c +++ b/dis.c @@ -477,7 +477,11 @@ int dis_decode(const uint8_t *code, address_t offset, address_t len, insn->dsize = (op & 0x0100) ? MSP430_DSIZE_WORD : MSP430_DSIZE_AWORD; ret = 2; - } else if ((op & 0xf000) == 0x1000) { + } else if ((op & 0xff80) == 0x1300) { + insn->itype = MSP430_ITYPE_NOARG; + insn->op = MSP430_OP_RETI; + ret = 2; + } else if ((op & 0xf000) == 0x1000 && (op & 0xfc00) < 0x1300) { insn->itype = MSP430_ITYPE_SINGLE; ret = decode_single(code, offset, len, insn); } else if ((op & 0xff00) >= 0x2000 && diff --git a/dis.h b/dis.h index 1722deb..62d35bf 100644 --- a/dis.h +++ b/dis.h @@ -107,8 +107,8 @@ typedef enum { * data[15:0], {12'b0, data[19:16]} */ typedef enum { + MSP430_DSIZE_WORD = 0, MSP430_DSIZE_BYTE, - MSP430_DSIZE_WORD, MSP430_DSIZE_AWORD, MSP430_DSIZE_UNKNOWN } msp430_dsize_t;