diff options
author | John David Anglin <dave.anglin@nrc-cnrc.gc.ca> | 2007-09-28 00:54:29 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2007-09-28 00:54:29 +0000 |
commit | 7cefcade5d36495c8c0611cddff1f63c2a6e4b1b (patch) | |
tree | 0eefe5eeb98aeb981e791a8a1b3ea83fc7bec38d /gcc/expr.c | |
parent | 3ba43c5f0c039df452c8f33071f36ce7dee4a70c (diff) | |
download | gcc-7cefcade5d36495c8c0611cddff1f63c2a6e4b1b.zip gcc-7cefcade5d36495c8c0611cddff1f63c2a6e4b1b.tar.gz gcc-7cefcade5d36495c8c0611cddff1f63c2a6e4b1b.tar.bz2 |
re PR middle-end/33436 (Bad constant output with TARGET_ASM_ALIGNED_DI_OP)
PR middle-end/33436
* expr.c (emit_group_load_1): Split constant double when destination
length is half source length.
From-SVN: r128855
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -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, |