aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-06-14 08:47:36 +0000
committerRichard Stallman <rms@gnu.org>1993-06-14 08:47:36 +0000
commitdbf85761b58b9dcc84cc4c5bebe4f77d8140c097 (patch)
tree2634d939c42b0806ed65312fa7b248f8d79cc567 /gcc
parent2937cf8796f6713dd2ec10531838a3891f9c811a (diff)
downloadgcc-dbf85761b58b9dcc84cc4c5bebe4f77d8140c097.zip
gcc-dbf85761b58b9dcc84cc4c5bebe4f77d8140c097.tar.gz
gcc-dbf85761b58b9dcc84cc4c5bebe4f77d8140c097.tar.bz2
(make_memloc): Don't reuse a memloc.
From-SVN: r4675
Diffstat (limited to 'gcc')
-rw-r--r--gcc/reload.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index 08a21c6..868c967 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -3794,6 +3794,9 @@ find_reloads_toplev (x, opnum, type, ind_levels, is_set_dest)
return x;
}
+/* Return a mem ref for the memory equivalent of reg REGNO.
+ This mem ref is not shared with anything. */
+
static rtx
make_memloc (ad, regno)
rtx ad;
@@ -3801,9 +3804,16 @@ make_memloc (ad, regno)
{
register int i;
rtx tem = reg_equiv_address[regno];
+
+#if 0 /* We cannot safely reuse a memloc made here;
+ if the pseudo appears twice, and its mem needs a reload,
+ it gets two separate reloads assigned, but it only
+ gets substituted with the second of them;
+ then it can get used before that reload reg gets loaded up. */
for (i = 0; i < n_memlocs; i++)
if (rtx_equal_p (tem, XEXP (memlocs[i], 0)))
return memlocs[i];
+#endif
/* If TEM might contain a pseudo, we must copy it to avoid
modifying it when we do the substitution for the reload. */