From e43d9cd9eb59197c72eb08189cfcbb37cd630898 Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Mon, 29 Apr 2013 01:14:24 -0700 Subject: Fix target cycle count after 68K interrupt --- runtime.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/runtime.S b/runtime.S index 0136aba..0cd5a27 100644 --- a/runtime.S +++ b/runtime.S @@ -18,6 +18,7 @@ skip_sync: handle_cycle_limit_int: cmp 88(%rsi), %eax jb skip_int + mov 84(%rsi), %ebp /* swap USP and SSP if not already in supervisor mode */ bt $5, 5(%rsi) jc already_supervisor @@ -444,9 +445,9 @@ m68k_write_long_highfirst: jmp m68k_write_word inccycles: - cmp %rbp, %rax + cmp %ebp, %eax jnb do_limit - add $4, %rax + add $4, %eax ret do_limit: push %rcx @@ -454,7 +455,7 @@ do_limit: call handle_cycle_limit pop %rdi pop %rcx - add $4, %rax + add $4, %eax ret .global m68k_read_word_scratch1 -- cgit v1.2.3