diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-04-12 03:41:36 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-04-12 03:41:36 +0000 |
commit | 213b27c99d10147707909332de18c0546a423196 (patch) | |
tree | 943b9fe0140e410d24c23703edfa24a7154c671e /gcc/expr.c | |
parent | a1f6ba09f2743fe1c3426e1010d07065ccfb3b3f (diff) | |
download | ppe42-gcc-213b27c99d10147707909332de18c0546a423196.tar.gz ppe42-gcc-213b27c99d10147707909332de18c0546a423196.zip |
* expmed.c (store_bit_field): Truncate CONST_INTs.
(expand_mult_highpart, expand_divmod): Likewise.
* expr.c (convert_modes, store_field): Likewise.
* integrate.c (expand_inline_function): Use promote_mode() to
determine whether to convert_modes() an argument as signed
or unsigned.
* optabs.c (expand_binop): Get CONST_INT operands
sign-extended for their appropriate modes.
* stmt.c (emit_case_nodes): Convert node values to the
appropriate mode.
(expand_end_case): Convert minval and range to the appropriate
mode.
* unroll.c (loop_iterations): Truncate abs_diff to the mode of
the iteration variable.
* varasm.c (immed_double_const): Don't require words to be
narrower than host wide ints to properly sign-extend
CONST_INTs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41285 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index 7d78acd33ae..970c275cde5 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -1360,7 +1360,7 @@ convert_modes (mode, oldmode, x, unsignedp) && (val & ((HOST_WIDE_INT) 1 << (width - 1)))) val |= (HOST_WIDE_INT) (-1) << width; - return GEN_INT (val); + return GEN_INT (trunc_int_for_mode (val, mode)); } return gen_lowpart (mode, x); @@ -5268,7 +5268,13 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, enum machine_mode tmode; if (unsignedp) - return expand_and (temp, GEN_INT (width_mask), NULL_RTX); + return expand_and (temp, + GEN_INT + (trunc_int_for_mode + (width_mask, + GET_MODE (temp) == VOIDmode + ? value_mode + : GET_MODE (temp))), NULL_RTX); tmode = GET_MODE (temp); if (tmode == VOIDmode) tmode = value_mode; |