s390_opnd_RMI op2, value, opnd;
s390_insn *insn;
Bool is_commutative, is_signed_multiply, is_signed_divide;
+ Bool is_single_multiply = False;
is_commutative = True;
switch (expr->Iex.Binop.op) {
+ case Iop_Mul8:
+ case Iop_Mul16:
+ case Iop_Mul32:
+ case Iop_Mul64:
+ is_single_multiply = True;
+ /* fall through */
case Iop_MullU8:
case Iop_MullU16:
case Iop_MullU32:
do_multiply: {
HReg r10, r11;
- UInt arg_size = size / 2;
+ UInt arg_size = is_single_multiply ? size : size / 2;
order_commutative_operands(arg1, arg2);
return res;
}
+ /* For Iop_Mul64 the result is in r11[0:63] */
+ if (expr->Iex.Binop.op == Iop_Mul64) {
+ addInstr(env, s390_insn_move(size, res, r11));
+ return res;
+ }
+
/* The result is in registers r10 and r11. Combine them into a SIZE-bit
value into the destination register. */
addInstr(env, s390_insn_move(arg_size, res, r10));