aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDoug Evans <dje@gnu.org>1993-09-24 19:50:44 +0000
committerDoug Evans <dje@gnu.org>1993-09-24 19:50:44 +0000
commita36d4c6259c2e8b426087892db7c9e644981ffc4 (patch)
treee3a2048a330bd8e5def4dd4ec35c986ceb300c13 /gcc
parent6fa4004a0cb37854350172c0cf72d9b91eb87aae (diff)
downloadgcc-a36d4c6259c2e8b426087892db7c9e644981ffc4.zip
gcc-a36d4c6259c2e8b426087892db7c9e644981ffc4.tar.gz
gcc-a36d4c6259c2e8b426087892db7c9e644981ffc4.tar.bz2
reload.c: (immune_p): Constants never overlap hard frame pointer references.
* reload.c: (immune_p): Constants never overlap hard frame pointer references. (find_reloads_address): Compute invalid references to the hard frame pointer in a register; also (reg + const) and (reg + reg + const). From-SVN: r5462
Diffstat (limited to 'gcc')
-rw-r--r--gcc/reload.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index 27d017d..7d9d55b 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -2109,10 +2109,12 @@ immune_p (x, y, ydata)
/* Constants and stack slots never overlap. */
if (CONSTANT_P (xdata.base)
&& (ydata.base == frame_pointer_rtx
+ || ydata.base == hard_frame_pointer_rtx
|| ydata.base == stack_pointer_rtx))
return 1;
if (CONSTANT_P (ydata.base)
&& (xdata.base == frame_pointer_rtx
+ || xdata.base == hard_frame_pointer_rtx
|| xdata.base == stack_pointer_rtx))
return 1;
/* If either base is variable, we don't know anything. */
@@ -4083,6 +4085,9 @@ find_reloads_address (mode, memrefloc, ad, loc, opnum, type, ind_levels)
(displacement is too large), compute the sum in a register. */
else if (GET_CODE (ad) == PLUS
&& (XEXP (ad, 0) == frame_pointer_rtx
+#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
+ || XEXP (ad, 0) == hard_frame_pointer_rtx
+#endif
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
|| XEXP (ad, 0) == arg_pointer_rtx
#endif
@@ -4149,6 +4154,9 @@ find_reloads_address (mode, memrefloc, ad, loc, opnum, type, ind_levels)
else if (GET_CODE (ad) == PLUS && GET_CODE (XEXP (ad, 1)) == CONST_INT
&& GET_CODE (XEXP (ad, 0)) == PLUS
&& (XEXP (XEXP (ad, 0), 0) == frame_pointer_rtx
+#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
+ || XEXP (XEXP (ad, 0), 0) == hard_frame_pointer_rtx
+#endif
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
|| XEXP (XEXP (ad, 0), 0) == arg_pointer_rtx
#endif
@@ -4169,6 +4177,9 @@ find_reloads_address (mode, memrefloc, ad, loc, opnum, type, ind_levels)
else if (GET_CODE (ad) == PLUS && GET_CODE (XEXP (ad, 1)) == CONST_INT
&& GET_CODE (XEXP (ad, 0)) == PLUS
&& (XEXP (XEXP (ad, 0), 1) == frame_pointer_rtx
+#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
+ || XEXP (XEXP (ad, 0), 1) == hard_frame_pointer_rtx
+#endif
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
|| XEXP (XEXP (ad, 0), 1) == arg_pointer_rtx
#endif