Author: pluto                        Date: Mon Oct  3 09:29:44 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fix profiledbootstrap on ppc.

---- Files affected:
SOURCES:
   gcc-pr20606_pr24069.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/gcc-pr20606_pr24069.patch
diff -u /dev/null SOURCES/gcc-pr20606_pr24069.patch:1.1
--- /dev/null   Mon Oct  3 11:29:44 2005
+++ SOURCES/gcc-pr20606_pr24069.patch   Mon Oct  3 11:29:39 2005
@@ -0,0 +1,33 @@
+The problem here is that we have an indirect jump to a label.
+JUMP_LABEL (insn) will be NULL but we will have a reg note REG_LABEL
+for the label.  This patch fixes the problem by using that reg note.
+
+PR 24069 is reproducible with a profiledbootstrap on powerpc-linux-gnu
+and PR 20606 is reproducible with a java compiling from byte-code
+with -findirect-dispatch and -fPIC both of which are hard to a testcase
+for the testsuite.
+
+--- gcc/gcc/cfgbuild.c 25 Jun 2005 01:59:28 -0000      1.68
++++ gcc/gcc/cfgbuild.c 2 Oct 2005 18:22:25 -0000
+@@ -347,8 +347,19 @@ make_edges (basic_block min, basic_block
+         /* Otherwise, we have a plain conditional or unconditional jump.  */
+         else
+           {
+-            gcc_assert (JUMP_LABEL (insn));
+-            make_label_edge (edge_cache, bb, JUMP_LABEL (insn), 0);
++            rtx label = JUMP_LABEL (insn);
++            /* For indirect jumps to a label, JUMP_LABEL will be NULL, grab
++               the label from the REG_LABEL note which should have been setup
++               correctly already for the indirect jump.  */
++            if (!label)
++              {
++                label = find_reg_note (insn, REG_LABEL, NULL_RTX);
++                if (label)
++                  label = XEXP (label, 0);
++              }
++              
++            gcc_assert (label);
++            make_label_edge (edge_cache, bb, label, 0);
+           }
+       }
+ 
================================================================
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to