+2004-04-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * expmed.c (expand_mult_highpart_adjust): Make OP1 valid for MODE.
+ (expand_mult_highpart_optab): Likewise.
+ (expand_mult_highpart): Make OP1 valid for WIDER_MODE, not MODE.
+
2004-04-19 Paul Brook <paul@codesourcery.com>
* config/arm/arm.md (fixuns_truncsfsi2, fixuns_truncdfsi2,
rtx tem;
enum rtx_code adj_code = unsignedp ? PLUS : MINUS;
+ op1 = gen_int_mode (INTVAL (op1), mode);
tem = expand_shift (RSHIFT_EXPR, mode, op0,
build_int_2 (GET_MODE_BITSIZE (mode) - 1, 0),
NULL_RTX, 0);
if (mul_highpart_cost[(int) mode] < max_cost)
{
moptab = unsignedp ? umul_highpart_optab : smul_highpart_optab;
- tem = expand_binop (mode, moptab, op0, op1, target,
+ tem = expand_binop (mode, moptab, op0,
+ gen_int_mode (INTVAL (op1), mode), target,
unsignedp, OPTAB_DIRECT);
if (tem)
return tem;
< max_cost))
{
moptab = unsignedp ? smul_highpart_optab : umul_highpart_optab;
- tem = expand_binop (mode, moptab, op0, op1, target,
+ tem = expand_binop (mode, moptab, op0,
+ gen_int_mode (INTVAL (op1), mode), target,
unsignedp, OPTAB_DIRECT);
if (tem)
/* We used the wrong signedness. Adjust the result. */
if (GET_MODE_BITSIZE (mode) > HOST_BITS_PER_WIDE_INT)
abort ();
- op1 = gen_int_mode (cnst1, mode);
+ op1 = gen_int_mode (cnst1, wider_mode);
cnst1 &= GET_MODE_MASK (mode);
/* We can't optimize modes wider than BITS_PER_WORD.