static const HChar *
s390_irgen_MSR(UChar r1, UChar r2)
{
- IRTemp op1 = newTemp(Ity_I32);
- IRTemp op2 = newTemp(Ity_I32);
- IRTemp result = newTemp(Ity_I64);
-
- assign(op1, get_gpr_w1(r1));
- assign(op2, get_gpr_w1(r2));
- assign(result, binop(Iop_MullS32, mkexpr(op1), mkexpr(op2)));
- put_gpr_w1(r1, unop(Iop_64to32, mkexpr(result)));
+ put_gpr_w1(r1, binop(Iop_Mul32, get_gpr_w1(r1), get_gpr_w1(r2)));
return "msr";
}
static const HChar *
s390_irgen_MSGR(UChar r1, UChar r2)
{
- IRTemp op1 = newTemp(Ity_I64);
- IRTemp op2 = newTemp(Ity_I64);
- IRTemp result = newTemp(Ity_I128);
-
- assign(op1, get_gpr_dw0(r1));
- assign(op2, get_gpr_dw0(r2));
- assign(result, binop(Iop_MullS64, mkexpr(op1), mkexpr(op2)));
- put_gpr_dw0(r1, unop(Iop_128to64, mkexpr(result)));
+ put_gpr_dw0(r1, binop(Iop_Mul64, get_gpr_dw0(r1), get_gpr_dw0(r2)));
return "msgr";
}
static const HChar *
s390_irgen_MSGFR(UChar r1, UChar r2)
{
- IRTemp op1 = newTemp(Ity_I64);
- IRTemp op2 = newTemp(Ity_I32);
- IRTemp result = newTemp(Ity_I128);
-
- assign(op1, get_gpr_dw0(r1));
- assign(op2, get_gpr_w1(r2));
- assign(result, binop(Iop_MullS64, mkexpr(op1), unop(Iop_32Sto64, mkexpr(op2))
- ));
- put_gpr_dw0(r1, unop(Iop_128to64, mkexpr(result)));
+ put_gpr_dw0(
+ r1, binop(Iop_Mul64, get_gpr_dw0(r1), unop(Iop_32Sto64, get_gpr_w1(r2))));
return "msgfr";
}
static const HChar *
s390_irgen_MS(UChar r1, IRTemp op2addr)
{
- IRTemp op1 = newTemp(Ity_I32);
- IRTemp op2 = newTemp(Ity_I32);
- IRTemp result = newTemp(Ity_I64);
-
- assign(op1, get_gpr_w1(r1));
- assign(op2, load(Ity_I32, mkexpr(op2addr)));
- assign(result, binop(Iop_MullS32, mkexpr(op1), mkexpr(op2)));
- put_gpr_w1(r1, unop(Iop_64to32, mkexpr(result)));
+ put_gpr_w1(r1,
+ binop(Iop_Mul32, get_gpr_w1(r1), load(Ity_I32, mkexpr(op2addr))));
return "ms";
}
{
IRTemp op1 = newTemp(Ity_I32);
IRTemp op2 = newTemp(Ity_I32);
- IRTemp result = newTemp(Ity_I64);
assign(op1, get_gpr_w1(r1));
assign(op2, load(Ity_I32, mkexpr(op2addr)));
- assign(result, binop(Iop_MullS32, mkexpr(op1), mkexpr(op2)));
s390_cc_thunk_putSS(S390_CC_OP_MUL_32, op1, op2);
- put_gpr_w1(r1, unop(Iop_64to32, mkexpr(result)));
+ put_gpr_w1(r1, binop(Iop_Mul32, mkexpr(op1), mkexpr(op2)));
return "msc";
}
{
IRTemp op2 = newTemp(Ity_I32);
IRTemp op3 = newTemp(Ity_I32);
- IRTemp result = newTemp(Ity_I64);
assign(op2, get_gpr_w1(r2));
assign(op3, get_gpr_w1(r3));
- assign(result, binop(Iop_MullS32, mkexpr(op2), mkexpr(op3)));
s390_cc_thunk_putSS(S390_CC_OP_MUL_32, op2, op3);
- put_gpr_w1(r1, unop(Iop_64to32, mkexpr(result)));
+ put_gpr_w1(r1, binop(Iop_Mul32, mkexpr(op2), mkexpr(op3)));
return "msrkc";
}
static const HChar *
s390_irgen_MSY(UChar r1, IRTemp op2addr)
{
- IRTemp op1 = newTemp(Ity_I32);
- IRTemp op2 = newTemp(Ity_I32);
- IRTemp result = newTemp(Ity_I64);
-
- assign(op1, get_gpr_w1(r1));
- assign(op2, load(Ity_I32, mkexpr(op2addr)));
- assign(result, binop(Iop_MullS32, mkexpr(op1), mkexpr(op2)));
- put_gpr_w1(r1, unop(Iop_64to32, mkexpr(result)));
+ put_gpr_w1(r1,
+ binop(Iop_Mul32, get_gpr_w1(r1), load(Ity_I32, mkexpr(op2addr))));
return "msy";
}
static const HChar *
s390_irgen_MSG(UChar r1, IRTemp op2addr)
{
- IRTemp op1 = newTemp(Ity_I64);
- IRTemp op2 = newTemp(Ity_I64);
- IRTemp result = newTemp(Ity_I128);
-
- assign(op1, get_gpr_dw0(r1));
- assign(op2, load(Ity_I64, mkexpr(op2addr)));
- assign(result, binop(Iop_MullS64, mkexpr(op1), mkexpr(op2)));
- put_gpr_dw0(r1, unop(Iop_128to64, mkexpr(result)));
+ put_gpr_dw0(r1,
+ binop(Iop_Mul64, get_gpr_dw0(r1), load(Ity_I64, mkexpr(op2addr))));
return "msg";
}
{
IRTemp op1 = newTemp(Ity_I64);
IRTemp op2 = newTemp(Ity_I64);
- IRTemp result = newTemp(Ity_I128);
assign(op1, get_gpr_dw0(r1));
assign(op2, load(Ity_I64, mkexpr(op2addr)));
- assign(result, binop(Iop_MullS64, mkexpr(op1), mkexpr(op2)));
s390_cc_thunk_putSS(S390_CC_OP_MUL_64, op1, op2);
- put_gpr_dw0(r1, unop(Iop_128to64, mkexpr(result)));
+ put_gpr_dw0(r1, binop(Iop_Mul64, mkexpr(op1), mkexpr(op2)));
return "msgc";
}
static const HChar *
s390_irgen_MSGF(UChar r1, IRTemp op2addr)
{
- IRTemp op1 = newTemp(Ity_I64);
- IRTemp op2 = newTemp(Ity_I32);
- IRTemp result = newTemp(Ity_I128);
-
- assign(op1, get_gpr_dw0(r1));
- assign(op2, load(Ity_I32, mkexpr(op2addr)));
- assign(result, binop(Iop_MullS64, mkexpr(op1), unop(Iop_32Sto64, mkexpr(op2))
- ));
- put_gpr_dw0(r1, unop(Iop_128to64, mkexpr(result)));
+ put_gpr_dw0(r1, binop(Iop_Mul64, get_gpr_dw0(r1),
+ unop(Iop_32Sto64, load(Ity_I32, mkexpr(op2addr)))));
return "msgf";
}
static const HChar *
s390_irgen_MSFI(UChar r1, UInt i2)
{
- IRTemp op1 = newTemp(Ity_I32);
- Int op2;
- IRTemp result = newTemp(Ity_I64);
-
- assign(op1, get_gpr_w1(r1));
- op2 = (Int)i2;
- assign(result, binop(Iop_MullS32, mkexpr(op1), mkU32((UInt)op2)));
- put_gpr_w1(r1, unop(Iop_64to32, mkexpr(result)));
+ put_gpr_w1(r1, binop(Iop_Mul32, get_gpr_w1(r1), mkU32(i2)));
return "msfi";
}
static const HChar *
s390_irgen_MSGFI(UChar r1, UInt i2)
{
- IRTemp op1 = newTemp(Ity_I64);
- Int op2;
- IRTemp result = newTemp(Ity_I128);
-
- assign(op1, get_gpr_dw0(r1));
- op2 = (Int)i2;
- assign(result, binop(Iop_MullS64, mkexpr(op1), unop(Iop_32Sto64, mkU32((UInt)
- op2))));
- put_gpr_dw0(r1, unop(Iop_128to64, mkexpr(result)));
+ ULong op2 = (ULong)i2 - (((ULong)i2 & (1 << 31)) << 1);
+ put_gpr_dw0(r1, binop(Iop_Mul64, get_gpr_dw0(r1), mkU64(op2)));
return "msgfi";
}
{
IRTemp op2 = newTemp(Ity_I64);
IRTemp op3 = newTemp(Ity_I64);
- IRTemp result = newTemp(Ity_I128);
assign(op2, get_gpr_dw0(r2));
assign(op3, get_gpr_dw0(r3));
- assign(result, binop(Iop_MullS64, mkexpr(op2), mkexpr(op3)));
s390_cc_thunk_putSS(S390_CC_OP_MUL_64, op2, op3);
- put_gpr_dw0(r1, unop(Iop_128to64, mkexpr(result)));
+ put_gpr_dw0(r1, binop(Iop_Mul64, mkexpr(op2), mkexpr(op3)));
return "msgrkc";
}