Mercurial > repos > blastem
diff z80_to_x86.c @ 712:382a2b5b70c0
Fix crash bug in Z80 interpreter
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 17 May 2015 15:40:31 -0700 |
parents | 144df1a6d3b9 |
children | 1c2020d3e275 |
line wrap: on
line diff
--- a/z80_to_x86.c Sat May 16 23:08:07 2015 -0700 +++ b/z80_to_x86.c Sun May 17 15:40:31 2015 -0700 @@ -1674,7 +1674,7 @@ call(code, opts->gen.save_context); mov_irdisp(code, address, opts->gen.context_reg, offsetof(z80_context, pc), SZ_W); push_r(code, opts->gen.context_reg); - call_args(code, (code_ptr)z80_interp_handler, 2, opts->gen.scratch1, opts->gen.scratch2); + call_args(code, (code_ptr)z80_interp_handler, 2, opts->gen.scratch1, opts->gen.context_reg); mov_rr(code, RAX, opts->gen.scratch1, SZ_PTR); pop_r(code, opts->gen.context_reg); call(code, opts->gen.load_context);