]> gcc.gnu.org Git - gcc.git/commitdiff
Fix HPPA -fprofile-arcs abort on switch statements.
authorJim Wilson <wilson@cygnus.com>
Tue, 31 Mar 1998 18:56:59 +0000 (18:56 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 31 Mar 1998 18:56:59 +0000 (10:56 -0800)
* profile.c (branch_prob): Add code to recognize HPPA tablejump entry
branch.

From-SVN: r18919

gcc/ChangeLog
gcc/profile.c

index 578fe7234d08df32f80f4c6901986d2d843f5cea..9105c222d1b9ce8dda3849b0d6102b167e06d1ec 100644 (file)
@@ -1,5 +1,8 @@
 Tue Mar 31 16:57:33 1998  Jim Wilson  <wilson@cygnus.com>
 
+       * profile.c (branch_prob): Add code to recognize HPPA tablejump entry
+       branch.
+
        * toplev.c (rest_of__compilation): Call init_recog_no_volatile at end.
 
 Mon Mar 30 13:11:05 1998  Stan Cox  <scox@cygnus.com>
index 39a375ed54c270c877975b1db7e154ce16747e28..7ce327b076169fa95593f2fb59ae5b84079b10c6 100644 (file)
@@ -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;
This page took 0.067082 seconds and 5 git commands to generate.