| e->Iex.Binop.arg2->Iex.Const.con->Ico.U32)));
break;
case Iop_Shl32:
- shift = (Int)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U32);
+ vassert(e->Iex.Binop.arg2->Iex.Const.con->tag == Ico_U8);
+ shift = (Int)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U8);
if (shift >= 0 && shift <= 31)
e2 = IRExpr_Const(IRConst_U32(
(e->Iex.Binop.arg1->Iex.Const.con->Ico.U32
case Iop_Sar32: {
/* paranoid ... */
/*signed*/ Int s32;
+ vassert(e->Iex.Binop.arg2->Iex.Const.con->tag == Ico_U8);
s32 = (Int)(e->Iex.Binop.arg1->Iex.Const.con->Ico.U32);
- shift = (Int)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U32);
+ shift = (Int)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U8);
if (shift >= 0 && shift <= 31) {
s32 >>=/*signed*/ shift;
e2 = IRExpr_Const(IRConst_U32((UInt)s32));
}
break;
}
+ case Iop_Shr32: {
+ /* paranoid ... */
+ /*unsigned*/ UInt s32;
+ vassert(e->Iex.Binop.arg2->Iex.Const.con->tag == Ico_U8);
+ s32 = (Int)(e->Iex.Binop.arg1->Iex.Const.con->Ico.U32);
+ shift = (Int)(e->Iex.Binop.arg2->Iex.Const.con->Ico.U8);
+ if (shift >= 0 && shift <= 31) {
+ s32 >>=/*unsigned*/ shift;
+ e2 = IRExpr_Const(IRConst_U32((UInt)s32));
+ }
+ break;
+ }
case Iop_CmpEQ32:
e2 = IRExpr_Const(IRConst_Bit(
(e->Iex.Binop.arg1->Iex.Const.con->Ico.U32