mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-21 16:39:48 +08:00
expmed.c (store_fixed_bit_field): Always use convert_to_mode in order to convert between modes.
* expmed.c (store_fixed_bit_field): Always use convert_to_mode in order to convert between modes. (extract_bit_field_1): Test TRULY_NOOP_TRUNCATION on the right mode. From-SVN: r140730
This commit is contained in:
parent
57cb79efa4
commit
86cfb27a7d
@ -1,3 +1,9 @@
|
||||
2008-09-28 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* expmed.c (store_fixed_bit_field): Always use convert_to_mode in
|
||||
order to convert between modes.
|
||||
(extract_bit_field_1): Test TRULY_NOOP_TRUNCATION on the right mode.
|
||||
|
||||
2008-09-27 Kaz Kojima <kkojima@gcc.gnu.org>
|
||||
|
||||
* config/sh/sh.c (sh_gimplify_va_arg_expr): Use VIEW_CONVERT_EXPR
|
||||
|
10
gcc/expmed.c
10
gcc/expmed.c
@ -949,13 +949,7 @@ store_fixed_bit_field (rtx op0, unsigned HOST_WIDE_INT offset,
|
||||
&& bitpos + bitsize != GET_MODE_BITSIZE (mode));
|
||||
|
||||
if (GET_MODE (value) != mode)
|
||||
{
|
||||
if ((REG_P (value) || GET_CODE (value) == SUBREG)
|
||||
&& GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (value)))
|
||||
value = gen_lowpart (mode, value);
|
||||
else
|
||||
value = convert_to_mode (mode, value, 1);
|
||||
}
|
||||
value = convert_to_mode (mode, value, 1);
|
||||
|
||||
if (must_and)
|
||||
value = expand_binop (mode, and_optab, value,
|
||||
@ -1348,7 +1342,7 @@ extract_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
|
||||
? bitpos + bitsize == BITS_PER_WORD
|
||||
: bitpos == 0)))
|
||||
&& ((!MEM_P (op0)
|
||||
&& TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
|
||||
&& TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode1),
|
||||
GET_MODE_BITSIZE (GET_MODE (op0)))
|
||||
&& GET_MODE_SIZE (mode1) != 0
|
||||
&& byte_offset % GET_MODE_SIZE (mode1) == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user