Patchwork [052/111] m68k: correct flags with negl

login
register
mail settings
Submitter Bryce Lanham
Date Aug. 17, 2011, 8:46 p.m.
Message ID <1313614076-28878-53-git-send-email-blanham@gmail.com>
Download mbox | patch
Permalink /patch/110454/
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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index 52da485..4f2a5ee 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -1646,10 +1646,10 @@  DISAS_INSN(neg)
     SRC_EA(src1, opsize, -1, &addr);
     dest = tcg_temp_new();
     tcg_gen_neg_i32(dest, src1);
-    DEST_EA(insn, opsize, dest, &addr);
     SET_CC_OP(opsize, SUB);
     gen_update_cc_add(dest, src1);
     SET_X_FLAG(opsize, tcg_const_i32(0), dest);
+    DEST_EA(insn, opsize, dest, &addr);
 }
 
 static void gen_set_sr_im(DisasContext *s, uint16_t val, int ccr_only)