dis: handle RETI specially.

This commit is contained in:
Daniel Beer 2010-08-10 14:41:47 +12:00
parent bdeadb5192
commit ab0d02b2b3
2 changed files with 6 additions and 2 deletions

6
dis.c
View File

@ -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 &&

2
dis.h
View File

@ -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;