diff options
author | Jim Wilson <wilson@cygnus.com> | 1997-09-04 15:54:24 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1997-09-04 09:54:24 -0600 |
commit | 6030b6afe7e455948a4b0c4c3fef14cd896a8878 (patch) | |
tree | 92df26ce98c35ee9183f6d00a543d937eb685540 | |
parent | d30e0541de14f0627a14d5aecd98af81021b7767 (diff) | |
download | gcc-6030b6afe7e455948a4b0c4c3fef14cd896a8878.zip gcc-6030b6afe7e455948a4b0c4c3fef14cd896a8878.tar.gz gcc-6030b6afe7e455948a4b0c4c3fef14cd896a8878.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/profile.c | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f6614c2..81123aa 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 <amylaar@cygnus.co.uk> * final.c (shorten_branches): Don't count the lengths of deleted diff --git a/gcc/profile.c b/gcc/profile.c index 0509562..5360090 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 |