|
From: <sv...@va...> - 2005-06-29 18:54:21
|
Author: cerion
Date: 2005-06-29 19:53:23 +0100 (Wed, 29 Jun 2005)
New Revision: 1230
Log:
Fixed bug in doHelperCall, passing LONG_LONG params
Modified:
trunk/priv/host-ppc32/isel.c
Modified: trunk/priv/host-ppc32/isel.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/host-ppc32/isel.c 2005-06-29 07:59:18 UTC (rev 1229)
+++ trunk/priv/host-ppc32/isel.c 2005-06-29 18:53:23 UTC (rev 1230)
@@ -634,8 +634,8 @@
iselIntExpr_R(env, args[i]) ));
} else { // Ity_I64
HReg rHi, rLo;
- if (i%2 =3D=3D 1) // ppc32 abi spec for LONG_LONG
- argreg++;
+ if (argreg%2 =3D=3D 1) // ppc32 abi spec for passing a LONG_=
LONG
+ argreg++; // XXX: odd argreg =3D> even rN
vassert(argreg < PPC32_N_REGPARMS-1);
iselInt64Expr(&rHi,&rLo, env, args[i]);
addInstr(env, mk_iMOVds_RR( argregs[argreg++], rHi ));
@@ -668,8 +668,8 @@
tmpregs[argreg] =3D iselIntExpr_R(env, args[i]);
} else { // Ity_I64
HReg rHi, rLo;
- if (i%2 =3D=3D 1) // ppc32 abi spec for LONG_LONG
- argreg++;
+ if (argreg%2 =3D=3D 1) // ppc32 abi spec for passing a LONG_=
LONG
+ argreg++; // XXX: odd argreg =3D> even rN
vassert(argreg < PPC32_N_REGPARMS-1);
iselInt64Expr(&rHi,&rLo, env, args[i]);
tmpregs[argreg++] =3D rHi;
@@ -695,6 +695,8 @@
=20
/* Move the args to their final destinations. */
for (i =3D 0; i < argreg; i++) {
+ if (tmpregs[i] =3D=3D INVALID_HREG) // Skip invalid regs
+ continue;
/* None of these insns, including any spill code that might
be generated, may alter the condition codes. */
addInstr( env, mk_iMOVds_RR( argregs[i], tmpregs[i] ) );
|