aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Mitchell <mark@markmitchell.com>1999-03-15 09:25:01 +0000
committerJeff Law <law@gcc.gnu.org>1999-03-15 02:25:01 -0700
commite54db24f7355b816f4087b083deb79a2bd76d8dc (patch)
tree165466b673d5eec4051e00d09ac7976bb0fb21af /gcc
parenta4d3481dce1049ea5fe4e7eb4d500e48f4d5a35a (diff)
downloadgcc-e54db24f7355b816f4087b083deb79a2bd76d8dc.zip
gcc-e54db24f7355b816f4087b083deb79a2bd76d8dc.tar.gz
gcc-e54db24f7355b816f4087b083deb79a2bd76d8dc.tar.bz2
reload.c (find_reloads): Add a REG_LABEL note if we substitute a LABEL_REF for something else.
Mon Mar 15 10:20:20 1999 Mark Mitchell <mark@markmitchell.com> * reload.c (find_reloads): Add a REG_LABEL note if we substitute a LABEL_REF for something else. From-SVN: r25777
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/reload.c16
2 files changed, 20 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 88e3bd2..049d7ad 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Mon Mar 15 10:20:20 1999 Mark Mitchell <mark@markmitchell.com>
+
+ * reload.c (find_reloads): Add a REG_LABEL note if we substitute a
+ LABEL_REF for something else.
+
Mon Mar 15 08:24:17 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* fold-const.c (exact_real_inverse): Move variable `float_error'
diff --git a/gcc/reload.c b/gcc/reload.c
index e424d74..936e72f 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -3854,7 +3854,21 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
reload_{in,out}_reg when we do these replacements. */
if (replace)
- *recog_operand_loc[i] = substed_operand[i];
+ {
+ rtx substitution = substed_operand[i];
+
+ *recog_operand_loc[i] = substitution;
+
+ /* If we're replacing an operand with a LABEL_REF, we need
+ to make sure that there's a REG_LABEL note attached to
+ this instruction. */
+ if (GET_CODE (insn) != JUMP_INSN
+ && GET_CODE (substitution) == LABEL_REF
+ && !find_reg_note (insn, REG_LABEL, XEXP (substitution, 0)))
+ REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_LABEL,
+ XEXP (substitution, 0),
+ REG_NOTES (insn));
+ }
else
retval |= (substed_operand[i] != *recog_operand_loc[i]);
}