summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-07-17 00:18:28 -0700
committerMike Pavone <pavone@retrodev.com>2013-07-17 00:18:28 -0700
commite077eae365233923860becc64cec4b990f7f0b88 (patch)
tree652f8a40a79fd8db736b9fd4ddac93b51af6d010
parent04322d3657b54684db1c5650b03561a06184fca4 (diff)
Fix carry flag on rotate when the register provided rotate bit count is exactly 32
-rw-r--r--m68k_to_x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/m68k_to_x86.c b/m68k_to_x86.c
index f7e4d02..a5cdd57 100644
--- a/m68k_to_x86.c
+++ b/m68k_to_x86.c
@@ -3557,6 +3557,7 @@ uint8_t * translate_m68k(uint8_t * dst, m68kinst * inst, x86_68k_options * opts)
dst = cmp_ir(dst, 32, SCRATCH1, SZ_B);
norm_off = dst+1;
dst = jcc(dst, CC_L, dst+2);
+ dst = sub_ir(dst, 32, SCRATCH1, SZ_B);
if (dst_op.mode == MODE_REG_DIRECT) {
if (inst->op == M68K_ROL) {
dst = rol_ir(dst, 31, dst_op.base, inst->extra.size);
@@ -3574,7 +3575,6 @@ uint8_t * translate_m68k(uint8_t * dst, m68kinst * inst, x86_68k_options * opts)
dst = ror_irdisp8(dst, 1, dst_op.base, dst_op.disp, inst->extra.size);
}
}
- dst = sub_ir(dst, 32, SCRATCH1, SZ_B);
*norm_off = dst - (norm_off+1);
if (dst_op.mode == MODE_REG_DIRECT) {
if (inst->op == M68K_ROL) {