summaryrefslogtreecommitdiff
path: root/runtime.S
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2012-12-26 17:34:59 -0800
committerMike Pavone <pavone@retrodev.com>2012-12-26 17:34:59 -0800
commitcce801dfb2df84293b42c2a73ef1e894ac437333 (patch)
treefb84cd0b053c11fd0c6717bb55549efc419b1d33 /runtime.S
parente47a5743357fe9d026a62cb4c1c01f044215adde (diff)
Fix long reads from IO ports or long reads that trigger sync cycles by saving rdi. Possibly fix word wide IO reads.
Diffstat (limited to 'runtime.S')
-rw-r--r--runtime.S4
1 files changed, 3 insertions, 1 deletions
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