From 51960eeecff84639742ce367058749f451a83cf6 Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Thu, 27 Dec 2012 22:35:26 -0800 Subject: Some fixes to add/addx sub/subx decoding --- 68kinst.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '68kinst.c') diff --git a/68kinst.c b/68kinst.c index 099aab6..da7e00d 100644 --- a/68kinst.c +++ b/68kinst.c @@ -802,11 +802,11 @@ uint16_t * m68k_decode(uint16_t * istream, m68kinst * decoded, uint32_t address) } break; case SUB_SUBX: - size = *istream >> 6 & 0x3; + size = (*istream >> 6) & 0x3; decoded->op = M68K_SUB; if (*istream & 0x100) { // destination, SUBA.l or SUBX - if (*istream & 0x6) { + if (*istream & 0x30 || size == OPSIZE_INVALID) { if (size == OPSIZE_INVALID) { //SUBA.l decoded->extra.size = OPSIZE_LONG; @@ -930,11 +930,11 @@ uint16_t * m68k_decode(uint16_t * istream, m68kinst * decoded, uint32_t address) } break; case ADD_ADDX: - size = *istream >> 6 & 0x3; + size = (*istream >> 6) & 0x3; decoded->op = M68K_ADD; if (*istream & 0x100) { // destination, ADDA.l or ADDX - if (*istream & 0x6) { + if (*istream & 0x30 || size == OPSIZE_INVALID) { if (size == OPSIZE_INVALID) { //ADDA.l decoded->extra.size = OPSIZE_LONG; -- cgit v1.2.3