diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-01-09 22:31:07 -0800 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-01-09 22:31:07 -0800 |
commit | c9f76989d03409e5323871979d34053fc771c86d (patch) | |
tree | e80b946ec8d96daab0152b713a55c8bf3ef8ba02 /m68k_to_x86.c | |
parent | e50421bfff3bf6fe2313525d3bc5d103b7f9e98d (diff) |
Fix (a7)+ src when size is byte, fix trap return address, make div with areg src decoded to invalid
Diffstat (limited to 'm68k_to_x86.c')
-rw-r--r-- | m68k_to_x86.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/m68k_to_x86.c b/m68k_to_x86.c index 0fbd2bf..98ace40 100644 --- a/m68k_to_x86.c +++ b/m68k_to_x86.c @@ -167,7 +167,7 @@ uint8_t * translate_m68k_src(m68kinst * inst, x86_ea * ea, uint8_t * out, x86_68 } if (inst->src.addr_mode == MODE_AREG_POSTINC) { - inc_amount = inst->extra.size == OPSIZE_WORD ? 2 : (inst->extra.size == OPSIZE_LONG ? 4 : 1); + inc_amount = inst->extra.size == OPSIZE_WORD ? 2 : (inst->extra.size == OPSIZE_LONG ? 4 : (inst->src.params.regs.pri == 7 ? 2 : 1)); if (opts->aregs[inst->src.params.regs.pri] >= 0) { out = add_ir(out, inc_amount, opts->aregs[inst->src.params.regs.pri], SZ_D); } else { @@ -3484,7 +3484,7 @@ uint8_t * translate_m68k(uint8_t * dst, m68kinst * inst, x86_68k_options * opts) //case M68K_TAS: case M68K_TRAP: dst = mov_ir(dst, src_op.disp, SCRATCH2, SZ_D); - dst = mov_ir(dst, inst->address, SCRATCH1, SZ_D); + dst = mov_ir(dst, inst->address+2, SCRATCH1, SZ_D); dst = jmp(dst, (uint8_t *)m68k_trap); break; //case M68K_TRAPV: |