summaryrefslogtreecommitdiffstats
path: root/gcc/hooks.h
Commit message (Collapse)AuthorAgeFilesLines
...
* * target.h (gcc_target): Add cannot_force_const_mem.rth2002-12-091-0/+1
| | | | | | | | | | | | | | | | | | | * target-def.h (TARGET_CANNOT_FORCE_CONST_MEM): New. (TARGET_INITIALIZER): Add it. * varasm.c (force_const_mem): Fail if cannot_force_const_mem. * expr.c (emit_move_insn): Be prepared for force_const_mem to fail. * reload1.c (reload): Likewise. * hooks.c (hook_bool_rtx_false): New. * hooks.h: Declare it. * config/i386/i386.c (ix86_cannot_force_const_mem): New. (TARGET_CANNOT_FORCE_CONST_MEM): New. (ix86_expand_move): Remove de-const-pooling hack. * gcc.dg/tls/opt-4.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59971 138bc75d-0d04-0410-961f-82ee72b054a4
* * hooks.c (hook_bool_void_false, hook_void_tree_int,rth2002-11-271-5/+10
| | | | | | | | | | | | | | | | | | hook_void_FILEptr_constcharptr): Rename so that the return type is first. (hook_int_tree_tree_1, hook_void_tree, hook_void_tree_treeptr, hook_bool_tree_false): New. * hooks.h: Update. * langhooks-def.h: Update for renames. * target-def.h: Likewise. * tree.c (default_comp_type_attributes, default_set_default_type_attributes, default_insert_attributes, default_function_attribute_inlinable_p, default_ms_bitfield_layout_p): Remove. * tree.h: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59556 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/rth2002-10-221-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * target.h (gcc_target.asm_out): Merge output_mi_thunk and output_mi_vcall_thunk into a single hook. Add can_output_mi_thunk. * target-def.h (TARGET_ASM_OUTPUT_MI_THUNK): Don't conditionalize. (TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Remove. (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. (TARGET_ASM_OUT): Update. * hooks.c (hook_bool_tree_hwi_hwi_tree_false): New. (hook_bool_tree_hwi_hwi_tree_true): New. (default_can_output_mi_thunk_no_vcall): New. * hooks.h: Declare them. * system.h (ASM_OUTPUT_MI_THUNK): Poison. * config/alpha/alpha.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. (alpha_output_mi_thunk_osf): Add VCALL_OFFSET parameter. * config/arm/arm.c, config/cris/cris.c, config/frv/frv.c, config/i960/i960.c, config/ia64/ia64.c, config/m68k/m68k.c, config/mmix/mmix.c, config/pa/pa.c, config/sparc/sparc.c, config/stormy16/stormy16.c: Similarly. * config/i386/i386.c (x86_output_mi_thunk): Merge vcall_offset code. Handle 64-bit properly. Streamline. (x86_output_mi_vcall_thunk): Remove. (x86_this_parameter): Rename from ia32_this_parameter; handle 64-bit. (x86_can_output_mi_thunk): New. (TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Remove. (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. (override_options): Don't zap targetm.asm_out.output_mi_vcall_thunk. * config/rs6000/rs6000.c (rs6000_output_mi_thunk): Rename from output_mi_thunk; make static; always use function_section. (TARGET_ASM_OUTPUT_MI_THUNK): New. (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. (rs6000_ra_ever_killed): Test no_new_pseudos not targetm.asm_out.output_mi_thunk in conjunction with thunks. * config/rs6000/rs6000-protos.h: Update. * config/rs6000/sysv4.h (TARGET_ASM_OUTPUT_MI_THUNK): Remove. * config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Don't call xcoffout_declare_function when using rs6000_output_mi_thunk. * config/s390/s390.c (s390_output_mi_thunk): Rename from s390_output_mi_vcall_thunk. (TARGET_ASM_OUTPUT_MI_THUNK): Remove. (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. * config/vax/vax.c (vax_output_mi_thunk): Static; add vcall_offset. (TARGET_ASM_OUTPUT_MI_THUNK, TARGET_ASM_CAN_OUTPUT_MI_THUNK): New. * config/vax/vax-protos.h: Update. * config/vax/vax.h (ASM_OUTPUT_MI_THUNK): Remove. gcc/cp/ * method.c (use_thunk): Always compute vcall_value; assert that it is not zero. Use can_output_mi_thunk; use output_mi_thunk for vcall thunks as well. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58424 138bc75d-0d04-0410-961f-82ee72b054a4
* * alpha.c (TARGET_ASM_GLOBALIZE_LABEL): Define for unicosmk.ghazi2002-08-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * alpha/elf.h (ASM_OUTPUT_EXTERNAL_LIBCALL, ASM_OUTPUT_ALIGNED_BSS): Use target hook. * alpha/osf.h (ASM_OUTPUT_WEAK_ALIAS): Likewise. * alpha/unicosmk.h (ASM_GLOBALIZE_LABEL): Delete. * arm/aof.h (ASM_GLOBALIZE_LABEL): Likewise. (GLOBAL_ASM_OP): Define. * arm.c (aof_globalize_label): New function. (TARGET_ASM_GLOBALIZE_LABEL): Define for AOF. * arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS): Use target hook. * c4x.c (c4x_globalize_label): New function. (TARGET_ASM_GLOBALIZE_LABEL): Define for c4x. * c4x.h (ASM_GLOBALIZE_LABEL): Delete. (GLOBAL_ASM_OP): Define. * cris/aout.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Use target hook. * darwin-protos.h (darwin_globalize_label): Declare. * darwin.c (darwin_globalize_label): New function. * darwin.h (ASM_DECLARE_CLASS_REFERENCE): Use target hook. (ASM_GLOBALIZE_LABEL): Delete. (GLOBAL_ASM_OP, TARGET_ASM_GLOBALIZE_LABEL): Define. * dsp16xx.c (asm_output_common): Use target hook. * elfos.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Likewise. * frv.h (ASM_GLOBALIZE_LABEL): Delete. (GLOBAL_ASM_OP): Define. * i370.c (i370_globalize_label): New function. (TARGET_ASM_GLOBALIZE_LABEL): Define for i370. * i370.h (ASM_GLOBALIZE_LABEL): Delete. * i386.c (ix86_asm_file_end): Use target hook. * i386/sco5.h (ASM_GLOBALIZE_LABEL): Don't undef. (ASM_OUTPUT_EXTERNAL_LIBCALL): Use target hook. * ia64.c (ia64_asm_output_external): Likewise. * ia64/sysv4.h: Update comment. * m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use target hook. * mips/elf.h (ASM_OUTPUT_ALIGNED_BSS): Likewise. * mips/iris5.h (ASM_OUTPUT_WEAK_ALIAS): Use target hook. * mips/linux.h (ASM_OUTPUT_ALIGNED_BSS): Likewise. * mips.h (ASM_OUTPUT_ALIGNED_DECL_COMMON): Use target hook. * mmix-protos.h (mmix_asm_globalize_label): Delete. * mmix.c (mmix_asm_globalize_label): Likewise. * mmix.h (ASM_GLOBALIZE_LABEL): Likewise. (GLOBAL_ASM_OP): Define. * ns32k.c (ns32k_globalize_label): New function. * ns32k.h (TARGET_ASM_GLOBALIZE_LABEL): Define for ns32k. (ASM_GLOBALIZE_LABEL): Delete. * pa/pa-linux.h (ASM_GLOBALIZE_LABEL): Don't undef. (TARGET_ASM_GLOBALIZE_LABEL): Undefine. * pa.c (pa_globalize_label): New function. * pa.h (ASM_GLOBALIZE_LABEL): Delete. (TARGET_ASM_GLOBALIZE_LABEL): Define for pa. * rs6000/darwin.h (ASM_GLOBALIZE_LABEL): Delete. (GLOBAL_ASM_OP): Define. (TARGET_ASM_GLOBALIZE_LABEL): Undef. * rs6000/sysv4.h (ASM_OUTPUT_ALIGNED_BSS): Use target hook. * rs6000/xcoff.h (ASM_GLOBALIZE_LABEL): Delete. (GLOBAL_ASM_OP): Define. * v850.c (v850_output_aligned_bss): Use target hook. * vax.c (vms_globalize_label): New function. (TARGET_ASM_GLOBALIZE_LABEL): Define for vms. * vax/vms.h (ASM_GLOBALIZE_LABEL): Delete. (GLOBAL_ASM_OP): Define. * defaults.h (ASM_GLOBALIZE_LABEL): Delete. * doc/tm.texi: Update docs. * dwarf2out.c (default_eh_frame_section, output_die_symbol): Use target hook. * final.c (output_alternate_entry_point): Likewise. * hooks.c (hook_FILEptr_constcharptr_void): New function. * hooks.h (hook_FILEptr_constcharptr_void): Declare. * output.h (assemble_global): Delete. (default_globalize_label): Declare. * system.h (ASM_GLOBALIZE_LABEL): Poison. * target-def.h (TARGET_ASM_GLOBALIZE_LABEL): Define. (TARGET_ASM_OUT): Add TARGET_ASM_GLOBALIZE_LABEL. * target.h (gcc_target): Add globalize_label member. * varasm.c (asm_output_bss, asm_output_aligned_bss, globalize_decl): Use target hook. (assemble_global): Delete. (default_globalize_label): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56478 138bc75d-0d04-0410-961f-82ee72b054a4
* PR preprocessor/6517neil2002-05-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | * Makefile.in: Update. * c-common.c (c_common_post_options): Add preprocessor errors to the error count. * c-lang.c (c_post_options): Kill. (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. * hooks.h: Add header guards. * langhooks-def.h: Include hooks.h. (LANG_HOOKS_POST_OPTIONS): Update. * langhooks.h (struct lang_hooks): Update post_options. * toplev.c (parse_options_and_default_flags): Update. cp: * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. * cp-tree.h (cxx_post_options): Kill. * cp-lex.c (cxx_post_options): Kill. objc: * objc-lang.c (objc_post_options): Kill. (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53724 138bc75d-0d04-0410-961f-82ee72b054a4
* * system.h (ENCODE_SECTION_INFO): Poison it.rth2002-05-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * target-def.h (TARGET_ENCODE_SECTION_INFO): New. * target.h (encode_section_info): New. * varasm.c (make_decl_rtl, output_constant_def): Use it. * hooks.c (hook_tree_int_void): New. * hooks.h: Declare it. * config/darwin.h, config/alpha/alpha-protos.h, config/alpha/alpha.c, config/alpha/alpha.h, config/arm/pe.h, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.h, config/i386/cygwin.h, config/i386/win32.h, config/ia64/ia64-protos.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h, config/mcore/mcore-protos.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mmix/mmix-protos.h, config/mmix/mmix.c, config/mmix/mmix.h, config/rs6000/rs6000-protos.h, config/rs6000/sysv4.h, config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h: Replace ENCODE_SECTION_INFO with TARGET_ENCODE_SECTION_INFO referencing existing function. Make function static. * config/a29k/a29k.c, config/a29k/a29k.h, config/arc/arc.c, config/arc/arc.h, config/arm/arm.c, config/arm/arm.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386-interix.h, config/i386/i386.c, config/i386/i386.h, config/i386/interix.c, config/m88k/m88k.c, config/m88k/m88k.h, config/mips/mips.c, config/mips/mips.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/linux64.h, config/rs6000/xcoff.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c, config/v850/v850.h, config/vax/vax.c, config/vax/vms.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h: Move ENCODE_SECTION_INFO to out-of-line function and add TARGET_ENCODE_SECTION_INFO. * config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use hook, not macro. (ASM_DECLARE_OBJECT_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise. * config/arm/pe.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Rename from SUBTARGET_* (switch_to_section): Replace in_rdata case with in_readonly_data. * config/h8300/h8300.c (h8300_encode_label): Make static. * config/h8300/h8300-protos.h: Update. * config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Rename from rs6000_encode_section_info; make static. (rs6000_xcoff_encode_section_info): New. * config/v850/v850.c (v850_encode_data_area): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.c: Include flags.h. (vms_select_section): Fix typo. * doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update from previous ENCODE_SECTION_INFO docs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53606 138bc75d-0d04-0410-961f-82ee72b054a4
* * hooks.c (hook_tree_bool_false): New.rth2002-05-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * hooks.h: Declare it. * target-def.h (TARGET_ASM_SELECT_SECTION): New. (TARGET_ASM_UNIQUE_SECTION, TARGET_IN_SMALL_DATA_P): New. * target.h (select_section, unique_section): New. (in_small_data_p): New. * varasm.c (resolve_unique_section): Use hooks instead of macros. (variable_section, output_constant_def_contents): Likewise. (default_select_section, default_unique_section): New. (categorize_decl_for_section, default_elf_select_section): New. * output.h: Declare them. * config/darwin.h (ALIAS_SECTION, try_section_alias): Remove. (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/darwin.c (machopic_select_section): ... here. * config/darwin-protos.h: Update. * config/nextstep.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/nextstep.c (nextstep_select_section): ... here. * config/nextstep-protos.h: Update. * config/elfos.h (UNIQUE_SECTION, SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/svr3.h (SELECT_SECTION): Remove. * config/alpha/alpha.c (unicosmk_unique_section): Make static. (TARGET_ASM_UNIQUE_SECTION) [UNICOS]: New. (TARGET_IN_SMALL_DATA_P, alpha_in_small_data_p): New. (alpha_encode_section_info): Use it. * config/alpha/alpha-protos.h: Update. * config/alpha/elf.h (DO_SELECT_SECTION): Remove. (SELECT_SECTION, UNIQUE_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/alpha/unicosmk.h (UNIQUE_SECTION): Remove. * config/arm/pe.h (UNIQUE_SECTION): Remove. (TARGET_ASM_UNIQUE_SECTION): New. * config/avr/avr.c (TARGET_ASM_UNIQUE_SECTION): New. (avr_unique_section): Rename from unique_section; make static. * config/avr/avr-protos.h: Update. * config/avr/avr.h (UNIQUE_SECTION): Remove. * config/c4x/c4x.h (SELECT_SECTION): Remove. * config/i386/cygwin.h (UNIQUE_SECTION): Remove. (TARGET_ASM_UNIQUE_SECTION): New. * config/i386/i386-interix.h: Likewise. * config/i386/win32.h: Likewise. * config/i386/djgpp.h (UNIQUE_SECTION): Remove. * config/i386/i386.c (ix86_asm_file_end): Use target hook not macro. * config/i386/sco5.h (SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/i386/svr3gas.h (SELECT_SECTION): Remove. * config/i860/paragon.h: Undef TARGET_ASM_SELECT_SECTION instead of SELECT_SECTION. * config/m68k/dpx2.h: Likewise. * config/rs6000/lynx.h: Likewise. * config/ia64/aix.h (SELECT_SECTION, UNIQUE_SECTION): Remove. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New. * config/ia64/ia64.c (TARGET_IN_SMALL_DATA_P): New. (ia64_in_small_data_p): New. (ia64_encode_section_info): Use it. Reorganize overlarge conditional. (ia64_aix_select_section, ia64_aix_unique_section): New. * config/ia64/sysv4.h (DO_SELECT_SECTION): Remove. (SELECT_SECTION, UNIQUE_SECTION): Remove. * config/m32r/m32r.h (SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/m32r/m32r.c (m32r_select_section): Take align argument. * config/m32r/m32r-protos.h: Update. * config/m88k/m88k.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/m88k/m88k.c (m88k_select_section): ... here. * config/mcore/mcore-pe.h (SELECT_SECTION): Remove. * config/mcore/mcore.h (UNIQUE_SECTION): Remove. * config/mcore/mcore.c (TARGET_ASM_UNIQUE_SECTION): New. (mcore_unique_section): Make static. * config/mcore/mcore-protos.h: Update. * config/mips/elf.h (UNIQUE_SECTION): Remove. (TARGET_ASM_UNIQUE_SECTION): New. * config/mips/elf64.h: Likewise. * config/mips/iris6gld.h: Likewise. * config/mips/linux.h: Likewise. * config/mips/mips-protos.h: Update. * config/mips/mips.c (mips_select_section): Add align argument. * config/mips/mips.h (SELECT_SECTION): Remove. (TARGET_ASM_SELECT_SECTION): New. * config/mmix/mmix.h (SELECT_SECTION, UNIQUE_SECTION): Remove. * config/mmix/mmix.c (mmix_select_section): Remove. (mmix_unique_section): Remove. * config/mmix/mmix-protos.h: Update. * config/pa/pa.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/pa/pa.c (pa_select_section): ... here. * config/pa/pa64-hpux.h (UNIQUE_SECTION): Remove. * config/rs6000/rs6000.c (rs6000_elf_select_section): Rename from rs6000_select_section and make static. (rs6000_elf_unique_section): Similarly. (rs6000_xcoff_select_section): From xcoff.h. (rs6000_xcoff_unique_section): Likewise. * config/rs6000/rs6000-protos.h: Update. * config/rs6000/sysv4.h (SELECT_SECTION, UNIQUE_SECTION): Remove. (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New. * config/rs6000/xcoff.h: Likewise. * config/sparc/aout.h (TARGET_ASM_SELECT_SECTION): New. (SELECT_SECTION): Move ... * config/sparc/sparc.c (sparc_aout_select_section): ... here. * config/v850/v850.h (SELECT_SECTION): Move ... * config/v850/v850.c (v850_select_section): ... here. (TARGET_ASM_SELECT_SECTION): New. * config/vax/vms.h (SELECT_SECTION): Move ... * config/vax/vax.c (vms_select_section): ... here. (TARGET_ASM_SELECT_SECTION): New. * doc/tm.texi: Update SELECT_SECTION and UNIQUE_SECTION docs for the target hooks. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53550 138bc75d-0d04-0410-961f-82ee72b054a4
* * hooks.c: New file.aoliva2002-02-091-0/+22
* hooks.h: New file. * Makefile.in (HOOKS_H): New. (TARGET_DEF_H): Added $(HOOKS_H). (OBJS): Added hooks.o. (cfgcleanup.o, bb-reorder.o): Added target.h. (hooks.o): Added dependencies. * target-def.h (TARGET_CANNOT_MODIFY_JUMPS_P): New, added to... (TARGET_INITIALIZER): this. * doc/tm.texi (TARGET_CANNOT_MODIFY_JUMPS_P): Document. * target.h (struct gcc_target): Added cannot_modify_jumps_p. * bb-reorder.c: Include target.h. (reorder_basic_blocks): Skip if cannot modify jumps. * cfgcleanup.c: Include target.h. (try_optimize_cfg): Skip merge blocking if cannot modify jumps. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49627 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud