From: Julian Seward Date: Sat, 16 Oct 2004 11:31:31 +0000 (+0000) Subject: iselCondCode: handle 1:Bit X-Git-Tag: svn/VALGRIND_3_0_1^2~978 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=190b490cd243e1c2fc8e0750d8cbc127146bb411;p=thirdparty%2Fvalgrind.git iselCondCode: handle 1:Bit git-svn-id: svn://svn.valgrind.org/vex/trunk@356 --- diff --git a/VEX/priv/host-x86/isel.c b/VEX/priv/host-x86/isel.c index 4421ed4b11..56c8da488c 100644 --- a/VEX/priv/host-x86/isel.c +++ b/VEX/priv/host-x86/isel.c @@ -1180,6 +1180,15 @@ static X86CondCode iselCondCode_wrk ( ISelEnv* env, IRExpr* e ) vassert(e); vassert(typeOfIRExpr(env->type_env,e) == Ity_Bit); + /* Constant 1:Bit */ + if (e->tag == Iex_Const && e->Iex.Const.con->Ico.Bit == True) { + vassert(e->Iex.Const.con->tag == Ico_Bit); + HReg 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; + } + /* Not1(...) */ if (e->tag == Iex_Unop && e->Iex.Unop.op == Iop_Not1) { /* Generate code for the arg, and negate the test condition */