* [Qemu-devel] [5379] target-ppc: fix mullw/mullwo
@ 2008-10-01 21:45 Aurelien Jarno
0 siblings, 0 replies; only message in thread
From: Aurelien Jarno @ 2008-10-01 21:45 UTC (permalink / raw)
To: qemu-devel
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 <aurelien@aurel32.net>
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-10-01 21:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-01 21:45 [Qemu-devel] [5379] target-ppc: fix mullw/mullwo Aurelien Jarno
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).