diff 68kinst.c @ 181:3b4ef459aa8d

Fix signed division with negative result, fix address reg destination with word-sized operand, fix cmpm decoding and code generation, fix unbalanced pop in bit instructions
author Mike Pavone <pavone@retrodev.com>
date Wed, 09 Jan 2013 21:08:37 -0800
parents e2918b5208eb
children 2f08d9e90a4c
line wrap: on
line diff
--- a/68kinst.c	Tue Jan 08 09:34:46 2013 -0800
+++ b/68kinst.c	Wed Jan 09 21:08:37 2013 -0800
@@ -1006,7 +1006,8 @@
 					decoded->op = M68K_INVALID;
 					return start+1;
 				}
-				if (decoded->src.addr_mode == MODE_AREG) {
+				decoded->extra.size = size;
+				if (decoded->dst.addr_mode == MODE_AREG) {
 					//CMPM
 					decoded->src.addr_mode = decoded->dst.addr_mode = MODE_AREG_POSTINC;
 					decoded->src.params.regs.pri = decoded->dst.params.regs.pri;
@@ -1014,7 +1015,6 @@
 				} else {
 					//EOR
 					decoded->op = M68K_EOR;
-					decoded->extra.size = size;
 					decoded->src.addr_mode = MODE_REG;
 					decoded->src.params.regs.pri = m68k_reg_quick_field(*istream);
 				}