qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [5380] target-ppc: fix computation of XER.{CA, OV} in addme


From: Aurelien Jarno
Subject: [Qemu-devel] [5380] target-ppc: fix computation of XER.{CA, OV} in addme, subfme
Date: Wed, 01 Oct 2008 21:45:38 +0000

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
 






reply via email to

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