summaryrefslogtreecommitdiff
path: root/runtime.S
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-01-01 09:40:17 -0800
committerMike Pavone <pavone@retrodev.com>2013-01-01 09:40:17 -0800
commit430233f56146d636d85bf8240b092132b4fb898c (patch)
tree343699f3c3f0fdeceec255500dc3341e9d5caffb /runtime.S
parent88d0d276444ed44b8dbfb29eebf14e87ebf0e403 (diff)
Do a sync when interrupt mask changes so we can recompute the next interrupt cycle. Also fix a bug in which the SR part of ORI to SR was not being performed.
Diffstat (limited to 'runtime.S')
-rw-r--r--runtime.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime.S b/runtime.S
index 43295d2..65e64be 100644
--- a/runtime.S
+++ b/runtime.S
@@ -1,8 +1,10 @@
.global handle_cycle_limit
+ .global do_sync
handle_cycle_limit:
cmp 84(%rsi), %eax
jb skip_sync
+do_sync:
call m68k_save_context
mov %rsi, %rdi
call sync_components
@@ -49,9 +51,14 @@ already_supervisor:
/* discard function return address */
pop %rdi
jmp *%rcx
+ ret
skip_int:
+ cmp 84(%rsi), %eax
+ jnb do_sync
ret
+ .global do_sync
+
int_dbg_msg:
.asciz "Executing Interrupt!"
print_int_dbg: