From ae54e75678adf7fb6c8fd66640b49a83d43314f7 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Mon, 21 Oct 2013 10:05:33 +0000 Subject: [PATCH] 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 --- VEX/priv/host_ppc_isel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; } -- 2.47.3