diff options
Diffstat (limited to 'z80_to_x86.c')
-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) { |