changeset 712:382a2b5b70c0

Fix crash bug in Z80 interpreter
author Michael Pavone <pavone@retrodev.com>
date Sun, 17 May 2015 15:40:31 -0700
parents 3342548de036
children f9b80a78d9a6
files z80_to_x86.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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);