diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-28 09:17:30 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-28 09:17:30 +0000 |
commit | 3c15005d14b7e1a380ce936f9b759431d69b84b0 (patch) | |
tree | 0731ffe63c84669ad48a81762dda973a70625d68 /gcc/expmed.c | |
parent | c643ba1a340de0fa8a5fffa1993b5d90c5243a50 (diff) | |
download | gcc-3c15005d14b7e1a380ce936f9b759431d69b84b0.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140730 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 6099c4b6839..ae5ad0a2f12 100644 --- a/gcc/expmed.c +++ b/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) |