summaryrefslogtreecommitdiff
path: root/68kinst.c
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2012-12-27 22:35:26 -0800
committerMike Pavone <pavone@retrodev.com>2012-12-27 22:35:26 -0800
commit51960eeecff84639742ce367058749f451a83cf6 (patch)
tree0a4d816dd838dacff2fb9352c68ca20f164fe298 /68kinst.c
parent1d7a1f2607fc1e5ac6d25182ea6c846b9b2752b5 (diff)
Some fixes to add/addx sub/subx decoding
Diffstat (limited to '68kinst.c')
-rw-r--r--68kinst.c8
1 files changed, 4 insertions, 4 deletions
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) {
//<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;