changeset 1918:6fdac0108e47

Fix bug in in (c) instruction in Z80 dynarec
author Michael Pavone <pavone@retrodev.com>
date Fri, 03 Apr 2020 23:47:57 -0700
parents b91c35bce3e9
children e29ff59192ce
files z80_to_x86.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/z80_to_x86.c	Fri Apr 03 23:47:17 2020 -0700
+++ b/z80_to_x86.c	Fri Apr 03 23:47:57 2020 -0700
@@ -2327,7 +2327,7 @@
 		if (inst->addr_mode == Z80_IMMED_INDIRECT) {
 			mov_ir(code, inst->immed, opts->gen.scratch1, SZ_B);
 		} else {
-			zreg_to_native(opts, Z80_C, opts->gen.scratch2);
+			zreg_to_native(opts, Z80_C, opts->gen.scratch1);
 		}
 		call(code, opts->read_io);
 		if (inst->addr_mode != Z80_IMMED_INDIRECT) {