Patchwork [050/111] m68k: lsl/lsr, clear C flag if shift count is 0

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

Patch

diff --git a/target-m68k/helper.c b/target-m68k/helper.c
index 5800a4f..21dfcc7 100644
--- a/target-m68k/helper.c
+++ b/target-m68k/helper.c
@@ -739,7 +739,7 @@  uint32_t HELPER(glue(glue(shl, bits),_cc))(CPUState *env, uint32_t val, uint32_t
     shift &= 63; \
     if (shift == 0) { \
         result = (type)val; \
-        cf = env->cc_src & CCF_C; \
+        cf = 0; \
     } else if (shift < bits) { \
         result = (type)val << shift; \
         cf = ((type)val >> (bits - shift)) & 1; \
@@ -768,7 +768,7 @@  uint32_t HELPER(glue(glue(shr, bits), _cc))(CPUState *env, uint32_t val, uint32_
     shift &= 63; \
     if (shift == 0) { \
         result = (type)val; \
-        cf = env->cc_src & CCF_C; \
+        cf = 0; \
     } else if (shift < bits) { \
         result = (type)val >> shift; \
         cf = ((type)val >> (shift - 1)) & 1; \