From 430233f56146d636d85bf8240b092132b4fb898c Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Tue, 1 Jan 2013 09:40:17 -0800 Subject: 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. --- runtime.S | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'runtime.S') 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: -- cgit v1.2.3