summaryrefslogtreecommitdiff
path: root/runtime.S
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2012-12-18 22:56:04 -0800
committerMike Pavone <pavone@retrodev.com>2012-12-18 22:56:04 -0800
commitf4c9528b11a02481a3d418dd3a41304ad1583153 (patch)
tree8c25751ba0be4abc0b14b6232470d86c5ff349ac /runtime.S
parent59e88c670ab6db559b71c5bc9ddb6b5bac2c11f2 (diff)
ecx was getting clobbered before the relevant temp value was used in some cases during memory reads
Diffstat (limited to 'runtime.S')
-rw-r--r--runtime.S7
1 files changed, 6 insertions, 1 deletions
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