qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 043/111] m68k: on 0 bit shift, don't update X flag


From: Bryce Lanham
Subject: [Qemu-devel] [PATCH 043/111] m68k: on 0 bit shift, don't update X flag
Date: Wed, 17 Aug 2011 15:46:48 -0500

From: Laurent Vivier <address@hidden>

Signed-off-by: Laurent Vivier <address@hidden>
---
 target-m68k/helper.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/target-m68k/helper.c b/target-m68k/helper.c
index 451b02a..1c3dd72 100644
--- a/target-m68k/helper.c
+++ b/target-m68k/helper.c
@@ -660,7 +660,7 @@ uint32_t HELPER(glue(glue(shl, bits),_cc))(CPUState *env, 
uint32_t val, uint32_t
         cf = 0; \
     } \
     env->cc_src = cf; \
-    env->cc_x = (cf != 0); \
+    if (shift) env->cc_x = (cf != 0); \
     env->cc_dest = result; \
     return result; \
 }
@@ -689,7 +689,7 @@ uint32_t HELPER(glue(glue(shr, bits), _cc))(CPUState *env, 
uint32_t val, uint32_
         cf = 0; \
     } \
     env->cc_src = cf; \
-    env->cc_x = (cf != 0); \
+    if (shift) env->cc_x = (cf != 0); \
     env->cc_dest = result; \
     return result; \
 }
@@ -715,7 +715,7 @@ uint32_t HELPER(glue(glue(sar, bits), _cc))(CPUState *env, 
uint32_t val, uint32_
         cf = (type)val >> (bits - 1); \
     } \
     env->cc_src = cf; \
-    env->cc_x = cf; \
+    if (shift) env->cc_x = (cf != 0); \
     env->cc_dest = result; \
     return result; \
 }
-- 
1.7.2.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]