From cce801dfb2df84293b42c2a73ef1e894ac437333 Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Wed, 26 Dec 2012 17:34:59 -0800 Subject: Fix long reads from IO ports or long reads that trigger sync cycles by saving rdi. Possibly fix word wide IO reads. --- runtime.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime.S') diff --git a/runtime.S b/runtime.S index c5618f8..7d7b7a3 100644 --- a/runtime.S +++ b/runtime.S @@ -154,7 +154,7 @@ do_io_read_w: call io_read_w mov %rax, %rsi call m68k_load_context - mov 136(%rsi), %cl + mov 136(%rsi), %cx ret bad_access_msg: @@ -333,7 +333,9 @@ m68k_read_long_scratch1: mov %cx, %di pop %rcx add $2, %ecx + push %rdi call m68k_read_word_scratch1 + pop %rdi and $0xFFFF, %ecx shl $16, %edi or %edi, %ecx -- cgit v1.2.3