Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kl9Vs-0007H2-9O for qemu-devel@nongnu.org; Wed, 01 Oct 2008 17:45:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kl9Vr-0007Gj-NW for qemu-devel@nongnu.org; Wed, 01 Oct 2008 17:45:39 -0400 Received: from [199.232.76.173] (port=56612 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kl9Vr-0007Gc-HK for qemu-devel@nongnu.org; Wed, 01 Oct 2008 17:45:39 -0400 Received: from savannah.gnu.org ([199.232.41.3]:44702 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kl9Vr-0003Bm-2n for qemu-devel@nongnu.org; Wed, 01 Oct 2008 17:45:39 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1Kl9Vq-000284-El for qemu-devel@nongnu.org; Wed, 01 Oct 2008 21:45:38 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1Kl9Vq-00027o-2R for qemu-devel@nongnu.org; Wed, 01 Oct 2008 21:45:38 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Wed, 01 Oct 2008 21:45:38 +0000 Subject: [Qemu-devel] [5380] target-ppc: fix computation of XER.{CA, OV} in addme, subfme Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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