From 6f68fce01e5256d87c1f8ff48d3d397b646c4a4f Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Sun, 8 Sep 2013 20:46:25 -0700 Subject: Fix bit instruction timing --- m68k_to_x86.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'm68k_to_x86.c') diff --git a/m68k_to_x86.c b/m68k_to_x86.c index 785dac3..e78fe0d 100644 --- a/m68k_to_x86.c +++ b/m68k_to_x86.c @@ -2952,7 +2952,9 @@ uint8_t * translate_m68k(uint8_t * dst, m68kinst * inst, x86_68k_options * opts) 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; -- cgit v1.2.3