* integrate.c (expand_inline_function): Fix bugs in previous
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Nov 1999 06:04:59 +0000 (06:04 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Nov 1999 06:04:59 +0000 (06:04 +0000)
        change from Oct 28, 1999.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30312 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/integrate.c

index bae5847..3e20f16 100644 (file)
@@ -1,3 +1,8 @@
+Sun Oct 31 23:03:25 1999  Jeffrey A Law  (law@cygnus.com)
+
+        * integrate.c (expand_inline_function): Fix bugs in previous
+        change from Oct 28, 1999.
+
 Sun Oct 31 20:27:45 1999  Mark Mitchell  <mark@codesourcery.com>
 
        * stmt.c (expand_value_return): Fix typo in this change:
index c7420ab..3668ab9 100644 (file)
@@ -1091,24 +1091,28 @@ expand_inline_function (fndecl, parms, target, ignore, type,
          else if (set != 0
                   && rtx_equal_p (SET_DEST (set), virtual_stack_vars_rtx))
            {
+             HOST_WIDE_INT offset;
              temp = map->reg_map[REGNO (SET_DEST (set))];
              temp = VARRAY_CONST_EQUIV (map->const_equiv_varray,
                                         REGNO (temp)).rtx;
 
-             if (GET_CODE (temp) != PLUS
-                 || ! rtx_equal_p (XEXP (temp, 0), virtual_stack_vars_rtx)
-                 || GET_CODE (XEXP (temp, 1)) != CONST_INT)
+             if (rtx_equal_p (temp, virtual_stack_vars_rtx))
+               offset = 0;
+             else if (GET_CODE (temp) == PLUS
+                      && rtx_equal_p (XEXP (temp, 0), virtual_stack_vars_rtx)
+                      && GET_CODE (XEXP (temp, 1)) == CONST_INT)
+               offset = INTVAL (XEXP (temp, 1));
+             else
                abort ();
 
              if (rtx_equal_p (SET_SRC (set), stack_pointer_rtx))
                temp = SET_SRC (set);
              else
-               temp
-                 = force_operand (plus_constant (SET_SRC (set),
-                                                 - INTVAL (XEXP (temp, 1))),
-                                  NULL_RTX);
+               temp = force_operand (plus_constant (SET_SRC (set),
+                                                    - offset),
+                                     NULL_RTX);
 
-             copy = emit_move_insn (SET_DEST (set), temp);
+             copy = emit_move_insn (virtual_stack_vars_rtx, temp);
            }
 
          else