]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Merge from trunk, r2088 (Handle Ico_V128(0xFFFF))
authorJulian Seward <jseward@acm.org>
Mon, 14 Feb 2011 13:58:08 +0000 (13:58 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 14 Feb 2011 13:58:08 +0000 (13:58 +0000)
git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_6_BRANCH@2102

VEX/priv/host_ppc_isel.c

index 4ae18f32e424e8ee8ffe2eeb59aac4677080c794..1609c747776c2af3eef1680cad6c4adfee9da60c 100644 (file)
@@ -994,6 +994,16 @@ static HReg generate_zeroes_V128 ( ISelEnv* env )
    return dst;
 }
 
+/* Generate all-ones into a new vector register.
+*/
+static HReg generate_ones_V128 ( ISelEnv* env )
+{
+   HReg dst = newVRegV(env);
+   PPCVI5s * src = PPCVI5s_Imm(-1);
+   addInstr(env, PPCInstr_AvSplat(8, dst, src));
+   return dst;
+}
+
 
 /*
   Generates code for AvSplat
@@ -3710,6 +3720,9 @@ static HReg iselVecExpr_wrk ( ISelEnv* env, IRExpr* e )
       vassert(e->Iex.Const.con->tag == Ico_V128);
       if (e->Iex.Const.con->Ico.V128 == 0x0000) {
          return generate_zeroes_V128(env);
+      } 
+      else if (e->Iex.Const.con->Ico.V128 == 0xffff) {
+         return generate_ones_V128(env);
       }
    }