From e9b8afabb9c182a6058452e622cabc3602c0cf26 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Thu, 2 Mar 2017 22:18:15 -0800 Subject: Fix implementation of in c and out c on 32-bit x86 --- z80_to_x86.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'z80_to_x86.c') diff --git a/z80_to_x86.c b/z80_to_x86.c index 5303bf2..00788a0 100644 --- a/z80_to_x86.c +++ b/z80_to_x86.c @@ -2322,7 +2322,7 @@ void translate_z80inst(z80inst * inst, z80_context * context, uint16_t address, 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 @@ void translate_z80inst(z80inst * inst, z80_context * context, uint16_t address, 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) { -- cgit v1.2.3