diff options
author | Michael Pavone <pavone@retrodev.com> | 2016-07-30 16:01:57 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2016-07-30 16:01:57 -0700 |
commit | 64cd8646221c9adee0da9f8b47b3e72c2ed0cbb2 (patch) | |
tree | 299ed6f6d4455082662b055526ddf085bfc07723 | |
parent | 1e437cf960ad1f88e4c6ad2e6bc310bbaf6cba79 (diff) |
Fix handling of undocumented flag bits for ADD in 32-bit builds
-rw-r--r-- | z80_to_x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/z80_to_x86.c b/z80_to_x86.c index 6c5bd76..204cb24 100644 --- a/z80_to_x86.c +++ b/z80_to_x86.c @@ -909,7 +909,7 @@ void translate_z80inst(z80inst * inst, z80_context * context, uint16_t address, mov_rdispr(code, src_op.base, src_op.disp, opts->gen.scratch1, z80_size(inst)); add_rrdisp(code, opts->gen.scratch1, dst_op.base, dst_op.disp, z80_size(inst)); } - mov_rdispr(code, dst_op.base, dst_op.disp + z80_size(inst) == SZ_B ? 0 : 8, opts->gen.scratch1, SZ_B); + mov_rdispr(code, dst_op.base, dst_op.disp + (z80_size(inst) == SZ_B ? 0 : 1), opts->gen.scratch1, SZ_B); mov_rrdisp(code, opts->gen.scratch1, opts->gen.context_reg, zf_off(ZF_XY), SZ_B); } setcc_rdisp(code, CC_C, opts->gen.context_reg, zf_off(ZF_C)); |