diff options
author | Jim Wilson <wilson@cygnus.com> | 1998-03-31 18:56:59 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1998-03-31 10:56:59 -0800 |
commit | a7ebd547fb652723984d8df350c9196990d19fa3 (patch) | |
tree | 3a59126fed93124c700a3f8a72253a10f15ffe19 /gcc/profile.c | |
parent | c8d86b9a3c933297b47d8ee8616e19fcd47d39d0 (diff) | |
download | gcc-a7ebd547fb652723984d8df350c9196990d19fa3.zip gcc-a7ebd547fb652723984d8df350c9196990d19fa3.tar.gz gcc-a7ebd547fb652723984d8df350c9196990d19fa3.tar.bz2 |
Fix HPPA -fprofile-arcs abort on switch statements.
* profile.c (branch_prob): Add code to recognize HPPA tablejump entry
branch.
From-SVN: r18919
Diffstat (limited to 'gcc/profile.c')
-rw-r--r-- | gcc/profile.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/profile.c b/gcc/profile.c index 39a375e..7ce327b 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; |