From: Julian Seward Date: Mon, 14 Feb 2011 13:58:08 +0000 (+0000) Subject: Merge from trunk, r2088 (Handle Ico_V128(0xFFFF)) X-Git-Tag: svn/VALGRIND_3_6_1^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffa2dd6d82a99ef35cd61d0b4f1ed0cab4fac509;p=thirdparty%2Fvalgrind.git Merge from trunk, r2088 (Handle Ico_V128(0xFFFF)) git-svn-id: svn://svn.valgrind.org/vex/branches/VEX_3_6_BRANCH@2102 --- diff --git a/VEX/priv/host_ppc_isel.c b/VEX/priv/host_ppc_isel.c index 4ae18f32e4..1609c74777 100644 --- a/VEX/priv/host_ppc_isel.c +++ b/VEX/priv/host_ppc_isel.c @@ -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); } }