Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kl9Vb-00079t-Kk for qemu-devel@nongnu.org; Wed, 01 Oct 2008 17:45:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kl9Va-00079N-72 for qemu-devel@nongnu.org; Wed, 01 Oct 2008 17:45:23 -0400 Received: from [199.232.76.173] (port=56596 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kl9VZ-00079E-VR for qemu-devel@nongnu.org; Wed, 01 Oct 2008 17:45:21 -0400 Received: from savannah.gnu.org ([199.232.41.3]:44698 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 1Kl9VZ-00038e-LF for qemu-devel@nongnu.org; Wed, 01 Oct 2008 17:45:21 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1Kl9VY-00020H-86 for qemu-devel@nongnu.org; Wed, 01 Oct 2008 21:45:20 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1Kl9VX-000204-Pl for qemu-devel@nongnu.org; Wed, 01 Oct 2008 21:45:20 +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:19 +0000 Subject: [Qemu-devel] [5379] target-ppc: fix mullw/mullwo 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: 5379 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5379 Author: aurel32 Date: 2008-10-01 21:45:18 +0000 (Wed, 01 Oct 2008) Log Message: ----------- target-ppc: fix mullw/mullwo Based on patch by Julian Seward. Signed-off-by: Aurelien Jarno 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 19:39:40 UTC (rev 5378) +++ trunk/target-ppc/op.c 2008-10-01 21:45:18 UTC (rev 5379) @@ -798,7 +798,11 @@ /* multiply low word */ void OPPROTO op_mullw (void) { +#if defined(TARGET_PPC64) + T0 = (int64_t)(int32_t)T0 * (int64_t)(int32_t)T1; +#else T0 = (int32_t)(T0 * T1); +#endif RETURN(); } Modified: trunk/target-ppc/op_helper.c =================================================================== --- trunk/target-ppc/op_helper.c 2008-10-01 19:39:40 UTC (rev 5378) +++ trunk/target-ppc/op_helper.c 2008-10-01 21:45:18 UTC (rev 5379) @@ -227,7 +227,7 @@ void do_mullwo (void) { - int64_t res = (int64_t)T0 * (int64_t)T1; + int64_t res = (int64_t)(int32_t)T0 * (int64_t)(int32_t)T1; if (likely((int32_t)res == res)) { xer_ov = 0;