Hi,
so far we emitted the jump over the literal pool as normal insn:
(insn 8094 5448 8483 (parallel [
(set (reg:SI 13 %r13)
(unspec [
(label_ref 8095)
] UNSPEC_MAIN_BASE))
(set (pc)
(label_ref 8097))
]) /build/gcc-ok/libjava/gnu/gcj/tools/gcj_dbtool/
Main.java:26 610 {main_base_31_large}
(nil))
When dwarf2cfi tries to build its own cfg it does not recognize the
insn as control flow change. With the attached patch the back-end
properly emits the insn as jump_insn.
This fixes java bootstrap on s390 and s390x.
Committed to mainline.
Bye,
-Andreas-
2011-12-08 Andreas Krebbel <[email protected]>
PR target/50395
* config/s390/s390.c (s390_mainpool_finish): Emit the jump over
the literal pool as jump insn.
Index: gcc/config/s390/s390.c
===================================================================
*** gcc/config/s390/s390.c.orig
--- gcc/config/s390/s390.c
*************** s390_mainpool_finish (struct constant_po
*** 6476,6482 ****
rtx pool_end = gen_label_rtx ();
insn = gen_main_base_31_large (base_reg, pool->label, pool_end);
! insn = emit_insn_after (insn, pool->pool_insn);
INSN_ADDRESSES_NEW (insn, -1);
remove_insn (pool->pool_insn);
--- 6476,6483 ----
rtx pool_end = gen_label_rtx ();
insn = gen_main_base_31_large (base_reg, pool->label, pool_end);
! insn = emit_jump_insn_after (insn, pool->pool_insn);
! JUMP_LABEL (insn) = pool_end;
INSN_ADDRESSES_NEW (insn, -1);
remove_insn (pool->pool_insn);