From: Cerion Armour-Brown Date: Wed, 29 Jun 2005 18:53:23 +0000 (+0000) Subject: Fixed bug in doHelperCall, passing LONG_LONG params X-Git-Tag: svn/VALGRIND_3_0_1^2~104 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1d0df5bb8e114b48a7c78615427a47af9031d8e4;p=thirdparty%2Fvalgrind.git Fixed bug in doHelperCall, passing LONG_LONG params git-svn-id: svn://svn.valgrind.org/vex/trunk@1230 --- diff --git a/VEX/priv/host-ppc32/isel.c b/VEX/priv/host-ppc32/isel.c index d0c1bb947c..a7a3b763aa 100644 --- a/VEX/priv/host-ppc32/isel.c +++ b/VEX/priv/host-ppc32/isel.c @@ -634,8 +634,8 @@ void doHelperCall ( ISelEnv* env, iselIntExpr_R(env, args[i]) )); } else { // Ity_I64 HReg rHi, rLo; - if (i%2 == 1) // ppc32 abi spec for LONG_LONG - argreg++; + if (argreg%2 == 1) // ppc32 abi spec for passing a LONG_LONG + argreg++; // XXX: odd argreg => 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 @@ void doHelperCall ( ISelEnv* env, tmpregs[argreg] = iselIntExpr_R(env, args[i]); } else { // Ity_I64 HReg rHi, rLo; - if (i%2 == 1) // ppc32 abi spec for LONG_LONG - argreg++; + if (argreg%2 == 1) // ppc32 abi spec for passing a LONG_LONG + argreg++; // XXX: odd argreg => even rN vassert(argreg < PPC32_N_REGPARMS-1); iselInt64Expr(&rHi,&rLo, env, args[i]); tmpregs[argreg++] = rHi; @@ -695,6 +695,8 @@ void doHelperCall ( ISelEnv* env, /* Move the args to their final destinations. */ for (i = 0; i < argreg; i++) { + if (tmpregs[i] == 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] ) );