return IRExpr_Const(IRConst_U64(value));
}
+/* Create an expression node for a 128-bit vector constant */
+static __inline__ IRExpr *
+mkV128(UShort value)
+{
+ return IRExpr_Const(IRConst_V128(value));
+}
+
/* Create an expression node for a 32-bit floating point constant
whose value is given by a bit pattern. */
static __inline__ IRExpr *
static const HChar *
s390_irgen_VGBM(UChar v1, UShort i2, UChar m3 __attribute__((unused)))
{
- put_vr_qw(v1, IRExpr_Const(IRConst_V128(i2)));
+ put_vr_qw(v1, mkV128(i2));
return "vgbm";
}
switch(type) {
case Ity_I8:
sum = unop(Iop_PwAddL16Ux8, unop(Iop_PwAddL8Ux16, get_vr_qw(v2)));
- mask = IRExpr_Const(IRConst_V128(0b0001000100010001));
+ mask = mkV128(0b0001000100010001);
break;
case Ity_I16:
sum = unop(Iop_PwAddL16Ux8, get_vr_qw(v2));
- mask = IRExpr_Const(IRConst_V128(0b0011001100110011));
+ mask = mkV128(0b0011001100110011);
break;
default:
vpanic("s390_irgen_VSUM: invalid type ");
switch(type) {
case Ity_I16:
sum = unop(Iop_PwAddL32Ux4, unop(Iop_PwAddL16Ux8, get_vr_qw(v2)));
- mask = IRExpr_Const(IRConst_V128(0b0000001100000011));
+ mask = mkV128(0b0000001100000011);
break;
case Ity_I32:
sum = unop(Iop_PwAddL32Ux4, get_vr_qw(v2));
- mask = IRExpr_Const(IRConst_V128(0b0000111100001111));
+ mask = mkV128(0b0000111100001111);
break;
default:
vpanic("s390_irgen_VSUMG: invalid type ");
switch(type) {
case Ity_I32:
sum = unop(Iop_PwAddL64Ux2, unop(Iop_PwAddL32Ux4, get_vr_qw(v2)));
- mask = IRExpr_Const(IRConst_V128(0b0000000000001111));
+ mask = mkV128(0b0000000000001111);
break;
case Ity_I64:
sum = unop(Iop_PwAddL64Ux2, get_vr_qw(v2));
- mask = IRExpr_Const(IRConst_V128(0b0000000011111111));
+ mask = mkV128(0b0000000011111111);
break;
default:
vpanic("s390_irgen_VSUMQ: invalid type ");
assign(cond, binop(Iop_CmpEQ32, mkexpr(result), mkU32(cmp)));
}
put_vr_qw(v1, mkite(mkexpr(cond),
- IRExpr_Const(IRConst_V128(0xffff)),
- IRExpr_Const(IRConst_V128(0))));
+ mkV128(0xffff),
+ mkV128(0)));
if (s390_vr_is_cs_set(m6)) {
IRTemp cc = newTemp(Ity_I64);
assign(cc, mkite(mkexpr(cond), mkU64(0), mkU64(3)));