summaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-28 00:54:29 +0000
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-28 00:54:29 +0000
commit25b1440f06a8264f9e66e3bdd2faadc7ee97ad94 (patch)
tree0eefe5eeb98aeb981e791a8a1b3ea83fc7bec38d /gcc/expr.c
parent6136e812362edc9a88605605afe821096df96179 (diff)
downloadgcc-25b1440f06a8264f9e66e3bdd2faadc7ee97ad94.tar.gz
PR middle-end/33436
* expr.c (emit_group_load_1): Split constant double when destination length is half source length. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128855 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index ff3258d746e..9d2a61ad782 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -1776,8 +1776,25 @@ emit_group_load_1 (rtx *tmps, rtx dst, rtx orig_src, tree type, int ssize)
else if (CONSTANT_P (src) && GET_MODE (dst) != BLKmode
&& XVECLEN (dst, 0) > 1)
tmps[i] = simplify_gen_subreg (mode, src, GET_MODE(dst), bytepos);
- else if (CONSTANT_P (src)
- || (REG_P (src) && GET_MODE (src) == mode))
+ else if (CONSTANT_P (src))
+ {
+ HOST_WIDE_INT len = (HOST_WIDE_INT) bytelen;
+
+ if (len == ssize)
+ tmps[i] = src;
+ else
+ {
+ rtx first, second;
+
+ gcc_assert (2 * len == ssize);
+ split_double (src, &first, &second);
+ if (i)
+ tmps[i] = second;
+ else
+ tmps[i] = first;
+ }
+ }
+ else if (REG_P (src) && GET_MODE (src) == mode)
tmps[i] = src;
else
tmps[i] = extract_bit_field (src, bytelen * BITS_PER_UNIT,