qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [5380] target-ppc: fix computation of XER.{CA, OV} in addme, subfme
@ 2008-10-01 21:45 Aurelien Jarno
  2008-10-02  0:14 ` [Qemu-devel] target-ppc: does not compile anymore Martin Mohring
  0 siblings, 1 reply; 5+ messages in thread
From: Aurelien Jarno @ 2008-10-01 21:45 UTC (permalink / raw)
  To: qemu-devel

Revision: 5380
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5380
Author:   aurel32
Date:     2008-10-01 21:45:37 +0000 (Wed, 01 Oct 2008)

Log Message:
-----------
target-ppc: fix computation of XER.{CA, OV} in addme, subfme

(Jocelyn Mayer)

Modified Paths:
--------------
    trunk/target-ppc/op.c
    trunk/target-ppc/op_helper.c

Modified: trunk/target-ppc/op.c
===================================================================
--- trunk/target-ppc/op.c	2008-10-01 21:45:18 UTC (rev 5379)
+++ trunk/target-ppc/op.c	2008-10-01 21:45:37 UTC (rev 5380)
@@ -640,8 +640,6 @@
     T0 += xer_ca + (-1);
     if (likely((uint32_t)T1 != 0))
         xer_ca = 1;
-    else
-        xer_ca = 0;
     RETURN();
 }
 
@@ -651,8 +649,6 @@
     T0 += xer_ca + (-1);
     if (likely((uint64_t)T1 != 0))
         xer_ca = 1;
-    else
-        xer_ca = 0;
     RETURN();
 }
 #endif
@@ -930,8 +926,6 @@
     T0 = ~T0 + xer_ca - 1;
     if (likely((uint32_t)T0 != UINT32_MAX))
         xer_ca = 1;
-    else
-        xer_ca = 0;
     RETURN();
 }
 
@@ -941,8 +935,6 @@
     T0 = ~T0 + xer_ca - 1;
     if (likely((uint64_t)T0 != UINT64_MAX))
         xer_ca = 1;
-    else
-        xer_ca = 0;
     RETURN();
 }
 #endif

Modified: trunk/target-ppc/op_helper.c
===================================================================
--- trunk/target-ppc/op_helper.c	2008-10-01 21:45:18 UTC (rev 5379)
+++ trunk/target-ppc/op_helper.c	2008-10-01 21:45:37 UTC (rev 5380)
@@ -151,10 +151,8 @@
     T0 += xer_ca + (-1);
     xer_ov = ((uint32_t)T1 & ((uint32_t)T1 ^ (uint32_t)T0)) >> 31;
     xer_so |= xer_ov;
-    if (likely(T1 != 0))
+    if (likely((uint32_t)T1 != 0))
         xer_ca = 1;
-    else
-        xer_ca = 0;
 }
 
 #if defined(TARGET_PPC64)
@@ -164,10 +162,8 @@
     T0 += xer_ca + (-1);
     xer_ov = ((uint64_t)T1 & ((uint64_t)T1 ^ (uint64_t)T0)) >> 63;
     xer_so |= xer_ov;
-    if (likely(T1 != 0))
+    if (likely((uint64_t)T1 != 0))
         xer_ca = 1;
-    else
-        xer_ca = 0;
 }
 #endif
 
@@ -312,8 +308,6 @@
     xer_so |= xer_ov;
     if (likely((uint32_t)T1 != UINT32_MAX))
         xer_ca = 1;
-    else
-        xer_ca = 0;
 }
 
 #if defined(TARGET_PPC64)
@@ -325,8 +319,6 @@
     xer_so |= xer_ov;
     if (likely((uint64_t)T1 != UINT64_MAX))
         xer_ca = 1;
-    else
-        xer_ca = 0;
 }
 #endif
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-10-02 21:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-01 21:45 [Qemu-devel] [5380] target-ppc: fix computation of XER.{CA, OV} in addme, subfme Aurelien Jarno
2008-10-02  0:14 ` [Qemu-devel] target-ppc: does not compile anymore Martin Mohring
2008-10-02 11:42   ` Martin Mohring
2008-10-02 13:47     ` Aurelien Jarno
2008-10-02 21:36       ` Martin Mohring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).