From: Cerion Armour-Brown Date: Fri, 25 Feb 2005 12:08:02 +0000 (+0000) Subject: Correction to iselCC::IexTmp X-Git-Tag: svn/VALGRIND_3_0_1^2~371 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71d16e21cfd4d28f25860e7fc8b05e2c6cbb239b;p=thirdparty%2Fvalgrind.git Correction to iselCC::IexTmp git-svn-id: svn://svn.valgrind.org/vex/trunk@963 --- diff --git a/VEX/priv/host-ppc32/isel.c b/VEX/priv/host-ppc32/isel.c index bf5a6f0f27..e7dd014e33 100644 --- a/VEX/priv/host-ppc32/isel.c +++ b/VEX/priv/host-ppc32/isel.c @@ -1637,9 +1637,11 @@ static PPC32CondCode iselCondCode_wrk ( ISelEnv* env, IRExpr* e ) /* var */ if (e->tag == Iex_Tmp) { - HReg src = lookupIRTemp(env, e->Iex.Tmp.tmp); - addInstr(env, PPC32Instr_Cmp32(Pcmp_U, 7, src, PPC32RI_Imm(0))); - return mk_PPCCondCode( Pct_FALSE, Pcf_EQ ); + HReg src = lookupIRTemp(env, e->Iex.Tmp.tmp); + HReg src_masked = newVRegI(env); + addInstr(env, PPC32Instr_Alu32(Palu_AND, src_masked, src, PPC32RI_Imm(1))); + addInstr(env, PPC32Instr_Cmp32(Pcmp_U, 7, src_masked, PPC32RI_Imm(1))); + return mk_PPCCondCode( Pct_TRUE, Pcf_EQ ); } ppIRExpr(e);