diff options
author | Michael Pavone <pavone@retrodev.com> | 2017-03-02 22:18:15 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2017-03-02 22:18:15 -0800 |
commit | e9b8afabb9c182a6058452e622cabc3602c0cf26 (patch) | |
tree | 7995285658943120ffc4d89a76e1dc3ede806ab2 | |
parent | 9cee9ef2dbd75efac5f3ae4a21c348d8922d56e2 (diff) |
Fix implementation of in c and out c on 32-bit x86
-rw-r--r-- | z80_to_x86.c | 3 |
1 files changed, 1 insertions, 2 deletions
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) { |