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 8f6e269a-dfd6-0310-a8e1-e2731360e62c
diff --git a/priv/host_ppc_isel.c b/priv/host_ppc_isel.c
index f493e03..724fee8 100644
--- a/priv/host_ppc_isel.c
+++ b/priv/host_ppc_isel.c
@@ -2312,12 +2312,11 @@
 
    /* --------- 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 @@
       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;
    }