From: Julian Seward Date: Mon, 21 Oct 2013 10:05:33 +0000 (+0000) Subject: In 64 bit mode, allow 64 bit return values from clean helper calls. X-Git-Tag: svn/VALGRIND_3_9_0^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae54e75678adf7fb6c8fd66640b49a83d43314f7;p=thirdparty%2Fvalgrind.git In 64 bit mode, allow 64 bit return values from clean helper calls. This makes SMC checking calls work (even though they are irrelevant on PPC targets). Fixes #309430. git-svn-id: svn://svn.valgrind.org/vex/trunk@2793 --- diff --git a/VEX/priv/host_ppc_isel.c b/VEX/priv/host_ppc_isel.c index f493e03425..724fee8825 100644 --- a/VEX/priv/host_ppc_isel.c +++ b/VEX/priv/host_ppc_isel.c @@ -2312,12 +2312,11 @@ static HReg iselWordExpr_R_wrk ( ISelEnv* env, IRExpr* e ) /* --------- CCALL --------- */ case Iex_CCall: { - HReg r_dst = newVRegI(env); - vassert(ty == Ity_I32); + vassert(ty == e->Iex.CCall.retty); /* well-formedness of IR */ /* be very restrictive for now. Only 32/64-bit ints allowed for - args, and 32 bits for return type. */ - if (e->Iex.CCall.retty != Ity_I32) + args, and 32 bits or host machine word for return type. */ + if (!(ty == Ity_I32 || (mode64 && ty == Ity_I64))) goto irreducible; /* Marshal args, do the call, clear stack. */ @@ -2330,6 +2329,7 @@ static HReg iselWordExpr_R_wrk ( ISelEnv* env, IRExpr* e ) vassert(addToSp == 0); /* GPR3 now holds the destination address from Pin_Goto */ + HReg r_dst = newVRegI(env); addInstr(env, mk_iMOVds_RR(r_dst, hregPPC_GPR3(mode64))); return r_dst; }