From: Julian Seward Date: Mon, 18 Jul 2005 13:54:49 +0000 (+0000) Subject: Handle 0 :: Ity_I1 as well as 1 :: Ity_I1. X-Git-Tag: svn/VALGRIND_3_0_1^2~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=866423c6f307fef17996a9c74d2d2cea2b4fd29e;p=thirdparty%2Fvalgrind.git Handle 0 :: Ity_I1 as well as 1 :: Ity_I1. git-svn-id: svn://svn.valgrind.org/vex/trunk@1275 --- diff --git a/VEX/priv/host-x86/isel.c b/VEX/priv/host-x86/isel.c index f6fe7f67a5..2d3d82754c 100644 --- a/VEX/priv/host-x86/isel.c +++ b/VEX/priv/host-x86/isel.c @@ -1492,13 +1492,15 @@ static X86CondCode iselCondCode_wrk ( ISelEnv* env, IRExpr* e ) } /* Constant 1:Bit */ - if (e->tag == Iex_Const && e->Iex.Const.con->Ico.U1 == True) { + if (e->tag == Iex_Const) { HReg r; vassert(e->Iex.Const.con->tag == Ico_U1); + vassert(e->Iex.Const.con->Ico.U1 == True + || e->Iex.Const.con->Ico.U1 == False); r = newVRegI(env); addInstr(env, X86Instr_Alu32R(Xalu_MOV,X86RMI_Imm(0),r)); addInstr(env, X86Instr_Alu32R(Xalu_XOR,X86RMI_Reg(r),r)); - return Xcc_Z; + return e->Iex.Const.con->Ico.U1 ? Xcc_Z : Xcc_NZ; } /* Not1(e) */