# HG changeset patch # User Michael Pavone # Date 1469851159 25200 # Node ID ca38a29d2d76a36ba726603245349c221483e429 # Parent b86c3ce007d9bc57f3ec22ce7c55a7af2fa1f347 Implement undocumented flag bits for RLD and RRD diff -r b86c3ce007d9 -r ca38a29d2d76 z80_to_x86.c --- a/z80_to_x86.c Fri Jul 29 09:23:59 2016 -0700 +++ b/z80_to_x86.c Fri Jul 29 20:59:19 2016 -0700 @@ -1797,6 +1797,7 @@ setcc_rdisp(code, CC_P, opts->gen.context_reg, zf_off(ZF_PV)); 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)); + mov_rrdisp(code, opts->regs[Z80_A], opts->gen.context_reg, zf_off(ZF_XY), SZ_B); zreg_to_native(opts, Z80_HL, opts->gen.scratch2); ror_ir(code, 8, opts->gen.scratch1, SZ_W); @@ -1828,6 +1829,7 @@ setcc_rdisp(code, CC_P, opts->gen.context_reg, zf_off(ZF_PV)); 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)); + mov_rrdisp(code, opts->regs[Z80_A], opts->gen.context_reg, zf_off(ZF_XY), SZ_B); zreg_to_native(opts, Z80_HL, opts->gen.scratch2); ror_ir(code, 8, opts->gen.scratch1, SZ_W);