diff options
author | Mike Pavone <pavone@retrodev.com> | 2012-12-27 22:35:26 -0800 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2012-12-27 22:35:26 -0800 |
commit | 51960eeecff84639742ce367058749f451a83cf6 (patch) | |
tree | 0a4d816dd838dacff2fb9352c68ca20f164fe298 | |
parent | 1d7a1f2607fc1e5ac6d25182ea6c846b9b2752b5 (diff) |
Some fixes to add/addx sub/subx decoding
-rw-r--r-- | 68kinst.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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) { //<ea> 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) { //<ea> 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; |