diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-04-21 11:42:45 -0700 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-04-21 11:42:45 -0700 |
commit | 1dd89758e07ed71dc664a8341c19315293ef2730 (patch) | |
tree | 8917c307d93d0b1d3a5a73825b52981620d2f21f | |
parent | e59423f4f1b9cd758b7f4dd082448720816a455c (diff) |
Fixed a couple bugs in roxl/roxr. X flag wasn't being saved properly and rotates of more than 31 bits were messed up as the X flag was being thrown away between the first 31 bits of rotate and the rest.
-rw-r--r-- | m68k_to_x86.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/m68k_to_x86.c b/m68k_to_x86.c index e0da24f..85869fd 100644 --- a/m68k_to_x86.c +++ b/m68k_to_x86.c @@ -3628,6 +3628,7 @@ uint8_t * translate_m68k(uint8_t * dst, m68kinst * inst, x86_68k_options * opts) dst = rcr_irdisp8(dst, 1, dst_op.base, dst_op.disp, inst->extra.size); } } + dst = setcc_rind(dst, CC_C, CONTEXT); dst = sub_ir(dst, 32, SCRATCH1, SZ_B); *norm_off = dst - (norm_off+1); dst = bt_irdisp8(dst, 0, CONTEXT, 0, SZ_B); @@ -3645,7 +3646,7 @@ uint8_t * translate_m68k(uint8_t * dst, m68kinst * inst, x86_68k_options * opts) } } dst = setcc_r(dst, CC_C, FLAG_C); - dst = mov_rr(dst, FLAG_C, CONTEXT, SZ_B); + dst = mov_rrind(dst, FLAG_C, CONTEXT, SZ_B); end_off = dst + 1; dst = jmp(dst, dst+2); *zero_off = dst - (zero_off+1); |