Add .def file for public target instructions

Markus Trippelsdorf markus@trippelsdorf.de
Fri Jun 26 07:42:00 GMT 2015


On 2015.06.23 at 19:41 +0100, Richard Sandiford wrote:
> 
> gcc/
> 	* Makefile.in (TARGET_DEF): Add target-insns.def.
> 	(.PRECIOUS, simple_rtl_generated_h): Add insn-target-def.h.
> 	(build/gentarget-def.o): New rule.
> 	(genprogrtl): Add target-def.
> 	* target-insns.def, gentarget-def.c: New files.
> 	* target.def: Add targetm.have_* and targetm.gen_* hooks,
> 	based on the contents of target-insns.def.
> 	* defaults.h (HAVE_simple_return, gen_simple_return): Delete.
> 	(HAVE_return, gen_return): Delete.
> 	* target-def.h: Include insn-target-def.h.
> 	* cfgrtl.c (force_nonfallthru_and_redirect): Use targetm interface
> 	instead of direct calls.  Rely on them to do the appropriate assertions.
> 	* function.c (gen_return_pattern): Likewise.  Return an rtx_insn *.
> 	(convert_jumps_to_returns): Use targetm interface instead of
> 	direct calls.
> 	(thread_prologue_and_epilogue_insns): Likewise.
> 	* reorg.c (find_end_label, dbr_schedule): Likewise.
> 	* shrink-wrap.h (SHRINK_WRAPPING_ENABLED): Likewise.
> 	* shrink-wrap.c (convert_to_simple_return): Likewise.
> 	(try_shrink_wrapping): Use SHRINK_WRAPPING_ENABLED.

The patch breaks bootstrap on ppc64le. During libgcc configuration:

conftest.c: In function 'main':
conftest.c:16:1: internal compiler error: in as_a, at is-a.h:192
 }
 ^
0x1010411b as_a<rtx_jump_insn*, rtx_insn>
        ../../gcc/gcc/is-a.h:192
0x1040ccd3 as_a<rtx_jump_insn*, rtx_insn>
        ../../gcc/gcc/emit-rtl.c:4750
0x1040ccd3 emit_jump_insn_after(rtx_def*, rtx_def*)
        ../../gcc/gcc/emit-rtl.c:4749
0x104c378f emit_return_into_block(bool, basic_block_def*)
        ../../gcc/gcc/function.c:5633
0x104c3ee7 emit_return_for_exit(edge_def*, bool)
        ../../gcc/gcc/function.c:5779
0x104c9ee3 thread_prologue_and_epilogue_insns()
        ../../gcc/gcc/function.c:5961
0x104ca39f rest_of_handle_thread_prologue_and_epilogue
        ../../gcc/gcc/function.c:6443
0x104ca39f execute
        ../../gcc/gcc/function.c:6481
Please submit a full bug report,
with preprocessed source if appropriate.



-- 
Markus



More information about the Gcc-patches mailing list