static Bool isU64 ( IRExpr* e, ULong n )
{
- return e->tag == Iex_Const
- && e->Iex.Const.con->tag == Ico_U64
- && e->Iex.Const.con->Ico.U64 == n;
+ return toBool( e->tag == Iex_Const
+ && e->Iex.Const.con->tag == Ico_U64
+ && e->Iex.Const.con->Ico.U64 == n );
}
IRExpr* guest_amd64_spechelper ( HChar* function_name,
return IRExpr_Binop(op, a1, a2);
}
-//.. static IRExpr* mkU64 ( ULong i )
-//.. {
-//.. return IRExpr_Const(IRConst_U64(i));
-//.. }
-
-static IRExpr* mkU32 ( UInt i )
-{
- return IRExpr_Const(IRConst_U32(i));
-}
-
static IRExpr* bind ( Int binder )
{
return IRExpr_Binder(binder);
case Iop_16Uto32: {
HReg dst = newVRegI(env);
HReg src = iselIntExpr_R(env, e->Iex.Unop.arg);
- Bool srcIs16 = e->Iex.Unop.op==Iop_16Uto32
- || e->Iex.Unop.op==Iop_16Uto64;
+ Bool srcIs16 = toBool( e->Iex.Unop.op==Iop_16Uto32
+ || e->Iex.Unop.op==Iop_16Uto64 );
UInt mask = srcIs16 ? 0xFFFF : 0xFF;
addInstr(env, mk_iMOVsd_RR(src,dst) );
addInstr(env, AMD64Instr_Alu64R(Aalu_AND,
case Iop_16Sto64: {
HReg dst = newVRegI(env);
HReg src = iselIntExpr_R(env, e->Iex.Unop.arg);
- Bool srcIs16 = e->Iex.Unop.op==Iop_16Sto32
- || e->Iex.Unop.op==Iop_16Sto64;
+ Bool srcIs16 = toBool( e->Iex.Unop.op==Iop_16Sto32
+ || e->Iex.Unop.op==Iop_16Sto64 );
UInt amt = srcIs16 ? 48 : 56;
addInstr(env, mk_iMOVsd_RR(src,dst) );
addInstr(env, AMD64Instr_Sh64(Ash_SHL, amt, AMD64RM_Reg(dst)));
- (e->Iex.Unop.arg->Iex.Const.con->Ico.U32)));
break;
case Iop_Neg8:
- e2 = IRExpr_Const(IRConst_U8(
- - (e->Iex.Unop.arg->Iex.Const.con->Ico.U8)));
+ e2 = IRExpr_Const(IRConst_U8(toUChar(
+ - (e->Iex.Unop.arg->Iex.Const.con->Ico.U8))));
break;
case Iop_64to8: {