From: John David Anglin Date: Tue, 22 Jan 2008 19:39:39 +0000 (+0000) Subject: re PR middle-end/33436 (Bad constant output with TARGET_ASM_ALIGNED_DI_OP) X-Git-Tag: prereleases/gcc-4.2.3-rc1~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ae691e46445023e4ff6986d307ebdf05f1fa345;p=thirdparty%2Fgcc.git 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: r131739 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4c52209fc4d5..1c3d9d110e78 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2008-01-22 John David Anglin + + Backport: + 2007-09-27 John David Anglin + + PR middle-end/33436 + * expr.c (emit_group_load_1): Split constant double when destination + length is half source length. + 2008-01-22 Richard Guenther PR middle-end/34739 diff --git a/gcc/expr.c b/gcc/expr.c index 7ca1819088cf..9ef151eeb0c2 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -1739,8 +1739,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,