Patchwork [036/111] m68k: correct neg condition code flags computation

login
register
mail settings
Submitter Bryce Lanham
Date Aug. 17, 2011, 8:46 p.m.
Message ID <1313614076-28878-37-git-send-email-blanham@gmail.com>
Download mbox | patch
Permalink /patch/110470/
State New
Headers show

Comments

Bryce Lanham - Aug. 17, 2011, 8:46 p.m.
From: Laurent Vivier <laurent@vivier.eu>

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

Patch

diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index cad2e26..f2bdef0 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -1547,9 +1547,8 @@  DISAS_INSN(neg)
     tcg_gen_neg_i32(dest, src1);
     DEST_EA(insn, opsize, dest, &addr);
     SET_CC_OP(opsize, SUB);
-    gen_update_cc_add(src1, dest);
+    gen_update_cc_add(dest, src1);
     gen_helper_xflag_lt(QREG_CC_X, tcg_const_i32(0), dest);
-    SET_CC_OP(opsize, SUB);
 }
 
 static void gen_set_sr_im(DisasContext *s, uint16_t val, int ccr_only)