]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
reload1.c (eliminate_regs_in_insn): Handle another case when eliminating the frame...
authorJim Wilson <wilson@cygnus.com>
Fri, 14 Aug 1998 00:14:41 +0000 (00:14 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 14 Aug 1998 00:14:41 +0000 (18:14 -0600)
        * reload1.c (eliminate_regs_in_insn): Handle another case when
        eliminating the frame pointer to the hard frame pointer.  Add
        missing ep->to_rtx check to one existing case.

From-SVN: r21706

gcc/ChangeLog
gcc/reload1.c

index cd2112d90396a9a208fc0d76f7b592a16526ead5..d34848a75ead1f70b8dcd12033265228093acb57 100644 (file)
@@ -1,3 +1,9 @@
+Thu Aug 13 19:55:05 1998  Jim Wilson  <wilson@cygnus.com>
+
+        * reload1.c (eliminate_regs_in_insn): Handle another case when
+        eliminating the frame pointer to the hard frame pointer.  Add
+        missing ep->to_rtx check to one existing case.
+
 Tue Aug 11 17:45:39 1998  Dave Love  <d.love@dl.ac.uk>
 
        * README.g77: Update from Craig.
index 2755ee6273c5c135325c6e64179997e60fd782ea..239afd82df0f818eed40bd172f02e443addc58da 100644 (file)
@@ -3416,8 +3416,13 @@ eliminate_regs_in_insn (insn, replace)
                if (src == ep->to_rtx)
                  offset = 0, ok = 1;
                else if (GET_CODE (src) == PLUS
-                        && GET_CODE (XEXP (src, 0)) == CONST_INT)
+                        && GET_CODE (XEXP (src, 0)) == CONST_INT
+                        && XEXP (src, 1) == ep->to_rtx)
                  offset = INTVAL (XEXP (src, 0)), ok = 1;
+               else if (GET_CODE (src) == PLUS
+                        && GET_CODE (XEXP (src, 1)) == CONST_INT
+                        && XEXP (src, 0) == ep->to_rtx)
+                 offset = INTVAL (XEXP (src, 1)), ok = 1;
                else if ((prev_insn = prev_nonnote_insn (insn)) != 0
                         && (prev_set = single_set (prev_insn)) != 0
                         && rtx_equal_p (SET_DEST (prev_set), src))