]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Correction to iselCC::IexTmp
authorCerion Armour-Brown <cerion@valgrind.org>
Fri, 25 Feb 2005 12:08:02 +0000 (12:08 +0000)
committerCerion Armour-Brown <cerion@valgrind.org>
Fri, 25 Feb 2005 12:08:02 +0000 (12:08 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@963

VEX/priv/host-ppc32/isel.c

index bf5a6f0f273ad336525f338411e60b3c0fe3313b..e7dd014e33026dc93593eff27fe4dcc028a3de43 100644 (file)
@@ -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);