summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2016-07-30 14:03:25 -0700
committerMichael Pavone <pavone@retrodev.com>2016-07-30 14:03:25 -0700
commit1e437cf960ad1f88e4c6ad2e6bc310bbaf6cba79 (patch)
tree9505de87c1a9b482a0cdc93bfb80cc3db991ec35
parent1b7a3b5c6f2c65aa9618af2d5c4c4e197ef85a09 (diff)
Fixed bug introduced in NEG with addition of undocumented flags
-rw-r--r--z80_to_x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/z80_to_x86.c b/z80_to_x86.c
index 997ca2c..6c5bd76 100644
--- a/z80_to_x86.c
+++ b/z80_to_x86.c
@@ -1377,7 +1377,7 @@ void translate_z80inst(z80inst * inst, z80_context * context, uint16_t address,
cycles(&opts->gen, num_cycles);
mov_rr(code, opts->regs[Z80_A], opts->gen.scratch2, SZ_B);
neg_r(code, opts->regs[Z80_A], SZ_B);
- mov_rrdisp(code, dst_op.base, opts->gen.context_reg, zf_off(ZF_XY), SZ_B);
+ mov_rrdisp(code, opts->regs[Z80_A], opts->gen.context_reg, zf_off(ZF_XY), SZ_B);
setcc_rdisp(code, CC_Z, opts->gen.context_reg, zf_off(ZF_Z));
setcc_rdisp(code, CC_S, opts->gen.context_reg, zf_off(ZF_S));
setcc_rdisp(code, CC_C, opts->gen.context_reg, zf_off(ZF_C));