]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
target-m68k: Fix cmpa operand size
authorLaurent Vivier <laurent@vivier.eu>
Wed, 23 Nov 2016 20:45:56 +0000 (21:45 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Thu, 24 Nov 2016 08:39:05 +0000 (09:39 +0100)
"The size of the operation can be specified as word or long.
Word length source operands are sign-extended to 32 bits for
comparison."

So comparison is always done using OS_LONG.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <rth@twiddle.net>
target-m68k/translate.c

index 8e522db9f393afc717100dd3e6333e1189acc3c8..d2d68163b35f1858103adaf4ac0562cf5b414286 100644 (file)
@@ -2170,7 +2170,7 @@ DISAS_INSN(cmpa)
     }
     SRC_EA(env, src, opsize, 1, NULL);
     reg = AREG(insn, 9);
-    gen_update_cc_cmp(s, reg, src, opsize);
+    gen_update_cc_cmp(s, reg, src, OS_LONG);
 }
 
 DISAS_INSN(eor)