# HG changeset patch # User Michael Pavone # Date 1469912605 25200 # Node ID 47c7484553657889a014579310b1030d9580acc9 # Parent ac4615d16226b920ba71862f184851b2bd6ae9cd Fixed bug introduced in NEG with addition of undocumented flags diff -r ac4615d16226 -r 47c748455365 z80_to_x86.c --- 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));