Commit 218e3e4e authored by jsm28's avatar jsm28
Browse files

* target-def.h (TARGET_HAVE_NAMED_SECTIONS): Move to

	common/common-target-def.h.
	* target.def (default_target_flags, handle_option,
	supports_split_stack, optimization_table, init_struct,
	except_unwind_info, unwind_tables_default, have_named_sections):
	Move to common/common-target.def.
	* target.h (enum opt_levels, struct default_options): Move to
	common/common-target.h.
	* targhooks.c (default_except_unwind_info,
	dwarf2_except_unwind_info, sjlj_except_unwind_info,
	default_target_handle_option, empty_optimization_table): Move to
	common/common-targhooks.c.
	* targhooks.h (default_except_unwind_info,
	dwarf2_except_unwind_info, sjlj_except_unwind_info,
	default_target_handle_option, empty_optimization_table): Move to
	common/common-targhooks.h.
	* common/common-target-def.h: Include common/common-targhooks.h.
	(TARGET_HAVE_NAMED_SECTIONS): Define if TARGET_ASM_NAMED_SECTION
	defined.
	* common/common-target.def (handle_option, option_init_struct,
	option_optimization_table, default_target_flags,
	except_unwind_info, supports_split_stack, unwind_tables_default,
	have_named_sections): Move from target.def.
	(HOOK_PREFIX): Undefine at end of file.
	* common/common-target.h: Include input.h.
	(enum opt_levels, struct default_options): Move from target.h.
	* common/common-targhooks.c, common/common-targhooks.h: New.
	* config.gcc (target_has_targetm_common): Default to yes.
	(moxie*): Set target_has_targetm_common=no.
	(hppa*-*-*): Don't set target_has_targetm_common=yes.
	* doc/tm.texi: Regenerate.
	* Makefile.in (COMMON_TARGET_H): Add $(INPUT_H).
	(C_TARGET_DEF_H): Add common/common-targhooks.h.
	(GCC_OBJS): Remove vec.o.
	(OBJS): Remove hooks.o and vec.o.
	(OBJS-libcommon-target): Add vec.o, hooks.o and
	common/common-targhooks.o.
	(c-family/c-common.o, c-family/c-cppbuiltin.o, lto-opts.o, tree.o,
	tree-tailcall.o, opts.o, toplev.o, varasm.o, function.o, except.o,
	expr.o, explow.o, dbxout.o, dwarf2out.o, cfgrtl.o, haifa-sched.o,
	cfglayout.o, $(out_object_file), $(common_out_object_file)):
	Update dependencies.
	(common/common-targhooks.o): New.
	* common/config/default-common.c: Include tm.h.  Add FIXME
	comment.
	* common/config/pa/pa-common.c: Include more headers.  Take
	copyright dates from pa.c.
	(pa_option_optimization_table, pa_handle_option,
	TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS,
	TARGET_HANDLE_OPTION): Move from pa.c.
	* common/config/alpha/alpha-common.c,
	common/config/arm/arm-common.c, common/config/avr/avr-common.c,
	common/config/bfin/bfin-common.c,
	common/config/cris/cris-common.c,
	common/config/fr30/fr30-common.c, common/config/frv/frv-common.c,
	common/config/h8300/h8300-common.c,
	common/config/i386/i386-common.c,
	common/config/ia64/ia64-common.c,
	common/config/iq2000/iq2000-common.c,
	common/config/lm32/lm32-common.c,
	common/config/m32c/m32c-common.c,
	common/config/m32r/m32r-common.c,
	common/config/m68k/m68k-common.c,
	common/config/mcore/mcore-common.c,
	common/config/mep/mep-common.c,
	common/config/microblaze/microblaze-common.c,
	common/config/mips/mips-common.c,
	common/config/mmix/mmix-common.c,
	common/config/mn10300/mn10300-common.c,
	common/config/pdp11/pdp11-common.c,
	common/config/picochip/picochip-common.c,
	common/config/rs6000/rs6000-common.c,
	common/config/rx/rx-common.c, common/config/s390/s390-common.c,
	common/config/score/score-common.c, common/config/sh/sh-common.c,
	common/config/sparc/sparc-common.c,
	common/config/spu/spu-common.c, common/config/v850/v850-common.c,
	common/config/vax/vax-common.c,
	common/config/xstormy16/xstormy16-common.c,
	common/config/xtensa/xtensa-common.c: New.
	* config/alpha/alpha.c: Include common/common-target.h.
	(alpha_option_optimization_table, alpha_handle_option,
	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
	TARGET_OPTION_OPTIMIZATION_TABLE): Move to alpha-common.c.
	* config/arm/arm-protos.h (arm_except_unwind_info): Declare.
	* config/arm/arm.c (arm_option_optimization_table,
	TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE,
	TARGET_EXCEPT_UNWIND_INFO, arm_except_unwind_info): Move to
	arm-common.c.
	* config/avr/avr.c (avr_option_optimization_table,
	TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move
	to avr-common.c.
	* config/bfin/bfin.c (struct bfin_cpu): Move to bfin.h.
	(bfin_cpus, bfin_handle_option, TARGET_HANDLE_OPTION,
	TARGET_DEFAULT_TARGET_FLAGS): Move to bfin-common.c.
	* config/bfin/bfin.h struct bfin_cpu): Move from bfin.c.
	* config/cris/cris.c (cris_option_optimization_table,
	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
	TARGET_OPTION_OPTIMIZATION_TABLE, cris_handle_option): Move to
	cris-common.c.
	* config/fr30/fr30.c (fr30_option_optimization_table,
	TARGET_EXCEPT_UNWIND_INFO, TARGET_OPTION_OPTIMIZATION_TABLE): Move
	to fr30-common.c.
	* config/frv/frv.c (frv_option_optimization_table,
	MASK_DEFAULT_ALLOC_CC, TARGET_DEFAULT_TARGET_FLAGS,
	TARGET_OPTION_OPTIMIZATION_TABLE): Move to frv-common.c.
	* config/h8300/h8300.c (h8300_option_optimization_table,
	TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE,
	TARGET_EXCEPT_UNWIND_INFO): Move to h8300-common.c.
	* config/i386/i386-protos.h (ix86_handle_option): Declare.
	* config/i386/i386.c: Include common/common-target.h.
	(OPTION_MASK_ISA_MMX_SET, OPTION_MASK_ISA_3DNOW_SET,
	OPTION_MASK_ISA_SSE_SET, OPTION_MASK_ISA_SSE2_SET,
	OPTION_MASK_ISA_SSE3_SET, OPTION_MASK_ISA_SSSE3_SET,
	OPTION_MASK_ISA_SSE4_1_SET, OPTION_MASK_ISA_SSE4_2_SET,
	OPTION_MASK_ISA_AVX_SET, OPTION_MASK_ISA_FMA_SET,
	OPTION_MASK_ISA_SSE4_SET, OPTION_MASK_ISA_SSE4A_SET,
	OPTION_MASK_ISA_FMA4_SET, OPTION_MASK_ISA_XOP_SET,
	OPTION_MASK_ISA_LWP_SET, OPTION_MASK_ISA_AES_SET,
	OPTION_MASK_ISA_PCLMUL_SET, OPTION_MASK_ISA_ABM_SET,
	OPTION_MASK_ISA_BMI_SET, OPTION_MASK_ISA_TBM_SET,
	OPTION_MASK_ISA_POPCNT_SET, OPTION_MASK_ISA_CX16_SET,
	OPTION_MASK_ISA_SAHF_SET, OPTION_MASK_ISA_MOVBE_SET,
	OPTION_MASK_ISA_CRC32_SET, OPTION_MASK_ISA_FSGSBASE_SET,
	OPTION_MASK_ISA_RDRND_SET, OPTION_MASK_ISA_F16C_SET,
	OPTION_MASK_ISA_MMX_UNSET, OPTION_MASK_ISA_3DNOW_UNSET,
	OPTION_MASK_ISA_3DNOW_A_UNSET, OPTION_MASK_ISA_SSE_UNSET,
	OPTION_MASK_ISA_SSE2_UNSET, OPTION_MASK_ISA_SSE3_UNSET,
	OPTION_MASK_ISA_SSSE3_UNSET, OPTION_MASK_ISA_SSE4_1_UNSET,
	OPTION_MASK_ISA_SSE4_2_UNSET, OPTION_MASK_ISA_AVX_UNSET,
	OPTION_MASK_ISA_FMA_UNSET, OPTION_MASK_ISA_SSE4_UNSET,
	OPTION_MASK_ISA_SSE4A_UNSET, OPTION_MASK_ISA_FMA4_UNSET,
	OPTION_MASK_ISA_XOP_UNSET, OPTION_MASK_ISA_LWP_UNSET,
	OPTION_MASK_ISA_AES_UNSET, OPTION_MASK_ISA_PCLMUL_UNSET,
	OPTION_MASK_ISA_ABM_UNSET, OPTION_MASK_ISA_BMI_UNSET,
	OPTION_MASK_ISA_TBM_UNSET, OPTION_MASK_ISA_POPCNT_UNSET,
	OPTION_MASK_ISA_CX16_UNSET, OPTION_MASK_ISA_SAHF_UNSET,
	OPTION_MASK_ISA_MOVBE_UNSET, OPTION_MASK_ISA_CRC32_UNSET,
	OPTION_MASK_ISA_FSGSBASE_UNSET, OPTION_MASK_ISA_RDRND_UNSET,
	OPTION_MASK_ISA_F16C_UNSET, ix86_handle_option,
	ix86_option_optimization_table, ix86_option_init_struct,
	ix86_supports_split_stack, TARGET_DEFAULT_TARGET_FLAGS,
	TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE,
	TARGET_OPTION_INIT_STRUCT, TARGET_SUPPORTS_SPLIT_STACK): Move to
	i386-common.c.
	* config/i386/t-i386 (i386.o): Update dependencies.
	* config/ia64/ia64-protos.h (ia64_except_unwind_info): Declare.
	* config/ia64/ia64.c (ia64_option_optimization_table,
	TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO,
	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
	ia64_handle_option): Move to ia64-common.c.
	* config/iq2000/iq2000.c (iq2000_option_optimization_table,
	TARGET_OPTION_OPTIMIZATION_TABLE): Move to iq2000-common.c.
	* config/lm32/lm32.c (lm32_option_optimization_table,
	TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move
	to lm32-common.c.
	* config/m32c/m32c.c (TARGET_HAVE_NAMED_SECTIONS): Move to
	m32c-common.c.
	* config/m32r/m32r.c (m32r_option_optimization_table,
	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
	TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO,
	m32r_handle_option): Move to m32r-common.c.
	(m32r_memory_move_cost): Remove comment referring to
	TARGET_HANDLE_OPTION.
	* config/m68k/m68k.c (TARGET_HANDLE_OPTION, m68k_handle_option):
	Move to m68k-common.c.
	* config/mcore/mcore.c (mcore_option_optimization_table,
	TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE,
	TARGET_EXCEPT_UNWIND_INFO): Move to mcore-common.c.
	* config/mep/mep.c (mep_option_optimization_table,
	mep_handle_option, TARGET_HANDLE_OPTION,
	TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS):
	Move to mep-common.c.
	* config/microblaze/microblaze.c
	(microblaze_option_optimization_table,
	TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE,
	TARGET_EXCEPT_UNWIND_INFO): Move to microblaze-common.c.
	* config/mips/mips.c (mips_handle_option,
	mips_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE,
	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION): Move to
	mips-common.c.
	* config/mmix/mmix.c (mmix_option_optimization_table,
	TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE):
	Move to mmix-common.c.
	* config/mn10300/mn10300.c (mn10300_option_optimization_table,
	mn10300_handle_option, TARGET_EXCEPT_UNWIND_INFO,
	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
	TARGET_OPTION_OPTIMIZATION_TABLE): Move to mn10300-common.c.
	* config/pa/pa.c: Include common/common-target.h.
	(pa_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE,
	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
	pa_handle_option): Move to pa-common.c.
	(pa_option_override): Use targetm_common.except_unwind_info.
	(pa_asm_output_mi_thunk, pa_function_section): Use
	targetm_common.have_named_sections.
	* config/pdp11/pdp11.c (pdp11_option_optimization_table,
	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
	TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_OPTION_INIT_STRUCT,
	pdp11_handle_option, pdp11_option_init_struct): Move to
	pdp11-common.c.
	* config/picochip/picochip.c (picochip_option_optimization_table,
	TARGET_HAVE_NAMED_SECTIONS, TARGET_OPTION_OPTIMIZATION_TABLE,
	TARGET_EXCEPT_UNWIND_INFO): Move to picochip-common.c.
	* config/rs6000/rs6000.c: Include common/common-target.h.
	(rs6000_option_optimization_table, TARGET_HANDLE_OPTION,
	TARGET_OPTION_INIT_STRUCT, TARGET_OPTION_OPTIMIZATION_TABLE,
	TARGET_DEFAULT_TARGET_FLAGS, rs6000_option_init_struct,
	rs6000_handle_option): Move to rs6000-common.c.
	* config/rs6000/t-rs6000 (rs6000.o): Update dependencies.
	* config/rx/rx.c (rx_handle_option, rx_option_optimization_table,
	TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE,
	TARGET_EXCEPT_UNWIND_INFO): Move to rx-common.c.
	* config/s390/s390.c (processor_flags_table,
	s390_option_optimization_table, s390_option_init_struct,
	s390_handle_option, TARGET_DEFAULT_TARGET_FLAGS,
	TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE,
	TARGET_OPTION_INIT_STRUCT): Move to s390-common.c.
	* config/s390/s390.h (processor_flags_table): Declare.
	* config/score/score.c (score_option_optimization_table,
	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
	TARGET_OPTION_OPTIMIZATION_TABLE, MASK_ALL_CPU_BITS,
	score_handle_option): Move to score-common.c.
	* config/sh/sh.c (sh_option_optimization_table,
	TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_OPTION_INIT_STRUCT,
	TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
	sh_handle_option, sh_option_init_struct): Move to sh-common.c.
	* config/sparc/sparc.c: Include common/common-target.h.
	(sparc_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS,
	TARGET_OPTION_OPTIMIZATION_TABLE): Move to sparc-common.c.
	* config/spu/spu.c (TARGET_DEFAULT_TARGET_FLAGS,
	TARGET_OPTION_INIT_STRUCT, TARGET_EXCEPT_UNWIND_INFO,
	spu_option_init_struct): Move to spu-common.c.
	* config/stormy16/stormy16.c (xstorym16_option_optimization_table,
	TARGET_OPTION_OPTIMIZATION_TABLE): Move to xstormy16-common.c.
	* config/v850/v850.c (small_memory_physical_max,
	v850_handle_memory_optionn v850_handle_option,
	v850_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS,
	TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE): Move to
	v850-common.c.
	* config/vax/vax.c (TARGET_DEFAULT_TARGET_FLAGS): Move to
	vax-common.c.
	* config/xtensa/xtensa.c (xtensa_option_optimization_table,
	TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE):
	Move to xtensa-common.c.
	* cfglayout.c: Include common/common-target.h.
	(fixup_reorder_chain): Use targetm_common.have_named_sections.
	* cfgrtl.c: Include common/common-target.h.
	(force_nonfallthru_and_redirect, commit_one_edge_insertion): Use
	targetm_common.have_named_sections.
	* dbxout.c: Include common/common-target.h.
	(dbxout_function_end): Use targetm_common.have_named_sections.
	* defaults.h (STACK_OLD_CHECK_PROTECT, STACK_CHECK_PROTECT): Use
	targetm_common.except_unwind_info.
	* dwarf2out.c: Include common/common-target.h.
	(dwarf2out_do_frame, dwarf2out_do_cfi_asm,
	dwarf2out_begin_prologue, dwarf2out_frame_init,
	dwarf2out_frame_finish, dwarf2out_assembly_start): Use
	targetm_common.except_unwind_info.
	* except.c: Include common/common-target.h.
	(init_eh, finish_eh_generation,
	output_one_function_exception_table): Use
	targetm_common.except_unwind_info.
	(switch_to_exception_section): Use
	targetm_common.have_named_sections.
	* explow.c: Include common/common-target.h.
	* expr.c: Include common/common-target.h.
	(build_personality_function): Use
	targetm_common.except_unwind_info.
	* function.c: Include common/common-target.h.
	(expand_function_end): Use targetm_common.except_unwind_info.
	* haifa-sched.c: Include common/common-target.h.
	(sched_create_recovery_edges): Use
	targetm_common.have_named_sections.
	* lto-opts.c: Include common/common-target.h instead of target.h.
	(lto_reissue_options): Use targetm_common.handle_option.
	* opts.c: Include common/common-target.h.
	(target_handle_option): Use targetm_common.handle_option.
	(init_options_struct): Update comment referring to
	targetm.target_option.optimization.  Use
	targetm_common.default_target_flags,
	targetm_common.unwind_tables_default and
	targetm_common.option_init_struct.
	(default_options_optimization): Use
	targetm_common.option_optimization_table.
	(finish_options): Use targetm_common.except_unwind_info,
	targetm_common.unwind_tables_default,
	targetm_common.have_named_sections and
	targetm_common.supports_split_stack.
	* toplev.c: Include common/common-target.h.
	(process_options): Use targetm_common.have_named_sections.
	* tree-tailcall.c: Include common/common-target.h.
	(suitable_for_tail_call_opt_p): Use
	targetm_common.except_unwind_info.
	* tree.c: Include common/common-target.h.
	(build_common_builtin_nodes): Use
	targetm_common.except_unwind_info.
	* varasm.c: Include common/common-target.h.
	(resolve_unique_section, hot_function_section,
	default_function_section): Use targetm_common.have_named_sections.

ada:
	* gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
	(ada/utils.o): Update dependencies.
	* gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
	../../../libcpp/libcpp.a.
	* gcc-interface/utils.c: Include common/common-target.h.
	(process_attributes): Use targetm_common.have_named_sections.

c-family:
	* c-common.c: Include common/common-target.h.
	(handle_section_attribute): Use
	targetm_common.have_named_sections.
	* c-cppbuiltin.c: Include common/common-target.h.
	(c_cpp_builtins): Use targetm_common.except_unwind_info.

cp:
	* Make-lang.in (cp/method.o): Update dependencies.
	* method.c: Include common/common-target.h.
	(use_thunk): Use targetm_common.have_named_sections.

go:
	* Make-lang.in (go/go-lang.o, go/go-backend.o): Update
	dependencies.
	* go-backend.c: Include common/common-target.h.
	(go_write_export_data): Use targetm_common.have_named_sections.
	* go-lang.c: Include common/common-target.h.
	(go_langhook_init_options_struct): Use
	targetm_common.supports_split_stack.

po:
	* exgettext: Handle common/ directory and subdirectories.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175064 138bc75d-0d04-0410-961f-82ee72b054a4
parent b4a708fb
2011-06-14 Joseph Myers <joseph@codesourcery.com>
* target-def.h (TARGET_HAVE_NAMED_SECTIONS): Move to
common/common-target-def.h.
* target.def (default_target_flags, handle_option,
supports_split_stack, optimization_table, init_struct,
except_unwind_info, unwind_tables_default, have_named_sections):
Move to common/common-target.def.
* target.h (enum opt_levels, struct default_options): Move to
common/common-target.h.
* targhooks.c (default_except_unwind_info,
dwarf2_except_unwind_info, sjlj_except_unwind_info,
default_target_handle_option, empty_optimization_table): Move to
common/common-targhooks.c.
* targhooks.h (default_except_unwind_info,
dwarf2_except_unwind_info, sjlj_except_unwind_info,
default_target_handle_option, empty_optimization_table): Move to
common/common-targhooks.h.
* common/common-target-def.h: Include common/common-targhooks.h.
(TARGET_HAVE_NAMED_SECTIONS): Define if TARGET_ASM_NAMED_SECTION
defined.
* common/common-target.def (handle_option, option_init_struct,
option_optimization_table, default_target_flags,
except_unwind_info, supports_split_stack, unwind_tables_default,
have_named_sections): Move from target.def.
(HOOK_PREFIX): Undefine at end of file.
* common/common-target.h: Include input.h.
(enum opt_levels, struct default_options): Move from target.h.
* common/common-targhooks.c, common/common-targhooks.h: New.
* config.gcc (target_has_targetm_common): Default to yes.
(moxie*): Set target_has_targetm_common=no.
(hppa*-*-*): Don't set target_has_targetm_common=yes.
* doc/tm.texi: Regenerate.
* Makefile.in (COMMON_TARGET_H): Add $(INPUT_H).
(C_TARGET_DEF_H): Add common/common-targhooks.h.
(GCC_OBJS): Remove vec.o.
(OBJS): Remove hooks.o and vec.o.
(OBJS-libcommon-target): Add vec.o, hooks.o and
common/common-targhooks.o.
(c-family/c-common.o, c-family/c-cppbuiltin.o, lto-opts.o, tree.o,
tree-tailcall.o, opts.o, toplev.o, varasm.o, function.o, except.o,
expr.o, explow.o, dbxout.o, dwarf2out.o, cfgrtl.o, haifa-sched.o,
cfglayout.o, $(out_object_file), $(common_out_object_file)):
Update dependencies.
(common/common-targhooks.o): New.
* common/config/default-common.c: Include tm.h. Add FIXME
comment.
* common/config/pa/pa-common.c: Include more headers. Take
copyright dates from pa.c.
(pa_option_optimization_table, pa_handle_option,
TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS,
TARGET_HANDLE_OPTION): Move from pa.c.
* common/config/alpha/alpha-common.c,
common/config/arm/arm-common.c, common/config/avr/avr-common.c,
common/config/bfin/bfin-common.c,
common/config/cris/cris-common.c,
common/config/fr30/fr30-common.c, common/config/frv/frv-common.c,
common/config/h8300/h8300-common.c,
common/config/i386/i386-common.c,
common/config/ia64/ia64-common.c,
common/config/iq2000/iq2000-common.c,
common/config/lm32/lm32-common.c,
common/config/m32c/m32c-common.c,
common/config/m32r/m32r-common.c,
common/config/m68k/m68k-common.c,
common/config/mcore/mcore-common.c,
common/config/mep/mep-common.c,
common/config/microblaze/microblaze-common.c,
common/config/mips/mips-common.c,
common/config/mmix/mmix-common.c,
common/config/mn10300/mn10300-common.c,
common/config/pdp11/pdp11-common.c,
common/config/picochip/picochip-common.c,
common/config/rs6000/rs6000-common.c,
common/config/rx/rx-common.c, common/config/s390/s390-common.c,
common/config/score/score-common.c, common/config/sh/sh-common.c,
common/config/sparc/sparc-common.c,
common/config/spu/spu-common.c, common/config/v850/v850-common.c,
common/config/vax/vax-common.c,
common/config/xstormy16/xstormy16-common.c,
common/config/xtensa/xtensa-common.c: New.
* config/alpha/alpha.c: Include common/common-target.h.
(alpha_option_optimization_table, alpha_handle_option,
TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
TARGET_OPTION_OPTIMIZATION_TABLE): Move to alpha-common.c.
* config/arm/arm-protos.h (arm_except_unwind_info): Declare.
* config/arm/arm.c (arm_option_optimization_table,
TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE,
TARGET_EXCEPT_UNWIND_INFO, arm_except_unwind_info): Move to
arm-common.c.
* config/avr/avr.c (avr_option_optimization_table,
TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move
to avr-common.c.
* config/bfin/bfin.c (struct bfin_cpu): Move to bfin.h.
(bfin_cpus, bfin_handle_option, TARGET_HANDLE_OPTION,
TARGET_DEFAULT_TARGET_FLAGS): Move to bfin-common.c.
* config/bfin/bfin.h struct bfin_cpu): Move from bfin.c.
* config/cris/cris.c (cris_option_optimization_table,
TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
TARGET_OPTION_OPTIMIZATION_TABLE, cris_handle_option): Move to
cris-common.c.
* config/fr30/fr30.c (fr30_option_optimization_table,
TARGET_EXCEPT_UNWIND_INFO, TARGET_OPTION_OPTIMIZATION_TABLE): Move
to fr30-common.c.
* config/frv/frv.c (frv_option_optimization_table,
MASK_DEFAULT_ALLOC_CC, TARGET_DEFAULT_TARGET_FLAGS,
TARGET_OPTION_OPTIMIZATION_TABLE): Move to frv-common.c.
* config/h8300/h8300.c (h8300_option_optimization_table,
TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE,
TARGET_EXCEPT_UNWIND_INFO): Move to h8300-common.c.
* config/i386/i386-protos.h (ix86_handle_option): Declare.
* config/i386/i386.c: Include common/common-target.h.
(OPTION_MASK_ISA_MMX_SET, OPTION_MASK_ISA_3DNOW_SET,
OPTION_MASK_ISA_SSE_SET, OPTION_MASK_ISA_SSE2_SET,
OPTION_MASK_ISA_SSE3_SET, OPTION_MASK_ISA_SSSE3_SET,
OPTION_MASK_ISA_SSE4_1_SET, OPTION_MASK_ISA_SSE4_2_SET,
OPTION_MASK_ISA_AVX_SET, OPTION_MASK_ISA_FMA_SET,
OPTION_MASK_ISA_SSE4_SET, OPTION_MASK_ISA_SSE4A_SET,
OPTION_MASK_ISA_FMA4_SET, OPTION_MASK_ISA_XOP_SET,
OPTION_MASK_ISA_LWP_SET, OPTION_MASK_ISA_AES_SET,
OPTION_MASK_ISA_PCLMUL_SET, OPTION_MASK_ISA_ABM_SET,
OPTION_MASK_ISA_BMI_SET, OPTION_MASK_ISA_TBM_SET,
OPTION_MASK_ISA_POPCNT_SET, OPTION_MASK_ISA_CX16_SET,
OPTION_MASK_ISA_SAHF_SET, OPTION_MASK_ISA_MOVBE_SET,
OPTION_MASK_ISA_CRC32_SET, OPTION_MASK_ISA_FSGSBASE_SET,
OPTION_MASK_ISA_RDRND_SET, OPTION_MASK_ISA_F16C_SET,
OPTION_MASK_ISA_MMX_UNSET, OPTION_MASK_ISA_3DNOW_UNSET,
OPTION_MASK_ISA_3DNOW_A_UNSET, OPTION_MASK_ISA_SSE_UNSET,
OPTION_MASK_ISA_SSE2_UNSET, OPTION_MASK_ISA_SSE3_UNSET,
OPTION_MASK_ISA_SSSE3_UNSET, OPTION_MASK_ISA_SSE4_1_UNSET,
OPTION_MASK_ISA_SSE4_2_UNSET, OPTION_MASK_ISA_AVX_UNSET,
OPTION_MASK_ISA_FMA_UNSET, OPTION_MASK_ISA_SSE4_UNSET,
OPTION_MASK_ISA_SSE4A_UNSET, OPTION_MASK_ISA_FMA4_UNSET,
OPTION_MASK_ISA_XOP_UNSET, OPTION_MASK_ISA_LWP_UNSET,
OPTION_MASK_ISA_AES_UNSET, OPTION_MASK_ISA_PCLMUL_UNSET,
OPTION_MASK_ISA_ABM_UNSET, OPTION_MASK_ISA_BMI_UNSET,
OPTION_MASK_ISA_TBM_UNSET, OPTION_MASK_ISA_POPCNT_UNSET,
OPTION_MASK_ISA_CX16_UNSET, OPTION_MASK_ISA_SAHF_UNSET,
OPTION_MASK_ISA_MOVBE_UNSET, OPTION_MASK_ISA_CRC32_UNSET,
OPTION_MASK_ISA_FSGSBASE_UNSET, OPTION_MASK_ISA_RDRND_UNSET,
OPTION_MASK_ISA_F16C_UNSET, ix86_handle_option,
ix86_option_optimization_table, ix86_option_init_struct,
ix86_supports_split_stack, TARGET_DEFAULT_TARGET_FLAGS,
TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE,
TARGET_OPTION_INIT_STRUCT, TARGET_SUPPORTS_SPLIT_STACK): Move to
i386-common.c.
* config/i386/t-i386 (i386.o): Update dependencies.
* config/ia64/ia64-protos.h (ia64_except_unwind_info): Declare.
* config/ia64/ia64.c (ia64_option_optimization_table,
TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO,
TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
ia64_handle_option): Move to ia64-common.c.
* config/iq2000/iq2000.c (iq2000_option_optimization_table,
TARGET_OPTION_OPTIMIZATION_TABLE): Move to iq2000-common.c.
* config/lm32/lm32.c (lm32_option_optimization_table,
TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move
to lm32-common.c.
* config/m32c/m32c.c (TARGET_HAVE_NAMED_SECTIONS): Move to
m32c-common.c.
* config/m32r/m32r.c (m32r_option_optimization_table,
TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO,
m32r_handle_option): Move to m32r-common.c.
(m32r_memory_move_cost): Remove comment referring to
TARGET_HANDLE_OPTION.
* config/m68k/m68k.c (TARGET_HANDLE_OPTION, m68k_handle_option):
Move to m68k-common.c.
* config/mcore/mcore.c (mcore_option_optimization_table,
TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE,
TARGET_EXCEPT_UNWIND_INFO): Move to mcore-common.c.
* config/mep/mep.c (mep_option_optimization_table,
mep_handle_option, TARGET_HANDLE_OPTION,
TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS):
Move to mep-common.c.
* config/microblaze/microblaze.c
(microblaze_option_optimization_table,
TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE,
TARGET_EXCEPT_UNWIND_INFO): Move to microblaze-common.c.
* config/mips/mips.c (mips_handle_option,
mips_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE,
TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION): Move to
mips-common.c.
* config/mmix/mmix.c (mmix_option_optimization_table,
TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE):
Move to mmix-common.c.
* config/mn10300/mn10300.c (mn10300_option_optimization_table,
mn10300_handle_option, TARGET_EXCEPT_UNWIND_INFO,
TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
TARGET_OPTION_OPTIMIZATION_TABLE): Move to mn10300-common.c.
* config/pa/pa.c: Include common/common-target.h.
(pa_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE,
TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
pa_handle_option): Move to pa-common.c.
(pa_option_override): Use targetm_common.except_unwind_info.
(pa_asm_output_mi_thunk, pa_function_section): Use
targetm_common.have_named_sections.
* config/pdp11/pdp11.c (pdp11_option_optimization_table,
TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_OPTION_INIT_STRUCT,
pdp11_handle_option, pdp11_option_init_struct): Move to
pdp11-common.c.
* config/picochip/picochip.c (picochip_option_optimization_table,
TARGET_HAVE_NAMED_SECTIONS, TARGET_OPTION_OPTIMIZATION_TABLE,
TARGET_EXCEPT_UNWIND_INFO): Move to picochip-common.c.
* config/rs6000/rs6000.c: Include common/common-target.h.
(rs6000_option_optimization_table, TARGET_HANDLE_OPTION,
TARGET_OPTION_INIT_STRUCT, TARGET_OPTION_OPTIMIZATION_TABLE,
TARGET_DEFAULT_TARGET_FLAGS, rs6000_option_init_struct,
rs6000_handle_option): Move to rs6000-common.c.
* config/rs6000/t-rs6000 (rs6000.o): Update dependencies.
* config/rx/rx.c (rx_handle_option, rx_option_optimization_table,
TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE,
TARGET_EXCEPT_UNWIND_INFO): Move to rx-common.c.
* config/s390/s390.c (processor_flags_table,
s390_option_optimization_table, s390_option_init_struct,
s390_handle_option, TARGET_DEFAULT_TARGET_FLAGS,
TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE,
TARGET_OPTION_INIT_STRUCT): Move to s390-common.c.
* config/s390/s390.h (processor_flags_table): Declare.
* config/score/score.c (score_option_optimization_table,
TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
TARGET_OPTION_OPTIMIZATION_TABLE, MASK_ALL_CPU_BITS,
score_handle_option): Move to score-common.c.
* config/sh/sh.c (sh_option_optimization_table,
TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_OPTION_INIT_STRUCT,
TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION,
sh_handle_option, sh_option_init_struct): Move to sh-common.c.
* config/sparc/sparc.c: Include common/common-target.h.
(sparc_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS,
TARGET_OPTION_OPTIMIZATION_TABLE): Move to sparc-common.c.
* config/spu/spu.c (TARGET_DEFAULT_TARGET_FLAGS,
TARGET_OPTION_INIT_STRUCT, TARGET_EXCEPT_UNWIND_INFO,
spu_option_init_struct): Move to spu-common.c.
* config/stormy16/stormy16.c (xstorym16_option_optimization_table,
TARGET_OPTION_OPTIMIZATION_TABLE): Move to xstormy16-common.c.
* config/v850/v850.c (small_memory_physical_max,
v850_handle_memory_optionn v850_handle_option,
v850_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS,
TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE): Move to
v850-common.c.
* config/vax/vax.c (TARGET_DEFAULT_TARGET_FLAGS): Move to
vax-common.c.
* config/xtensa/xtensa.c (xtensa_option_optimization_table,
TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE):
Move to xtensa-common.c.
* cfglayout.c: Include common/common-target.h.
(fixup_reorder_chain): Use targetm_common.have_named_sections.
* cfgrtl.c: Include common/common-target.h.
(force_nonfallthru_and_redirect, commit_one_edge_insertion): Use
targetm_common.have_named_sections.
* dbxout.c: Include common/common-target.h.
(dbxout_function_end): Use targetm_common.have_named_sections.
* defaults.h (STACK_OLD_CHECK_PROTECT, STACK_CHECK_PROTECT): Use
targetm_common.except_unwind_info.
* dwarf2out.c: Include common/common-target.h.
(dwarf2out_do_frame, dwarf2out_do_cfi_asm,
dwarf2out_begin_prologue, dwarf2out_frame_init,
dwarf2out_frame_finish, dwarf2out_assembly_start): Use
targetm_common.except_unwind_info.
* except.c: Include common/common-target.h.
(init_eh, finish_eh_generation,
output_one_function_exception_table): Use
targetm_common.except_unwind_info.
(switch_to_exception_section): Use
targetm_common.have_named_sections.
* explow.c: Include common/common-target.h.
* expr.c: Include common/common-target.h.
(build_personality_function): Use
targetm_common.except_unwind_info.
* function.c: Include common/common-target.h.
(expand_function_end): Use targetm_common.except_unwind_info.
* haifa-sched.c: Include common/common-target.h.
(sched_create_recovery_edges): Use
targetm_common.have_named_sections.
* lto-opts.c: Include common/common-target.h instead of target.h.
(lto_reissue_options): Use targetm_common.handle_option.
* opts.c: Include common/common-target.h.
(target_handle_option): Use targetm_common.handle_option.
(init_options_struct): Update comment referring to
targetm.target_option.optimization. Use
targetm_common.default_target_flags,
targetm_common.unwind_tables_default and
targetm_common.option_init_struct.
(default_options_optimization): Use
targetm_common.option_optimization_table.
(finish_options): Use targetm_common.except_unwind_info,
targetm_common.unwind_tables_default,
targetm_common.have_named_sections and
targetm_common.supports_split_stack.
* toplev.c: Include common/common-target.h.
(process_options): Use targetm_common.have_named_sections.
* tree-tailcall.c: Include common/common-target.h.
(suitable_for_tail_call_opt_p): Use
targetm_common.except_unwind_info.
* tree.c: Include common/common-target.h.
(build_common_builtin_nodes): Use
targetm_common.except_unwind_info.
* varasm.c: Include common/common-target.h.
(resolve_unique_section, hot_function_section,
default_function_section): Use targetm_common.have_named_sections.
2011-06-14 Easwaran Raman <eraman@google.com>
 
PR rtl-optimization/44194
......
......@@ -893,14 +893,14 @@ C_TARGET_DEF = c-family/c-target.def target-hooks-macros.h
COMMON_TARGET_DEF = common/common-target.def target-hooks-macros.h
TARGET_H = $(TM_H) target.h $(TARGET_DEF) insn-modes.h
C_TARGET_H = c-family/c-target.h $(C_TARGET_DEF)
COMMON_TARGET_H = common/common-target.h $(COMMON_TARGET_DEF)
COMMON_TARGET_H = common/common-target.h $(INPUT_H) $(COMMON_TARGET_DEF)
MACHMODE_H = machmode.h mode-classes.def insn-modes.h
HOOKS_H = hooks.h $(MACHMODE_H)
HOSTHOOKS_DEF_H = hosthooks-def.h $(HOOKS_H)
LANGHOOKS_DEF_H = langhooks-def.h $(HOOKS_H)
TARGET_DEF_H = target-def.h target-hooks-def.h $(HOOKS_H) targhooks.h
C_TARGET_DEF_H = c-family/c-target-def.h c-family/c-target-hooks-def.h \
$(TREE_H) $(C_COMMON_H) $(HOOKS_H)
$(TREE_H) $(C_COMMON_H) $(HOOKS_H) common/common-targhooks.h
COMMON_TARGET_DEF_H = common/common-target-def.h \
common/common-target-hooks-def.h $(HOOKS_H)
RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H) reg-notes.def insn-notes.def \
......@@ -1173,7 +1173,7 @@ CXX_TARGET_OBJS=@cxx_target_objs@
FORTRAN_TARGET_OBJS=@fortran_target_objs@
# Object files for gcc driver.
GCC_OBJS = gcc.o vec.o ggc-none.o
GCC_OBJS = gcc.o ggc-none.o
# Language-specific object files shared by all C-family front ends.
C_COMMON_OBJS = c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o \
......@@ -1292,7 +1292,6 @@ OBJS = \
graphite-sese-to-poly.o \
gtype-desc.o \
haifa-sched.o \
hooks.o \
hwint.o \
ifcvt.o \
implicit-zee.o \
......@@ -1484,7 +1483,6 @@ OBJS = \
var-tracking.o \
varasm.o \
varpool.o \
vec.o \
vmsdbgout.o \
web.o \
xcoffout.o \
......@@ -1499,7 +1497,7 @@ OBJS-libcommon = diagnostic.o pretty-print.o intl.o input.o version.o
# Objects in libcommon-target.a, used by drivers and by the core
# compiler and containing target-dependent code.
OBJS-libcommon-target = $(common_out_object_file) prefix.o opts-common.o \
options.o
options.o vec.o hooks.o common/common-targhooks.o
# This lists all host objects for the front ends.
ALL_HOST_FRONTEND_OBJS = $(C_OBJS) \
......@@ -2144,11 +2142,11 @@ c-family/c-common.o : c-family/c-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
intl.h $(OPTS_H) $(CPPLIB_H) $(TREE_INLINE_H) $(HASHTAB_H) \
$(BUILTINS_DEF) $(CGRAPH_H) $(BASIC_BLOCK_H) $(TARGET_DEF_H) \
$(LIBFUNCS_H) \
gt-c-family-c-common.h
gt-c-family-c-common.h $(COMMON_TARGET_H)
c-family/c-cppbuiltin.o : c-family/c-cppbuiltin.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(TREE_H) version.h $(C_COMMON_H) $(C_PRAGMA_H) \
$(FLAGS_H) output.h $(TREE_H) $(TARGET_H) \
$(FLAGS_H) output.h $(TREE_H) $(TARGET_H) $(COMMON_TARGET_H) \
$(TM_P_H) debug.h $(CPP_ID_DATA_H) cppbuiltin.h
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
$< $(OUTPUT_OPTION)
......@@ -2389,7 +2387,7 @@ lto-symtab.o: lto-symtab.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(LTO_STREAMER_H) $(LINKER_PLUGIN_API_H) gt-lto-symtab.h
lto-opts.o: lto-opts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
$(HASHTAB_H) $(GGC_H) $(BITMAP_H) $(FLAGS_H) $(OPTS_H) $(OPTIONS_H) \
$(TARGET_H) $(DIAGNOSTIC_H) $(LTO_STREAMER_H)
$(COMMON_TARGET_H) $(DIAGNOSTIC_H) $(LTO_STREAMER_H)
lto-streamer.o: lto-streamer.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(GIMPLE_H) $(BITMAP_H) $(LTO_STREAMER_H) $(FLAGS_H) \
$(TREE_FLOW_H) $(DIAGNOSTIC_CORE_H) $(LTO_SYMTAB_H) toplev.h $(DIAGNOSTIC_CORE_H)
......@@ -2403,7 +2401,8 @@ tree.o: tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
langhooks.h gt-tree.h $(TREE_INLINE_H) tree-iterator.h \
$(BASIC_BLOCK_H) $(TREE_FLOW_H) $(OBSTACK_H) pointer-set.h \
tree-pass.h $(LANGHOOKS_DEF_H) $(DIAGNOSTIC_H) $(CGRAPH_H) $(TIMEVAR_H) \
$(EXCEPT_H) debug.h intl.h tree-diagnostic.h tree-pretty-print.h
$(EXCEPT_H) debug.h intl.h tree-diagnostic.h tree-pretty-print.h \
$(COMMON_TARGET_H)
tree-dump.o: tree-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) langhooks.h toplev.h $(SPLAY_TREE_H) $(TREE_DUMP_H) \
tree-iterator.h $(TREE_PASS_H) $(DIAGNOSTIC_H)
......@@ -2568,7 +2567,8 @@ tree-cfgcleanup.o : tree-cfgcleanup.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
tree-tailcall.o : tree-tailcall.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TM_P_H) $(FUNCTION_H) $(TM_H) coretypes.h \
$(TREE_DUMP_H) $(DIAGNOSTIC_H) $(EXCEPT_H) $(TREE_PASS_H) $(FLAGS_H) langhooks.h \
$(BASIC_BLOCK_H) $(DBGCNT_H) gimple-pretty-print.h $(TARGET_H)
$(BASIC_BLOCK_H) $(DBGCNT_H) gimple-pretty-print.h $(TARGET_H) \
$(COMMON_TARGET_H)
tree-ssa-sink.o : tree-ssa-sink.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
$(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) alloc-pool.h \
......@@ -2842,7 +2842,7 @@ diagnostic.o : diagnostic.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
version.h $(INPUT_H) intl.h $(DIAGNOSTIC_H) diagnostic.def
opts.o : opts.c $(OPTS_H) $(OPTIONS_H) $(DIAGNOSTIC_CORE_H) $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(RTL_H) \
$(DIAGNOSTIC_H) $(INSN_ATTR_H) intl.h $(TARGET_H) \
$(DIAGNOSTIC_H) $(INSN_ATTR_H) intl.h $(TARGET_H) $(COMMON_TARGET_H) \
$(FLAGS_H) $(PARAMS_H) opts-diagnostic.h
opts-global.o : opts-global.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(DIAGNOSTIC_H) $(OPTS_H) $(FLAGS_H) $(GGC_H) $(TREE_H) langhooks.h \
......@@ -2855,6 +2855,8 @@ targhooks.o : targhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
$(MACHMODE_H) $(TARGET_DEF_H) $(TARGET_H) $(GGC_H) gt-targhooks.h \
$(OPTABS_H) $(RECOG_H) reload.h hard-reg-set.h intl.h $(OPTS_H) \
tree-ssa-alias.h $(TREE_FLOW_H)
common/common-targhooks.o : common/common-targhooks.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(INPUT_H) $(TM_H) $(COMMON_TARGET_H) common/common-targhooks.h
bversion.h: s-bversion; @true
s-bversion: BASE-VER
......@@ -2876,7 +2878,7 @@ toplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(CGRAPH_H) $(COVERAGE_H) alloc-pool.h $(GGC_H) $(INTEGRATE_H) \
$(OPTS_H) params.def tree-mudflap.h $(TREE_PASS_H) $(GIMPLE_H) \
tree-ssa-alias.h $(PLUGIN_H) realmpfr.h tree-diagnostic.h \
tree-pretty-print.h opts-diagnostic.h
tree-pretty-print.h opts-diagnostic.h $(COMMON_TARGET_H)
$(COMPILER) $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
-DTARGET_NAME=\"$(target_noncanonical)\" \
-c $(srcdir)/toplev.c $(OUTPUT_OPTION)
......@@ -2923,13 +2925,13 @@ varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
output.h $(DIAGNOSTIC_CORE_H) xcoffout.h debug.h $(GGC_H) $(TM_P_H) \
$(HASHTAB_H) $(TARGET_H) langhooks.h gt-varasm.h $(BASIC_BLOCK_H) \
$(CFGLAYOUT_H) $(CGRAPH_H) targhooks.h tree-mudflap.h \
tree-iterator.h pointer-set.h
tree-iterator.h pointer-set.h $(COMMON_TARGET_H)
function.o : function.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \
$(TREE_H) $(CFGLAYOUT_H) $(GIMPLE_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) \
$(OPTABS_H) $(LIBFUNCS_H) $(REGS_H) hard-reg-set.h insn-config.h $(RECOG_H) \
output.h $(EXCEPT_H) $(HASHTAB_H) $(GGC_H) $(TM_P_H) langhooks.h \
gt-function.h $(TARGET_H) $(BASIC_BLOCK_H) $(INTEGRATE_H) $(PREDICT_H) \
$(TREE_PASS_H) $(DF_H) $(TIMEVAR_H) vecprim.h
$(TREE_PASS_H) $(DF_H) $(TIMEVAR_H) vecprim.h $(COMMON_TARGET_H)
statistics.o : statistics.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TREE_PASS_H) $(TREE_DUMP_H) $(HASHTAB_H) statistics.h $(FUNCTION_H)
stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
......@@ -2944,14 +2946,15 @@ except.o : except.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
dwarf2asm.h dwarf2out.h toplev.h $(DIAGNOSTIC_CORE_H) $(HASHTAB_H) intl.h $(GGC_H) \
gt-except.h $(CGRAPH_H) $(INTEGRATE_H) $(DIAGNOSTIC_H) $(DWARF2_H) \
$(TARGET_H) $(TM_P_H) $(TREE_PASS_H) $(TIMEVAR_H) $(TREE_FLOW_H) \
tree-pretty-print.h sbitmap.h
tree-pretty-print.h sbitmap.h $(COMMON_TARGET_H)
expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) $(FUNCTION_H) $(REGS_H) $(EXPR_H) $(OPTABS_H) \
$(LIBFUNCS_H) $(INSN_ATTR_H) insn-config.h $(RECOG_H) output.h \
typeclass.h hard-reg-set.h toplev.h $(DIAGNOSTIC_CORE_H) hard-reg-set.h $(EXCEPT_H) \
reload.h langhooks.h intl.h $(TM_P_H) $(TARGET_H) \
tree-iterator.h gt-expr.h $(MACHMODE_H) $(TIMEVAR_H) $(TREE_FLOW_H) \
$(TREE_PASS_H) $(DF_H) $(DIAGNOSTIC_H) vecprim.h $(SSAEXPAND_H)
$(TREE_PASS_H) $(DF_H) $(DIAGNOSTIC_H) vecprim.h $(SSAEXPAND_H) \
$(COMMON_TARGET_H)
dojump.o : dojump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
$(FLAGS_H) $(FUNCTION_H) $(EXPR_H) $(OPTABS_H) $(INSN_ATTR_H) insn-config.h \
langhooks.h $(GGC_H) gt-dojump.h vecprim.h $(BASIC_BLOCK_H) output.h
......@@ -2974,7 +2977,7 @@ expmed.o : expmed.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_
explow.o : explow.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
$(FLAGS_H) hard-reg-set.h insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) \
$(DIAGNOSTIC_CORE_H) $(EXCEPT_H) $(FUNCTION_H) $(GGC_H) $(TM_P_H) langhooks.h gt-explow.h \
$(TARGET_H) output.h
$(TARGET_H) $(COMMON_TARGET_H) output.h
optabs.o : optabs.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) insn-config.h $(EXPR_H) $(OPTABS_H) $(LIBFUNCS_H) \
$(RECOG_H) reload.h $(DIAGNOSTIC_CORE_H) $(GGC_H) $(TM_P_H) \
......@@ -2983,7 +2986,7 @@ dbxout.o : dbxout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(RTL_H) $(FLAGS_H) $(REGS_H) debug.h $(TM_P_H) $(TARGET_H) $(FUNCTION_H) \
langhooks.h insn-config.h reload.h $(GSTAB_H) xcoffout.h output.h dbxout.h \
toplev.h $(DIAGNOSTIC_CORE_H) $(GGC_H) $(OBSTACK_H) $(EXPR_H) $(CGRAPH_H) \
gt-dbxout.h
gt-dbxout.h $(COMMON_TARGET_H)
debug.o : debug.c debug.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H)
sdbout.o : sdbout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) debug.h \
$(TREE_H) $(GGC_H) $(RTL_H) $(REGS_H) $(FLAGS_H) insn-config.h \
......@@ -2995,7 +2998,8 @@ dwarf2out.o : dwarf2out.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(LIBFUNCS_H) toplev.h $(DIAGNOSTIC_CORE_H) dwarf2out.h reload.h \
$(GGC_H) $(EXCEPT_H) dwarf2asm.h $(TM_P_H) langhooks.h $(HASHTAB_H) \
gt-dwarf2out.h $(TARGET_H) $(CGRAPH_H) $(MD5_H) $(INPUT_H) $(FUNCTION_H) \
$(GIMPLE_H) $(TREE_PASS_H) $(TREE_FLOW_H) $(CFGLAYOUT_H) tree-pretty-print.h
$(GIMPLE_H) $(TREE_PASS_H) $(TREE_FLOW_H) $(CFGLAYOUT_H) \
tree-pretty-print.h $(COMMON_TARGET_H)
dwarf2asm.o : dwarf2asm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(FLAGS_H) $(RTL_H) $(TREE_H) output.h dwarf2asm.h $(TM_P_H) $(GGC_H) \
gt-dwarf2asm.h $(DWARF2_H) $(SPLAY_TREE_H) $(TARGET_H)
......@@ -3273,7 +3277,7 @@ cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \
output.h $(FUNCTION_H) $(EXCEPT_H) $(TM_P_H) $(INSN_ATTR_H) \
insn-config.h $(EXPR_H) \
$(CFGLAYOUT_H) $(CFGLOOP_H) $(OBSTACK_H) $(TARGET_H) $(TREE_H) \
$(TREE_PASS_H) $(DF_H) $(GGC_H)
$(TREE_PASS_H) $(DF_H) $(GGC_H) $(COMMON_TARGET_H)
cfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(BASIC_BLOCK_H) hard-reg-set.h insn-config.h $(RECOG_H) $(TM_P_H) \
$(TIMEVAR_H) $(OBSTACK_H) $(DIAGNOSTIC_CORE_H) vecprim.h sbitmap.h $(BITMAP_H)
......@@ -3436,7 +3440,7 @@ modulo-sched.o : modulo-sched.c $(DDG_H) $(CONFIG_H) $(CONFIG_H) $(SYSTEM_H) \
haifa-sched.o : haifa-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h $(FUNCTION_H) \
$(INSN_ATTR_H) $(DIAGNOSTIC_CORE_H) $(RECOG_H) $(EXCEPT_H) $(TM_P_H) $(TARGET_H) output.h \
$(PARAMS_H) $(DBGCNT_H) $(CFGLOOP_H) ira.h $(EMIT_RTL_H)
$(PARAMS_H) $(DBGCNT_H) $(CFGLOOP_H) ira.h $(EMIT_RTL_H) $(COMMON_TARGET_H)
sched-deps.o : sched-deps.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
$(FUNCTION_H) $(INSN_ATTR_H) $(DIAGNOSTIC_CORE_H) $(RECOG_H) $(EXCEPT_H) cselib.h \
......@@ -3510,7 +3514,7 @@ cfglayout.o : cfglayout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(TREE_H) insn-config.h $(BASIC_BLOCK_H) hard-reg-set.h output.h \
$(FUNCTION_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(TARGET_H) gt-cfglayout.h \
$(GGC_H) alloc-pool.h $(FLAGS_H) $(OBSTACK_H) $(TREE_PASS_H) vecprim.h \
$(DF_H) $(EMIT_RTL_H)
$(DF_H) $(EMIT_RTL_H) $(COMMON_TARGET_H)
timevar.o : timevar.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TIMEVAR_H) $(FLAGS_H) intl.h toplev.h $(DIAGNOSTIC_CORE_H) $(RTL_H) timevar.def
regcprop.o : regcprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
......@@ -3547,12 +3551,13 @@ $(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) \
output.h $(INSN_ATTR_H) $(SYSTEM_H) toplev.h $(DIAGNOSTIC_CORE_H) \
$(TARGET_H) $(LIBFUNCS_H) $(TARGET_DEF_H) $(FUNCTION_H) $(SCHED_INT_H) \
$(TM_P_H) $(EXPR_H) langhooks.h $(GGC_H) $(OPTABS_H) $(REAL_H) \
tm-constrs.h $(GIMPLE_H) $(DF_H) cselib.h
tm-constrs.h $(GIMPLE_H) $(DF_H) cselib.h $(COMMON_TARGET_H)
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
$(out_file) $(OUTPUT_OPTION)
$(common_out_object_file): $(common_out_file) $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(COMMON_TARGET_H) $(COMMON_TARGET_DEF_H) $(TM_H)
coretypes.h $(COMMON_TARGET_H) $(COMMON_TARGET_DEF_H) \
$(DIAGNOSTIC_CORE_H) $(FLAGS_H) $(OPTS_H) $(TM_H) $(TM_P_H) $(MACHMODE_H)
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
$< $(OUTPUT_OPTION)
......
2011-06-14 Joseph Myers <joseph@codesourcery.com>
* gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
(ada/utils.o): Update dependencies.
* gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
../../../libcpp/libcpp.a.
* gcc-interface/utils.c: Include common/common-target.h.
(process_attributes): Use targetm_common.have_named_sections.
2011-06-07 Richard Guenther <rguenther@suse.de>
* gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
......
......@@ -479,8 +479,8 @@ gnat1$(exeext): $(TARGET_ADA_SRCS) $(GNAT1_OBJS) $(ADA_BACKEND) libcommon-target
$(GCC_LINK) -o $@ $(GNAT1_OBJS) $(ADA_BACKEND) libcommon-target.a $(LIBS) $(SYSLIBS) $(BACKENDLIBS) $(CFLAGS)
$(RM) stamp-gnatlib2-rts stamp-tools
gnatbind$(exeext): ada/b_gnatb.o $(CONFIG_H) $(GNATBIND_OBJS) libcommon-target.a $(LIBDEPS)
$(GCC_LINK) -o $@ ada/b_gnatb.o $(GNATBIND_OBJS) libcommon-target.a $(LIBS) $(SYSLIBS) $(CFLAGS)
gnatbind$(exeext): ada/b_gnatb.o $(CONFIG_H) $(GNATBIND_OBJS) ggc-none.o libcommon-target.a $(LIBDEPS)
$(GCC_LINK) -o $@ ada/b_gnatb.o $(GNATBIND_OBJS) ggc-none.o libcommon-target.a $(LIBS) $(SYSLIBS) $(CFLAGS)
# use cross-gcc
gnat-cross: force
......@@ -1237,7 +1237,8 @@ ada/trans.o : ada/gcc-interface/trans.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
ada/utils.o : ada/gcc-interface/utils.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(FLAGS_H) toplev.h $(RTL_H) output.h debug.h convert.h \
$(TARGET_H) function.h langhooks.h $(CGRAPH_H) $(DIAGNOSTIC_H) \
$(TARGET_H) $(COMMON_TARGET_H) function.h langhooks.h \
$(CGRAPH_H) $(DIAGNOSTIC_H) \
$(TREE_DUMP_H) $(TREE_INLINE_H) tree-iterator.h \
ada/gcc-interface/ada.h ada/types.h ada/atree.h ada/elists.h ada/namet.h \
ada/nlists.h ada/stringt.h ada/uintp.h ada/fe.h ada/sinfo.h ada/einfo.h \
......
......@@ -180,7 +180,8 @@ LIBINTL_DEP = @LIBINTL_DEP@
SYSLIBS = @GNAT_LIBEXC@
# List of extra object files linked in with various programs.
EXTRA_GNATTOOLS_OBJS = ../../libcommon-target.a ../../libcommon.a
EXTRA_GNATTOOLS_OBJS = ../../libcommon-target.a ../../libcommon.a \
../../../libcpp/libcpp.a
# List extra gnattools
EXTRA_GNATTOOLS =
......
......@@ -36,6 +36,7 @@
#include "debug.h"
#include "convert.h"
#include "target.h"
#include "common/common-target.h"
#include "langhooks.h"
#include "cgraph.h"
#include "diagnostic.h"
......@@ -1720,7 +1721,7 @@ process_attributes (tree decl, struct attrib *attr_list)
break;
case ATTR_LINK_SECTION:
if (targetm.have_named_sections)
if (targetm_common.have_named_sections)
{
DECL_SECTION_NAME (decl)
= build_string (IDENTIFIER_LENGTH (attr_list->name),
......
2011-06-14 Joseph Myers <joseph@codesourcery.com>
* c-common.c: Include common/common-target.h.
(handle_section_attribute): Use
targetm_common.have_named_sections.
* c-cppbuiltin.c: Include common/common-target.h.
(c_cpp_builtins): Use targetm_common.except_unwind_info.
2011-06-10 Richard Guenther <rguenther@suse.de>
* c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
......
......@@ -35,6 +35,7 @@ along with GCC; see the file COPYING3. If not see
#include "obstack.h"
#include "cpplib.h"
#include "target.h"
#include "common/common-target.h"
#include "langhooks.h"
#include "tree-inline.h"
#include "toplev.h"
......@@ -6563,7 +6564,7 @@ handle_section_attribute (tree *node, tree ARG_UNUSED (name), tree args,
{
tree decl = *node;
if (targetm.have_named_sections)
if (targetm_common.have_named_sections)
{
user_defined_section_attribute = true;
......
......@@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. If not see
#include "debug.h" /* For dwarf2out_do_cfi_asm. */
#include "tm_p.h" /* For TARGET_CPU_CPP_BUILTINS & friends. */
#include "target.h"
#include "common/common-target.h"
#include "cpp-id-data.h"
#include "cppbuiltin.h"
......@@ -626,7 +627,7 @@ c_cpp_builtins (cpp_reader *pfile)
1000 + flag_abi_version);
/* libgcc needs to know this. */
if (targetm.except_unwind_info (&global_options) == UI_SJLJ)
if (targetm_common.except_unwind_info (&global_options) == UI_SJLJ)
cpp_define (pfile, "__USING_SJLJ_EXCEPTIONS__");
/* limits.h and stdint.h need to know these. */
......
......@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see
#include "cfglayout.h"
#include "cfgloop.h"
#include "target.h"
#include "common/common-target.h"
#include "ggc.h"
#include "alloc-pool.h"
#include "flags.h"
......@@ -912,7 +913,7 @@ fixup_reorder_chain (void)
section boundaries). */
BB_COPY_PARTITION (src_bb, single_pred (bb));
if (flag_reorder_blocks_and_partition
&& targetm.have_named_sections
&& targetm_common.have_named_sections
&& JUMP_P (BB_END (bb))
&& !any_condjump_p (BB_END (bb))
&& (EDGE_SUCC (bb, 0)->flags & EDGE_CROSSING))
......
/* Control flow graph manipulation code for GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -59,6 +59,7 @@ along with GCC; see the file COPYING3. If not see
#include "cfglayout.h"
#include "expr.h"
#include "target.h"
#include "common/common-target.h"
#include "cfgloop.h"
#include "ggc.h"
#include "tree-pass.h"
......@@ -1224,7 +1225,7 @@ force_nonfallthru_and_redirect (edge e, basic_block target)
BB_COPY_PARTITION (jump_block, e->src);
if (flag_reorder_blocks_and_partition
&& targetm.have_named_sections
&& targetm_common.have_named_sections
&& JUMP_P (BB_END (jump_block))
&& !any_condjump_p (BB_END (jump_block))
&& (EDGE_SUCC (jump_block, 0)->flags & EDGE_CROSSING))
......@@ -1524,7 +1525,7 @@ commit_one_edge_insertion (edge e)
after = BB_END (bb);
if (flag_reorder_blocks_and_partition
&& targetm.have_named_sections
&& targetm_common.have_named_sections
&& e->src != ENTRY_BLOCK_PTR
&& BB_PARTITION (e->src) == BB_COLD_PARTITION
&& !(e->flags & EDGE_CROSSING)
......
......@@ -16,5 +16,10 @@
along with this program; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#ifdef TARGET_ASM_NAMED_SECTION
#define TARGET_HAVE_NAMED_SECTIONS true
#endif
#include "common/common-target-hooks-def.h"
#include "hooks.h"
#include "common/common-targhooks.h"
......@@ -28,6 +28,66 @@ HOOK_VECTOR (TARGETM_COMMON_INITIALIZER, gcc_targetm_common)
#undef HOOK_PREFIX
#define HOOK_PREFIX "TARGET_"
/* Handle target switch DECODED for options structures OPTS and
OPTS_SET, at location LOC. Return true if the switch was valid. */
DEFHOOK
(handle_option,
"",
bool, (struct gcc_options *opts, struct gcc_options *opts_set,
const struct cl_decoded_option *decoded,
location_t loc),
default_target_handle_option)
DEFHOOK
(option_init_struct,
"Set target-dependent initial values of fields in @var{opts}.",
void, (struct gcc_options *opts),
hook_void_gcc_optionsp)
/* Set default optimizations for the target. */
DEFHOOKPOD
(option_optimization_table,
"",
const struct default_options *, empty_optimization_table)
/* The initial value of target_flags. */
DEFHOOKPOD
(default_target_flags,
"",
int, 0)
/* Determine the type of unwind info to emit for exceptions. */
DEFHOOK
(except_unwind_info,
"",
enum unwind_info_type, (struct gcc_options *opts),
default_except_unwind_info)
DEFHOOK
(supports_split_stack,
"Whether this target supports splitting the stack when the options\
described in @var{opts} have been passed. This is called\
after options have been parsed, so the target may reject splitting\
the stack in some configurations. The default version of this hook\
returns false. If @var{report} is true, this function may issue a warning\
or error; if @var{report} is false, it must simply return a value",
bool, (bool report, struct gcc_options *opts),
hook_bool_bool_gcc_optionsp_false)
/* Leave the boolean fields at the end. */
/* True if unwinding tables should be generated by default. */
DEFHOOKPOD
(unwind_tables_default,
"",
bool, false)
/* True if arbitrary sections are supported. */
DEFHOOKPOD
(have_named_sections,
"",
bool, false)
DEFHOOKPOD
(always_strip_dotdot,
"True if @file{..} components should always be removed from directory names\
......@@ -37,3 +97,5 @@ DEFHOOKPOD
bool, false)
HOOK_VECTOR_END (C90_EMPTY_HACK)
#undef HOOK_PREFIX
/* Data structure definitions for common hooks.
Copyright (C) 2011
Copyright (C) 2010, 2011
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
......@@ -23,6 +23,43 @@
#ifndef GCC_COMMON_TARGET_H
#define GCC_COMMON_TARGET_H
#include "input.h"
/* Sets of optimization levels at which an option may be enabled by
default_options_optimization. */
enum opt_levels
{
OPT_LEVELS_NONE, /* No levels (mark end of array). */
OPT_LEVELS_ALL, /* All levels (used by targets to disable options
enabled in target-independent code). */
OPT_LEVELS_0_ONLY, /* -O0 only. */
OPT_LEVELS_1_PLUS, /* -O1 and above, including -Os. */
OPT_LEVELS_1_PLUS_SPEED_ONLY, /* -O1 and above, but not -Os. */
OPT_LEVELS_2_PLUS, /* -O2 and above, including -Os. */
OPT_LEVELS_2_PLUS_SPEED_ONLY, /* -O2 and above, but not -Os. */
OPT_LEVELS_3_PLUS, /* -O3 and above. */
OPT_LEVELS_3_PLUS_AND_SIZE, /* -O3 and above and -Os. */
OPT_LEVELS_SIZE, /* -Os only. */
OPT_LEVELS_FAST /* -Ofast only. */
};
/* Description of options to enable by default at given levels. */
struct default_options
{
/* The levels at which to enable the option. */
enum opt_levels levels;
/* The option index and argument or enabled/disabled sense of the
option, as passed to handle_generated_option. If ARG is NULL and
the option allows a negative form, the option is considered to be
passed in negative form when the optimization level is not one of
those in LEVELS (in order to handle changes to the optimization
level with the "optimize" attribute). */
size_t opt_index;
const char *arg;
int value;
};
#define DEFHOOKPOD(NAME, DOC, TYPE, INIT) TYPE NAME;
#define DEFHOOK(NAME, DOC, TYPE, PARAMS, INIT) TYPE (* NAME) PARAMS;
#define DEFHOOK_UNDOC DEFHOOK
......
/* Default common target hook functions.
Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "input.h"
#include "tm.h"
#include "common/common-target.h"
#include "common/common-targhooks.h"
/* Determine the exception handling mechanism for the target. */
enum unwind_info_type
default_except_unwind_info (struct gcc_options *opts ATTRIBUTE_UNUSED)
{
/* Obey the configure switch to turn on sjlj exceptions. */
#ifdef CONFIG_SJLJ_EXCEPTIONS
if (CONFIG_SJLJ_EXCEPTIONS)
return UI_SJLJ;
#endif
/* ??? Change all users to the hook, then poison this. */
#ifdef DWARF2_UNWIND_INFO
if (DWARF2_UNWIND_INFO)
return UI_DWARF2;
#endif
return UI_SJLJ;
}
/* To be used by targets that force dwarf2 unwind enabled. */
enum unwind_info_type
dwarf2_except_unwind_info (struct gcc_options *opts ATTRIBUTE_UNUSED)
{
/* Obey the configure switch to turn on sjlj exceptions. */
#ifdef CONFIG_SJLJ_EXCEPTIONS
if (CONFIG_SJLJ_EXCEPTIONS)
return UI_SJLJ;
#endif
return UI_DWARF2;
}
/* To be used by targets that force sjlj unwind enabled. */
enum unwind_info_type
sjlj_except_unwind_info (struct gcc_options *opts ATTRIBUTE_UNUSED)
{
return UI_SJLJ;
}
/* Default version of TARGET_HANDLE_OPTION. */
bool
default_target_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED,
struct gcc_options *opts_set ATTRIBUTE_UNUSED,
const struct cl_decoded_option *decoded ATTRIBUTE_UNUSED,
location_t loc ATTRIBUTE_UNUSED)
{
return true;
}
const struct default_options empty_optimization_table[] =
{
{ OPT_LEVELS_NONE, 0, NULL, 0 }
};
/* Default common target hook functions.
Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#ifndef GCC_COMMON_TARGHOOKS_H
#define GCC_COMMON_TARGHOOKS_H
extern enum unwind_info_type default_except_unwind_info (struct gcc_options *);
extern enum unwind_info_type dwarf2_except_unwind_info (struct gcc_options *);
extern enum unwind_info_type sjlj_except_unwind_info (struct gcc_options *);
extern bool default_target_handle_option (struct gcc_options *,
struct gcc_options *,
const struct cl_decoded_option *,
location_t);
extern const struct default_options empty_optimization_table[];
#endif
/* Common hooks for DEC Alpha.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "diagnostic-core.h"
#include "tm.h"
#include "common/common-target.h"
#include "common/common-target-def.h"
#include "opts.h"
#include "flags.h"
/* Implement TARGET_OPTION_OPTIMIZATION_TABLE. */
static const struct default_options alpha_option_optimization_table[] =
{
{ OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
{ OPT_LEVELS_NONE, 0, NULL, 0 }
};
/* Implement TARGET_HANDLE_OPTION. */
static bool
alpha_handle_option (struct gcc_options *opts,
struct gcc_options *opts_set ATTRIBUTE_UNUSED,
const struct cl_decoded_option *decoded,
location_t loc)
{
size_t code = decoded->opt_index;
const char *arg = decoded->arg;
int value = decoded->value;
switch (code)
{
case OPT_mfp_regs:
if (value == 0)
opts->x_target_flags |= MASK_SOFT_FP;
break;
case OPT_mieee:
case OPT_mieee_with_inexact:
opts->x_target_flags |= MASK_IEEE_CONFORMANT;
break;
case OPT_mtls_size_:
if (value != 16 && value != 32 && value != 64)
error_at (loc, "bad value %qs for -mtls-size switch", arg);
break;
}
return true;
}
#undef TARGET_DEFAULT_TARGET_FLAGS
#define TARGET_DEFAULT_TARGET_FLAGS \
(TARGET_DEFAULT | TARGET_CPU_DEFAULT | TARGET_DEFAULT_EXPLICIT_RELOCS)
#undef TARGET_HANDLE_OPTION
#define TARGET_HANDLE_OPTION alpha_handle_option
#undef TARGET_OPTION_OPTIMIZATION_TABLE
#define TARGET_OPTION_OPTIMIZATION_TABLE alpha_option_optimization_table
struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
/* Common hooks for ARM.
Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 3, or (at your
option) any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tm_p.h"
#include "common/common-target.h"
#include "common/common-target-def.h"
#include "opts.h"
#include "flags.h"
/* Set default optimization options. */
static const struct default_options arm_option_optimization_table[] =
{
/* Enable section anchors by default at -O1 or higher. */
{ OPT_LEVELS_1_PLUS, OPT_fsection_anchors, NULL, 1 },
{ OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
{ OPT_LEVELS_NONE, 0, NULL, 0 }
};
/* Implement TARGET_EXCEPT_UNWIND_INFO. */
enum unwind_info_type
arm_except_unwind_info (struct gcc_options *opts)
{
/* Honor the --enable-sjlj-exceptions configure switch. */
#ifdef CONFIG_SJLJ_EXCEPTIONS
if (CONFIG_SJLJ_EXCEPTIONS)
return UI_SJLJ;
#endif
/* If not using ARM EABI unwind tables... */
if (ARM_UNWIND_INFO)
{
/* For simplicity elsewhere in this file, indicate that all unwind
info is disabled if we're not emitting unwind tables. */
if (!opts->x_flag_exceptions && !opts->x_flag_unwind_tables)
return UI_NONE;
else
return UI_TARGET;
}
/* ... we use sjlj exceptions for backwards compatibility. */
return UI_SJLJ;
}
#undef TARGET_DEFAULT_TARGET_FLAGS
#define TARGET_DEFAULT_TARGET_FLAGS (TARGET_DEFAULT | MASK_SCHED_PROLOG)
#undef TARGET_OPTION_OPTIMIZATION_TABLE
#define TARGET_OPTION_OPTIMIZATION_TABLE arm_option_optimization_table
#undef TARGET_EXCEPT_UNWIND_INFO
#define TARGET_EXCEPT_UNWIND_INFO arm_except_unwind_info
struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
/* Common hooks for ATMEL AVR.
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008,
2009, 2010, 2011 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "common/common-target.h"
#include "common/common-target-def.h"
/* Implement TARGET_OPTION_OPTIMIZATION_TABLE. */
static const struct default_options avr_option_optimization_table[] =
{
{ OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
{ OPT_LEVELS_NONE, 0, NULL, 0 }
};
#undef TARGET_OPTION_OPTIMIZATION_TABLE
#define TARGET_OPTION_OPTIMIZATION_TABLE avr_option_optimization_table
#undef TARGET_EXCEPT_UNWIND_INFO
#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info
struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
/* Common hooks for Blackfin.
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 3, or (at your
option) any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "diagnostic-core.h"
#include "tm.h"
#include "machmode.h"
#include "tm_p.h"
#include "common/common-target.h"
#include "common/common-target-def.h"
#include "opts.h"
#include "flags.h"
EXPORTED_CONST struct bfin_cpu bfin_cpus[] =
{
{"bf512", BFIN_CPU_BF512, 0x0002,
WA_SPECULATIVE_LOADS | WA_05000074},
{"bf512", BFIN_CPU_BF512, 0x0001,
WA_SPECULATIVE_LOADS | WA_05000074},
{"bf512", BFIN_CPU_BF512, 0x0000,
WA_SPECULATIVE_LOADS | WA_05000074},
{"bf514", BFIN_CPU_BF514, 0x0002,
WA_SPECULATIVE_LOADS | WA_05000074},
{"bf514", BFIN_CPU_BF514, 0x0001,
WA_SPECULATIVE_LOADS | WA_05000074},
{"bf514", BFIN_CPU_BF514, 0x0000,
WA_SPECULATIVE_LOADS | WA_05000074},
{"bf516", BFIN_CPU_BF516, 0x0002,
WA_SPECULATIVE_LOADS | WA_05000074},
{"bf516", BFIN_CPU_BF516, 0x0001,
WA_SPECULATIVE_LOADS | WA_05000074},
{"bf516", BFIN_CPU_BF516, 0x0000,
WA_SPECULATIVE_LOADS | WA_05000074},
{"bf518", BFIN_CPU_BF518, 0x0002,
WA_SPECULATIVE_LOADS | WA_05000074},
{"bf518", BFIN_CPU_BF518, 0x0001,
WA_SPECULATIVE_LOADS | WA_05000074},
{"bf518", BFIN_CPU_BF518, 0x0000,
WA_SPECULATIVE_LOADS | WA_05000074},
{"bf522", BFIN_CPU_BF522, 0x0002,
WA_SPECULATIVE_LOADS | WA_05000074},
{"bf522", BFIN_CPU_BF522, 0x0001,
WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf522", BFIN_CPU_BF522, 0x0000,
WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf523", BFIN_CPU_BF523, 0x0002,
WA_SPECULATIVE_LOADS | WA_05000074},
{"bf523", BFIN_CPU_BF523, 0x0001,
WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf523", BFIN_CPU_BF523, 0x0000,
WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf524", BFIN_CPU_BF524, 0x0002,
WA_SPECULATIVE_LOADS | WA_05000074},
{"bf524", BFIN_CPU_BF524, 0x0001,
WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf524", BFIN_CPU_BF524, 0x0000,
WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf525", BFIN_CPU_BF525, 0x0002,
WA_SPECULATIVE_LOADS | WA_05000074},
{"bf525", BFIN_CPU_BF525, 0x0001,
WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf525", BFIN_CPU_BF525, 0x0000,
WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf526", BFIN_CPU_BF526, 0x0002,
WA_SPECULATIVE_LOADS | WA_05000074},
{"bf526", BFIN_CPU_BF526, 0x0001,
WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf526", BFIN_CPU_BF526, 0x0000,
WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf527", BFIN_CPU_BF527, 0x0002,
WA_SPECULATIVE_LOADS | WA_05000074},
{"bf527", BFIN_CPU_BF527, 0x0001,
WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf527", BFIN_CPU_BF527, 0x0000,
WA_SPECULATIVE_LOADS | WA_RETS | WA_05000074},
{"bf531", BFIN_CPU_BF531, 0x0006,
WA_SPECULATIVE_LOADS | WA_LOAD_LCREGS | WA_05000074},
{"bf531", BFIN_CPU_BF531, 0x0005,
WA_SPECULATIVE_LOADS | WA_RETS | WA_05000283 | WA_05000315
| WA_LOAD_LCREGS | WA_05000074},
{"bf531", BFIN_CPU_BF531, 0x0004,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
| WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
| WA_05000074},
{"bf531", BFIN_CPU_BF531, 0x0003,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
| WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
| WA_05000074},
{"bf532", BFIN_CPU_BF532, 0x0006,
WA_SPECULATIVE_LOADS | WA_LOAD_LCREGS | WA_05000074},
{"bf532", BFIN_CPU_BF532, 0x0005,
WA_SPECULATIVE_LOADS | WA_RETS | WA_05000283 | WA_05000315
| WA_LOAD_LCREGS | WA_05000074},
{"bf532", BFIN_CPU_BF532, 0x0004,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
| WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
| WA_05000074},
{"bf532", BFIN_CPU_BF532, 0x0003,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
| WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
| WA_05000074},
{"bf533", BFIN_CPU_BF533, 0x0006,
WA_SPECULATIVE_LOADS | WA_LOAD_LCREGS | WA_05000074},
{"bf533", BFIN_CPU_BF533, 0x0005,
WA_SPECULATIVE_LOADS | WA_RETS | WA_05000283 | WA_05000315
| WA_LOAD_LCREGS | WA_05000074},
{"bf533", BFIN_CPU_BF533, 0x0004,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
| WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
| WA_05000074},
{"bf533", BFIN_CPU_BF533, 0x0003,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
| WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
| WA_05000074},
{"bf534", BFIN_CPU_BF534, 0x0003,
WA_SPECULATIVE_LOADS | WA_RETS | WA_LOAD_LCREGS | WA_05000074},
{"bf534", BFIN_CPU_BF534, 0x0002,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
| WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
| WA_05000074},
{"bf534", BFIN_CPU_BF534, 0x0001,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
| WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
| WA_05000074},
{"bf536", BFIN_CPU_BF536, 0x0003,
WA_SPECULATIVE_LOADS | WA_RETS | WA_LOAD_LCREGS | WA_05000074},
{"bf536", BFIN_CPU_BF536, 0x0002,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
| WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
| WA_05000074},
{"bf536", BFIN_CPU_BF536, 0x0001,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
| WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
| WA_05000074},
{"bf537", BFIN_CPU_BF537, 0x0003,
WA_SPECULATIVE_LOADS | WA_RETS | WA_LOAD_LCREGS | WA_05000074},
{"bf537", BFIN_CPU_BF537, 0x0002,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
| WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
| WA_05000074},
{"bf537", BFIN_CPU_BF537, 0x0001,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
| WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
| WA_05000074},
{"bf538", BFIN_CPU_BF538, 0x0005,
WA_SPECULATIVE_LOADS | WA_LOAD_LCREGS | WA_05000074},
{"bf538", BFIN_CPU_BF538, 0x0004,
WA_SPECULATIVE_LOADS | WA_RETS | WA_LOAD_LCREGS | WA_05000074},
{"bf538", BFIN_CPU_BF538, 0x0003,
WA_SPECULATIVE_LOADS | WA_RETS
| WA_05000283 | WA_05000315 | WA_LOAD_LCREGS | WA_05000074},
{"bf538", BFIN_CPU_BF538, 0x0002,
WA_SPECULATIVE_LOADS | WA_RETS
| WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
| WA_05000074},
{"bf539", BFIN_CPU_BF539, 0x0005,
WA_SPECULATIVE_LOADS | WA_LOAD_LCREGS | WA_05000074},
{"bf539", BFIN_CPU_BF539, 0x0004,
WA_SPECULATIVE_LOADS | WA_RETS | WA_LOAD_LCREGS | WA_05000074},
{"bf539", BFIN_CPU_BF539, 0x0003,
WA_SPECULATIVE_LOADS | WA_RETS
| WA_05000283 | WA_05000315 | WA_LOAD_LCREGS | WA_05000074},
{"bf539", BFIN_CPU_BF539, 0x0002,
WA_SPECULATIVE_LOADS | WA_RETS
| WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
| WA_05000074},
{"bf542m", BFIN_CPU_BF542M, 0x0003,
WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf542", BFIN_CPU_BF542, 0x0004,
WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf542", BFIN_CPU_BF542, 0x0002,
WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf542", BFIN_CPU_BF542, 0x0001,
WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_05000074},
{"bf542", BFIN_CPU_BF542, 0x0000,
WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_LOAD_LCREGS
| WA_05000074},
{"bf544m", BFIN_CPU_BF544M, 0x0003,
WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf544", BFIN_CPU_BF544, 0x0004,
WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf544", BFIN_CPU_BF544, 0x0002,
WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf544", BFIN_CPU_BF544, 0x0001,
WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_05000074},
{"bf544", BFIN_CPU_BF544, 0x0000,
WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_LOAD_LCREGS
| WA_05000074},
{"bf547m", BFIN_CPU_BF547M, 0x0003,
WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf547", BFIN_CPU_BF547, 0x0004,
WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf547", BFIN_CPU_BF547, 0x0002,
WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf547", BFIN_CPU_BF547, 0x0001,
WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_05000074},
{"bf547", BFIN_CPU_BF547, 0x0000,
WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_LOAD_LCREGS
| WA_05000074},
{"bf548m", BFIN_CPU_BF548M, 0x0003,
WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf548", BFIN_CPU_BF548, 0x0004,
WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf548", BFIN_CPU_BF548, 0x0002,
WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf548", BFIN_CPU_BF548, 0x0001,
WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_05000074},
{"bf548", BFIN_CPU_BF548, 0x0000,
WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_LOAD_LCREGS
| WA_05000074},
{"bf549m", BFIN_CPU_BF549M, 0x0003,
WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf549", BFIN_CPU_BF549, 0x0004,
WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf549", BFIN_CPU_BF549, 0x0002,
WA_SPECULATIVE_LOADS | WA_INDIRECT_CALLS | WA_05000074},
{"bf549", BFIN_CPU_BF549, 0x0001,
WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_05000074},
{"bf549", BFIN_CPU_BF549, 0x0000,
WA_SPECULATIVE_LOADS | WA_RETS | WA_INDIRECT_CALLS | WA_LOAD_LCREGS
| WA_05000074},
{"bf561", BFIN_CPU_BF561, 0x0005, WA_RETS
| WA_05000283 | WA_05000315 | WA_LOAD_LCREGS | WA_05000074},
{"bf561", BFIN_CPU_BF561, 0x0003,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
| WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
| WA_05000074},
{"bf561", BFIN_CPU_BF561, 0x0002,
WA_SPECULATIVE_LOADS | WA_SPECULATIVE_SYNCS | WA_RETS
| WA_05000283 | WA_05000257 | WA_05000315 | WA_LOAD_LCREGS
| WA_05000074},
{"bf592", BFIN_CPU_BF592, 0x0001,
WA_SPECULATIVE_LOADS | WA_05000074},
{"bf592", BFIN_CPU_BF592, 0x0000,
WA_SPECULATIVE_LOADS | WA_05000074},
{NULL, BFIN_CPU_UNKNOWN, 0, 0}
};
/* Implement TARGET_HANDLE_OPTION. */
static bool
bfin_handle_option (struct gcc_options *opts,
struct gcc_options *opts_set ATTRIBUTE_UNUSED,
const struct cl_decoded_option *decoded,
location_t loc)
{
size_t code = decoded->opt_index;
const char *arg = decoded->arg;
int value = decoded->value;
switch (code)
{
case OPT_mshared_library_id_:
if (value > MAX_LIBRARY_ID)
error_at (loc, "-mshared-library-id=%s is not between 0 and %d",
arg, MAX_LIBRARY_ID);
return true;
case OPT_mcpu_:
{
const char *p, *q;
int i;
i = 0;
while ((p = bfin_cpus[i].name) != NULL)
{
if (strncmp (arg, p, strlen (p)) == 0)
break;
i++;
}
if (p == NULL)
{
error_at (loc, "-mcpu=%s is not valid", arg);
return false;
}
opts->x_bfin_cpu_type = bfin_cpus[i].type;
q = arg + strlen (p);
if (*q == '\0')
{
opts->x_bfin_si_revision = bfin_cpus[i].si_revision;
opts->x_bfin_workarounds |= bfin_cpus[i].workarounds;
}
else if (strcmp (q, "-none") == 0)
opts->x_bfin_si_revision = -1;
else if (strcmp (q, "-any") == 0)
{
opts->x_bfin_si_revision = 0xffff;
while (bfin_cpus[i].type == opts->x_bfin_cpu_type)
{
opts->x_bfin_workarounds |= bfin_cpus[i].workarounds;
i++;
}
}
else
{
unsigned int si_major, si_minor;
int rev_len, n;
rev_len = strlen (q);
if (sscanf (q, "-%u.%u%n", &si_major, &si_minor, &n) != 2
|| n != rev_len
|| si_major > 0xff || si_minor > 0xff)
{
invalid_silicon_revision:
error_at (loc, "-mcpu=%s has invalid silicon revision", arg);
return false;
}
opts->x_bfin_si_revision = (si_major << 8) | si_minor;
while (bfin_cpus[i].type == opts->x_bfin_cpu_type
&& bfin_cpus[i].si_revision != opts->x_bfin_si_revision)
i++;
if (bfin_cpus[i].type != opts->x_bfin_cpu_type)
goto invalid_silicon_revision;
opts->x_bfin_workarounds |= bfin_cpus[i].workarounds;
}
return true;
}
default:
return true;
}
}
#undef TARGET_HANDLE_OPTION
#define TARGET_HANDLE_OPTION bfin_handle_option
#undef TARGET_DEFAULT_TARGET_FLAGS
#define TARGET_DEFAULT_TARGET_FLAGS TARGET_DEFAULT
struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment