Mercurial > repos > blastem
diff runtime.S @ 84:2d1ae596db7a
Fix long reads from IO ports or long reads that trigger sync cycles by saving rdi. Possibly fix word wide IO reads.
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 26 Dec 2012 17:34:59 -0800 |
parents | 2c7267617d71 |
children | 1db2a0b655d1 |
line wrap: on
line diff
--- a/runtime.S Wed Dec 26 17:06:34 2012 -0800 +++ b/runtime.S Wed Dec 26 17:34:59 2012 -0800 @@ -154,7 +154,7 @@ 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 @@ 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