From: Julian Seward Date: Thu, 28 Apr 2011 21:03:54 +0000 (+0000) Subject: Handle Iop_Not64 when doing 32-bit code generation. Also, assert that X-Git-Tag: svn/VALGRIND_3_7_0^2~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c08b032fef55701218bbcb738e96a4f034bb19b9;p=thirdparty%2Fvalgrind.git Handle Iop_Not64 when doing 32-bit code generation. Also, assert that iselWordExpr_R is not asked to handle Iop_Not64 in 32-bit mode. Fixes #270856. (Maynard Johnson, maynardj@us.ibm.com) git-svn-id: svn://svn.valgrind.org/vex/trunk@2136 --- diff --git a/VEX/priv/host_ppc_isel.c b/VEX/priv/host_ppc_isel.c index 816c270591..0f82e85c91 100644 --- a/VEX/priv/host_ppc_isel.c +++ b/VEX/priv/host_ppc_isel.c @@ -1615,6 +1615,7 @@ static HReg iselWordExpr_R_wrk ( ISelEnv* env, IRExpr* e ) case Iop_Not16: case Iop_Not32: case Iop_Not64: { + if (op_unop == Iop_Not64) vassert(mode64); HReg r_dst = newVRegI(env); HReg r_src = iselWordExpr_R(env, e->Iex.Unop.arg); addInstr(env, PPCInstr_Unary(Pun_NOT,r_dst,r_src)); @@ -2885,6 +2886,18 @@ static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo, return; } + case Iop_Not64: { + HReg xLo, xHi; + HReg tmpLo = newVRegI(env); + HReg tmpHi = newVRegI(env); + iselInt64Expr(&xHi, &xLo, env, e->Iex.Unop.arg); + addInstr(env, PPCInstr_Unary(Pun_NOT,tmpLo,xLo)); + addInstr(env, PPCInstr_Unary(Pun_NOT,tmpHi,xHi)); + *rHi = tmpHi; + *rLo = tmpLo; + return; + } + /* ReinterpF64asI64(e) */ /* Given an IEEE754 double, produce an I64 with the same bit pattern. */