changeset 1056:47c748455365

Fixed bug introduced in NEG with addition of undocumented flags
author Michael Pavone <pavone@retrodev.com>
date Sat, 30 Jul 2016 14:03:25 -0700
parents ac4615d16226
children ff46d8fc2de8
files z80_to_x86.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/z80_to_x86.c	Fri Jul 29 22:06:45 2016 -0700
+++ b/z80_to_x86.c	Sat Jul 30 14:03:25 2016 -0700
@@ -1377,7 +1377,7 @@
 		cycles(&opts->gen, num_cycles);
 		mov_rr(code, opts->regs[Z80_A], opts->gen.scratch2, SZ_B);
 		neg_r(code, opts->regs[Z80_A], SZ_B);
-		mov_rrdisp(code, dst_op.base, opts->gen.context_reg, zf_off(ZF_XY), SZ_B);
+		mov_rrdisp(code, opts->regs[Z80_A], opts->gen.context_reg, zf_off(ZF_XY), SZ_B);
 		setcc_rdisp(code, CC_Z, opts->gen.context_reg, zf_off(ZF_Z));
 		setcc_rdisp(code, CC_S, opts->gen.context_reg, zf_off(ZF_S));
 		setcc_rdisp(code, CC_C, opts->gen.context_reg, zf_off(ZF_C));