From: Jim Wilson Date: Thu, 4 Sep 1997 15:54:24 +0000 (+0000) Subject: profile.c (output_arc_profiler): Verify next_insert_after is an INSN before and after... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6030b6afe7e455948a4b0c4c3fef14cd896a8878;p=gcc.git profile.c (output_arc_profiler): Verify next_insert_after is an INSN before and after skipping a stack pop. * profile.c (output_arc_profiler): Verify next_insert_after is an INSN before and after skipping a stack pop. From-SVN: r15076 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f6614c2b48d..81123aace07 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 * final.c (shorten_branches): Don't count the lengths of deleted diff --git a/gcc/profile.c b/gcc/profile.c index 0509562f6f6..5360090ee84 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -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