qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.8] target-m68k: Fix cmpa operand size
@ 2016-11-23 20:55 Laurent Vivier
  2016-11-24  0:47 ` Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Vivier @ 2016-11-23 20:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson, Laurent Vivier

"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>
---
 target-m68k/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index 8e522db..d2d6816 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -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)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.8] target-m68k: Fix cmpa operand size
  2016-11-23 20:55 [Qemu-devel] [PATCH for-2.8] target-m68k: Fix cmpa operand size Laurent Vivier
@ 2016-11-24  0:47 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2016-11-24  0:47 UTC (permalink / raw)
  To: Laurent Vivier, qemu-devel

On 11/23/2016 09:55 PM, Laurent Vivier wrote:
> "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>
> ---
>  target-m68k/translate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-24  0:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-23 20:55 [Qemu-devel] [PATCH for-2.8] target-m68k: Fix cmpa operand size Laurent Vivier
2016-11-24  0:47 ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).