changeset 457:6a315728fede

Fix bit instruction timing
author Mike Pavone <pavone@retrodev.com>
date Sun, 08 Sep 2013 20:46:25 -0700
parents 249d24973682
children 848a3db9d0b0
files m68k_to_x86.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/m68k_to_x86.c	Wed Sep 04 19:34:19 2013 -0700
+++ b/m68k_to_x86.c	Sun Sep 08 20:46:25 2013 -0700
@@ -2952,7 +2952,9 @@
 	case M68K_BCLR:
 	case M68K_BSET:
 	case M68K_BTST:
-		dst = cycles(dst, inst->extra.size == OPSIZE_BYTE ? 4 : 6);
+		dst = cycles(dst, inst->extra.size == OPSIZE_BYTE ? 4 : (
+			inst->op == M68K_BTST ? 6 : (inst->op == M68K_BCLR ? 10 : 8))
+		);
 		if (src_op.mode == MODE_IMMED) {
 			if (inst->extra.size == OPSIZE_BYTE) {
 				src_op.disp &= 0x7;