Skip to contentSkip to conversation

target-m68k: Fix cmpa operand size

PATCH In review Laurent Vivier 2 participants 2 messages Nov 23, 2016 – Nov 24, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-m68k: Fix cmpa operand size

"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.

---
 target-m68k/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-m68k/translate.c +1 -1
index 8e522db..d2d6816 100644
@@ -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)
Signature · 1 line
2.7.4