profile.c (output_arc_profiler): Verify next_insert_after is an INSN before and after...
authorJim Wilson <wilson@cygnus.com>
Thu, 4 Sep 1997 15:54:24 +0000 (15:54 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 4 Sep 1997 15:54:24 +0000 (09:54 -0600)
        * profile.c (output_arc_profiler): Verify next_insert_after is an
        INSN before and after skipping a stack pop.

From-SVN: r15076

gcc/ChangeLog
gcc/profile.c

index f6614c2b48d3831d8f220dd0a109131e86a28041..81123aace074f09abf7c32fe2f8b63ff17e56fee 100644 (file)
@@ -1,3 +1,8 @@
+Thu Sep  4 09:53:20 1997  Jim Wilson  (wilson@cygnus.com)
+
+       * profile.c (output_arc_profiler): Verify next_insert_after is an
+       INSN before and after skipping a stack pop.
+
 Thu Sep  4 07:39:19 1997  J"orn Rennecke <amylaar@cygnus.co.uk>
 
        * final.c (shorten_branches): Don't count the lengths of deleted
index 0509562f6f6feabea17315b2568c28b39fa58671..5360090ee847b3cc24c4a9f8e6ad0a55a37f080b 100644 (file)
@@ -1536,13 +1536,14 @@ output_arc_profiler (arcno, insert_after)
       rtx return_reg;
       rtx next_insert_after = next_nonnote_insn (insert_after);
 
+      /* The first insn after the call may be a stack pop, skip it.  */
+      if (GET_CODE (next_insert_after) == INSN
+         && GET_CODE (PATTERN (next_insert_after)) == SET
+         && SET_DEST (PATTERN (next_insert_after)) == stack_pointer_rtx)
+       next_insert_after = next_nonnote_insn (next_insert_after);
+
       if (GET_CODE (next_insert_after) == INSN)
        {
-         /* The first insn after the call may be a stack pop, skip it.  */
-         if (GET_CODE (PATTERN (next_insert_after)) == SET
-             && SET_DEST (PATTERN (next_insert_after)) == stack_pointer_rtx)
-           next_insert_after = next_nonnote_insn (next_insert_after);
-
          if (GET_CODE (PATTERN (insert_after)) == SET)
            return_reg = SET_DEST (PATTERN (insert_after));
          else