summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--m68k_to_x86.c2
-rw-r--r--runtime.S7
2 files changed, 6 insertions, 3 deletions
diff --git a/m68k_to_x86.c b/m68k_to_x86.c
index 1f69dc5..2b6abba 100644
--- a/m68k_to_x86.c
+++ b/m68k_to_x86.c
@@ -159,7 +159,6 @@ uint8_t * translate_m68k_src(m68kinst * inst, x86_ea * ea, uint8_t * out, x86_68
out = cycles(out, BUS);
}
out = mov_ir(out, inst->src.params.immed, SCRATCH1, SZ_D);
- out = check_cycles(out);
switch (inst->extra.size)
{
case OPSIZE_BYTE:
@@ -461,7 +460,6 @@ uint8_t * translate_m68k_move(uint8_t * dst, m68kinst * inst, x86_68k_options *
dst = cmp_ir(dst, 0, flags_reg, inst->extra.size);
dst = setcc_r(dst, CC_Z, FLAG_Z);
dst = setcc_r(dst, CC_S, FLAG_N);
- dst = check_cycles(dst);
switch (inst->extra.size)
{
case OPSIZE_BYTE:
diff --git a/runtime.S b/runtime.S
index 5ffa06c..b117b77 100644
--- a/runtime.S
+++ b/runtime.S
@@ -153,7 +153,12 @@ cart:
inccycles:
add $4, %rax
cmp %rbp, %rax
- jge handle_cycle_limit
+ jge do_limit
+ ret
+do_limit:
+ push %rcx
+ call handle_cycle_limit
+ pop %rcx
ret
.global m68k_read_long_scratch1