aboutsummaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorJ"orn Rennecke <joern.rennecke@superh.com>2002-12-02 14:44:17 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2002-12-02 14:44:17 +0000
commit7ffc9761ca08a1576add6f098c01e5504735e363 (patch)
tree23939f2b8962a0fdddce031ee5be1fefe59c83b6 /gcc/expmed.c
parent0a2a0a583e9c933457c3577445a83e9af5fef29f (diff)
downloadgcc-7ffc9761ca08a1576add6f098c01e5504735e363.zip
gcc-7ffc9761ca08a1576add6f098c01e5504735e363.tar.gz
gcc-7ffc9761ca08a1576add6f098c01e5504735e363.tar.bz2
expmed.c (store_bit_field): Use int_mode_for_mode to find corresponding mode of non-integer mode...
* expmed.c (store_bit_field): Use int_mode_for_mode to find corresponding mode of non-integer mode, unless it is VOIDmode. From-SVN: r59716
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 6b365b9..d1c89f2 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -535,7 +535,9 @@ store_bit_field (str_rtx, bitsize, bitnum, fieldmode, value, total_size)
structure fields. */
if (GET_MODE_CLASS (GET_MODE (value)) != MODE_INT
&& GET_MODE_CLASS (GET_MODE (value)) != MODE_PARTIAL_INT)
- value = gen_lowpart (word_mode, value);
+ value = gen_lowpart ((GET_MODE (value) == VOIDmode
+ ? word_mode : int_mode_for_mode (GET_MODE (value))),
+ value);
/* Now OFFSET is nonzero only if OP0 is memory
and is therefore always measured in bytes. */