diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-05-06 05:47:46 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-05-06 05:47:46 -0400 |
commit | e54d80d01416c78a81ae5e2095e853f308ab46cb (patch) | |
tree | 34060f0925b4b8b8ef4e0f6212066f108f687cd0 /gcc | |
parent | 772ae9f018e47a61c32568babd238c4df4b8f521 (diff) | |
download | gcc-e54d80d01416c78a81ae5e2095e853f308ab46cb.zip gcc-e54d80d01416c78a81ae5e2095e853f308ab46cb.tar.gz gcc-e54d80d01416c78a81ae5e2095e853f308ab46cb.tar.bz2 |
(store_split_bit_field): Properly handle VALUE when it is a
CONST_DOUBLE.
From-SVN: r4354
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/expmed.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 6e7efad..faa4843 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -1,6 +1,6 @@ /* Medium-level subroutines: convert bit-field store and extract and shifts, multiplies and divides to rtl instructions. - Copyright (C) 1987, 1988, 1989, 1992 Free Software Foundation, Inc. + Copyright (C) 1987, 1988, 1989, 1992, 1993 Free Software Foundation, Inc. This file is part of GNU CC. @@ -680,8 +680,13 @@ store_split_bit_field (op0, bitsize, bitpos, value, align) if (GET_MODE (value) != VOIDmode) value = convert_to_mode (word_mode, value, 1); + + if (GET_CODE (value) == CONST_DOUBLE + && (part1 = gen_lowpart_common (word_mode, value)) != 0) + value = part1; + if (CONSTANT_P (value) && GET_CODE (value) != CONST_INT) - value = copy_to_reg (value); + value = copy_to_mode_reg (word_mode, value); /* Split the value into two parts: PART1 gets that which goes in the first word; PART2 the other. */ |