summaryrefslogtreecommitdiff
path: root/gcc/profile.c
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1998-03-31 18:56:59 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1998-03-31 18:56:59 +0000
commit0f954aef62dfd01677d80be8df0786215b01826b (patch)
tree3a59126fed93124c700a3f8a72253a10f15ffe19 /gcc/profile.c
parent27d9a61d71140a832ed321f101da3b4b8d7c4bd8 (diff)
downloadgcc-0f954aef62dfd01677d80be8df0786215b01826b.tar.gz
Fix HPPA -fprofile-arcs abort on switch statements.
* profile.c (branch_prob): Add code to recognize HPPA tablejump entry branch. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18919 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/profile.c')
-rw-r--r--gcc/profile.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/profile.c b/gcc/profile.c
index 39a375ed54c..7ce327b0761 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -744,9 +744,19 @@ branch_prob (f, dump_file)
tablejump = pattern;
else if (GET_CODE (pattern) == RETURN)
dest = num_blocks - 1;
+ else if (GET_CODE (pattern) != SET)
+ abort ();
else if ((tem = SET_SRC (pattern))
&& GET_CODE (tem) == LABEL_REF)
dest = label_to_bb[CODE_LABEL_NUMBER (XEXP (tem, 0))];
+ /* Recognize HPPA table jump entry. This code is similar to
+ the code above in the PARALLEL case. */
+ else if (GET_CODE (tem) == PLUS
+ && GET_CODE (XEXP (tem, 0)) == MEM
+ && GET_CODE (XEXP (XEXP (tem, 0), 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (XEXP (tem, 0), 0), 0)) == PC
+ && GET_CODE (XEXP (tem, 1)) == LABEL_REF)
+ dest = label_to_bb[CODE_LABEL_NUMBER (XEXP (XEXP (tem, 1), 0))];
else
{
rtx label_ref;