diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2004-04-19 12:02:02 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2004-04-19 08:02:02 -0400 |
commit | 3d8f2528cc3992632ff069d6f9e977f484ac37bf (patch) | |
tree | caa12be2df3066b3dd8bc86ae03ee0f1517b054b /gcc/expmed.c | |
parent | 41b8e86c9abcb1dbf93c78a1a8529ade77e39ff5 (diff) | |
download | gcc-3d8f2528cc3992632ff069d6f9e977f484ac37bf.tar.gz |
expmed.c (expand_mult_highpart_adjust): Make OP1 valid for MODE.
* 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.
From-SVN: r80848
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 5d213c38b3d..3fb76b45a54 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -2841,6 +2841,7 @@ expand_mult_highpart_adjust (enum machine_mode mode, rtx adj_operand, rtx op0, 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); @@ -2895,7 +2896,8 @@ expand_mult_highpart_optab (enum machine_mode mode, rtx op0, rtx op1, 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; @@ -2908,7 +2910,8 @@ expand_mult_highpart_optab (enum machine_mode mode, rtx op0, rtx op1, < 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. */ @@ -2987,7 +2990,7 @@ expand_mult_highpart (enum machine_mode mode, rtx op0, 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. |