Hi Jeff, Hi Alex,
The MN10300 target is currently failing to build in the mainline FSF
sources because of this error when creating libgcc:
gcc/libgcc2.c: In function '__popcountsi2':
gcc/libgcc2.c:834:1: internal compiler error: in create_trace_edges, at
dwarf2cfi.c:2325
This turns out to be because the code in create_trace_edges does not
handle jumps inside parallel insns, like this:
(jump_insn 72 52 31 3 (parallel [
(set (pc)
(if_then_else (ne (reg:CC 51 EPSW)
(const_int 0 [0]))
(label_ref 29)
(pc)))
(unspec [
(const_int 1 [0x1])
] 9)
]) gcc/libgcc2.c:830 -1
(insn_list:REG_LABEL_OPERAND 29 (nil)))
I am not sure if create_trace_edges should handle this, but I felt
that the easiest thing to do was to fix the MN10300 backend so that
when it was creating this insn, it would also set the label on the
parallel container. That is what the patch below does and with this
applied I can build the toolchain again.
OK to apply, or is there a better way to fix the problem ?
Cheers
Nick
gcc/ChangeLog
2011-09-06 Nick Clifton <[email protected]>
* config/mn10300/mn10300.c (mn10300_insert_setlb_lcc): Set the
jump label on the parallel part of the insn.
Index: gcc/config/mn10300/mn10300.c
===================================================================
--- gcc/config/mn10300/mn10300.c (revision 178566)
+++ gcc/config/mn10300/mn10300.c (working copy)
@@ -3150,6 +3150,7 @@
lcc = emit_jump_insn_before (lcc, branch);
mark_jump_label (XVECEXP (PATTERN (lcc), 0, 0), lcc, 0);
+ JUMP_LABEL (lcc) = label;
DUMP ("Replacing branch insn...", branch);
DUMP ("... with Lcc insn:", lcc);
delete_insn (branch);