Mercurial > repos > blastem
comparison z80_to_x86.c @ 1918:6fdac0108e47
Fix bug in in (c) instruction in Z80 dynarec
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 03 Apr 2020 23:47:57 -0700 |
parents | 62166274e6c0 |
children | 3e591869d135 |
comparison
equal
deleted
inserted
replaced
1917:b91c35bce3e9 | 1918:6fdac0108e47 |
---|---|
2325 } | 2325 } |
2326 cycles(&opts->gen, num_cycles);//T States: 4 3/4 | 2326 cycles(&opts->gen, num_cycles);//T States: 4 3/4 |
2327 if (inst->addr_mode == Z80_IMMED_INDIRECT) { | 2327 if (inst->addr_mode == Z80_IMMED_INDIRECT) { |
2328 mov_ir(code, inst->immed, opts->gen.scratch1, SZ_B); | 2328 mov_ir(code, inst->immed, opts->gen.scratch1, SZ_B); |
2329 } else { | 2329 } else { |
2330 zreg_to_native(opts, Z80_C, opts->gen.scratch2); | 2330 zreg_to_native(opts, Z80_C, opts->gen.scratch1); |
2331 } | 2331 } |
2332 call(code, opts->read_io); | 2332 call(code, opts->read_io); |
2333 if (inst->addr_mode != Z80_IMMED_INDIRECT) { | 2333 if (inst->addr_mode != Z80_IMMED_INDIRECT) { |
2334 or_rr(code, opts->gen.scratch1, opts->gen.scratch1, SZ_B); | 2334 or_rr(code, opts->gen.scratch1, opts->gen.scratch1, SZ_B); |
2335 mov_irdisp(code, 0, opts->gen.context_reg, zf_off(ZF_H), SZ_B); | 2335 mov_irdisp(code, 0, opts->gen.context_reg, zf_off(ZF_H), SZ_B); |