Mercurial > repos > blastem
changeset 1260:cad1642baf66
Fix implementation of in c and out c on 32-bit x86
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 02 Mar 2017 22:18:15 -0800 |
parents | 23c94f5266d1 |
children | f13f51e9f9f2 |
files | z80_to_x86.c |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/z80_to_x86.c Thu Mar 02 21:08:33 2017 -0800 +++ b/z80_to_x86.c Thu Mar 02 22:18:15 2017 -0800 @@ -2322,7 +2322,7 @@ if (inst->addr_mode == Z80_IMMED_INDIRECT) { mov_ir(code, inst->immed, opts->gen.scratch1, SZ_B); } else { - mov_rr(code, opts->regs[Z80_C], opts->gen.scratch1, SZ_B); + zreg_to_native(opts, Z80_C, opts->gen.scratch2); } call(code, opts->read_io); if (inst->addr_mode != Z80_IMMED_INDIRECT) { @@ -2602,7 +2602,6 @@ mov_ir(code, inst->immed, opts->gen.scratch2, SZ_B); } else { zreg_to_native(opts, Z80_C, opts->gen.scratch2); - mov_rr(code, opts->regs[Z80_C], opts->gen.scratch2, SZ_B); } translate_z80_reg(inst, &src_op, opts); if (src_op.mode == MODE_REG_DIRECT) {