qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [5379] target-ppc: fix mullw/mullwo


From: Aurelien Jarno
Subject: [Qemu-devel] [5379] target-ppc: fix mullw/mullwo
Date: Wed, 01 Oct 2008 21:45:19 +0000

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 <address@hidden>

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;






reply via email to

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