aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-11-30 19:07:49 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1994-11-30 19:07:49 -0500
commit5c5033c3c741a6700e363449c7671476d46df5ac (patch)
treec26e35964419152633e3c00680c2ec219b301440
parentdb40b434fa3910039f78972ebfd1887462da3642 (diff)
downloadgcc-5c5033c3c741a6700e363449c7671476d46df5ac.zip
gcc-5c5033c3c741a6700e363449c7671476d46df5ac.tar.gz
gcc-5c5033c3c741a6700e363449c7671476d46df5ac.tar.bz2
(convert_move): When emit multiword conversion, force FROM into a new
pseudo-reg if it overlaps TO. From-SVN: r8593
-rw-r--r--gcc/expr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 4c2ac54..f109293 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -916,6 +916,12 @@ convert_move (to, from, unsignedp)
/* No special multiword conversion insn; do it by hand. */
start_sequence ();
+ /* Since we will turn this into a no conflict block, we must ensure
+ that the source does not overlap the target. */
+
+ if (reg_overlap_mentioned_p (to, from))
+ from = force_reg (from_mode, from);
+
/* Get a copy of FROM widened to a word, if necessary. */
if (GET_MODE_BITSIZE (from_mode) < BITS_PER_WORD)
lowpart_mode = word_mode;