From: Laurent Vivier <laur...@vivier.eu>

Allow to run 'flex'.

Signed-off-by: Laurent Vivier <laur...@vivier.eu>
---
 target-m68k/translate.c |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index 1196508..252e610 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -2504,6 +2504,25 @@ DISAS_INSN(eor)
     int opsize;
 
     opsize = insn_opsize(insn, 6);
+
+    if (((insn >> 3) & 7) == 1 ) {
+        /* cmpm */
+        reg = AREG(insn, 0);
+        src = gen_load(s, opsize, reg, 1);
+        tcg_gen_addi_i32(reg, reg, opsize_bytes(opsize));
+
+        reg = AREG(insn, 9);
+        dest = gen_load(s, opsize, reg, 1);
+        tcg_gen_addi_i32(reg, reg, opsize_bytes(opsize));
+
+        reg = tcg_temp_new();
+        tcg_gen_sub_i32(reg, dest, src);
+        gen_update_cc_add(reg, src);
+        SET_CC_OP(opsize, SUB);
+
+        return;
+    }
+
     SRC_EA(src, opsize, -1, &addr);
     reg = DREG(insn, 9);
     dest = tcg_temp_new();
-- 
1.7.2.3


Reply via email to