Mercurial > repos > blastem
diff z80_to_x86.c @ 828:22c3c52b9871
Fixed a copy pasta error in the implementation of LDD and LDDR. HL should be decremented and not incremented in those instructions.
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 18 Sep 2015 19:54:02 -0700 |
parents | 21a69dfb6ee7 |
children | 5822c6e5642f |
line wrap: on
line diff
--- a/z80_to_x86.c Wed Aug 05 23:23:15 2015 -0700 +++ b/z80_to_x86.c Fri Sep 18 19:54:02 2015 -0700 @@ -632,7 +632,7 @@ sub_irdisp(code, 1, opts->gen.context_reg, zr_off(Z80_DE), SZ_W); } if (opts->regs[Z80_HL] >= 0) { - add_ir(code, 1, opts->regs[Z80_HL], SZ_W); + sub_ir(code, 1, opts->regs[Z80_HL], SZ_W); } else { sub_irdisp(code, 1, opts->gen.context_reg, zr_off(Z80_HL), SZ_W); } @@ -658,7 +658,7 @@ sub_irdisp(code, 1, opts->gen.context_reg, zr_off(Z80_DE), SZ_W); } if (opts->regs[Z80_HL] >= 0) { - add_ir(code, 1, opts->regs[Z80_HL], SZ_W); + sub_ir(code, 1, opts->regs[Z80_HL], SZ_W); } else { sub_irdisp(code, 1, opts->gen.context_reg, zr_off(Z80_HL), SZ_W); }