summaryrefslogtreecommitdiff
path: root/m68k_to_x86.c
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-09-08 20:46:25 -0700
committerMike Pavone <pavone@retrodev.com>2013-09-08 20:46:25 -0700
commit6f68fce01e5256d87c1f8ff48d3d397b646c4a4f (patch)
tree355ae2f997247fc6f335fe786f4c1464e49364cc /m68k_to_x86.c
parent13c9ce6e0b47a724bf97584a0eafa3ad065f3741 (diff)
Fix bit instruction timing
Diffstat (limited to 'm68k_to_x86.c')
-rw-r--r--m68k_to_x86.c4
1 files changed, 3 insertions, 1 deletions
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;