diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-08-31 18:54:44 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-08-31 18:54:44 -0400 |
commit | 4db3bddcbe4773beea800c88ff740c9f5ee900c5 (patch) | |
tree | 436cb4e5b3a2f75dc0c85f64d225144fd1c1beb0 | |
parent | 56929fbd6563f5f8d940fb4a2ce7dd22159e4250 (diff) | |
download | gcc-4db3bddcbe4773beea800c88ff740c9f5ee900c5.zip gcc-4db3bddcbe4773beea800c88ff740c9f5ee900c5.tar.gz gcc-4db3bddcbe4773beea800c88ff740c9f5ee900c5.tar.bz2 |
(store_split_bit_field): Always adjust arg to extract_fixed_bit_field
in BYTES_BIG_ENDIAN case.
From-SVN: r8005
-rw-r--r-- | gcc/expmed.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 026b650..8661259 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -740,19 +740,12 @@ store_split_bit_field (op0, bitsize, bitpos, value, align) >> (bitsize - bitsdone - thissize)) & (((HOST_WIDE_INT) 1 << thissize) - 1)); else - { - /* The args are chosen so that the last part - includes the lsb. */ - int bit_offset = 0; - /* If the value isn't in memory, then it must be right aligned - if a register, so skip past the padding on the left. If it - is in memory, then there is no padding on the left. */ - if (GET_CODE (value) != MEM) - bit_offset = BITS_PER_WORD - bitsize; - part = extract_fixed_bit_field (word_mode, value, 0, thissize, - bit_offset + bitsdone, - NULL_RTX, 1, align); - } + /* The args are chosen so that the last part includes the lsb. + Give extract_bit_field the value it needs (with endianness + compensation) to fetch the piece we want. */ + part = extract_fixed_bit_field (word_mode, value, 0, thissize, + BITS_PER_WORD - bitsize + bitsdone, + NULL_RTX, 1, align); #else /* Fetch successively more significant portions. */ if (GET_CODE (value) == CONST_INT) |