[5379] target-ppc: fix mullw/mullwo
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 <[email protected]>
Modified Paths:
--------------
trunk/target-ppc/op.c
trunk/target-ppc/op_helper.c
Modified: trunk/target-ppc/op.c
===================================================================
target-ppc/op.c +4 -0
@@ -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
===================================================================
target-ppc/op_helper.c +1 -1
@@ -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 ;