aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ"orn Rennecke <joern.rennecke@arc.com>2010-01-31 02:07:31 +0000
committerJ"orn Rennecke <joern.rennecke@arc.com>2010-01-31 02:07:31 +0000
commitbb4d3f4d705eaca594fada303829c51cc61d6407 (patch)
treee5cb25e90bb3ddef712f983e2618604239a81a3c
parent4d944c35dc5c903d99a3c6cbd09534c2c2cb2251 (diff)
Merge in multi-target patches from r147373.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/milepost-20100130-branch@156393 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/ChangeLog.multi-target169
-rw-r--r--gcc/Makefile.in646
-rw-r--r--gcc/README-multi-target36
-rw-r--r--gcc/TDEP-SOURCES123
-rw-r--r--gcc/addresses.h4
-rw-r--r--gcc/alias.c5
-rw-r--r--gcc/alias.h5
-rw-r--r--gcc/auto-inc-dec.c5
-rw-r--r--gcc/basic-block.h120
-rw-r--r--gcc/bb-reorder.c5
-rw-r--r--gcc/bt-load.c8
-rw-r--r--gcc/builtins.c5
-rw-r--r--gcc/c-common.c24
-rw-r--r--gcc/caller-save.c5
-rw-r--r--gcc/calls.c9
-rw-r--r--gcc/cfg.c5
-rw-r--r--gcc/cfganal.c5
-rw-r--r--gcc/cfgbuild.c5
-rw-r--r--gcc/cfgcleanup.c5
-rw-r--r--gcc/cfgexpand.c16
-rw-r--r--gcc/cfghooks.c16
-rw-r--r--gcc/cfghooks.h8
-rw-r--r--gcc/cfglayout.c5
-rw-r--r--gcc/cfglayout.h8
-rw-r--r--gcc/cfgloop.h17
-rw-r--r--gcc/cfgloopanal.c4
-rw-r--r--gcc/cfgrtl.c5
-rw-r--r--gcc/combine-stack-adj.c5
-rw-r--r--gcc/combine.c5
-rw-r--r--gcc/common.opt26
-rw-r--r--gcc/config/sh/sh-protos.h9
-rw-r--r--gcc/config/sh/sh.c32
-rw-r--r--gcc/config/sh/sh.h22
-rwxr-xr-xgcc/configure6
-rw-r--r--gcc/configure.ac1
-rw-r--r--gcc/coverage.c4
-rw-r--r--gcc/cse.c5
-rw-r--r--gcc/cselib.c5
-rw-r--r--gcc/cselib.h8
-rw-r--r--gcc/dbxout.c5
-rw-r--r--gcc/dbxout.h6
-rw-r--r--gcc/dce.c5
-rw-r--r--gcc/ddg.c5
-rw-r--r--gcc/ddg.h8
-rw-r--r--gcc/df-byte-scan.c4
-rw-r--r--gcc/df-core.c5
-rw-r--r--gcc/df-problems.c6
-rw-r--r--gcc/df-scan.c5
-rw-r--r--gcc/df.h7
-rw-r--r--gcc/doc/extend.texi9
-rw-r--r--gcc/dojump.c5
-rw-r--r--gcc/dse.c4
-rw-r--r--gcc/dwarf2asm.c5
-rw-r--r--gcc/dwarf2asm.h7
-rw-r--r--gcc/dwarf2out.c30
-rw-r--r--gcc/emit-rtl.c39
-rw-r--r--gcc/except.c9
-rw-r--r--gcc/except.h6
-rw-r--r--gcc/explow.c9
-rw-r--r--gcc/expmed.c5
-rw-r--r--gcc/expr.c17
-rw-r--r--gcc/expr.h52
-rw-r--r--gcc/final.c5
-rw-r--r--gcc/fixed-value.h3
-rw-r--r--gcc/flags.h3
-rw-r--r--gcc/function.c52
-rw-r--r--gcc/function.h17
-rw-r--r--gcc/fwprop.c4
-rw-r--r--gcc/gcse.c5
-rw-r--r--gcc/genattr.c11
-rw-r--r--gcc/genattrtab.c7
-rw-r--r--gcc/genautomata.c6
-rw-r--r--gcc/genemit.c6
-rw-r--r--gcc/genextract.c5
-rw-r--r--gcc/genflags.c5
-rw-r--r--gcc/gengtype.c13
-rw-r--r--gcc/genmodes.c202
-rw-r--r--gcc/genopinit.c7
-rw-r--r--gcc/genoutput.c7
-rw-r--r--gcc/genpeep.c7
-rw-r--r--gcc/genpreds.c25
-rw-r--r--gcc/genrecog.c6
-rw-r--r--gcc/ggc.h11
-rw-r--r--gcc/gimple.h6
-rw-r--r--gcc/graph.c5
-rw-r--r--gcc/haifa-sched.c5
-rw-r--r--gcc/hard-reg-set.h6
-rw-r--r--gcc/ifcvt.c4
-rw-r--r--gcc/init-regs.c5
-rw-r--r--gcc/insn-addr.h5
-rw-r--r--gcc/integrate.c5
-rw-r--r--gcc/ira-build.c5
-rw-r--r--gcc/ira-color.c5
-rw-r--r--gcc/ira-conflicts.c4
-rw-r--r--gcc/ira-costs.c9
-rw-r--r--gcc/ira-emit.c5
-rw-r--r--gcc/ira-int.h5
-rw-r--r--gcc/ira-lives.c5
-rw-r--r--gcc/ira.c10
-rw-r--r--gcc/ira.h6
-rw-r--r--gcc/jump.c5
-rw-r--r--gcc/loop-doloop.c4
-rw-r--r--gcc/loop-init.c4
-rw-r--r--gcc/loop-invariant.c5
-rw-r--r--gcc/loop-iv.c5
-rw-r--r--gcc/loop-unroll.c5
-rw-r--r--gcc/loop-unswitch.c5
-rw-r--r--gcc/lower-subreg.c5
-rw-r--r--gcc/machmode.def6
-rw-r--r--gcc/machmode.h5
-rw-r--r--gcc/mkconfig.sh15
-rw-r--r--gcc/mode-switching.c5
-rw-r--r--gcc/modulo-sched.c4
-rw-r--r--gcc/multi-target.h66
-rw-r--r--gcc/optabs.c5
-rw-r--r--gcc/optabs.h7
-rw-r--r--gcc/optc-gen.awk5
-rw-r--r--gcc/opth-gen.awk22
-rw-r--r--gcc/opts.c48
-rw-r--r--gcc/output.h16
-rw-r--r--gcc/passes.c24
-rw-r--r--gcc/postreload-gcse.c5
-rw-r--r--gcc/postreload.c5
-rw-r--r--gcc/predict.c5
-rw-r--r--gcc/predict.h4
-rw-r--r--gcc/print-rtl.c5
-rw-r--r--gcc/recog.c5
-rw-r--r--gcc/recog.h6
-rw-r--r--gcc/reg-stack.c5
-rw-r--r--gcc/reginfo.c7
-rw-r--r--gcc/regmove.c5
-rw-r--r--gcc/regrename.c4
-rw-r--r--gcc/regs.h7
-rw-r--r--gcc/regstat.c3
-rw-r--r--gcc/reload.c12
-rw-r--r--gcc/reload.h10
-rw-r--r--gcc/reload1.c17
-rw-r--r--gcc/reorg.c5
-rw-r--r--gcc/resource.c5
-rw-r--r--gcc/resource.h5
-rw-r--r--gcc/rtl.c5
-rw-r--r--gcc/rtl.h39
-rw-r--r--gcc/rtlanal.c5
-rw-r--r--gcc/rtlhooks-def.h3
-rw-r--r--gcc/rtlhooks.c3
-rw-r--r--gcc/sched-deps.c5
-rw-r--r--gcc/sched-ebb.c5
-rw-r--r--gcc/sched-int.h28
-rw-r--r--gcc/sched-rgn.c5
-rw-r--r--gcc/sched-vis.c4
-rw-r--r--gcc/sdbout.c5
-rw-r--r--gcc/sel-sched-dump.c6
-rw-r--r--gcc/sel-sched-dump.h7
-rw-r--r--gcc/sel-sched-ir.c6
-rw-r--r--gcc/sel-sched-ir.h13
-rw-r--r--gcc/sel-sched.c7
-rw-r--r--gcc/simplify-rtx.c5
-rw-r--r--gcc/stack-ptr-mod.c5
-rw-r--r--gcc/stmt.c4
-rw-r--r--gcc/stor-layout.c5
-rw-r--r--gcc/store-motion.c4
-rw-r--r--gcc/target-def.h8
-rw-r--r--gcc/target.h40
-rw-r--r--gcc/targhooks.c73
-rw-r--r--gcc/targhooks.h32
-rw-r--r--gcc/toplev.c184
-rw-r--r--gcc/toplev.h4
-rw-r--r--gcc/tree-pass.h22
-rw-r--r--gcc/tree-scalar-evolution.h2
-rw-r--r--gcc/tree.h38
-rw-r--r--gcc/var-tracking.c5
-rw-r--r--gcc/varasm.c20
-rw-r--r--gcc/web.c3
174 files changed, 2616 insertions, 528 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dcee2f453ed..c259c0d7768 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -4,6 +4,13 @@
* Makefile.in (HOST_PLUGIN_CC): Define.
(site.exp): Set HOST_PLUGIN_CC.
+ 2009-05-06 J"orn Rennecke <joern.rennecke@arc.com>
+ * config/sh/sh-protos.h: Fix end of multiple inclusion guard.
+ 2009-05-01 J"orn Rennecke <joern.rennecke@arc.com>
+ * coverage.c (ctr_labels): Remove unused variable.
+ Makefile.in ($(TA)rtlanal.o): Depend on $(DF_H).
+ ($(TA)sel-sched-ir.o): Depend on $(CFGLOOP_H).
+
2010-01-29 Eric Botcazou <ebotcazou@adacore.com>
* tree-ssa-alias.c (same_type_for_tbaa): Return -1 if the types have
diff --git a/gcc/ChangeLog.multi-target b/gcc/ChangeLog.multi-target
new file mode 100644
index 00000000000..a2b92610feb
--- /dev/null
+++ b/gcc/ChangeLog.multi-target
@@ -0,0 +1,169 @@
+2009-05-11 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * genmodes.c (find_mode): Set target field for to-be searched mode.
+ (eq_mode): Also consider target.
+ (drop_mode): New function.
+ (fixup_target_modes): Implement commoning of equivalent modes.
+ Mangle mode names for other-target modes.
+ (make_complex_modes): When processing target-specific input, don't
+ make modes for other targets.
+ (make_complex_modes, make_vector_modes): Tag new modes with the same
+ target field as the modes that they are made from.
+ (make_partial_integer_mode): Make error message clearer.
+ (emit_insn_modes_h): Remove mangling of mode name.
+ * Makefile.in (extra-modes.h): Use *-extra-modes.h instead of
+ extra_modes_blurb.
+ (extra_modes_blurb): Remove rule.
+ [!TA] (%-extra-modes.h): New rule.
+
+2009-05-08 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * doc/extend.texi (target_arch): Document new attribute.
+ * targhooks.c (STRINGIFY1, STRINGIFY): Delete.
+ (default_override_options): Use this_targetm.name for error message.
+ * flags.h (multi-target.h): Include.
+ (flag_ira_algorithm): Mark as target specific.
+ * multi-target.h (EXTRA_TARGETS_EXPAND_COMMA): Add trailing comma.
+ * tree.h (expand_function_end): Mark as target specific.
+ (expand_function_start, stack_protect_prologue): Likewise.
+ (stack_protect_epilogue): Likewise.
+ (allocate_struct_function): Mark as not target specific.
+ * target.h (struct gcc_target): Add new member name.
+ * toplev.c (targetm_array): Add zero delimiter.
+ (asm_out_file): Don't define for EXTRA_TARGET.
+ (process_options): Always initialize debug_hooks.
+ * regs.h (regstat_n_sets_and_refs): Mark as target specific.
+ (REG_N_REFS, REG_N_SETS, regstat_init_n_sets_and_refs): Likewise.
+ (regstat_free_n_sets_and_refs, regstat_compute_ri): Likewise.
+ (regstat_free_ri, regstat_get_setjmp_crosses): Likewise.
+ (regstat_compute_calls_crossed, regstat_free_calls_crossed): Likewise.
+ (reg_renumber, have_regs_of_mode, reg_raw_mode): Likewise.
+ * opts.c: Include multi-target.h. Add START_TARGET_SPECIFIC and
+ END_TARGET_SPECIFC markers. Add #ifndef EXTRA_TARGET / #endif
+ directives.
+ (decode_options): Use this_targetm for target-specific processing.
+ Do an EXTRA_TARGETS_CALL of self.
+ * function.c (allocate_struct_function_1): New function, broken out of:
+ (allocate_struct_function).
+ (set_cfun): Update target_pnt.
+ [!EXTRA_TARGET] (allocate_struct_function_1_array): New const array.
+ [EXTRA_TARGET] (allocate_struct_function): Don't define.
+ (allocate_struct_function): Initialize cfun->target_arch and set
+ targetm_pnt.
+ * varasm.c (last_arch): New variable.
+ (assemble_start_function): Emit .arch directive when targetm changed
+ since the last function was emitted, and update last_arch.
+ * ira.c (setup_cover_and_important_classes): Use this_targetm.
+ * ira.h (ira_init_once, ira_init): Mark as target specific.
+ (ira_finish_once, ira_eliminate_regs): Likewise.
+ (ira_sort_regnos_for_alter_reg, ira_mark_allocation_change): Likewise.
+ (ira_mark_memory_move_deletion, ira_reuse_stack_slot): Likewise.
+ (ira_mark_new_stack_slot, ira_better_spill_reload_regno_p: Likewise.
+ * target-def.h (TARGET_INITIALIZER): Add TARGET_NAME.
+ * rtl.h (insn_locators_alloc): Mark as target specific.
+ (insn_locators_free, insn_locators_finalize): Likewise.
+ (set_curr_insn_source_location, set_curr_insn_block): Likewise.
+ (curr_insn_locator): Likewise.
+ * output.h (asm_out_file): Don't mark as target specific.
+ * c-common.c (handle_target_arch_attribute): New function.
+ (c_common_attribute_table): Add target_arch attribute entry.
+ * Makefile.in (OBJS-common): Move opts.o from here...
+ (OBJS-rtl): ... to here.
+ ($(out_object_file)): Add -DTARGET_NAME=\"$(target_noncanonical)\"
+ to rule.
+ * passes.c (execute_one_pass): Move dispatch code from here...
+ (execute_pass_list): ... to here.
+
+2009-05-06 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * targhooks.c (default_override_options): New function.
+ (STRINGIFY1, STRINGIFY): New macros.
+ * targhooks.h (default_override_options): Declare.
+ * tree-pass.h: Include multi-target.h.
+ Mark rtl passes and pass_rest_of_compilation as target specific.
+ * target.h: Include multi-target.h.
+ (struct target_option_hooks): Add override member.
+ (targetm): change into a #define.
+ (targetm_pnt, targetm_array): Declare.
+ (this_targetm): Declare.
+ * toplev.c [EXTRA_TARGET] (general_init, do_compile): Don't declare.
+ (process_options): No longer static.
+ [!EXTRA_TARGET] (targetm_array, targetm_pnt): Define and inititialize.
+ (general_init): Add ATTRIBUTE_UNUSED to argv0.
+ (process_options): Guard general code with #ifndef EXTRA_TARGET.
+ Use this_targetm.target_option.override instead of OVERRIDE_OPTIONS.
+ (do_compile): Do an EXTRA_TARGETS_CALL of process_options.
+ (opth-gen.awk): Also make variables target specific that are for
+ options named AllTarget.
+ * common.opt (align_functions, align_jumps): Mark with AllTarget.
+ (align_loops, flag_data_sections, flag_delayed_branch): Likewise.
+ (flag_no_function_cse, flag_function_sections): Likewise.
+ (flag_leading_underscore, flag_omit_frame_pointer): Likewise.
+ (flag_rename_registers, flag_schedule_insns): Likewise.
+ (flag_schedule_insns_after_reload): Likewise.
+ * target-def.h [!TARGET_OVERRIDE_OPTIONS] (TARGET_OVERRIDE_OPTIONS):
+ Define.
+ (TARGET_OPTION_HOOKS): Include TARGET_OVERRIDE_OPTIONS.
+ * reg-stack.c: Include multi-target.h and mark code as target specific.
+ * reginfo.c (init_reg_sets): Make EXTRA_TARGETS_CALL of self.
+ * Makefile.in ($(out_object_file)): Add -Dtargetm=this_targetm.
+ * passes.c (gate_rest_of_compilation): Make target specific.
+ (pass_rest_of_compilation): Likewise.
+ * config/sh/sh.h (OVERRIDE_OPTIONS): Delete.
+ * config/sh/sh.c (sh_override_options): Change type to match hook.
+ Make manipulation of global flags dependent on main_target.
+ (TARGET_OVERRIDE_OPTIONS): Redefine.
+
+2009-05-01 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * regrename.c: Include "multi-target.h" and add START_TARGET_SPECIFIC
+ and END_TARGET_SPECIFC markers.
+ * loop-unswitch.c, sched-ebb.c, fwprop.c, dwarf2asm.c: Likewise.
+ * dwarf2asm.h, ira-conflicts.c, targhooks.c, targhooks.h: Likewise.
+ * regstat.c, see.c, machmode.h, rtlhooks.c, optabs.c: Likewise.
+ * postreload-gcse.c, optabs.h, postreload.c, reload.c: Likewise.
+ * tree.h, reload.h, rtlanal.c, ddg.c, final.c, builtins.c: Likewise.
+ * cfghooks.c, cfghooks.h, cfgloopanal.c, cfg.c: Likewise.
+ * auto-inc-dec.c, toplev.c, toplev.h, reorg.c, regs.h: Likewise.
+ * df-scan.c, haifa-sched.c, dojump.c, dbxout.c, df-core.c: Likewise.
+ * mode-switching.c, modulo-sched.c, caller-save.ci, graph.c: Likewise.
+ * ira-int.h, cse.c, web.c, ira-color.c, sel-sched.c: Likewise.
+ * loop-init.c, cfganal.c, ifcvt.c, jump.c, dwarf2out.c: Likewise.
+ * expr.c, cfgbuild.c, hard-reg-set.h, predict.c, predict.h: Likewise.
+ * recog.c, recog.h, dse.c, sel-sched-ir.c, sel-sched-ir.h: Likewise.
+ * ira-lives.c, regmove.c, sel-sched-dump.c: Likewise.
+ * sel-sched-dump.h, function.c, function.h, print-rtl.c: Likewise.
+ * df.h, sdbout.c, stor-layout.c, rtlhooks-def.h, ira-emit.c: Likewise.
+ * df-byte-scan.c, gcse.c, alias.c, alias.h, init-regs.c: Likewise.
+ * ira-build.c, loop-unroll.c, ggc.h, insn-addr.h, calls.c: Likewise.
+ * loop-doloop.c, rtl-factoring.c, lower-subreg.c, expmed.c: Likewise.
+ * bt-load.c, except.c, except.h, emit-rtl.c, cfgexpand.c: Likewise.
+ * cselib.c, cfgcleanup.c, simplify-rtx.c, explow.c: Likewise.
+ * loop-invariant.c, loop-iv.c, cfglayout.c, varasm.c, ira.c: Likewise.
+ * sched-deps.c, ira.h, rtl.c, ira-costs.c, rtl.h: Likewise.
+ * integrate.c, sched-int.h, output.h, combine.c: Likewise.
+ * fixed-value.h, addresses.h, bb-reorder.c, stack-ptr-mod.c: Likewise.
+ * resource.c, var-tracking.c, resource.h, cfgloop.h: Likewise.
+ * df-problems.c, reginfo.c, sched-rgn.c, basic-block.h: Likewise.
+ * sched-vis.c, passes.c, config/sh/sh-protos.h: Likewise.
+ * config/sh/sh.c, config/sh/sh.h, Likewise.
+ * combine-stack-adj.c, cfgrtl.c, stmt.c: Likewise.
+ * dce.c, reload1.c: Likewise.
+ * targhooks.c: Add #ifndef EXTRA_TARGET / #endif directives.
+ * cfghooks.c, toplev.c, expr.c, calls.c, emit-rtl.c: Likewise.
+ * explow.c, passes.c: Likewise.
+ * targhooks.h: (default_branch_target_register_class): Return int
+ instead of enum reg_class.
+ (default_secondary_reload): Likewise.
+ * config/sh/sh-protos.h (sh_secondary_reload): Likewise.
+ * config/sh/sh.c (sh_secondary_reload): Likewise.
+ * targhooks.h: (default_ira_cover_classes): Return const int *
+ instead of const enum reg_class *.
+ * targhooks.c (default_ira_cover_classes): Likewise.
+ * genrecog.c (write_header, main): Make generated file include
+ "multi-target.h" and have START_TARGET_SPECIFIC and END_TARGET_SPECIFC
+ markers.
+ * genopinit.c (main): Likewise.
+ * genoutput.c (output_prologue, main): Likewise.
+ * genextract.c (print_header, main): Likewise.
+ * genautomata.c (main): Likewise.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index d0b16b123f7..e408427b093 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -61,6 +61,8 @@ host=@host@
target=@target@
target_noncanonical:=@target_noncanonical@
+gcc_config_arguments=@gcc_config_arguments@
+
# Sed command to transform gcc to installed name.
program_transform_name := @program_transform_name@
@@ -458,7 +460,11 @@ TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
out_file=$(srcdir)/config/@out_file@
+ifdef EXTRA_TARGET
+out_object_file=$(TA)xout.o
+else
out_object_file=@out_object_file@
+endif
md_file=$(srcdir)/config/@md_file@
tm_file_list=@tm_file_list@
tm_include_list=@tm_include_list@
@@ -790,6 +796,10 @@ T =
T_TARGET =
T_TARGET : $(T_TARGET)
+# For building rtl pases for extra target architectures.
+TA =
+TARGET_NUM=0
+
# This should name the specs file that we're going to install. Target
# Makefiles may override it and name another file to be generated from
# the built-in specs and installed as the default spec, as long as
@@ -1036,6 +1046,12 @@ INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
.c.o:
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION)
+ifdef EXTRA_TARGET
+ ALL_COMPILERFLAGS \
+ += -DEXTRA_TARGET=$(EXTRA_TARGET) -DEXTRA_TARGET_$(EXTRA_TARGET)
+$(TA)%.o : %.c
+ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION)
+endif
#
# Support for additional languages (other than C).
@@ -1127,7 +1143,7 @@ C_OBJS = c-lang.o stub-objc.o $(C_AND_OBJC_OBJS)
# We put the insn-*.o files first so that a parallel make will build
# them sooner, because they are large and otherwise tend to be the
# last objects to finish building.
-OBJS-common = \
+OBJS-rtl = \
insn-attrtab.o \
insn-automata.o \
insn-emit.o \
@@ -1138,12 +1154,9 @@ OBJS-common = \
insn-peep.o \
insn-preds.o \
insn-recog.o \
- $(GGC) \
alias.o \
- alloc-pool.o \
auto-inc-dec.o \
bb-reorder.o \
- bitmap.o \
bt-load.o \
builtins.o \
caller-save.o \
@@ -1155,72 +1168,37 @@ OBJS-common = \
cfgexpand.o \
cfghooks.o \
cfglayout.o \
- cfgloop.o \
cfgloopanal.o \
- cfgloopmanip.o \
cfgrtl.o \
combine.o \
combine-stack-adj.o \
- convert.o \
- coverage.o \
cse.o \
cselib.o \
dbxout.o \
- dbgcnt.o \
dce.o \
ddg.o \
- debug.o \
df-byte-scan.o \
df-core.o \
df-problems.o \
df-scan.o \
- dfp.o \
- diagnostic.o \
dojump.o \
- dominance.o \
- domwalk.o \
- double-int.o \
dse.o \
dwarf2asm.o \
dwarf2out.o \
- ebitmap.o \
emit-rtl.o \
- et-forest.o \
except.o \
explow.o \
expmed.o \
expr.o \
final.o \
- fixed-value.o \
- fold-const.o \
function.o \
fwprop.o \
gcse.o \
- genrtl.o \
- ggc-common.o \
- gimple.o \
- gimple-iterator.o \
- gimple-low.o \
- gimple-pretty-print.o \
- gimplify.o \
graph.o \
- graphds.o \
- graphite.o \
- graphite-blocking.o \
- graphite-clast-to-gimple.o \
- graphite-dependences.o \
- graphite-interchange.o \
- graphite-poly.o \
- graphite-ppl.o \
- graphite-scop-detection.o \
- graphite-sese-to-poly.o \
- gtype-desc.o \
haifa-sched.o \
- hooks.o \
ifcvt.o \
init-regs.o \
integrate.o \
- intl.o \
ira.o \
ira-build.o \
ira-costs.o \
@@ -1229,12 +1207,6 @@ OBJS-common = \
ira-emit.o \
ira-lives.o \
jump.o \
- lambda-code.o \
- lambda-mat.o \
- lambda-trans.o \
- langhooks.o \
- lcm.o \
- lists.o \
loop-doloop.o \
loop-init.o \
loop-invariant.o \
@@ -1242,37 +1214,16 @@ OBJS-common = \
loop-unroll.o \
loop-unswitch.o \
lower-subreg.o \
- lto-cgraph.o \
- lto-streamer-in.o \
- lto-streamer-out.o \
- lto-section-in.o \
- lto-section-out.o \
- lto-symtab.o \
- lto-opts.o \
- lto-streamer.o \
- lto-wpa-fixup.o \
- lto-compress.o \
- mcf.o \
mode-switching.o \
modulo-sched.o \
- omega.o \
- omp-low.o \
optabs.o \
options.o \
- opts-common.o \
opts.o \
- params.o \
passes.o \
- plugin.o \
- pointer-set.o \
postreload-gcse.o \
postreload.o \
predict.o \
- pretty-print.o \
print-rtl.o \
- print-tree.o \
- profile.o \
- real.o \
recog.o \
reg-stack.o \
regcprop.o \
@@ -1284,11 +1235,9 @@ OBJS-common = \
reload1.o \
reorg.o \
resource.o \
- rtl-error.o \
rtl.o \
rtlanal.o \
rtlhooks.o \
- sbitmap.o \
sched-deps.o \
sched-ebb.o \
sched-rgn.o \
@@ -1297,19 +1246,97 @@ OBJS-common = \
sel-sched-ir.o \
sel-sched-dump.o \
sel-sched.o \
- sese.o \
simplify-rtx.o \
- sparseset.o \
- sreal.o \
stack-ptr-mod.o \
- statistics.o \
+ store-motion.o \
stmt.o \
stor-layout.o \
- store-motion.o \
- stringpool.o \
targhooks.o \
- timevar.o \
toplev.o \
+ var-tracking.o \
+ varasm.o \
+ vmsdbgout.o \
+ web.o
+
+EXTRA_TARGETS = @with_extra_target_list@
+NUM_TARGETS := $(words 1 @with_extra_target_list@)
+
+OBJS-common = \
+ $(OBJS-rtl) \
+ $(foreach TA,$(EXTRA_TARGETS),$(addprefix $(TA)/$(TA)-,$(OBJS-rtl) xout.o)) \
+ $(GGC) \
+ alloc-pool.o \
+ bitmap.o \
+ cfgloop.o \
+ cfgloopmanip.o \
+ convert.o \
+ coverage.o \
+ dbgcnt.o \
+ debug.o \
+ dfp.o \
+ diagnostic.o \
+ dominance.o \
+ domwalk.o \
+ double-int.o \
+ ebitmap.o \
+ et-forest.o \
+ fixed-value.o \
+ fold-const.o \
+ genrtl.o \
+ ggc-common.o \
+ gimple.o \
+ gimple-iterator.o \
+ gimple-low.o \
+ gimple-pretty-print.o \
+ gimplify.o \
+ graphds.o \
+ graphite.o \
+ graphite-blocking.o \
+ graphite-clast-to-gimple.o \
+ graphite-dependences.o \
+ graphite-interchange.o \
+ graphite-poly.o \
+ graphite-ppl.o \
+ graphite-scop-detection.o \
+ graphite-sese-to-poly.o \
+ gtype-desc.o \
+ hooks.o \
+ intl.o \
+ lambda-code.o \
+ lambda-mat.o \
+ lambda-trans.o \
+ langhooks.o \
+ lcm.o \
+ lists.o \
+ lto-cgraph.o \
+ lto-streamer-in.o \
+ lto-streamer-out.o \
+ lto-section-in.o \
+ lto-section-out.o \
+ lto-symtab.o \
+ lto-opts.o \
+ lto-streamer.o \
+ lto-wpa-fixup.o \
+ lto-compress.o \
+ mcf.o \
+ omega.o \
+ omp-low.o \
+ opts-common.o \
+ params.o \
+ plugin.o \
+ pointer-set.o \
+ pretty-print.o \
+ print-tree.o \
+ profile.o \
+ real.o \
+ rtl-error.o \
+ sese.o \
+ sbitmap.o \
+ sparseset.o \
+ sreal.o \
+ statistics.o \
+ stringpool.o \
+ timevar.o \
tracer.o \
tree-affine.o \
tree-call-cdce.o \
@@ -1389,13 +1416,9 @@ OBJS-common = \
tree-vrp.o \
tree.o \
value-prof.o \
- var-tracking.o \
- varasm.o \
varray.o \
vec.o \
version.o \
- vmsdbgout.o \
- web.o \
xcoffout.o
# Target object files.
@@ -1441,10 +1464,10 @@ ALL_HOST_OBJS = $(GCC_OBJS) $(C_OBJS) $(OBJS) libbackend.o \
BACKEND = main.o @TREEBROWSER@ libbackend.a $(CPPLIB) $(LIBDECNUMBER)
MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
- insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
- insn-attr.h insn-attrtab.c insn-opinit.c insn-preds.c insn-constants.h \
- tm-preds.h tm-constrs.h \
- tree-check.h min-insn-modes.c insn-modes.c insn-modes.h \
+ $(TA)insn-output.c $(TA)insn-recog.c $(TA)insn-emit.c $(TA)insn-extract.c \
+ $(TA)insn-peep.c insn-attr.h $(TA)insn-attrtab.c $(TA)insn-opinit.c \
+ $(TA)insn-preds.c insn-constants.h tm-preds.h tm-constrs.h \
+ tree-check.h $(TA)min-insn-modes.c $(TA)insn-modes.c insn-modes.h \
genrtl.c genrtl.h gt-*.h gtype-*.h gtype-desc.c gtyp-input.list \
xgcc$(exeext) cpp$(exeext) cc1$(exeext) cc1*-dummy$(exeext) $(EXTRA_PASSES) \
$(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
@@ -1624,14 +1647,19 @@ cs-tconfig.h: Makefile
HEADERS="$(xm_include_list)" DEFINES="USED_FOR_TARGET $(xm_defines)" \
$(SHELL) $(srcdir)/mkconfig.sh tconfig.h
+empty=
+space=$(empty) #
cs-tm.h: Makefile
TARGET_CPU_DEFAULT="$(target_cpu_default)" \
- HEADERS="$(tm_include_list)" DEFINES="$(tm_defines)" \
+ HEADERS="$(tm_include_list)" \
+ DEFINES="NUM_TARGETS=$(NUM_TARGETS) TARGET_NUM=$(TARGET_NUM) \
+ EXTRA_TARGETS_EXPAND(PREFIX,CALL,DELIM)=$(subst $(space),/**/DELIM/**/,$(foreach TA,$(subst -,_,$(EXTRA_TARGETS)),PREFIX/**/$(TA)/**/CALL)) \
+ $(tm_defines)" \
$(SHELL) $(srcdir)/mkconfig.sh tm.h
cs-tm_p.h: Makefile
TARGET_CPU_DEFAULT="" \
- HEADERS="$(tm_p_include_list)" DEFINES="" \
+ HEADERS="multi-target.h $(tm_p_include_list)" DEFINES="" \
$(SHELL) $(srcdir)/mkconfig.sh tm_p.h
# Don't automatically run autoconf, since configure.ac might be accidentally
@@ -1995,9 +2023,9 @@ c-pragma.o: c-pragma.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FUNCTION_H) $(C_PRAGMA_H) $(TOPLEV_H) output.h $(GGC_H) $(TM_P_H) \
$(C_COMMON_H) $(TARGET_H) gt-c-pragma.h $(CPPLIB_H) $(FLAGS_H) $(DIAGNOSTIC_H) \
opts.h $(PLUGINS_H)
-graph.o: graph.c $(SYSTEM_H) coretypes.h $(TM_H) $(TOPLEV_H) $(FLAGS_H) output.h \
- $(RTL_H) $(FUNCTION_H) hard-reg-set.h $(BASIC_BLOCK_H) graph.h $(OBSTACK_H) \
- $(CONFIG_H)
+$(TA)graph.o: graph.c $(SYSTEM_H) coretypes.h $(TM_H) $(TOPLEV_H) $(FLAGS_H) \
+ output.h $(RTL_H) $(FUNCTION_H) hard-reg-set.h $(BASIC_BLOCK_H) graph.h \
+ $(OBSTACK_H) $(CONFIG_H)
sbitmap.o: sbitmap.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FLAGS_H) hard-reg-set.h $(BASIC_BLOCK_H) $(OBSTACK_H)
ebitmap.o: ebitmap.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
@@ -2269,7 +2297,7 @@ tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(GGC_H) langhooks.h $(REAL_H) tree-iterator.h fixed-value.h \
$(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_PASS_H)
-stor-layout.o : stor-layout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)stor-layout.o : stor-layout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(PARAMS_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) output.h $(RTL_H) \
$(GGC_H) $(TM_P_H) $(TARGET_H) langhooks.h $(REGS_H) gt-stor-layout.h \
$(TOPLEV_H) $(CGRAPH_H) $(TREE_INLINE_H) $(TREE_DUMP_H) $(GIMPLE_H)
@@ -2694,7 +2722,7 @@ opts.o : opts.c opts.h options.h $(TOPLEV_H) $(CONFIG_H) $(SYSTEM_H) \
$(PLUGIN_H) $(EXCEPT_H)
opts-common.o : opts-common.c opts.h $(CONFIG_H) $(SYSTEM_H) \
coretypes.h intl.h
-targhooks.o : targhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
+$(TA)targhooks.o : targhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
$(EXPR_H) $(TM_H) $(RTL_H) $(TM_P_H) $(FUNCTION_H) output.h $(TOPLEV_H) \
$(MACHMODE_H) $(TARGET_DEF_H) $(TARGET_H) $(GGC_H) gt-targhooks.h \
$(OPTABS_H) $(RECOG_H) reload.h hard-reg-set.h
@@ -2707,7 +2735,7 @@ s-bversion: BASE-VER
echo "#define BUILDING_GCC_VERSION (BUILDING_GCC_MAJOR * 1000 + BUILDING_GCC_MINOR)" >> bversion.h
$(STAMP) s-bversion
-toplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
+$(TA)toplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
version.h $(RTL_H) $(FUNCTION_H) $(FLAGS_H) xcoffout.h $(INPUT_H) \
$(INSN_ATTR_H) output.h $(DIAGNOSTIC_H) debug.h insn-config.h intl.h \
$(RECOG_H) Makefile $(TOPLEV_H) dwarf2out.h sdbout.h dbxout.h $(EXPR_H) \
@@ -2721,7 +2749,7 @@ toplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
-DTARGET_NAME=\"$(target_noncanonical)\" \
-c $(srcdir)/toplev.c $(OUTPUT_OPTION)
-passes.o : passes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
+$(TA)passes.o : passes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(RTL_H) $(FUNCTION_H) $(FLAGS_H) xcoffout.h $(INPUT_H) $(INSN_ATTR_H) output.h \
$(DIAGNOSTIC_H) debug.h insn-config.h intl.h $(RECOG_H) $(TOPLEV_H) \
dwarf2out.h sdbout.h dbxout.h $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) \
@@ -2745,24 +2773,25 @@ rtl-error.o: rtl-error.c $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(INSN_ATTR_H) insn-config.h $(INPUT_H) $(TOPLEV_H) intl.h $(DIAGNOSTIC_H) \
$(CONFIG_H) varray.h
-rtl.o : rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)rtl.o : rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(GGC_H) $(BCONFIG_H) insn-notes.def reg-notes.def $(TOPLEV_H) $(REAL_H)
-print-rtl.o : print-rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)print-rtl.o : print-rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(TREE_H) hard-reg-set.h $(BASIC_BLOCK_H) $(FLAGS_H) \
$(BCONFIG_H) $(REAL_H) $(DIAGNOSTIC_H) cselib.h $(TREE_PASS_H)
-rtlanal.o : rtlanal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TOPLEV_H) \
- $(RTL_H) hard-reg-set.h $(TM_P_H) insn-config.h $(RECOG_H) $(REAL_H) \
- $(FLAGS_H) $(REGS_H) output.h $(TARGET_H) $(FUNCTION_H) $(TREE_H) \
+$(TA)rtlanal.o : rtlanal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(TOPLEV_H) $(RTL_H) hard-reg-set.h $(TM_P_H) insn-config.h $(RECOG_H) \
+ $(REAL_H) $(FLAGS_H) $(REGS_H) output.h $(TARGET_H) $(FUNCTION_H) $(TREE_H) \
$(DF_H)
-varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
+$(TA)varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(RTL_H) $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) hard-reg-set.h $(REGS_H) \
output.h $(TOPLEV_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 $(REAL_H) \
tree-iterator.h
-function.o : function.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)function.o : function.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(RTL_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 $(TOPLEV_H) $(EXCEPT_H) $(HASHTAB_H) $(GGC_H) $(TM_P_H) langhooks.h \
@@ -2770,72 +2799,75 @@ function.o : function.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_PASS_H) $(DF_H) $(TIMEVAR_H) vecprim.h
statistics.o : statistics.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TREE_PASS_H) $(TREE_DUMP_H) $(HASHTAB_H) statistics.h $(TM_H) $(FUNCTION_H)
-stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) $(FUNCTION_H) insn-config.h hard-reg-set.h $(EXPR_H) \
libfuncs.h $(EXCEPT_H) $(RECOG_H) $(TOPLEV_H) output.h $(GGC_H) $(TM_P_H) \
langhooks.h $(PREDICT_H) $(OPTABS_H) $(TARGET_H) $(GIMPLE_H) $(MACHMODE_H) \
$(REGS_H) alloc-pool.h $(PRETTY_PRINT_H)
-except.o : except.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)except.o : except.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) $(EXCEPT_H) $(FUNCTION_H) $(EXPR_H) libfuncs.h \
langhooks.h insn-config.h hard-reg-set.h $(BASIC_BLOCK_H) output.h \
dwarf2asm.h dwarf2out.h $(TOPLEV_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)
-expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)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) hard-reg-set.h $(EXCEPT_H) reload.h \
$(GGC_H) langhooks.h intl.h $(TM_P_H) $(REAL_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)
-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)
-builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)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)
+$(TA)builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(RTL_H) \
$(TREE_H) $(GIMPLE_H) $(FLAGS_H) $(TARGET_H) $(FUNCTION_H) $(REGS_H) \
$(EXPR_H) $(OPTABS_H) insn-config.h $(RECOG_H) output.h typeclass.h \
hard-reg-set.h $(TOPLEV_H) hard-reg-set.h $(EXCEPT_H) $(TM_P_H) $(PREDICT_H) \
libfuncs.h $(REAL_H) langhooks.h $(BASIC_BLOCK_H) tree-mudflap.h \
$(BUILTINS_DEF) $(MACHMODE_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) value-prof.h
-calls.o : calls.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)calls.o : calls.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) $(EXPR_H) $(OPTABS_H) langhooks.h $(TARGET_H) \
- libfuncs.h $(REGS_H) $(TOPLEV_H) output.h $(FUNCTION_H) $(TIMEVAR_H) $(TM_P_H) \
- $(CGRAPH_H) $(EXCEPT_H) sbitmap.h $(DBGCNT_H) $(TREE_FLOW_H)
-expmed.o : expmed.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
- $(FLAGS_H) insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) $(REAL_H) \
- $(TOPLEV_H) $(TM_P_H) langhooks.h $(DF_H) $(TARGET_H)
-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) \
- $(TOPLEV_H) $(EXCEPT_H) $(FUNCTION_H) $(GGC_H) $(TM_P_H) langhooks.h gt-explow.h \
- $(TARGET_H) output.h
-optabs.o : optabs.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+ libfuncs.h $(REGS_H) $(TOPLEV_H) output.h $(FUNCTION_H) $(TIMEVAR_H) \
+ $(TM_P_H) $(CGRAPH_H) $(EXCEPT_H) sbitmap.h $(DBGCNT_H) $(TREE_FLOW_H)
+$(TA)expmed.o : expmed.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+ $(TREE_H) $(FLAGS_H) insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) \
+ $(REAL_H) $(TOPLEV_H) $(TM_P_H) langhooks.h $(DF_H) $(TARGET_H)
+$(TA)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) $(TOPLEV_H) $(EXCEPT_H) $(FUNCTION_H) $(GGC_H) $(TM_P_H) \
+ langhooks.h gt-explow.h $(TARGET_H) output.h
+$(TA)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 $(TOPLEV_H) $(GGC_H) $(REAL_H) $(TM_P_H) $(EXCEPT_H) \
gt-optabs.h $(BASIC_BLOCK_H) $(TARGET_H) $(FUNCTION_H)
-dbxout.o : dbxout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
+$(TA)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) $(GGC_H) $(OBSTACK_H) $(EXPR_H) gt-dbxout.h
debug.o : debug.c debug.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)
-sdbout.o : sdbout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) debug.h \
+$(TA)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 \
output.h $(TOPLEV_H) $(TM_P_H) gsyms.h langhooks.h $(TARGET_H) sdbout.h \
gt-sdbout.h reload.h $(VARRAY_H)
-dwarf2out.o : dwarf2out.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)dwarf2out.o : dwarf2out.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) version.h $(RTL_H) $(DWARF2_H) debug.h $(FLAGS_H) insn-config.h \
output.h $(DIAGNOSTIC_H) $(REAL_H) hard-reg-set.h $(REGS_H) $(EXPR_H) \
libfuncs.h $(TOPLEV_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) $(VARRAY_H) $(GIMPLE_H) $(TREE_PASS_H)
-dwarf2asm.o : dwarf2asm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)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)
-vmsdbgout.o : vmsdbgout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) version.h \
- $(FLAGS_H) $(RTL_H) output.h vmsdbg.h debug.h langhooks.h $(FUNCTION_H) $(TARGET_H)
+$(TA)vmsdbgout.o : vmsdbgout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(TREE_H) version.h $(FLAGS_H) $(RTL_H) output.h vmsdbg.h debug.h \
+ langhooks.h $(FUNCTION_H) $(TARGET_H)
xcoffout.o : xcoffout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(RTL_H) xcoffout.h $(FLAGS_H) $(TOPLEV_H) output.h dbxout.h \
$(GGC_H) $(TARGET_H) debug.h $(GSTAB_H) xcoff.h
-emit-rtl.o : emit-rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)emit-rtl.o : emit-rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(RTL_H) \
$(TREE_H) $(FLAGS_H) $(FUNCTION_H) $(REGS_H) insn-config.h $(RECOG_H) \
$(GGC_H) $(EXPR_H) hard-reg-set.h $(BITMAP_H) $(TOPLEV_H) $(BASIC_BLOCK_H) \
$(HASHTAB_H) $(TM_P_H) debug.h langhooks.h $(TREE_PASS_H) gt-emit-rtl.h \
@@ -2846,17 +2878,18 @@ dfp.o : dfp.c dfp.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(TOPLEV_H) $(TM_P_H) $(REAL_H) $(DECNUM_H)
fixed-value.o: fixed-value.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) fixed-value.h $(REAL_H) $(TOPLEV_H)
-integrate.o : integrate.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)integrate.o : integrate.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(TREE_H) $(FLAGS_H) debug.h $(INTEGRATE_H) insn-config.h \
$(EXPR_H) $(REAL_H) $(REGS_H) intl.h $(FUNCTION_H) output.h $(RECOG_H) \
$(EXCEPT_H) $(TOPLEV_H) $(PARAMS_H) $(TM_P_H) $(TARGET_H) langhooks.h \
gt-integrate.h $(GGC_H) $(TREE_PASS_H) $(DF_H)
-jump.o : jump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)jump.o : jump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FLAGS_H) hard-reg-set.h $(REGS_H) insn-config.h $(RECOG_H) $(EXPR_H) \
$(REAL_H) $(EXCEPT_H) $(FUNCTION_H) $(TREE_PASS_H) $(DIAGNOSTIC_H) \
$(TOPLEV_H) $(INSN_ATTR_H) $(TM_P_H) reload.h $(PREDICT_H) \
$(TIMEVAR_H) $(TARGET_H)
-simplify-rtx.o : simplify-rtx.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)simplify-rtx.o : simplify-rtx.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+ $(TM_H) \
$(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) $(REAL_H) insn-config.h \
$(RECOG_H) $(EXPR_H) $(TOPLEV_H) output.h $(FUNCTION_H) $(GGC_H) $(TM_P_H) \
$(TREE_H) $(TARGET_H)
@@ -2930,47 +2963,49 @@ coverage.o : coverage.c $(GCOV_IO_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) \
$(FUNCTION_H) $(TOPLEV_H) $(GGC_H) langhooks.h $(COVERAGE_H) gt-coverage.h \
$(HASHTAB_H) tree-iterator.h $(CGRAPH_H) $(TREE_PASS_H) gcov-io.c $(TM_P_H)
-cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(REGS_H) hard-reg-set.h $(FLAGS_H) $(REAL_H) insn-config.h $(RECOG_H) \
$(EMIT_RTL_H) $(TOPLEV_H) output.h $(FUNCTION_H) $(TREE_PASS_H) \
cselib.h gt-cselib.h $(GGC_H) $(TM_P_H) $(PARAMS_H) alloc-pool.h \
$(HASHTAB_H) $(TARGET_H)
-cse.o : cse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
+$(TA)cse.o : cse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+ $(REGS_H) \
hard-reg-set.h $(FLAGS_H) insn-config.h $(RECOG_H) $(EXPR_H) $(TOPLEV_H) \
output.h $(FUNCTION_H) $(BASIC_BLOCK_H) $(GGC_H) $(TM_P_H) $(TIMEVAR_H) \
$(EXCEPT_H) $(TARGET_H) $(PARAMS_H) rtlhooks-def.h $(TREE_PASS_H) \
$(REAL_H) $(DF_H) $(DBGCNT_H)
-dce.o : dce.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)dce.o : dce.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) $(EXCEPT_H) $(DF_H) cselib.h \
$(DBGCNT_H) dce.h $(TIMEVAR_H) $(TREE_PASS_H) $(DBGCNT_H) $(TM_P_H)
-dse.o : dse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)dse.o : dse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(TM_P_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
$(RECOG_H) $(EXPR_H) $(DF_H) cselib.h $(DBGCNT_H) $(TIMEVAR_H) \
$(TREE_PASS_H) alloc-pool.h $(ALIAS_H) dse.h $(OPTABS_H) $(TARGET_H)
-fwprop.o : fwprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- $(TOPLEV_H) insn-config.h $(RECOG_H) $(FLAGS_H) $(OBSTACK_H) $(BASIC_BLOCK_H) \
- output.h $(DF_H) alloc-pool.h $(TIMEVAR_H) $(TREE_PASS_H) $(TARGET_H) \
- $(TM_P_H) $(CFGLOOP_H) $(EMIT_RTL_H) domwalk.h
-web.o : web.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)fwprop.o : fwprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+ $(TOPLEV_H) insn-config.h $(RECOG_H) $(FLAGS_H) $(OBSTACK_H) \
+ $(BASIC_BLOCK_H) output.h $(DF_H) alloc-pool.h $(TIMEVAR_H) $(TREE_PASS_H) \
+ $(TARGET_H) $(TM_P_H) $(CFGLOOP_H) $(EMIT_RTL_H) domwalk.h
+$(TA)web.o : web.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h $(TOPLEV_H) \
$(DF_H) $(OBSTACK_H) $(TIMEVAR_H) $(TREE_PASS_H)
-gcse.o : gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)gcse.o : gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(REGS_H) hard-reg-set.h $(FLAGS_H) $(REAL_H) insn-config.h $(GGC_H) \
$(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h $(TOPLEV_H) \
$(TM_P_H) $(PARAMS_H) cselib.h $(EXCEPT_H) gt-gcse.h $(TREE_H) $(TIMEVAR_H) \
intl.h $(OBSTACK_H) $(TREE_PASS_H) $(DF_H) $(DBGCNT_H) $(TARGET_H)
-store-motion.o : store-motion.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)store-motion.o : store-motion.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+ $(TM_H) $(RTL_H) \
$(REGS_H) hard-reg-set.h $(FLAGS_H) $(REAL_H) insn-config.h $(GGC_H) \
$(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h $(TOPLEV_H) \
$(TM_P_H) $(EXCEPT_H) $(TREE_H) $(TIMEVAR_H) \
intl.h $(OBSTACK_H) $(TREE_PASS_H) $(DF_H) $(DBGCNT_H)
-resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h $(SYSTEM_H) \
+$(TA)resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h $(SYSTEM_H) \
coretypes.h $(TM_H) $(REGS_H) $(FLAGS_H) output.h $(RESOURCE_H) $(DF_H) \
$(FUNCTION_H) $(TOPLEV_H) $(INSN_ATTR_H) $(EXCEPT_H) $(PARAMS_H) $(TM_P_H)
lcm.o : lcm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
hard-reg-set.h $(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(RECOG_H) \
$(BASIC_BLOCK_H) $(TM_P_H) $(FUNCTION_H) output.h $(REAL_H)
-mode-switching.o : mode-switching.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+$(TA)mode-switching.o : mode-switching.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
$(INSN_ATTR_H) $(RECOG_H) $(BASIC_BLOCK_H) $(TM_P_H) $(FUNCTION_H) \
output.h $(TREE_PASS_H) $(TIMEVAR_H) $(REAL_H) $(DF_H)
@@ -3005,25 +3040,26 @@ tree-vect-generic.o : tree-vect-generic.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
$(FLAGS_H) $(OPTABS_H) $(RTL_H) $(MACHMODE_H) $(EXPR_H) \
langhooks.h $(FLAGS_H) $(DIAGNOSTIC_H) gt-tree-vect-generic.h $(GGC_H) \
coretypes.h insn-codes.h
-df-core.o : df-core.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \
+$(TA)df-core.o : df-core.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(RTL_H) insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \
hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h $(TIMEVAR_H) \
$(TM_P_H) $(FLAGS_H) output.h $(TREE_PASS_H) $(PARAMS_H)
-df-problems.o : df-problems.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)df-problems.o : df-problems.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \
hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h $(TIMEVAR_H) \
$(TM_P_H) $(FLAGS_H) output.h $(EXCEPT_H) dce.h vecprim.h
-df-scan.o : df-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \
+$(TA)df-scan.o : df-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(RTL_H) insn-config.h $(RECOG_H) $(FUNCTION_H) $(REGS_H) alloc-pool.h \
hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(BITMAP_H) sbitmap.h $(TIMEVAR_H) \
$(TM_P_H) $(FLAGS_H) $(TARGET_H) $(TARGET_DEF_H) $(TREE_H) output.h \
$(TREE_PASS_H)
-df-byte-scan.o : df-byte-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- $(TM_P_H) $(DF_H) output.h $(DBGCNT_H)
-regstat.o : regstat.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- $(TM_P_H) $(FLAGS_H) $(REGS_H) output.h $(EXCEPT_H) hard-reg-set.h \
+$(TA)df-byte-scan.o : df-byte-scan.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+ $(TM_H) $(RTL_H) $(TM_P_H) $(DF_H) output.h $(DBGCNT_H)
+$(TA)regstat.o : regstat.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(RTL_H) $(TM_P_H) $(FLAGS_H) $(REGS_H) output.h $(EXCEPT_H) hard-reg-set.h \
$(BASIC_BLOCK_H) $(TIMEVAR_H) $(DF_H)
-var-tracking.o : var-tracking.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)var-tracking.o : var-tracking.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+ $(TM_H) \
$(RTL_H) $(TREE_H) hard-reg-set.h insn-config.h reload.h $(FLAGS_H) \
$(BASIC_BLOCK_H) output.h sbitmap.h alloc-pool.h $(FIBHEAP_H) $(HASHTAB_H) \
$(REGS_H) $(EXPR_H) $(TIMEVAR_H) $(TREE_PASS_H) $(TREE_FLOW_H) \
@@ -3043,38 +3079,41 @@ value-prof.o : value-prof.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RECOG_H) insn-config.h $(OPTABS_H) $(REGS_H) $(GGC_H) $(DIAGNOSTIC_H) \
$(TREE_H) $(COVERAGE_H) $(RTL_H) $(GCOV_IO_H) $(TREE_FLOW_H) \
tree-flow-inline.h $(TIMEVAR_H) $(TREE_PASS_H) $(TOPLEV_H) pointer-set.h
-loop-doloop.o : loop-doloop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)loop-doloop.o : loop-doloop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(FLAGS_H) $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TM_P_H) \
$(TOPLEV_H) $(CFGLOOP_H) output.h $(PARAMS_H) $(TARGET_H)
alloc-pool.o : alloc-pool.c $(CONFIG_H) $(SYSTEM_H) alloc-pool.h $(HASHTAB_H)
-auto-inc-dec.o : auto-inc-dec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)auto-inc-dec.o : auto-inc-dec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+ $(TM_H) \
$(TREE_H) $(RTL_H) $(TM_P_H) hard-reg-set.h $(BASIC_BLOCK_H) insn-config.h \
$(REGS_H) $(FLAGS_H) output.h $(FUNCTION_H) $(EXCEPT_H) $(TOPLEV_H) $(RECOG_H) \
$(EXPR_H) $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H) $(DBGCNT_H) $(TARGET_H)
-cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(FLAGS_H) \
- $(REGS_H) hard-reg-set.h output.h $(TOPLEV_H) $(FUNCTION_H) $(EXCEPT_H) $(GGC_H) \
+$(TA)cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+ $(FLAGS_H) $(REGS_H) hard-reg-set.h output.h $(TOPLEV_H) $(FUNCTION_H) \
+ $(EXCEPT_H) $(GGC_H) \
$(TM_P_H) $(TIMEVAR_H) $(OBSTACK_H) $(TREE_H) alloc-pool.h \
$(HASHTAB_H) $(DF_H) $(CFGLOOP_H) $(TREE_FLOW_H) $(TREE_PASS_H)
-cfghooks.o: cfghooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- $(TREE_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TOPLEV_H) $(CFGLOOP_H)
-cfgexpand.o : cfgexpand.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
+$(TA)cfghooks.o: cfghooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(RTL_H) $(TREE_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(TIMEVAR_H) \
+ $(TOPLEV_H) $(CFGLOOP_H)
+$(TA)cfgexpand.o : cfgexpand.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) \
coretypes.h $(TREE_DUMP_H) $(EXCEPT_H) langhooks.h $(TREE_PASS_H) $(RTL_H) \
$(DIAGNOSTIC_H) $(TOPLEV_H) $(BASIC_BLOCK_H) $(FLAGS_H) debug.h $(PARAMS_H) \
value-prof.h $(TREE_INLINE_H) $(TARGET_H) $(SSAEXPAND_H)
-cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \
output.h $(TOPLEV_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)
-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) \
+$(TA)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) $(TOPLEV_H) vecprim.h
-cfgbuild.o : cfgbuild.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- $(FLAGS_H) $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h $(TOPLEV_H) \
- $(FUNCTION_H) $(EXCEPT_H) $(TIMEVAR_H) $(TREE_H) $(EXPR_H)
-cfgcleanup.o : cfgcleanup.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)cfgbuild.o : cfgbuild.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(RTL_H) $(FLAGS_H) $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h \
+ $(TOPLEV_H) $(FUNCTION_H) $(EXCEPT_H) $(TIMEVAR_H) $(TREE_H) $(EXPR_H)
+$(TA)cfgcleanup.o : cfgcleanup.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(TIMEVAR_H) hard-reg-set.h output.h $(FLAGS_H) $(RECOG_H) \
$(TOPLEV_H) insn-config.h cselib.h $(TARGET_H) $(TM_P_H) $(PARAMS_H) \
$(REGS_H) $(EMIT_RTL_H) $(CFGLAYOUT_H) $(TREE_PASS_H) $(CFGLOOP_H) $(EXPR_H) \
@@ -3083,29 +3122,30 @@ cfgloop.o : cfgloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) coretypes.h $(TM_H) \
$(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(FLAGS_H) $(FUNCTION_H) \
$(OBSTACK_H) $(TOPLEV_H) $(TREE_FLOW_H) $(TREE_H) pointer-set.h output.h \
$(GGC_H)
-cfgloopanal.o : cfgloopanal.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
+$(TA)cfgloopanal.o : cfgloopanal.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
$(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) coretypes.h $(TM_H) \
$(OBSTACK_H) output.h graphds.h $(PARAMS_H)
graphds.o : graphds.c graphds.h $(CONFIG_H) $(SYSTEM_H) $(BITMAP_H) $(OBSTACK_H) \
coretypes.h vec.h vecprim.h
-loop-iv.o : loop-iv.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(BASIC_BLOCK_H) \
+$(TA)loop-iv.o : loop-iv.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(BASIC_BLOCK_H) \
hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) coretypes.h $(TM_H) $(OBSTACK_H) \
output.h intl.h $(TOPLEV_H) $(DF_H) $(HASHTAB_H)
-loop-invariant.o : loop-invariant.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
+$(TA)loop-invariant.o : loop-invariant.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
$(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) $(RECOG_H) \
coretypes.h $(TM_H) $(TM_P_H) $(FUNCTION_H) $(FLAGS_H) $(DF_H) \
$(OBSTACK_H) output.h $(HASHTAB_H) $(EXCEPT_H) $(PARAMS_H) $(REGS_H) ira.h
cfgloopmanip.o : cfgloopmanip.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
$(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(CFGLAYOUT_H) output.h \
coretypes.h $(TM_H) cfghooks.h $(OBSTACK_H) $(TREE_FLOW_H)
-loop-init.o : loop-init.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(GGC_H) \
+$(TA)loop-init.o : loop-init.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(GGC_H) \
$(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(CFGLAYOUT_H) \
coretypes.h $(TM_H) $(OBSTACK_H) $(TREE_PASS_H) $(TIMEVAR_H) $(FLAGS_H) \
$(DF_H)
-loop-unswitch.o : loop-unswitch.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TM_H) \
+$(TA)loop-unswitch.o : loop-unswitch.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
+ $(TM_H) \
$(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(CFGLAYOUT_H) $(PARAMS_H) \
output.h $(EXPR_H) coretypes.h $(TM_H) $(OBSTACK_H)
-loop-unroll.o: loop-unroll.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TM_H) \
+$(TA)loop-unroll.o: loop-unroll.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TM_H) \
$(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(CFGLAYOUT_H) $(PARAMS_H) \
output.h $(EXPR_H) coretypes.h $(TM_H) $(HASHTAB_H) $(RECOG_H) \
$(OBSTACK_H)
@@ -3114,13 +3154,15 @@ dominance.o : dominance.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TIMEVAR_H) graphds.h vecprim.h pointer-set.h
et-forest.o : et-forest.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
et-forest.h alloc-pool.h $(BASIC_BLOCK_H)
-combine.o : combine.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)combine.o : combine.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(RTL_H) \
$(FLAGS_H) $(FUNCTION_H) insn-config.h $(INSN_ATTR_H) $(REGS_H) $(EXPR_H) \
rtlhooks-def.h $(BASIC_BLOCK_H) $(RECOG_H) $(REAL_H) hard-reg-set.h \
$(TOPLEV_H) $(TM_P_H) $(TREE_H) $(TARGET_H) output.h $(PARAMS_H) $(OPTABS_H) \
insn-codes.h $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H) vecprim.h $(CGRAPH_H)
-reginfo.o : reginfo.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) addresses.h $(REGS_H) insn-config.h \
+$(TA)reginfo.o : reginfo.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(RTL_H) hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) addresses.h $(REGS_H) \
+ insn-config.h \
$(RECOG_H) reload.h $(REAL_H) $(TOPLEV_H) $(FUNCTION_H) output.h $(GGC_H) \
$(TM_P_H) $(EXPR_H) $(TIMEVAR_H) gt-reginfo.h $(HASHTAB_H) \
$(TARGET_H) $(TREE_PASS_H) $(DF_H) ira.h
@@ -3130,156 +3172,161 @@ varray.o : varray.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) \
$(HASHTAB_H) $(BCONFIG_H) $(VARRAY_H) $(TOPLEV_H)
vec.o : vec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h vec.h $(GGC_H) \
$(TOPLEV_H) $(HASHTAB_H)
-reload.o : reload.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)reload.o : reload.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FLAGS_H) output.h $(EXPR_H) $(OPTABS_H) reload.h $(RECOG_H) \
hard-reg-set.h insn-config.h $(REGS_H) $(FUNCTION_H) real.h $(TOPLEV_H) \
addresses.h $(TM_P_H) $(PARAMS_H) $(TARGET_H) $(REAL_H) $(DF_H) ira.h
-reload1.o : reload1.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)reload1.o : reload1.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(RTL_H) \
$(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) hard-reg-set.h insn-config.h \
$(BASIC_BLOCK_H) $(RECOG_H) output.h $(FUNCTION_H) $(TOPLEV_H) $(TM_P_H) \
addresses.h $(EXCEPT_H) $(TREE_H) $(REAL_H) $(FLAGS_H) $(MACHMODE_H) \
$(OBSTACK_H) $(DF_H) $(TARGET_H) $(EMIT_RTL_H) ira.h
-rtlhooks.o : rtlhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- rtlhooks-def.h $(EXPR_H) $(RECOG_H)
-postreload.o : postreload.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)rtlhooks.o : rtlhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(RTL_H) rtlhooks-def.h $(EXPR_H) $(RECOG_H)
+$(TA)postreload.o : postreload.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(REAL_H) $(FLAGS_H) $(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) \
hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) $(RECOG_H) output.h \
$(FUNCTION_H) $(TOPLEV_H) cselib.h $(TM_P_H) $(EXCEPT_H) $(TREE_H) $(MACHMODE_H) \
$(OBSTACK_H) $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H) $(DBGCNT_H)
-postreload-gcse.o : postreload-gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+$(TA)postreload-gcse.o : postreload-gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
$(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h $(TOPLEV_H) \
$(TM_P_H) $(EXCEPT_H) $(TREE_H) $(TARGET_H) $(HASHTAB_H) intl.h $(OBSTACK_H) \
$(PARAMS_H) $(TIMEVAR_H) $(TREE_PASS_H) $(REAL_H) $(DBGCNT_H)
-caller-save.o : caller-save.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- $(FLAGS_H) $(REGS_H) hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) $(FUNCTION_H) \
+$(TA)caller-save.o : caller-save.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+ $(TM_H) $(RTL_H) $(FLAGS_H) $(REGS_H) hard-reg-set.h insn-config.h \
+ $(BASIC_BLOCK_H) $(FUNCTION_H) \
addresses.h $(RECOG_H) reload.h $(EXPR_H) $(TOPLEV_H) $(TM_P_H) $(DF_H) \
output.h gt-caller-save.h $(GGC_H)
-bt-load.o : bt-load.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(EXCEPT_H) \
+$(TA)bt-load.o : bt-load.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(EXCEPT_H) \
$(RTL_H) hard-reg-set.h $(REGS_H) $(TM_P_H) $(FIBHEAP_H) output.h $(EXPR_H) \
$(TARGET_H) $(FLAGS_H) $(INSN_ATTR_H) $(FUNCTION_H) $(TREE_PASS_H) \
$(TOPLEV_H) $(DF_H) vecprim.h $(RECOG_H)
-reorg.o : reorg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)reorg.o : reorg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
conditions.h hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) insn-config.h \
$(INSN_ATTR_H) $(EXCEPT_H) $(RECOG_H) $(FUNCTION_H) $(FLAGS_H) output.h \
$(EXPR_H) $(TOPLEV_H) $(PARAMS_H) $(TM_P_H) $(OBSTACK_H) $(RESOURCE_H) \
$(TIMEVAR_H) $(TARGET_H) $(TREE_PASS_H)
-alias.o : alias.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)alias.o : alias.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FLAGS_H) hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) $(TOPLEV_H) output.h \
$(ALIAS_H) $(EMIT_RTL_H) $(GGC_H) $(FUNCTION_H) cselib.h $(TREE_H) $(TM_P_H) \
langhooks.h $(TARGET_H) gt-alias.h $(TIMEVAR_H) $(CGRAPH_H) \
$(SPLAY_TREE_H) $(VARRAY_H) $(IPA_TYPE_ESCAPE_H) $(DF_H) $(TREE_PASS_H) \
tree-ssa-alias.h pointer-set.h $(TREE_FLOW_H)
-stack-ptr-mod.o : stack-ptr-mod.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+$(TA)stack-ptr-mod.o : stack-ptr-mod.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(RTL_H) $(REGS_H) $(EXPR_H) $(TREE_PASS_H) \
$(BASIC_BLOCK_H) $(FLAGS_H) output.h $(DF_H)
-init-regs.o : init-regs.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+$(TA)init-regs.o : init-regs.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(RTL_H) $(REGS_H) $(EXPR_H) $(TREE_PASS_H) \
$(BASIC_BLOCK_H) $(FLAGS_H) $(DF_H)
-ira-build.o: ira-build.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)ira-build.o: ira-build.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TARGET_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) \
insn-config.h $(RECOG_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) \
$(PARAMS_H) $(DF_H) sparseset.h $(IRA_INT_H) output.h reload.h
-ira-costs.o: ira-costs.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)ira-costs.o: ira-costs.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
hard-reg-set.h $(RTL_H) $(EXPR_H) $(TM_P_H) $(FLAGS_H) $(BASIC_BLOCK_H) \
$(REGS_H) addresses.h insn-config.h $(RECOG_H) $(TOPLEV_H) $(TARGET_H) \
$(PARAMS_H) $(IRA_INT_H)
-ira-conflicts.o: ira-conflicts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(TARGET_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) \
+$(TA)ira-conflicts.o: ira-conflicts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
+ $(TM_H) $(TARGET_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) \
insn-config.h $(RECOG_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(PARAMS_H) \
$(DF_H) sparseset.h addresses.h $(IRA_INT_H)
-ira-color.o: ira-color.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)ira-color.o: ira-color.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TARGET_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) \
$(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) reload.h $(PARAMS_H) \
$(DF_H) $(SPLAY_TREE_H) $(IRA_INT_H)
-ira-emit.o: ira-emit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)ira-emit.o: ira-emit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(REGS_H) $(RTL_H) $(TM_P_H) $(TARGET_H) $(FLAGS_H) hard-reg-set.h \
$(BASIC_BLOCK_H) $(EXPR_H) $(RECOG_H) $(PARAMS_H) $(TIMEVAR_H) \
$(TREE_PASS_H) output.h reload.h errors.h $(DF_H) $(IRA_INT_H)
-ira-lives.o: ira-lives.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)ira-lives.o: ira-lives.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TARGET_H) $(RTL_H) $(REGS_H) $(EXCEPT_H) hard-reg-set.h $(FLAGS_H) \
insn-config.h $(RECOG_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(PARAMS_H) \
$(DF_H) sparseset.h $(IRA_INT_H)
-ira.o: ira.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+$(TA)ira.o: ira.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(REGS_H) $(RTL_H) $(TM_P_H) $(TARGET_H) $(FLAGS_H) $(OBSTACK_H) \
$(BITMAP_H) hard-reg-set.h $(BASIC_BLOCK_H) \
$(EXPR_H) $(RECOG_H) $(PARAMS_H) $(TIMEVAR_H) $(TREE_PASS_H) output.h \
$(EXCEPT_H) reload.h errors.h $(INTEGRATE_H) $(DF_H) $(GGC_H) $(IRA_INT_H)
-regmove.o : regmove.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- insn-config.h $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H)\
+$(TA)regmove.o : regmove.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(RTL_H) insn-config.h $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H)\
$(RECOG_H) output.h $(REGS_H) hard-reg-set.h $(FLAGS_H) $(FUNCTION_H) \
$(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(EXCEPT_H) ira.h reload.h
-combine-stack-adj.o : combine-stack-adj.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(TM_H) $(RTL_H) insn-config.h $(TIMEVAR_H) $(TREE_PASS_H) \
+$(TA)combine-stack-adj.o : combine-stack-adj.c $(CONFIG_H) $(SYSTEM_H) \
+ coretypes.h $(TM_H) $(RTL_H) insn-config.h $(TIMEVAR_H) $(TREE_PASS_H) \
$(RECOG_H) output.h $(REGS_H) hard-reg-set.h $(FLAGS_H) $(FUNCTION_H) \
$(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(DF_H) $(EXCEPT_H) reload.h
-ddg.o : ddg.c $(DDG_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TARGET_H) \
+$(TA)ddg.o : ddg.c $(DDG_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TARGET_H) \
$(TOPLEV_H) $(RTL_H) $(TM_P_H) $(REGS_H) $(FUNCTION_H) \
$(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(EXCEPT_H) $(RECOG_H) \
$(SCHED_INT_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(EXPR_H) $(BITMAP_H) \
hard-reg-set.h sbitmap.h $(TM_H)
-modulo-sched.o : modulo-sched.c $(DDG_H) $(CONFIG_H) $(CONFIG_H) $(SYSTEM_H) \
- coretypes.h $(TARGET_H) $(TOPLEV_H) $(RTL_H) $(TM_P_H) $(REGS_H) $(FUNCTION_H) \
+$(TA)modulo-sched.o : modulo-sched.c $(DDG_H) $(CONFIG_H) $(CONFIG_H) \
+ $(SYSTEM_H) coretypes.h $(TARGET_H) $(TOPLEV_H) $(RTL_H) $(TM_P_H) \
+ $(REGS_H) $(FUNCTION_H) \
$(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(EXCEPT_H) $(RECOG_H) \
$(SCHED_INT_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(EXPR_H) $(PARAMS_H) \
cfghooks.h $(GCOV_IO_H) hard-reg-set.h $(TM_H) $(TIMEVAR_H) $(TREE_PASS_H) \
$(DF_H) $(DBGCNT_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) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(TM_P_H) $(TARGET_H) output.h \
+$(TA)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) $(TOPLEV_H) $(RECOG_H) \
+ $(EXCEPT_H) $(TM_P_H) $(TARGET_H) output.h \
$(PARAMS_H) $(DBGCNT_H) $(CFGLOOP_H) ira.h
-sched-deps.o : sched-deps.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)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) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) cselib.h \
ira.h $(PARAMS_H) $(TM_P_H) ira.h $(TARGET_H)
-sched-rgn.o : sched-rgn.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)sched-rgn.o : sched-rgn.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) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
$(TM_P_H) sel-sched.h $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) $(TREE_PASS_H) \
$(DBGCNT_H)
-sched-ebb.o : sched-ebb.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)sched-ebb.o : sched-ebb.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) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(TM_P_H) \
$(PARAMS_H) $(CFGLAYOUT_H) $(TARGET_H) output.h
-sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(SCHED_INT_H) hard-reg-set.h $(BASIC_BLOCK_H) $(OBSTACK_H) \
$(REAL_H) $(TREE_PASS_H) $(INSN_ATTR_H)
-sel-sched.o : sel-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)sel-sched.o : sel-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
$(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
$(TM_P_H) output.h $(TARGET_H) $(TIMEVAR_H) $(TREE_PASS_H) \
$(SCHED_INT_H) $(GGC_H) $(TREE_H) langhooks.h rtlhooks-def.h \
$(SEL_SCHED_IR_H) $(SEL_SCHED_DUMP_H) sel-sched.h $(DBGCNT_H)
-sel-sched-dump.o : sel-sched-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
+$(TA)sel-sched-dump.o : sel-sched-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+ $(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
$(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
$(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) $(TREE_PASS_H) \
$(SEL_SCHED_DUMP_H) $(GGC_H) $(TREE_H) $(LANGHOOKS_DEF_H) $(SEL_SCHED_IR_H) \
output.h $(BASIC_BLOCK_H) cselib.h
-sel-sched-ir.o : sel-sched-ir.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
+$(TA)sel-sched-ir.o : sel-sched-ir.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+ $(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
$(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) $(RECOG_H) $(EXCEPT_H) $(PARAMS_H) \
$(TM_P_H) $(TARGET_H) $(TIMEVAR_H) $(TREE_PASS_H) $(SCHED_INT_H) $(GGC_H) \
$(TREE_H) langhooks.h rtlhooks-def.h $(SEL_SCHED_IR_H) $(SEL_SCHED_DUMP_H)
-final.o : final.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)final.o : final.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) intl.h $(REGS_H) $(RECOG_H) conditions.h \
insn-config.h $(INSN_ATTR_H) $(FUNCTION_H) output.h hard-reg-set.h \
$(EXCEPT_H) debug.h xcoffout.h $(TOPLEV_H) reload.h dwarf2out.h \
$(TREE_PASS_H) $(BASIC_BLOCK_H) $(TM_P_H) $(TARGET_H) $(EXPR_H) \
$(CFGLAYOUT_H) dbxout.h $(TIMEVAR_H) $(CGRAPH_H) $(COVERAGE_H) $(REAL_H) \
$(DF_H) vecprim.h $(GGC_H) $(CFGLOOP_H) $(PARAMS_H) $(TREE_FLOW_H)
-recog.o : recog.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)recog.o : recog.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FUNCTION_H) $(BASIC_BLOCK_H) $(REGS_H) $(RECOG_H) $(EXPR_H) \
$(FLAGS_H) insn-config.h $(INSN_ATTR_H) $(TOPLEV_H) output.h reload.h \
addresses.h $(TM_P_H) $(TIMEVAR_H) $(TREE_PASS_H) hard-reg-set.h $(REAL_H) \
$(DF_H) $(DBGCNT_H) $(TARGET_H)
-reg-stack.o : reg-stack.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)reg-stack.o : reg-stack.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(TREE_H) $(RECOG_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) \
insn-config.h $(TOPLEV_H) reload.h $(FUNCTION_H) $(TM_P_H) $(GGC_H) \
$(BASIC_BLOCK_H) $(CFGLAYOUT_H) output.h $(VARRAY_H) $(TIMEVAR_H) \
$(TREE_PASS_H) $(TARGET_H) vecprim.h $(DF_H)
sreal.o: sreal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) sreal.h
-predict.o: predict.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)predict.o: predict.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) \
hard-reg-set.h output.h $(TOPLEV_H) $(RECOG_H) $(FUNCTION_H) $(EXCEPT_H) \
$(TM_P_H) $(PREDICT_H) sreal.h $(PARAMS_H) $(TARGET_H) $(CFGLOOP_H) \
@@ -3287,7 +3334,7 @@ predict.o: predict.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_FLOW_H) $(TREE_PASS_H) $(EXPR_H) pointer-set.h
lists.o: lists.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TOPLEV_H) \
$(RTL_H) $(GGC_H) gt-lists.h
-bb-reorder.o : bb-reorder.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)bb-reorder.o : bb-reorder.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(FLAGS_H) $(TIMEVAR_H) output.h $(CFGLAYOUT_H) $(FIBHEAP_H) \
$(TARGET_H) $(FUNCTION_H) $(TM_P_H) $(OBSTACK_H) $(EXPR_H) $(REGS_H) \
$(PARAMS_H) $(TOPLEV_H) $(TREE_PASS_H) $(DF_H)
@@ -3295,7 +3342,7 @@ tracer.o : tracer.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(BASIC_BLOCK_H) hard-reg-set.h output.h $(CFGLAYOUT_H) \
$(FLAGS_H) $(TIMEVAR_H) $(PARAMS_H) $(COVERAGE_H) $(FIBHEAP_H) \
$(TREE_PASS_H) $(TREE_FLOW_H) $(TREE_INLINE_H)
-cfglayout.o : cfglayout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)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 \
@@ -3306,11 +3353,11 @@ regcprop.o : regcprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \
output.h $(RECOG_H) $(FUNCTION_H) $(OBSTACK_H) $(FLAGS_H) $(TM_P_H) \
addresses.h reload.h $(TOPLEV_H) $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H)
-regrename.o : regrename.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)regrename.o : regrename.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \
output.h $(RECOG_H) $(FUNCTION_H) $(OBSTACK_H) $(FLAGS_H) $(TM_P_H) \
addresses.h reload.h $(TOPLEV_H) $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H)
-ifcvt.o : ifcvt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+$(TA)ifcvt.o : ifcvt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(REGS_H) $(TOPLEV_H) $(FLAGS_H) insn-config.h $(FUNCTION_H) $(RECOG_H) \
$(TARGET_H) $(BASIC_BLOCK_H) $(EXPR_H) output.h $(EXCEPT_H) $(TM_P_H) \
$(REAL_H) $(OPTABS_H) $(CFGLOOP_H) hard-reg-set.h $(TIMEVAR_H) \
@@ -3333,7 +3380,7 @@ pretty-print.o: $(CONFIG_H) $(SYSTEM_H) coretypes.h intl.h $(PRETTY_PRINT_H) \
errors.o : errors.c $(CONFIG_H) $(SYSTEM_H) errors.h $(BCONFIG_H)
dbgcnt.o: dbgcnt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h errors.h $(DBGCNT_H) \
$(TM_H) $(RTL_H) output.h
-lower-subreg.o : lower-subreg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+$(TA)lower-subreg.o : lower-subreg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(MACHMODE_H) $(TM_H) $(RTL_H) $(TM_P_H) $(TIMEVAR_H) $(FLAGS_H) \
insn-config.h $(BASIC_BLOCK_H) $(RECOG_H) $(OBSTACK_H) $(BITMAP_H) \
$(EXPR_H) $(EXCEPT_H) $(REGS_H) $(TREE_PASS_H) $(DF_H)
@@ -3345,7 +3392,8 @@ $(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) \
langhooks.h $(GGC_H) $(OPTABS_H) $(REAL_H) tm-constrs.h $(GIMPLE_H) $(DF_H) \
cselib.h gt-$(basename $(notdir $(out_file))).h
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
- $(out_file) $(OUTPUT_OPTION)
+ $(out_file) $(OUTPUT_OPTION) -Dtargetm=this_targetm \
+ -DTARGET_NAME=\"$(target_noncanonical)
# Build auxiliary files that support ecoff format.
mips-tfile: mips-tfile.o version.o $(LIBDEPS)
@@ -3380,8 +3428,8 @@ libbackend.o : $(OBJS-common:.o=.c) $(out_file) \
# and compile them.
.PRECIOUS: insn-config.h insn-flags.h insn-codes.h insn-constants.h \
- insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
- insn-attr.h insn-attrtab.c insn-preds.c
+ $(TA)insn-emit.c $(TA)insn-recog.c $(TA)insn-extract.c $(TA)insn-output.c \
+ $(TA)insn-peep.c insn-attr.h $(TA)insn-attrtab.c $(TA)insn-preds.c
# Dependencies for the md file. The first time through, we just assume
# the md file itself and the generated dependency file (in order to get
@@ -3397,37 +3445,38 @@ s-mddeps: $(md_file) $(MD_INCLUDES) build/genmddeps$(build_exeext)
# Header dependencies for generated source files.
genrtl.o : genrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H)\
$(GGC_H) $(OBSTACK_H)
-insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(TM_H) $(RTL_H) $(REGS_H) $(REAL_H) output.h $(INSN_ATTR_H) \
+$(TA)insn-attrtab.o : $(TA)insn-attrtab.c $(CONFIG_H) $(SYSTEM_H) \
+ coretypes.h $(TM_H) $(RTL_H) $(REGS_H) $(REAL_H) output.h $(INSN_ATTR_H) \
insn-config.h $(TOPLEV_H) $(RECOG_H) $(TM_P_H) $(FLAGS_H)
-insn-automata.o : insn-automata.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(TM_H) $(RTL_H) $(REGS_H) $(REAL_H) output.h $(INSN_ATTR_H) \
+$(TA)insn-automata.o : $(TA)insn-automata.c $(CONFIG_H) $(SYSTEM_H) \
+ coretypes.h $(TM_H) $(RTL_H) $(REGS_H) $(REAL_H) output.h $(INSN_ATTR_H) \
insn-config.h $(TOPLEV_H) $(RECOG_H) $(TM_P_H) $(FLAGS_H)
-insn-emit.o : insn-emit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(RTL_H) $(TM_P_H) $(FUNCTION_H) $(EXPR_H) $(OPTABS_H) $(REAL_H) \
+$(TA)insn-emit.o : $(TA)insn-emit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+ $(TM_H) $(RTL_H) $(TM_P_H) $(FUNCTION_H) $(EXPR_H) $(OPTABS_H) $(REAL_H) \
dfp.h $(FLAGS_H) output.h insn-config.h hard-reg-set.h $(RECOG_H) \
$(RESOURCE_H) reload.h $(TOPLEV_H) $(REGS_H) tm-constrs.h $(GGC_H) \
$(BASIC_BLOCK_H) $(INTEGRATE_H)
-insn-extract.o : insn-extract.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+$(TA)insn-extract.o : $(TA)insn-extract.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(TOPLEV_H) insn-config.h $(RECOG_H)
-insn-modes.o : insn-modes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(MACHMODE_H) $(REAL_H)
-insn-opinit.o : insn-opinit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+$(TA)insn-modes.o : $(TA)insn-modes.c $(CONFIG_H) $(SYSTEM_H) \
+ coretypes.h $(TM_H) $(MACHMODE_H) $(REAL_H)
+$(TA)insn-opinit.o : $(TA)insn-opinit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(TM_P_H) insn-config.h $(FLAGS_H) $(RECOG_H) \
$(EXPR_H) $(OPTABS_H) reload.h
-insn-output.o : insn-output.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+$(TA)insn-output.o : $(TA)insn-output.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(GGC_H) $(REGS_H) $(REAL_H) conditions.h \
hard-reg-set.h insn-config.h $(INSN_ATTR_H) $(EXPR_H) output.h \
$(RECOG_H) $(FUNCTION_H) $(TOPLEV_H) $(FLAGS_H) insn-codes.h $(TM_P_H) \
$(TARGET_H) tm-constrs.h
-insn-peep.o : insn-peep.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+$(TA)insn-peep.o : $(TA)insn-peep.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+ $(TM_H) \
insn-config.h $(RTL_H) $(TM_P_H) $(REGS_H) output.h $(REAL_H) \
$(RECOG_H) $(EXCEPT_H) $(FUNCTION_H) $(TOPLEV_H) $(FLAGS_H) tm-constrs.h
-insn-preds.o : insn-preds.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+$(TA)insn-preds.o : $(TA)insn-preds.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(TREE_H) insn-config.h $(RECOG_H) output.h \
$(FLAGS_H) $(FUNCTION_H) hard-reg-set.h $(RESOURCE_H) $(TM_P_H) \
$(TOPLEV_H) reload.h $(REGS_H) $(REAL_H) tm-constrs.h
-insn-recog.o : insn-recog.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+$(TA)insn-recog.o : $(TA)insn-recog.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) insn-config.h $(RECOG_H) output.h $(FLAGS_H) \
$(FUNCTION_H) hard-reg-set.h $(RESOURCE_H) $(TM_P_H) $(TOPLEV_H) \
reload.h $(REAL_H) $(REGS_H) tm-constrs.h
@@ -3441,9 +3490,9 @@ insn-recog.o : insn-recog.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
simple_generated_h = insn-attr.h insn-codes.h insn-config.h insn-flags.h
-simple_generated_c = insn-attrtab.c insn-automata.c insn-emit.c \
- insn-extract.c insn-opinit.c insn-output.c \
- insn-peep.c insn-recog.c
+simple_generated_c = $(TA)insn-attrtab.c $(TA)insn-automata.c \
+ $(TA)insn-emit.c $(TA)insn-extract.c $(TA)insn-opinit.c \
+ $(TA)insn-output.c $(TA)insn-peep.c $(TA)insn-recog.c
$(simple_generated_h): insn-%.h: s-%; @true
@@ -3454,12 +3503,12 @@ $(simple_generated_h:insn-%.h=s-%): s-%: build/gen%$(build_exeext) \
$(SHELL) $(srcdir)/../move-if-change tmp-$*.h insn-$*.h
$(STAMP) s-$*
-$(simple_generated_c): insn-%.c: s-%; @true
-$(simple_generated_c:insn-%.c=s-%): s-%: build/gen%$(build_exeext) \
+$(simple_generated_c): $(TA)insn-%.c: s-%; @true
+$(simple_generated_c:$(TA)insn-%.c=s-%): s-%: build/gen%$(build_exeext) \
$(MD_DEPS) insn-conditions.md
$(RUN_GEN) build/gen$*$(build_exeext) $(md_file) \
insn-conditions.md > tmp-$*.c
- $(SHELL) $(srcdir)/../move-if-change tmp-$*.c insn-$*.c
+ $(SHELL) $(srcdir)/../move-if-change tmp-$*.c $(TA)insn-$*.c
$(STAMP) s-$*
generated_files = config.h tm.h $(TM_P_H) $(TM_H) multilib.h \
@@ -3519,13 +3568,13 @@ s-genrtl-h: build/gengenrtl$(build_exeext)
$(SHELL) $(srcdir)/../move-if-change tmp-genrtl.h genrtl.h
$(STAMP) s-genrtl-h
-insn-modes.c: s-modes; @true
+$(TA)insn-modes.c: s-modes; @true
insn-modes.h: s-modes-h; @true
-min-insn-modes.c: s-modes-m; @true
+$(TA)min-insn-modes.c: s-modes-m; @true
s-modes: build/genmodes$(build_exeext)
$(RUN_GEN) build/genmodes$(build_exeext) > tmp-modes.c
- $(SHELL) $(srcdir)/../move-if-change tmp-modes.c insn-modes.c
+ $(SHELL) $(srcdir)/../move-if-change tmp-modes.c $(TA)insn-modes.c
$(STAMP) s-modes
s-modes-h: build/genmodes$(build_exeext)
@@ -3535,16 +3584,16 @@ s-modes-h: build/genmodes$(build_exeext)
s-modes-m: build/genmodes$(build_exeext)
$(RUN_GEN) build/genmodes$(build_exeext) -m > tmp-min-modes.c
- $(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c min-insn-modes.c
+ $(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c $(TA)min-insn-modes.c
$(STAMP) s-modes-m
-insn-preds.c: s-preds; @true
+$(TA)insn-preds.c: s-preds; @true
tm-preds.h: s-preds-h; @true
tm-constrs.h: s-constrs-h; @true
s-preds: $(MD_DEPS) build/genpreds$(build_exeext)
$(RUN_GEN) build/genpreds$(build_exeext) $(md_file) > tmp-preds.c
- $(SHELL) $(srcdir)/../move-if-change tmp-preds.c insn-preds.c
+ $(SHELL) $(srcdir)/../move-if-change tmp-preds.c $(TA)insn-preds.c
$(STAMP) s-preds
s-preds-h: $(MD_DEPS) build/genpreds$(build_exeext)
@@ -3641,7 +3690,7 @@ s-gtype: build/gengtype$(build_exeext) $(filter-out [%], $(GTFILES)) \
build/%.o : # dependencies provided by explicit rule later
$(COMPILER_FOR_BUILD) -c $(BUILD_COMPILERFLAGS) $(BUILD_CPPFLAGS) \
- -o $@ $<
+ $(if $(EXTRA_TARGET),-DEXTRA_TARGET=$(EXTRA_TARGET)) -o $@ $<
# Header dependencies for the programs that generate source code.
# These are library modules...
@@ -3651,7 +3700,7 @@ build/gensupport.o: gensupport.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
gensupport.h
build/ggc-none.o : ggc-none.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
$(GGC_H)
-build/min-insn-modes.o : min-insn-modes.c $(BCONFIG_H) $(SYSTEM_H) \
+build/min-insn-modes.o : $(TA)min-insn-modes.c $(BCONFIG_H) $(SYSTEM_H) \
$(MACHMODE_H)
build/print-rtl.o: print-rtl.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
$(GTM_H) $(RTL_BASE_H)
@@ -3705,8 +3754,19 @@ build/gengtype.o : gengtype.c $(BCONFIG_H) $(SYSTEM_H) gengtype.h \
rtl.def insn-notes.def errors.h double-int.h
build/genmddeps.o: genmddeps.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
$(GTM_H) $(RTL_BASE_H) errors.h gensupport.h
+build/genmodes.o : \
+ BUILD_CPPFLAGS += -Doutput_target='"$(subst -,_,$(target_noncanonical))"'
build/genmodes.o : genmodes.c $(BCONFIG_H) $(SYSTEM_H) errors.h \
- $(HASHTAB_H) machmode.def $(extra_modes_file)
+ $(HASHTAB_H) machmode.def extra-modes.h
+extra-modes.h: Makefile $(foreach ta,$(EXTRA_TARGETS),$(ta)-extra-modes.h)
+ echo target=\"$(subst -,_,$(target_noncanonical))\"\; > $@
+ifdef extra_modes_file
+ echo \#include \"$(extra_modes_file)\" >> $@
+else
+ echo // no extra_modes_file. >> $@
+endif
+ cat $(foreach ta,$(EXTRA_TARGETS),$(ta)-extra-modes.h) >> $@
+ echo 'target = (const char *) 0;' >> $@
build/genopinit.o : genopinit.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h $(GTM_H) errors.h gensupport.h
build/genoutput.o : genoutput.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
@@ -3718,6 +3778,84 @@ build/genpreds.o : genpreds.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
build/genrecog.o : genrecog.c $(RTL_BASE_H) $(BCONFIG_H) $(SYSTEM_H) \
coretypes.h $(GTM_H) errors.h gensupport.h
+ifndef TA
+%-extra-modes.h: %/Makefile
+ $(MAKE) -C $* ../$*-extra-modes.h TA=$*-
+endif
+
+../$(TA)extra-modes.h:
+ echo target=\"$(subst -,_,$(target_noncanonical))\"\; > $@
+ifdef extra_modes_file
+ echo \#include \"$(extra_modes_file:../%=%)\" >> $@
+else
+ echo // no extra_modes_file. >> $@
+endif
+
+#Fixme: modify EXTRA_TARGETS configuration to make sure that we use a
+#uniform type and storage layout
+COMMON_ABI = $(TM_H)
+
+#make sure ENABLE_NLS is consistent between this dir and subdirs.
+#configure checks for ../intl/config.intl
+intl/config.intl: ../intl/config.intl
+ -$(LN) -s ../intl .
+
+define EXTRA_TARGET_RULES
+
+# ??? This is no good - --with-mpfr doesn't set the right variables when
+# used at this level. Need to pass GMPLIBS and GMPINC for $(MAKE) instead.
+## we need to pass down options like --with-mpfr; but we need to loose
+##the original --target= and --with-extra=-target-list options.
+#THIS-TARGET/Makefile: $(COMMON_ABI)
+# -mkdir THIS-TARGET
+# cd THIS-TARGET \
+# && $(srcdir:.%=../.%)/configure --target=THIS-TARGET \
+# $(filter-out --target%,$(subst --with-extra-target-list='$(EXTRA_TARGETS)',,$(wordlist 2,999,$(gcc_config_arguments))))
+
+THIS-TARGET: intl/config.intl
+ -mkdir THIS-TARGET
+ cd THIS-TARGET \
+ && $(srcdir:.%=../.%)/configure --target=THIS-TARGET
+
+THIS-TARGET/Makefile: THIS-TARGET Makefile
+ $(MAKE) -C THIS-TARGET Makefile
+
+# Wo don't want a stamp file for the recursive make invocation, because
+# only the recursive make understands all the dependencies for THIS-TARGET,
+# and besides, stamp file can get out-of-sync with what they stand for
+# when individual files are deleted manually or due interrupts / error
+# conditions. Just say that each file is up-to-date if we have used
+# a recursive make to update it.
+$(addprefix THIS-TARGET/THIS-TARGET-,$(OBJS-rtl) xout.o) : make-THIS-TARGET ;
+
+# Use a single recursive make invokation to update all files of THIS-TARGET.
+# Having more than one would not merely cost more time, but cause serious
+# synchronization issues for parallel make.
+.PHONY: make-THIS-TARGET
+make-THIS-TARGET : THIS-TARGET/Makefile THIS-TARGET/extra-modes.h $(COMMON_ABI)
+ $(MAKE) -C THIS-TARGET make-OBJS-rtl \
+ EXTRA_TARGET='THIS_TARGET' TA='THIS-TARGET-' \
+ TARGET_NUM=THIS-TARGET-NUM \
+ toplevel_builddir='$(toplevel_builddir:.%=../.%)' \
+ GMPLIBS='$(GMPLIBS)' GMPINC='$(GMPINC)'
+THIS-TARGET/extra-modes.h: extra-modes.h
+ cp $< $@
+
+endef
+# EXTRA_TARGET_RULES
+
+.PHONY: make-OBJS-rtl
+make-OBJS-rtl: $(addprefix $(TA),$(OBJS-rtl) xout.o) ;
+
+enumerate=$(if $(1),$(call enumerate,$(wordlist 2,999,$(1))) $(words $(1)))
+
+ifndef EXTRA_TARGET
+$(eval $(foreach num,$(call enumerate,$(EXTRA_TARGETS)),\
+$(subst THIS_TARGET,$(subst -,_,$(word $(num),$(EXTRA_TARGETS))),\
+$(subst THIS-TARGET,$(word $(num),$(EXTRA_TARGETS)),\
+$(subst THIS-TARGET-NUM,$(num),$(value EXTRA_TARGET_RULES))))))
+endif
+
# Compile the programs that generate insn-* from the machine description.
# They are compiled with $(COMPILER_FOR_BUILD), and associated libraries,
# since they need to run on this machine
diff --git a/gcc/README-multi-target b/gcc/README-multi-target
new file mode 100644
index 00000000000..353b54e5e7d
--- /dev/null
+++ b/gcc/README-multi-target
@@ -0,0 +1,36 @@
+rtl passes are duplicated for each target architecture, using namespaces
+and object file name prefixes to avoid name clashes.
+Making architecture-specific functions member functions of an architecture
+class would be conceptually cleaner, but using non-static functions would
+require passing the this-pointer around all the time thus making the compiler
+slower.
+Unfortunately, virtual static member functions are not supported by the C++
+language. And even if they were, it would require lots of code changes to
+use them throughout.
+
+The target vector has to be broken up into a target ABI part,
+a target architecture part - or a set of target architecture parts,
+and a target architectures heuristics part;
+the latter guides tree optimizations depending on the set of target
+architectures, e.g. the tree vectorizer wants a notion of UNITS_PER_WORD
+and the set of vector modes supported, even though these are really a
+function of the target architecture.
+
+Targets are expected to be uniform with respect to targetm.have_ctors_dtors.
+(Otherwise cgraphunit would need to be target architecture specific.)
+
+The passes have to be broken up into a set of tree passes and a set of
+rtl passes. rtl passes are target architecture specific, and use a target
+architecture pass manager in the target architecture namespace.
+
+For each extra target architecture, there is a constructor which adds a target
+architecture vector with an architecture specific pass list (starting with
+rtl expansion) to a list of target architectures.
+
+x_rtl (crtl) is target architecture specific because state has to be saved
+across functions of the same architecture in order to support constant
+pools shared across functions.
+
+Some parameters will need to be able to hold different values for different
+target architectures, e.g. PARAM_PREDICTABLE_BRANCH_OUTCOME (which requires
+predict.c to have target architecture specific versions).
diff --git a/gcc/TDEP-SOURCES b/gcc/TDEP-SOURCES
new file mode 100644
index 00000000000..b54311f271c
--- /dev/null
+++ b/gcc/TDEP-SOURCES
@@ -0,0 +1,123 @@
+This is a list of source files that have to be compiled target-architecture
+dependent.
+Mostly this are passes that operate on rtl; passes that work on rtl are
+included without checking for evidence that they actually depend on the
+target architecture, since they could reasonably depend on it, and
+changing the dependencies and build system all the time for what should
+be implementation choices seems to promote too much churn.
+Some utility modules are also included because they depend on things
+like FIRST_PSEUDO_REGISTER.
+genmodes.c and read-rtl.c area also included because they depend on
+NUM_MACHINE_MODES.
+??? NUM_MACHINE_MODES is now uniform.
+
+VOIDmode and BLKmode are assumed to be constant.
+BITS_PER_UNIT must also be unchanging; otherwise we'd have to redefine trees
+size meansures to be independent of BITS_PER_UNIT.
+
+// FIXME: originally planned to generate insn-* files that use #ifdef EXTRA_TARGET / #ifdef EXTRA_TARGET_XXX to select the right content; is there still any use for EXTRA_TARGET_XXX ?
+// FIXME: gty handling needs to be unified.
+
+alias.c
+auto-inc-dec.c
+bb-reorder.c
+bt-load.c
+builtins.c
+caller-save.c
+calls.c
+cfganal.c
+cfgbuild.c
+cfg.c
+cfgcleanup.c
+cfgexpand.c
+cfghooks.c
+cfglayout.c
+cfgloopanal.c
+cfgrtl.c
+combine.c
+combine-stack-adj.c
+cse.c
+cselib.c
+dbxout.c
+dce.c
+ddg.c
+df-byte-scan.c
+df-core.c
+df-problems.c
+df-scan.c
+dojump.c
+dse.c
+dwarf2asm.c
+dwarf2out.c
+emit-rtl.c
+except.c
+explow.c
+expmed.c
+expr.c
+final.c FIXME: init_final
+function.c
+fwprop.c
+gcse.c
+genopinit.c
+graph.c
+haifa-sched.c
+ifcvt.c
+init-regs.c
+integrate.c
+ira-build.c
+ira.c
+ira-color.c
+ira-conflicts.c
+ira-costs.c
+ira-emit.c
+ira-lives.c
+jump.c
+loop-doloop.c
+loop-init.c
+loop-invariant.c
+loop-iv.c
+loop-unroll.c
+loop-unswitch.c
+lower-subreg.c
+mode-switching.c
+modulo-sched.c
+optabs.c
+passes.c FIXME rest_of_decl_compilation FIXME
+postreload.c
+postreload-gcse.c
+predict.c
+print-rtl.c
+read-rtl.c
+recog.c
+reginfo.c
+regmove.c
+regrename.c
+reg-stack.c
+regstat.c
+reload1.c
+reload.c
+reorg.c
+resource.c
+rtlanal.c
+rtl.c
+rtl-factoring.c
+rtlhooks.c
+sched-deps.c
+sched-ebb.c
+sched-rgn.c
+sched-vis.c
+sdbout.c
+see.c
+sel-sched.c
+sel-sched-dump.c
+sel-sched-ir.c
+simplify-rtx.c
+stack-ptr-mod.c
+stmt.c
+stor-layout.c
+targhooks.c
+toplev.c FIXME: backend_init_target lang_dependent_init_target general_init emit_debug_global_declarations compile_file do_compile
+varasm.c
+var-tracking.c
+vmsdbgout.c
+web.c
diff --git a/gcc/addresses.h b/gcc/addresses.h
index 7413a856392..53d6343ebef 100644
--- a/gcc/addresses.h
+++ b/gcc/addresses.h
@@ -17,6 +17,9 @@ 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 "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Wrapper function to unify target macros MODE_CODE_BASE_REG_CLASS,
MODE_BASE_REG_REG_CLASS, MODE_BASE_REG_CLASS and BASE_REG_CLASS.
Arguments as for the MODE_CODE_BASE_REG_CLASS macro. */
@@ -78,3 +81,4 @@ regno_ok_for_base_p (unsigned regno, enum machine_mode mode,
return ok_for_base_p_1 (regno, mode, outer_code, index_code);
}
+END_TARGET_SPECIFIC
diff --git a/gcc/alias.c b/gcc/alias.c
index 41a2f2318f7..b743a5983d4 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -49,6 +49,9 @@ along with GCC; see the file COPYING3. If not see
#include "tree-ssa-alias.h"
#include "pointer-set.h"
#include "tree-flow.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* The aliasing API provided here solves related but different problems:
@@ -2778,3 +2781,5 @@ end_alias_analysis (void)
}
#include "gt-alias.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/alias.h b/gcc/alias.h
index 5907215824d..ae469e012a0 100644
--- a/gcc/alias.h
+++ b/gcc/alias.h
@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see
#define GCC_ALIAS_H
#include "coretypes.h"
+#include "multi-target.h"
/* The type of an alias set. Code currently assumes that variables of
this type can take the values 0 (the alias set which aliases
@@ -30,6 +31,8 @@ along with GCC; see the file COPYING3. If not see
set yet). */
typedef int alias_set_type;
+START_TARGET_SPECIFIC
+
extern alias_set_type new_alias_set (void);
extern alias_set_type get_alias_set (tree);
extern alias_set_type get_deref_alias_set (tree);
@@ -51,4 +54,6 @@ extern bool insn_alias_sets_conflict_p (rtx, rtx);
memory barriers, including an address of SCRATCH. */
#define ALIAS_SET_MEMORY_BARRIER ((alias_set_type) -1)
+END_TARGET_SPECIFIC
+
#endif /* GCC_ALIAS_H */
diff --git a/gcc/auto-inc-dec.c b/gcc/auto-inc-dec.c
index 7d48f4227c1..a57bcc41e90 100644
--- a/gcc/auto-inc-dec.c
+++ b/gcc/auto-inc-dec.c
@@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "dbgcnt.h"
#include "target.h"
+#include "multi-target.h"
/* This pass was originally removed from flow.c. However there is
almost nothing that remains of that code.
@@ -112,6 +113,8 @@ along with GCC; see the file COPYING3. If not see
before the ref or +c if the increment was after the ref, then if we
can do the combination but switch the pre/post bit. */
+START_TARGET_SPECIFIC
+
#ifdef AUTO_INC_DEC
enum form
@@ -1527,3 +1530,5 @@ struct rtl_opt_pass pass_inc_dec =
TODO_df_finish, /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index 89156114036..71aef2ee8d4 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see
#include "predict.h"
#include "vec.h"
#include "function.h"
+#include "multi-target.h"
/* Head of register set linked list. */
typedef bitmap_head regset_head;
@@ -79,6 +80,7 @@ typedef bitmap regset;
/* Return true if a register is set in a register set. */
#define REGNO_REG_SET_P(TO, REG) bitmap_bit_p (TO, REG)
+START_TARGET_SPECIFIC
/* Copy the hard registers in a register set to the hard register set. */
extern void reg_set_to_hard_reg_set (HARD_REG_SET *, const_bitmap);
#define REG_SET_TO_HARD_REG_SET(TO, FROM) \
@@ -86,6 +88,7 @@ do { \
CLEAR_HARD_REG_SET (TO); \
reg_set_to_hard_reg_set (&TO, FROM); \
} while (0)
+END_TARGET_SPECIFIC
typedef bitmap_iterator reg_set_iterator;
@@ -501,46 +504,6 @@ extern bitmap_obstack reg_obstack;
#define set_block_for_insn(INSN, BB) (BLOCK_FOR_INSN (INSN) = BB)
-extern void compute_bb_for_insn (void);
-extern unsigned int free_bb_for_insn (void);
-extern void update_bb_for_insn (basic_block);
-
-extern void insert_insn_on_edge (rtx, edge);
-basic_block split_edge_and_insert (edge, rtx);
-
-extern void commit_one_edge_insertion (edge e);
-extern void commit_edge_insertions (void);
-
-extern void remove_fake_edges (void);
-extern void remove_fake_exit_edges (void);
-extern void add_noreturn_fake_exit_edges (void);
-extern void connect_infinite_loops_to_exit (void);
-extern edge unchecked_make_edge (basic_block, basic_block, int);
-extern edge cached_make_edge (sbitmap, basic_block, basic_block, int);
-extern edge make_edge (basic_block, basic_block, int);
-extern edge make_single_succ_edge (basic_block, basic_block, int);
-extern void remove_edge_raw (edge);
-extern void redirect_edge_succ (edge, basic_block);
-extern edge redirect_edge_succ_nodup (edge, basic_block);
-extern void redirect_edge_pred (edge, basic_block);
-extern basic_block create_basic_block_structure (rtx, rtx, rtx, basic_block);
-extern void clear_bb_flags (void);
-extern int post_order_compute (int *, bool, bool);
-extern int inverted_post_order_compute (int *);
-extern int pre_and_rev_post_order_compute (int *, int *, bool);
-extern int dfs_enumerate_from (basic_block, int,
- bool (*)(const_basic_block, const void *),
- basic_block *, int, const void *);
-extern void compute_dominance_frontiers (bitmap *);
-extern bitmap compute_idf (bitmap, bitmap *);
-extern void dump_bb_info (basic_block, bool, bool, int, const char *, FILE *);
-extern void dump_edge_info (FILE *, edge, int);
-extern void brief_dump_cfg (FILE *);
-extern void clear_edges (void);
-extern void scale_bbs_frequencies_int (basic_block *, int, int, int);
-extern void scale_bbs_frequencies_gcov_type (basic_block *, int, gcov_type,
- gcov_type);
-
/* Structure to group all of the information to process IF-THEN and
IF-THEN-ELSE blocks for the conditional execution support. This
needs to be in a public file in case the IFCVT macros call
@@ -829,6 +792,10 @@ extern struct edge_list *pre_edge_rev_lcm (int, sbitmap *,
sbitmap **);
extern void compute_available (sbitmap *, sbitmap *, sbitmap *, sbitmap *);
+START_TARGET_SPECIFIC
+/* In loop-unroll.c */
+basic_block split_edge_and_insert (edge, rtx);
+
/* In predict.c */
extern bool maybe_hot_bb_p (const_basic_block);
extern bool maybe_hot_edge_p (edge);
@@ -855,6 +822,33 @@ extern bool br_prob_note_reliable_p (const_rtx);
extern bool predictable_edge_p (edge);
/* In cfg.c */
+extern edge unchecked_make_edge (basic_block, basic_block, int);
+extern edge cached_make_edge (sbitmap, basic_block, basic_block, int);
+extern edge make_edge (basic_block, basic_block, int);
+extern edge make_single_succ_edge (basic_block, basic_block, int);
+extern void remove_edge_raw (edge);
+extern void redirect_edge_succ (edge, basic_block);
+extern edge redirect_edge_succ_nodup (edge, basic_block);
+extern void redirect_edge_pred (edge, basic_block);
+extern void clear_bb_flags (void);
+extern void dump_bb_info (basic_block, bool, bool, int, const char *, FILE *);
+extern void dump_edge_info (FILE *, edge, int);
+extern void brief_dump_cfg (FILE *);
+extern void clear_edges (void);
+extern void scale_bbs_frequencies_int (basic_block *, int, int, int);
+extern void scale_bbs_frequencies_gcov_type (basic_block *, int, gcov_type,
+ gcov_type);
+extern void check_bb_profile (basic_block, FILE *);
+extern void update_bb_profile_for_threading (basic_block, int, gcov_type, edge);
+extern void initialize_original_copy_tables (void);
+extern void free_original_copy_tables (void);
+extern void set_bb_original (basic_block, basic_block);
+extern basic_block get_bb_original (basic_block);
+extern void set_bb_copy (basic_block, basic_block);
+extern basic_block get_bb_copy (basic_block);
+void set_loop_copy (struct loop *, struct loop *);
+struct loop *get_loop_copy (struct loop *);
+
extern void init_flow (struct function *);
extern void debug_bb (basic_block);
extern basic_block debug_bb_n (int);
@@ -875,7 +869,19 @@ extern void clear_aux_for_edges (void);
extern void free_aux_for_edges (void);
/* In cfganal.c */
+extern void remove_fake_edges (void);
+extern void remove_fake_exit_edges (void);
+extern void add_noreturn_fake_exit_edges (void);
+extern void connect_infinite_loops_to_exit (void);
extern void find_unreachable_blocks (void);
+extern int post_order_compute (int *, bool, bool);
+extern int inverted_post_order_compute (int *);
+extern int pre_and_rev_post_order_compute (int *, int *, bool);
+extern int dfs_enumerate_from (basic_block, int,
+ bool (*)(const_basic_block, const void *),
+ basic_block *, int, const void *);
+extern void compute_dominance_frontiers (bitmap *);
+extern bitmap compute_idf (bitmap, bitmap *);
extern bool forwarder_block_p (const_basic_block);
extern bool can_fallthru (basic_block, basic_block);
extern bool could_fall_through (basic_block, basic_block);
@@ -883,10 +889,24 @@ extern void flow_nodes_print (const char *, const_sbitmap, FILE *);
extern void flow_edge_list_print (const char *, const edge *, int, FILE *);
/* In cfgrtl.c */
+extern void compute_bb_for_insn (void);
+extern unsigned int free_bb_for_insn (void);
+extern void update_bb_for_insn (basic_block);
+extern void insert_insn_on_edge (rtx, edge);
+extern void commit_one_edge_insertion (edge e);
+extern void commit_edge_insertions (void);
+extern basic_block create_basic_block_structure (rtx, rtx, rtx, basic_block);
extern basic_block force_nonfallthru (edge);
extern rtx block_label (basic_block);
extern bool purge_all_dead_edges (void);
extern bool purge_dead_edges (basic_block);
+extern edge try_redirect_by_replacing_jump (edge, basic_block, bool);
+extern void init_rtl_bb_info (basic_block);
+extern rtx insert_insn_end_bb_new (rtx, basic_block);
+
+/* In cfglayout.c */
+extern void break_superblocks (void);
+extern void relink_block_chain (bool);
/* In cfgbuild.c. */
extern void find_many_sub_basic_blocks (sbitmap);
@@ -906,6 +926,7 @@ extern rtx get_last_bb_insn (basic_block);
/* In bb-reorder.c */
extern void reorder_basic_blocks (void);
+END_TARGET_SPECIFIC
/* In dominance.c */
@@ -947,25 +968,6 @@ extern basic_block next_dom_son (enum cdi_direction, basic_block);
unsigned bb_dom_dfs_in (enum cdi_direction, basic_block);
unsigned bb_dom_dfs_out (enum cdi_direction, basic_block);
-extern edge try_redirect_by_replacing_jump (edge, basic_block, bool);
-extern void break_superblocks (void);
-extern void relink_block_chain (bool);
-extern void check_bb_profile (basic_block, FILE *);
-extern void update_bb_profile_for_threading (basic_block, int, gcov_type, edge);
-extern void init_rtl_bb_info (basic_block);
-
-extern void initialize_original_copy_tables (void);
-extern void free_original_copy_tables (void);
-extern void set_bb_original (basic_block, basic_block);
-extern basic_block get_bb_original (basic_block);
-extern void set_bb_copy (basic_block, basic_block);
-extern basic_block get_bb_copy (basic_block);
-void set_loop_copy (struct loop *, struct loop *);
-struct loop *get_loop_copy (struct loop *);
-
-
-extern rtx insert_insn_end_bb_new (rtx, basic_block);
-
#include "cfghooks.h"
/* Return true when one of the predecessor edges of BB is marked with EDGE_EH. */
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index ebbd517dabd..b6de4622f4a 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -85,6 +85,9 @@
#include "toplev.h"
#include "tree-pass.h"
#include "df.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* The number of rounds. In most cases there will only be 4 rounds, but
when partitioning hot and cold basic blocks into separate sections of
@@ -2292,3 +2295,5 @@ struct rtl_opt_pass pass_partition_blocks =
TODO_dump_func | TODO_verify_rtl_sharing/* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/bt-load.c b/gcc/bt-load.c
index 5e3d12c359a..e69e3c32b1f 100644
--- a/gcc/bt-load.c
+++ b/gcc/bt-load.c
@@ -38,6 +38,9 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "recog.h"
#include "df.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Target register optimizations - these are performed after reload. */
@@ -1458,7 +1461,8 @@ migrate_btr_defs (enum reg_class btr_class, int allow_callee_save)
static void
branch_target_load_optimize (bool after_prologue_epilogue_gen)
{
- enum reg_class klass = targetm.branch_target_register_class ();
+ enum reg_class klass
+ = (enum reg_class) targetm.branch_target_register_class ();
if (klass != NO_REGS)
{
/* Initialize issue_rate. */
@@ -1572,3 +1576,5 @@ struct rtl_opt_pass pass_branch_target_load_optimize2 =
TODO_ggc_collect, /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/builtins.c b/gcc/builtins.c
index ac9693400e4..e2ec20283da 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -50,6 +50,9 @@ along with GCC; see the file COPYING3. If not see
#include "tree-flow.h"
#include "value-prof.h"
#include "diagnostic.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
#ifndef SLOW_UNALIGNED_ACCESS
#define SLOW_UNALIGNED_ACCESS(MODE, ALIGN) STRICT_ALIGNMENT
@@ -13592,3 +13595,5 @@ set_builtin_user_assembler_name (tree decl, const char *asmspec)
break;
}
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/c-common.c b/gcc/c-common.c
index f9bdf38f2d2..9ac669f4f15 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -499,6 +499,7 @@ static tree handle_transparent_union_attribute (tree *, tree, tree,
static tree handle_constructor_attribute (tree *, tree, tree, int, bool *);
static tree handle_destructor_attribute (tree *, tree, tree, int, bool *);
static tree handle_mode_attribute (tree *, tree, tree, int, bool *);
+static tree handle_target_arch_attribute (tree *, tree, tree, int, bool *);
static tree handle_section_attribute (tree *, tree, tree, int, bool *);
static tree handle_aligned_attribute (tree *, tree, tree, int, bool *);
static tree handle_weak_attribute (tree *, tree, tree, int, bool *) ;
@@ -768,6 +769,8 @@ const struct attribute_spec c_common_attribute_table[] =
handle_destructor_attribute },
{ "mode", 1, 1, false, true, false,
handle_mode_attribute },
+ { "target_arch", 1, 1, true, false, false,
+ handle_target_arch_attribute },
{ "section", 1, 1, true, false, false,
handle_section_attribute },
{ "aligned", 0, 1, false, false, false,
@@ -6557,6 +6560,25 @@ handle_mode_attribute (tree *node, tree name, tree args,
return NULL_TREE;
}
+/* Handle a "target" attribute; arguments as in
+ struct attribute_spec.handler. */
+static tree
+handle_target_arch_attribute (tree *node, tree ARG_UNUSED (name), tree args,
+ int ARG_UNUSED (flags), bool *no_add_attrs)
+{
+ int i;
+
+ for (i = 0; targetm_array[i]; i++)
+ if (strcmp (targetm_array[i]->name,
+ TREE_STRING_POINTER (TREE_VALUE (args))) == 0)
+ {
+ return NULL_TREE;
+ }
+ error ("%Jtarget attribute for non-configured target", *node);
+ *no_add_attrs = true;
+ return NULL_TREE;
+}
+
/* Handle a "section" attribute; arguments as in
struct attribute_spec.handler. */
@@ -7705,6 +7727,8 @@ handle_target_attribute (tree *node, tree name, tree args, int flags,
warning (OPT_Wattributes, "%qE attribute ignored", name);
*no_add_attrs = true;
}
+ /* ??? should look for a target_arch attribute to find relevant target
+ vector. */
else if (! targetm.target_option.valid_attribute_p (*node, name, args,
flags))
*no_add_attrs = true;
diff --git a/gcc/caller-save.c b/gcc/caller-save.c
index e12deb73ead..487de432278 100644
--- a/gcc/caller-save.c
+++ b/gcc/caller-save.c
@@ -39,6 +39,9 @@ along with GCC; see the file COPYING3. If not see
#include "output.h"
#include "df.h"
#include "ggc.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Call used hard registers which can not be saved because there is no
insn for this. */
@@ -1393,3 +1396,5 @@ insert_one_insn (struct insn_chain *chain, int before_p, int code, rtx pat)
return new_chain;
}
#include "gt-caller-save.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/calls.c b/gcc/calls.c
index ce54bbea846..d60943de040 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -44,6 +44,9 @@ along with GCC; see the file COPYING3. If not see
#include "except.h"
#include "dbgcnt.h"
#include "tree-flow.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Like PREFERRED_STACK_BOUNDARY but in units of bytes, not bits. */
#define STACK_BYTES (PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT)
@@ -452,6 +455,8 @@ emit_call_1 (rtx funexp, tree fntree ATTRIBUTE_UNUSED, tree fndecl ATTRIBUTE_UNU
anti_adjust_stack (GEN_INT (n_popped));
}
+#ifndef EXTRA_TARGET
+
/* Determine if the function identified by NAME and FNDECL is one with
special properties we wish to know about.
@@ -643,6 +648,8 @@ call_expr_flags (const_tree t)
return flags;
}
+#endif /* !EXTRA_TARGET */
+
/* Precompute all register parameters as described by ARGS, storing values
into fields within the ARGS array.
@@ -4391,3 +4398,5 @@ must_pass_in_stack_var_size_or_pad (enum machine_mode mode, const_tree type)
return false;
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/cfg.c b/gcc/cfg.c
index 834bb5cc2bd..a0f89a965f9 100644
--- a/gcc/cfg.c
+++ b/gcc/cfg.c
@@ -68,6 +68,9 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "cfgloop.h"
#include "tree-flow.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* The obstack on which the flow graph components are allocated. */
@@ -1298,3 +1301,5 @@ get_loop_copy (struct loop *loop)
else
return NULL;
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/cfganal.c b/gcc/cfganal.c
index 22a0503c013..be0a93e6b92 100644
--- a/gcc/cfganal.c
+++ b/gcc/cfganal.c
@@ -35,6 +35,9 @@ along with GCC; see the file COPYING3. If not see
#include "vec.h"
#include "vecprim.h"
#include "timevar.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Store the data structures necessary for depth-first search. */
struct depth_first_search_dsS {
@@ -1355,4 +1358,4 @@ compute_idf (bitmap def_blocks, bitmap *dfs)
return phi_insertion_points;
}
-
+END_TARGET_SPECIFIC
diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c
index b063f898507..5f38fbfd01d 100644
--- a/gcc/cfgbuild.c
+++ b/gcc/cfgbuild.c
@@ -36,6 +36,9 @@ along with GCC; see the file COPYING3. If not see
#include "expr.h"
#include "toplev.h"
#include "timevar.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
static void make_edges (basic_block, basic_block, int);
static void make_label_edge (sbitmap, basic_block, rtx, int);
@@ -620,3 +623,5 @@ find_many_sub_basic_blocks (sbitmap blocks)
FOR_EACH_BB (bb)
SET_STATE (bb, 0);
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index ffe36e45a9e..f5a2cc40502 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -56,6 +56,9 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "dce.h"
#include "dbgcnt.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
#define FORWARDER_BLOCK_P(BB) ((BB)->flags & BB_FORWARDER_BLOCK)
@@ -2302,4 +2305,4 @@ struct rtl_opt_pass pass_jump2 =
}
};
-
+END_TARGET_SPECIFIC
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 788242c3d82..2bd83ad9743 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -43,7 +43,9 @@ along with GCC; see the file COPYING3. If not see
#include "value-prof.h"
#include "target.h"
#include "ssaexpand.h"
+#include "multi-target.h"
+START_TARGET_SPECIFIC
/* This variable holds information helping the rewriting of SSA trees
into RTL. */
@@ -3748,7 +3750,9 @@ gimple_expand_cfg (void)
return 0;
}
-struct rtl_opt_pass pass_expand =
+EXTRA_TARGETS_DECL (struct rtl_dispatch_pass pass_expand)
+
+struct rtl_dispatch_pass pass_expand =
{
{
RTL_PASS,
@@ -3764,8 +3768,16 @@ struct rtl_opt_pass pass_expand =
PROP_rtl, /* properties_provided */
PROP_ssa | PROP_trees, /* properties_destroyed */
TODO_verify_ssa | TODO_verify_flow
- | TODO_verify_stmts, /* todo_flags_start */
+ | TODO_verify_stmts
+ | TODO_arch_dispatch, /* todo_flags_start */
TODO_dump_func
| TODO_ggc_collect /* todo_flags_finish */
+ },
+ {
+#ifndef EXTRA_TARGET
+ EXTRA_TARGETS_EXPAND_COMMA (&,pass_expand.pass)
+#endif /* !EXTRA_TARGET */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c
index ad5fb6b6c4c..5cd4f87f8e7 100644
--- a/gcc/cfghooks.c
+++ b/gcc/cfghooks.c
@@ -30,9 +30,19 @@ along with GCC; see the file COPYING3. If not see
#include "timevar.h"
#include "toplev.h"
#include "cfgloop.h"
+#include "multi-target.h"
-/* A pointer to one of the hooks containers. */
-static struct cfg_hooks *cfg_hooks;
+/* A pointer to one of the hooks containers. This is local to this file,
+ but shared across targets.
+ E.g. can_remove_branch_p is called from target-independent sources,
+ but can use target-specific code by going via cfg_hooks. */
+extern struct cfg_hooks *cfg_hooks;
+
+START_TARGET_SPECIFIC
+
+#ifndef EXTRA_TARGET
+struct cfg_hooks *cfg_hooks;
+#endif /* !EXTRA_TARGET */
/* Initialization of functions specific to the rtl IR. */
void
@@ -1094,3 +1104,5 @@ lv_add_condition_to_bb (basic_block first, basic_block second,
gcc_assert (cfg_hooks->lv_add_condition_to_bb);
cfg_hooks->lv_add_condition_to_bb (first, second, new_block, cond);
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/cfghooks.h b/gcc/cfghooks.h
index 574176805e2..70720d00d72 100644
--- a/gcc/cfghooks.h
+++ b/gcc/cfghooks.h
@@ -22,6 +22,8 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_CFGHOOKS_H
#define GCC_CFGHOOKS_H
+#include "multi-target.h"
+
struct cfg_hooks
{
/* Name of the corresponding ir. */
@@ -138,6 +140,8 @@ struct cfg_hooks
void (*flush_pending_stmts) (edge);
};
+START_TARGET_SPECIFIC
+
extern void verify_flow_info (void);
extern void dump_bb (basic_block, FILE *, int);
extern edge redirect_edge_and_branch (edge, basic_block);
@@ -182,7 +186,9 @@ extern void lv_add_condition_to_bb (basic_block, basic_block, basic_block,
void *);
/* Hooks containers. */
+END_TARGET_SPECIFIC
extern struct cfg_hooks gimple_cfg_hooks;
+START_TARGET_SPECIFIC
extern struct cfg_hooks rtl_cfg_hooks;
extern struct cfg_hooks cfg_layout_rtl_cfg_hooks;
@@ -194,4 +200,6 @@ extern void gimple_register_cfg_hooks (void);
extern struct cfg_hooks get_cfg_hooks (void);
extern void set_cfg_hooks (struct cfg_hooks);
+END_TARGET_SPECIFIC
+
#endif /* GCC_CFGHOOKS_H */
diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c
index 9d23b16c116..cec26bb1b55 100644
--- a/gcc/cfglayout.c
+++ b/gcc/cfglayout.c
@@ -39,6 +39,9 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "df.h"
#include "vecprim.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Holds the interesting trailing notes for the function. */
rtx cfg_layout_function_footer;
@@ -1454,3 +1457,5 @@ copy_bbs (basic_block *bbs, unsigned n, basic_block *new_bbs,
}
#include "gt-cfglayout.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/cfglayout.h b/gcc/cfglayout.h
index 42b12dd5b16..cba7faac4d2 100644
--- a/gcc/cfglayout.h
+++ b/gcc/cfglayout.h
@@ -22,6 +22,10 @@
#include "basic-block.h"
+#ifdef EXTRA_TARGET
+namespace EXTRA_TARGET {
+#endif
+
extern GTY(()) rtx cfg_layout_function_footer;
extern GTY(()) rtx cfg_layout_function_header;
@@ -34,4 +38,8 @@ extern void copy_bbs (basic_block *, unsigned, basic_block *,
basic_block);
extern rtx duplicate_insn_chain (rtx, rtx);
+#ifdef EXTRA_TARGET
+} /* Close EXTRA_TARGET namespace. */
+#endif
+
#endif /* GCC_CFGLAYOUT_H */
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h
index 26f9050076a..db6489ef02e 100644
--- a/gcc/cfgloop.h
+++ b/gcc/cfgloop.h
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "vecprim.h"
#include "double-int.h"
+#include "multi-target.h"
/* Structure to hold decision about unrolling/peeling. */
enum lpt_dec
@@ -212,28 +213,36 @@ struct loop *alloc_loop (void);
extern void flow_loop_free (struct loop *);
int flow_loop_nodes_find (basic_block, struct loop *);
void fix_loop_structure (bitmap changed_bbs);
+START_TARGET_SPECIFIC
bool mark_irreducible_loops (void);
+END_TARGET_SPECIFIC
void release_recorded_exits (void);
void record_loop_exits (void);
void rescan_loop_exit (edge, bool, bool);
+START_TARGET_SPECIFIC
/* Loop data structure manipulation/querying. */
extern void flow_loop_tree_node_add (struct loop *, struct loop *);
extern void flow_loop_tree_node_remove (struct loop *);
extern void add_loop (struct loop *, struct loop *);
+END_TARGET_SPECIFIC
extern bool flow_loop_nested_p (const struct loop *, const struct loop *);
extern bool flow_bb_inside_loop_p (const struct loop *, const_basic_block);
extern struct loop * find_common_loop (struct loop *, struct loop *);
struct loop *superloop_at_depth (struct loop *, unsigned);
struct eni_weights_d;
extern unsigned tree_num_loop_insns (struct loop *, struct eni_weights_d *);
+START_TARGET_SPECIFIC
extern int num_loop_insns (const struct loop *);
extern int average_num_loop_insns (const struct loop *);
extern unsigned get_loop_level (const struct loop *);
+END_TARGET_SPECIFIC
extern bool loop_exit_edge_p (const struct loop *, const_edge);
extern bool is_loop_exit (struct loop *, basic_block);
+START_TARGET_SPECIFIC
extern void mark_loop_exit_edges (void);
+END_TARGET_SPECIFIC
/* Loops & cfg manipulation. */
extern basic_block *get_loop_body (const struct loop *);
extern unsigned get_loop_body_with_size (const struct loop *, basic_block *,
@@ -265,6 +274,7 @@ enum
basic_block create_preheader (struct loop *, int);
extern void create_preheaders (int);
extern void force_single_succ_latches (void);
+START_TARGET_SPECIFIC
extern void verify_loop_structure (void);
@@ -274,11 +284,15 @@ gcov_type expected_loop_iterations_unbounded (const struct loop *);
extern unsigned expected_loop_iterations (const struct loop *);
extern rtx doloop_condition_get (rtx);
+END_TARGET_SPECIFIC
void estimate_numbers_of_iterations_loop (struct loop *);
HOST_WIDE_INT estimated_loop_iterations_int (struct loop *, bool);
bool estimated_loop_iterations (struct loop *, bool, double_int *);
/* Loop manipulation. */
+/* some functions in cfgloopmanip.c are called from target-specific functions,
+ even though cfgloopmanip.c is not compiled as target-specific. That's
+ OK because the target specific parts get dispatched via cfg_hooks. */
extern bool can_duplicate_loop_p (const struct loop *loop);
#define DLTHE_FLAG_UPDATE_FREQ 1 /* Update frequencies in
@@ -303,6 +317,7 @@ struct loop * loop_version (struct loop *, void *,
basic_block *, unsigned, unsigned, unsigned, bool);
extern bool remove_path (edge);
void scale_loop_frequencies (struct loop *, int, int);
+START_TARGET_SPECIFIC
/* Induction variable analysis. */
@@ -650,4 +665,6 @@ extern void doloop_optimize_loops (void);
extern void move_loop_invariants (void);
extern bool finite_loop_p (struct loop *);
+END_TARGET_SPECIFIC
+
#endif /* GCC_CFGLOOP_H */
diff --git a/gcc/cfgloopanal.c b/gcc/cfgloopanal.c
index 129ec25a331..80e56b76a89 100644
--- a/gcc/cfgloopanal.c
+++ b/gcc/cfgloopanal.c
@@ -31,6 +31,9 @@ along with GCC; see the file COPYING3. If not see
#include "output.h"
#include "graphds.h"
#include "params.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Checks whether BB is executed exactly once in each LOOP iteration. */
@@ -439,3 +442,4 @@ mark_loop_exit_edges (void)
}
}
+END_TARGET_SPECIFIC
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index 1a47bfe7143..8254b9a03eb 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -62,6 +62,9 @@ along with GCC; see the file COPYING3. If not see
#include "ggc.h"
#include "tree-pass.h"
#include "df.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
static int can_delete_note_p (const_rtx);
static int can_delete_label_p (const_rtx);
@@ -3261,3 +3264,5 @@ struct cfg_hooks cfg_layout_rtl_cfg_hooks = {
rtl_extract_cond_bb_edges, /* extract_cond_bb_edges */
NULL /* flush_pending_stmts */
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/combine-stack-adj.c b/gcc/combine-stack-adj.c
index 8849697bfce..8da216588ea 100644
--- a/gcc/combine-stack-adj.c
+++ b/gcc/combine-stack-adj.c
@@ -61,8 +61,11 @@ along with GCC; see the file COPYING3. If not see
#include "reload.h"
#include "timevar.h"
#include "tree-pass.h"
+#include "multi-target.h"
+START_TARGET_SPECIFIC
+
/* Turn STACK_GROWS_DOWNWARD into a boolean. */
#ifdef STACK_GROWS_DOWNWARD
#undef STACK_GROWS_DOWNWARD
@@ -589,3 +592,5 @@ struct rtl_opt_pass pass_stack_adjustments =
TODO_ggc_collect, /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/combine.c b/gcc/combine.c
index e5d4c5aafc2..8a861b30058 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -105,6 +105,9 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "df.h"
#include "cgraph.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Number of attempts to combine instructions in this function. */
@@ -13405,3 +13408,5 @@ struct rtl_opt_pass pass_combine =
TODO_ggc_collect, /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/common.opt b/gcc/common.opt
index 6e369e55102..2d50e191b17 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -274,14 +274,14 @@ fabi-version=
Common Joined UInteger Var(flag_abi_version) Init(2)
falign-functions
-Common Report Var(align_functions,0) Optimization UInteger
+Common Report AllTarget Var(align_functions,0) Optimization UInteger
Align the start of functions
falign-functions=
Common RejectNegative Joined UInteger
falign-jumps
-Common Report Var(align_jumps,0) Optimization UInteger
+Common Report AllTarget Var(align_jumps,0) Optimization UInteger
Align labels which are only reached by jumping
falign-jumps=
@@ -295,7 +295,7 @@ falign-labels=
Common RejectNegative Joined UInteger
falign-loops
-Common Report Var(align_loops) Optimization UInteger
+Common Report AllTarget Var(align_loops) Optimization UInteger
Align the start of loops
falign-loops=
@@ -421,7 +421,7 @@ Common Report Var(flag_cx_fortran_rules) Optimization
Complex multiplication and division follow Fortran rules
fdata-sections
-Common Report Var(flag_data_sections) Optimization
+Common Report AllTarget Var(flag_data_sections) Optimization
Place data items into their own section
fdbg-cnt-list
@@ -442,8 +442,10 @@ fdefer-pop
Common Report Var(flag_defer_pop) Optimization
Defer popping functions args from stack until later
+; Although not all targets have delayed branches, the option can be nominally
+; set for all targets.
fdelayed-branch
-Common Report Var(flag_delayed_branch) Optimization
+Common Report AllTarget Var(flag_delayed_branch) Optimization
Attempt to fill delay slots of branch instructions
fdelete-null-pointer-checks
@@ -549,11 +551,11 @@ Perform a forward propagation pass on RTL
; Used for compiling the Unix kernel, where strange substitutions are
; done on the assembly output.
ffunction-cse
-Common Report Var(flag_no_function_cse,0)
+Common Report AllTarget Var(flag_no_function_cse,0)
Allow function addresses to be held in registers
ffunction-sections
-Common Report Var(flag_function_sections)
+Common Report AllTarget Var(flag_function_sections)
Place each function into its own section
fgcse
@@ -755,7 +757,7 @@ Common Report Var(flag_keep_static_consts) Init(1)
Emit static const variables even if they are not used
fleading-underscore
-Common Report Var(flag_leading_underscore) Init(-1)
+Common Report AllTarget Var(flag_leading_underscore) Init(-1)
Give external symbols a leading underscore
floop-optimize
@@ -843,7 +845,7 @@ Common Report Var(flag_non_call_exceptions) Optimization
Support synchronous non-call exceptions
fomit-frame-pointer
-Common Report Var(flag_omit_frame_pointer) Optimization
+Common Report AllTarget Var(flag_omit_frame_pointer) Optimization
When possible do not generate stack frames
foptimize-register-move
@@ -981,7 +983,7 @@ Common Report Var(flag_regmove) Optimization
Enables a register move optimization
frename-registers
-Common Report Var(flag_rename_registers) Init(2) Optimization
+Common Report AllTarget Var(flag_rename_registers) Init(2) Optimization
Perform a register renaming optimization pass
freorder-blocks
@@ -1041,11 +1043,11 @@ Common Report Var(flag_sched2_use_traces) Optimization
If scheduling post reload, do trace scheduling
fschedule-insns
-Common Report Var(flag_schedule_insns) Optimization
+Common Report AllTarget Var(flag_schedule_insns) Optimization
Reschedule instructions before register allocation
fschedule-insns2
-Common Report Var(flag_schedule_insns_after_reload) Optimization
+Common Report AllTarget Var(flag_schedule_insns_after_reload) Optimization
Reschedule instructions after register allocation
; This flag should be on when a target implements non-trivial
diff --git a/gcc/config/sh/sh-protos.h b/gcc/config/sh/sh-protos.h
index 7335efcd0a1..1579c114f23 100644
--- a/gcc/config/sh/sh-protos.h
+++ b/gcc/config/sh/sh-protos.h
@@ -24,6 +24,8 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_SH_PROTOS_H
#define GCC_SH_PROTOS_H
+#include "multi-target.h"
+
enum sh_function_kind {
/* A function with normal C ABI */
FUNCTION_ORDINARY,
@@ -172,15 +174,17 @@ extern int shmedia_cleanup_truncate (rtx *, void *);
extern int sh_contains_memref_p (rtx);
extern int sh_loads_bankedreg_p (rtx);
extern rtx shmedia_prepare_call_address (rtx fnaddr, int is_sibcall);
+END_TARGET_SPECIFIC
struct secondary_reload_info;
-extern enum reg_class sh_secondary_reload (bool, rtx, enum reg_class,
+START_TARGET_SPECIFIC
+extern int /*enum reg_class*/ sh_secondary_reload (bool, rtx,
+ int /*enum reg_class*/,
enum machine_mode,
struct secondary_reload_info *);
extern int sh2a_get_function_vector_number (rtx);
extern int sh2a_is_function_vector_call (rtx);
extern void sh_fix_range (const char *);
extern bool sh_hard_regno_mode_ok (unsigned int, enum machine_mode);
-#endif /* ! GCC_SH_PROTOS_H */
#ifdef SYMBIAN
extern const char * sh_symbian_strip_name_encoding (const char *);
@@ -195,3 +199,4 @@ extern void sh_symbian_encode_section_info (tree, rtx, int);
#endif
#endif /* SYMBIAN */
+#endif /* ! GCC_SH_PROTOS_H */
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index cec17b8fc90..b3fbe44f58e 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -55,7 +55,9 @@ along with GCC; see the file COPYING3. If not see
#include "cfgloop.h"
#include "alloc-pool.h"
#include "tm-constrs.h"
+#include "multi-target.h"
+START_TARGET_SPECIFIC
int code_for_indirect_jump_scratch = CODE_FOR_indirect_jump_scratch;
@@ -164,6 +166,7 @@ int assembler_dialect;
static bool shmedia_space_reserved_for_target_registers;
static bool sh_handle_option (size_t, const char *, int);
+static bool sh_override_options (bool);
static void split_branches (rtx);
static int branch_dest (rtx);
static void force_into (rtx, rtx);
@@ -340,6 +343,9 @@ static const struct attribute_spec sh_attribute_table[] =
#undef TARGET_HANDLE_OPTION
#define TARGET_HANDLE_OPTION sh_handle_option
+#undef TARGET_OVERRIDE_OPTIONS
+#define TARGET_OVERRIDE_OPTIONS sh_override_options
+
#undef TARGET_INSERT_ATTRIBUTES
#define TARGET_INSERT_ATTRIBUTES sh_insert_attributes
@@ -695,17 +701,20 @@ sh_optimization_options (int level ATTRIBUTE_UNUSED, int size ATTRIBUTE_UNUSED)
set_param_value ("simultaneous-prefetches", 2);
}
-/* Implement OVERRIDE_OPTIONS macro. Validate and override various
+/* Implement OVERRIDE_OPTIONS hook. Validate and override various
options, and do some machine dependent initialization. */
-void
-sh_override_options (void)
+static bool
+sh_override_options (bool main_target)
{
int regno;
SUBTARGET_OVERRIDE_OPTIONS;
- if (flag_finite_math_only == 2)
- flag_finite_math_only
- = !flag_signaling_nans && TARGET_SH2E && ! TARGET_IEEE;
+ if (main_target)
+ {
+ if (flag_finite_math_only == 2)
+ flag_finite_math_only
+ = !flag_signaling_nans && TARGET_SH2E && ! TARGET_IEEE;
+ }
if (TARGET_SH2E && !flag_finite_math_only)
target_flags |= MASK_IEEE;
sh_cpu = PROCESSOR_SH1;
@@ -895,7 +904,7 @@ sh_override_options (void)
/* Unwinding with -freorder-blocks-and-partition does not work on this
architecture, because it requires far jumps to label crossing between
hot/cold sections which are rejected on this architecture. */
- if (flag_reorder_blocks_and_partition)
+ if (main_target && flag_reorder_blocks_and_partition)
{
if (flag_exceptions)
{
@@ -946,6 +955,7 @@ sh_override_options (void)
if (sh_fixed_range_str)
sh_fix_range (sh_fixed_range_str);
+ return true;
}
/* Print the operand address in x to the stream. */
@@ -6586,8 +6596,8 @@ sh_media_register_for_return (void)
typedef struct save_entry_s
{
unsigned char reg;
- unsigned char mode;
short offset;
+ int mode;
} save_entry;
#define MAX_TEMPS 4
@@ -11962,8 +11972,8 @@ shmedia_prepare_call_address (rtx fnaddr, int is_sibcall)
return fnaddr;
}
-enum reg_class
-sh_secondary_reload (bool in_p, rtx x, enum reg_class rclass,
+int /*enum reg_class*/
+sh_secondary_reload (bool in_p, rtx x, int /*enum reg_class*/ rclass,
enum machine_mode mode, secondary_reload_info *sri)
{
if (in_p)
@@ -12067,3 +12077,5 @@ sh_secondary_reload (bool in_p, rtx x, enum reg_class rclass,
enum sh_divide_strategy_e sh_div_strategy = SH_DIV_STRATEGY_DEFAULT;
#include "gt-sh.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index 697138f57ce..72e58157e8c 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -24,6 +24,9 @@ along with GCC; see the file COPYING3. If not see
#define GCC_SH_H
#include "config/vxworks-dummy.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
#define TARGET_VERSION \
fputs (" (Hitachi SH)", stderr);
@@ -499,8 +502,6 @@ extern enum sh_divide_strategy_e sh_div_strategy;
extern const char *sh_fixed_range_str;
-#define OVERRIDE_OPTIONS sh_override_options ()
-
/* Target machine storage layout. */
@@ -1478,6 +1479,7 @@ extern enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER];
Thus NARGREGS or more means all following args should go on the stack. */
enum sh_arg_class { SH_ARG_INT = 0, SH_ARG_FLOAT = 1 };
+END_TARGET_SPECIFIC
struct sh_args {
int arg_count[2];
int force_mem;
@@ -1567,6 +1569,7 @@ struct sh_args {
even without the -mrenesas option. */
int renesas_abi;
};
+START_TARGET_SPECIFIC
#define CALL_COOKIE_RET_TRAMP_SHIFT 0
#define CALL_COOKIE_RET_TRAMP(VAL) ((VAL) << CALL_COOKIE_RET_TRAMP_SHIFT)
@@ -2629,6 +2632,19 @@ struct sh_args {
extern struct rtx_def *sh_compare_op0;
extern struct rtx_def *sh_compare_op1;
+/* The SH machine description uses "sh_cpu_attr" to find the cpu variant
+ that is being compiled for for use in attributes. For target compilation
+ performance reasons, this should be a direct variable access.
+ The type of that variable would naturally be enum attr_cpu, alas, that
+ is not possible, because there is no target-controlled headerfile
+ that is guaranteed to be only included after insn-attr.h, hence we
+ can't declare such a variable to be visible inside insn-attrtab.c .
+ If statements expressions were allowed, we could solve this by having
+ an 'extern enum attr_cpu sh_cpu' declaration inside a statement expression
+ to be used inside the sh_attr_cpu definition.
+ But as we have to do without statement expressions, we have to use a
+ different type for the sh_cpu variable. */
+
/* Which processor to schedule for. The elements of the enumeration must
match exactly the cpu attribute in the sh.md file. */
@@ -2800,4 +2816,6 @@ extern int current_function_interrupt;
/* FIXME: middle-end support for highpart optimizations is missing. */
#define high_life_started reload_in_progress
+END_TARGET_SPECIFIC
+
#endif /* ! GCC_SH_H */
diff --git a/gcc/configure b/gcc/configure
index 589c8b4299c..675731537e2 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -610,6 +610,7 @@ PPLINC
PPLLIBS
GMPINC
GMPLIBS
+with_extra_target_list
target_cpu_default
fortran_target_objs
cxx_target_objs
@@ -17037,7 +17038,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 17040 "configure"
+#line 17041 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -17143,7 +17144,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 17146 "configure"
+#line 17147 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -25010,6 +25011,7 @@ fi
+
# Echo link setup.
if test x${build} = x${host} ; then
if test x${host} = x${target} ; then
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 0d507e99b55..6c9d81f7195 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -4265,6 +4265,7 @@ AC_SUBST(c_target_objs)
AC_SUBST(cxx_target_objs)
AC_SUBST(fortran_target_objs)
AC_SUBST(target_cpu_default)
+AC_SUBST(with_extra_target_list)
AC_SUBST_FILE(language_hooks)
diff --git a/gcc/coverage.c b/gcc/coverage.c
index e04d22b7a88..5dab44b5a5f 100644
--- a/gcc/coverage.c
+++ b/gcc/coverage.c
@@ -101,10 +101,6 @@ static htab_t counts_hash = NULL;
/* Trees representing the counter table arrays. */
static GTY(()) tree tree_ctr_tables[GCOV_COUNTERS];
-/* The names of the counter tables. Not used if we're
- generating counters at tree level. */
-static GTY(()) rtx ctr_labels[GCOV_COUNTERS];
-
/* The names of merge functions for counters. */
static const char *const ctr_merge_functions[GCOV_COUNTERS] = GCOV_MERGE_FUNCTIONS;
static const char *const ctr_names[GCOV_COUNTERS] = GCOV_COUNTER_NAMES;
diff --git a/gcc/cse.c b/gcc/cse.c
index 585cce8efd0..2b0224a99d9 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -46,6 +46,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "df.h"
#include "dbgcnt.h"
+#include "multi-target.h"
/* The basic idea of common subexpression elimination is to go
through the code, keeping a record of expressions that would
@@ -207,6 +208,8 @@ Related expressions:
so that it is possible to find out if there exists any
register equivalent to an expression related to a given expression. */
+START_TARGET_SPECIFIC
+
/* Length of qty_table vector. We know in advance we will not need
a quantity number this big. */
@@ -7402,3 +7405,5 @@ struct rtl_opt_pass pass_cse_after_global_opts =
TODO_verify_flow /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/cselib.c b/gcc/cselib.c
index 66d92a01ad0..84070d546aa 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -43,6 +43,9 @@ along with GCC; see the file COPYING3. If not see
#include "params.h"
#include "alloc-pool.h"
#include "target.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
static bool cselib_record_memory;
static int entry_and_rtx_equal_p (const void *, const void *);
@@ -2167,3 +2170,5 @@ dump_cselib_table (FILE *out)
}
#include "gt-cselib.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/cselib.h b/gcc/cselib.h
index 433f4deb87d..36afb91500e 100644
--- a/gcc/cselib.h
+++ b/gcc/cselib.h
@@ -62,6 +62,10 @@ struct cselib_set
cselib_val *dest_addr_elt;
};
+#ifdef EXTRA_TARGET
+namespace EXTRA_TARGET {
+#endif
+
extern void (*cselib_discard_hook) (cselib_val *);
extern void (*cselib_record_sets_hook) (rtx insn, struct cselib_set *sets,
int n_sets);
@@ -88,3 +92,7 @@ extern bool cselib_preserved_value_p (cselib_val *);
extern void cselib_preserve_only_values (bool);
extern void dump_cselib_table (FILE *);
+
+#ifdef EXTRA_TARGET
+} /* Close EXTRA_TARGET namespace. */
+#endif
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index a314e7b4430..74e3e02a4ee 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -90,6 +90,7 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "obstack.h"
#include "expr.h"
+#include "multi-target.h"
#ifdef XCOFF_DEBUGGING_INFO
#include "xcoffout.h"
@@ -177,6 +178,8 @@ struct GTY(()) typeinfo {
int type_number;
};
+START_TARGET_SPECIFIC
+
/* Vector recording information about C data types.
When we first notice a data type (a tree node),
we assign it a number using next_type_number.
@@ -3713,3 +3716,5 @@ dbxout_begin_function (tree decl)
#endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
#include "gt-dbxout.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/dbxout.h b/gcc/dbxout.h
index 80616597b40..830b9848774 100644
--- a/gcc/dbxout.h
+++ b/gcc/dbxout.h
@@ -21,10 +21,16 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_DBXOUT_H
#define GCC_DBXOUT_H
+#ifdef EXTRA_TARGET
+namespace EXTRA_TARGET {
+#endif
extern int dbxout_symbol (tree, int);
extern void dbxout_parms (tree);
extern void dbxout_reg_parms (tree);
extern int dbxout_syms (tree);
+#ifdef EXTRA_TARGET
+} /* Close EXTRA_TARGET namespace. */
+#endif
/* Language description for N_SO stabs. */
#define N_SO_AS 1
diff --git a/gcc/dce.c b/gcc/dce.c
index 855bef32237..7e6c8ca66f9 100644
--- a/gcc/dce.c
+++ b/gcc/dce.c
@@ -35,6 +35,9 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "dbgcnt.h"
#include "tm_p.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* -------------------------------------------------------------------------
@@ -1160,3 +1163,5 @@ struct rtl_opt_pass pass_fast_rtl_byte_dce =
TODO_ggc_collect /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/ddg.c b/gcc/ddg.c
index f51c5dc4e29..1032e513e98 100644
--- a/gcc/ddg.c
+++ b/gcc/ddg.c
@@ -43,12 +43,15 @@ along with GCC; see the file COPYING3. If not see
#include "expr.h"
#include "bitmap.h"
#include "ddg.h"
+#include "multi-target.h"
#ifdef INSN_SCHEDULING
/* A flag indicating that a ddg edge belongs to an SCC or not. */
enum edge_flag {NOT_IN_SCC = 0, IN_SCC};
+START_TARGET_SPECIFIC
+
/* Forward declarations. */
static void add_backarc_to_ddg (ddg_ptr, ddg_edge_ptr);
static void add_backarc_to_scc (ddg_scc_ptr, ddg_edge_ptr);
@@ -1132,4 +1135,6 @@ longest_simple_path (struct ddg * g, int src, int dest, sbitmap nodes)
return result;
}
+END_TARGET_SPECIFIC
+
#endif /* INSN_SCHEDULING */
diff --git a/gcc/ddg.h b/gcc/ddg.h
index e17e534af4d..6ea3f1f3d08 100644
--- a/gcc/ddg.h
+++ b/gcc/ddg.h
@@ -167,6 +167,10 @@ struct ddg_all_sccs
};
+#ifdef EXTRA_TARGET
+namespace EXTRA_TARGET {
+#endif
+
ddg_ptr create_ddg (basic_block, int closing_branch_deps);
void free_ddg (ddg_ptr);
@@ -186,4 +190,8 @@ void free_ddg_all_sccs (ddg_all_sccs_ptr);
int find_nodes_on_paths (sbitmap result, ddg_ptr, sbitmap from, sbitmap to);
int longest_simple_path (ddg_ptr, int from, int to, sbitmap via);
+#ifdef EXTRA_TARGET
+} /* Close EXTRA_TARGET namespace. */
+#endif
+
#endif /* GCC_DDG_H */
diff --git a/gcc/df-byte-scan.c b/gcc/df-byte-scan.c
index 8271465041e..55321d1adb9 100644
--- a/gcc/df-byte-scan.c
+++ b/gcc/df-byte-scan.c
@@ -27,6 +27,9 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "output.h"
#include "dbgcnt.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* The following suite of functions provides bytewise modeling of REFs
which are struct df_ref. START_BYTE and LAST_BYTE are returned.
@@ -338,3 +341,4 @@ df_compute_accessed_bytes (df_ref ref, enum df_mm mm,
return true;
}
+END_TARGET_SPECIFIC
diff --git a/gcc/df-core.c b/gcc/df-core.c
index cee00b9dafd..6d8082826f2 100644
--- a/gcc/df-core.c
+++ b/gcc/df-core.c
@@ -396,6 +396,9 @@ are write-only operations.
#include "df.h"
#include "tree-pass.h"
#include "params.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
static void *df_get_bb_info (struct dataflow *, unsigned int);
static void df_set_bb_info (struct dataflow *, unsigned int, void *);
@@ -2208,3 +2211,5 @@ debug_df_chain (struct df_link *link)
df_chain_dump (link, stderr);
fputc ('\n', stderr);
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/df-problems.c b/gcc/df-problems.c
index e0ec16778f0..1d49afb192c 100644
--- a/gcc/df-problems.c
+++ b/gcc/df-problems.c
@@ -44,6 +44,9 @@ along with GCC; see the file COPYING3. If not see
#include "except.h"
#include "dce.h"
#include "vecprim.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Note that turning REG_DEAD_DEBUGGING on will cause
gcc.c-torture/unsorted/dump-noaddr.c to fail because it prints
@@ -4428,5 +4431,4 @@ df_md_add_problem (void)
df_add_problem (&problem_MD);
}
-
-
+END_TARGET_SPECIFIC
diff --git a/gcc/df-scan.c b/gcc/df-scan.c
index c3a3dc70c89..2d1cc0f0ce7 100644
--- a/gcc/df-scan.c
+++ b/gcc/df-scan.c
@@ -45,6 +45,7 @@ along with GCC; see the file COPYING3. If not see
#include "target-def.h"
#include "df.h"
#include "tree-pass.h"
+#include "multi-target.h"
DEF_VEC_P(df_ref);
DEF_VEC_ALLOC_P_STACK(df_ref);
@@ -59,6 +60,8 @@ DEF_VEC_ALLOC_P_STACK(df_mw_hardreg_ptr);
#define VEC_df_mw_hardreg_ptr_stack_alloc(alloc) \
VEC_stack_alloc (df_mw_hardreg_ptr, alloc)
+START_TARGET_SPECIFIC
+
#ifndef HAVE_epilogue
#define HAVE_epilogue 0
#endif
@@ -4674,3 +4677,5 @@ df_scan_verify (void)
df_reg_chain_verify_unmarked (DF_REG_EQ_USE_CHAIN (i));
}
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/df.h b/gcc/df.h
index 194cbcf2639..a09b864eead 100644
--- a/gcc/df.h
+++ b/gcc/df.h
@@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see
#include "basic-block.h"
#include "alloc-pool.h"
#include "timevar.h"
+#include "multi-target.h"
struct dataflow;
struct df;
@@ -760,12 +761,15 @@ struct df
#define DF_INSN_UID_EQ_USES(INSN) (DF_INSN_UID_GET(INSN)->eq_uses)
#define DF_INSN_UID_MWS(INSN) (DF_INSN_UID_GET(INSN)->mw_hardregs)
+START_TARGET_SPECIFIC
+
/* An obstack for bitmap not related to specific dataflow problems.
This obstack should e.g. be used for bitmaps with a short life time
such as temporary bitmaps. This obstack is declared in df-core.c. */
extern bitmap_obstack df_bitmap_obstack;
+END_TARGET_SPECIFIC
/* One of these structures is allocated for every basic block. */
struct df_scan_bb_info
@@ -868,6 +872,7 @@ struct df_byte_lr_bb_info
bitmap out; /* At the bottom of the block. */
};
+START_TARGET_SPECIFIC
/* This is used for debugging and for the dumpers to find the latest
instance so that the df info can be added to the dumps. This
@@ -1120,4 +1125,6 @@ extern void union_defs (df_ref, struct web_entry *,
unsigned int *used, struct web_entry *,
bool (*fun) (struct web_entry *, struct web_entry *));
+END_TARGET_SPECIFIC
+
#endif /* GCC_DF_H */
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 59270e57852..ca72ea157da 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -3028,6 +3028,15 @@ Use this attribute on the Blackfin, H8/300, H8/300H, and H8S to indicate that
all registers except the stack pointer should be saved in the prologue
regardless of whether they are used or not.
+@item target_arch ("@var{target-name}")
+@cindex @code{target_arch} attribute
+For multi-targeted configurations, this allows the user to specify on which
+target a function or variable should be implemented.
+Note that if target attributes for more than one target are used for NUMA
+architectures, it is possible that the compiler will be unable to find a
+target assignment for the remaining functions / variables to retain the
+language semantics of data objects in memory.
+
@item section ("@var{section-name}")
@cindex @code{section} function attribute
Normally, the compiler places the code it generates in the @code{text} section.
diff --git a/gcc/dojump.c b/gcc/dojump.c
index 20d52ea5a28..ccef486aa77 100644
--- a/gcc/dojump.c
+++ b/gcc/dojump.c
@@ -35,6 +35,9 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "ggc.h"
#include "basic-block.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
static bool prefer_and_bit_test (enum machine_mode, int);
static void do_jump_by_parts_greater (tree, tree, int, rtx, rtx);
@@ -1120,3 +1123,5 @@ do_compare_and_jump (tree treeop0, tree treeop1, enum rtx_code signed_code,
}
#include "gt-dojump.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/dse.c b/gcc/dse.c
index 9569a6176e1..330026fa675 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -46,6 +46,7 @@ along with GCC; see the file COPYING3. If not see
#include "optabs.h"
#include "dbgcnt.h"
#include "target.h"
+#include "multi-target.h"
/* This file contains three techniques for performing Dead Store
Elimination (dse).
@@ -198,6 +199,7 @@ along with GCC; see the file COPYING3. If not see
that really have constant offsets this size. */
#define MAX_OFFSET (64 * 1024)
+START_TARGET_SPECIFIC
static bitmap scratch = NULL;
struct insn_info;
@@ -3920,3 +3922,5 @@ struct rtl_opt_pass pass_rtl_dse2 =
TODO_ggc_collect /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c
index 3657d0be89b..76f11d55f5e 100644
--- a/gcc/dwarf2asm.c
+++ b/gcc/dwarf2asm.c
@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see
#include "splay-tree.h"
#include "ggc.h"
#include "tm_p.h"
+#include "multi-target.h"
/* How to start an assembler comment. */
@@ -41,6 +42,8 @@ along with GCC; see the file COPYING3. If not see
#endif
+START_TARGET_SPECIFIC
+
/* Output an unaligned integer with the given value and size. Prefer not
to print a newline, since the caller may want to add a comment. */
@@ -993,3 +996,5 @@ dw2_asm_output_encoded_addr_rtx (int encoding, rtx addr, bool is_public,
}
#include "gt-dwarf2asm.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/dwarf2asm.h b/gcc/dwarf2asm.h
index e7be9bdbaee..d75264668b4 100644
--- a/gcc/dwarf2asm.h
+++ b/gcc/dwarf2asm.h
@@ -17,6 +17,9 @@ 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/>. */
+#ifdef EXTRA_TARGET
+namespace EXTRA_TARGET {
+#endif
extern void dw2_assemble_integer (int, rtx);
@@ -82,3 +85,7 @@ extern void dw2_asm_output_delta_sleb128 (const char *, const char *,
const char *, ...)
ATTRIBUTE_NULL_PRINTF_3;
#endif
+
+#ifdef EXTRA_TARGET
+} /* Close EXTRA_TARGET namespace. */
+#endif
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 0fd93cb194a..74d7b12f187 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -91,6 +91,9 @@ along with GCC; see the file COPYING3. If not see
#include "input.h"
#include "gimple.h"
#include "tree-pass.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
#ifdef DWARF2_DEBUGGING_INFO
static void dwarf2out_source_line (unsigned int, const char *, int, bool);
@@ -234,6 +237,8 @@ static GTY(()) section *debug_frame_section;
personality CFI. */
static GTY(()) rtx current_unit_personality;
+END_TARGET_SPECIFIC
+
/* How to start an assembler comment. */
#ifndef ASM_COMMENT_START
#define ASM_COMMENT_START ";#"
@@ -389,6 +394,8 @@ dw_fde_node;
#define DWARF_CIE_ID DW_CIE_ID
#endif
+START_TARGET_SPECIFIC
+
/* A pointer to the base of a table that contains frame description
information for each routine. */
static GTY((length ("fde_table_allocated"))) dw_fde_ref fde_table;
@@ -422,6 +429,8 @@ static GTY(()) dw_cfi_ref cie_cfi_head;
static unsigned current_funcdef_fde;
#endif
+END_TARGET_SPECIFIC
+
struct GTY(()) indirect_string_node {
const char *str;
unsigned int refcount;
@@ -429,6 +438,8 @@ struct GTY(()) indirect_string_node {
char *label;
};
+START_TARGET_SPECIFIC
+
static GTY ((param_is (struct indirect_string_node))) htab_t debug_str_hash;
/* True if the compilation unit has location entries that reference
@@ -2886,7 +2897,7 @@ dwarf2out_frame_debug_restore_state (void)
cfa_remember.in_use = 0;
}
-#endif
+#endif /* defined (DWARF2_DEBUGGING_INFO) || defined (DWARF2_UNWIND_INFO) */
/* Describe for the GTY machinery what parts of dw_cfi_oprnd1 are used. */
static enum dw_cfi_oprnd_type dw_cfi_oprnd1_desc
@@ -4138,7 +4149,9 @@ dwarf2out_switch_text_section (void)
fde->dw_fde_switch_cfi = cfi;
}
}
-#endif
+#endif /* defined (DWARF2_DEBUGGING_INFO) || defined (DWARF2_UNWIND_INFO) */
+
+END_TARGET_SPECIFIC
/* And now, the subset of the debugging information support code necessary
for emitting location expressions. */
@@ -4263,6 +4276,8 @@ typedef struct GTY(()) dw_loc_list_struct {
dw_loc_descr_ref expr;
} dw_loc_list_node;
+START_TARGET_SPECIFIC
+
#if defined (DWARF2_DEBUGGING_INFO) || defined (DWARF2_UNWIND_INFO)
static dw_loc_descr_ref int_loc_descriptor (HOST_WIDE_INT);
@@ -5466,7 +5481,10 @@ const struct gcc_debug_hooks dwarf2_debug_hooks =
dwarf2out_set_name,
1 /* start_end_main_source_file */
};
-#endif
+#endif /* DWARF2_DEBUGGING_INFO */
+
+END_TARGET_SPECIFIC
+
/* NOTE: In the comments in this file, many references are made to
"Debugging Information Entries". This term is abbreviated as `DIE'
@@ -5568,8 +5586,10 @@ typedef struct GTY(()) pubname_struct {
}
pubname_entry;
+START_TARGET_SPECIFIC
DEF_VEC_O(pubname_entry);
DEF_VEC_ALLOC_O(pubname_entry, gc);
+END_TARGET_SPECIFIC
struct GTY(()) dw_ranges_struct {
/* If this is positive, it's a block number, otherwise it's a
@@ -5687,6 +5707,8 @@ skeleton_chain_node;
is not made available by the GCC front-end. */
#define DWARF_LINE_DEFAULT_IS_STMT_START 1
+START_TARGET_SPECIFIC
+
#ifdef DWARF2_DEBUGGING_INFO
/* This location is used by calc_die_sizes() to keep track
the offset of each DIE within the .debug_info section. */
@@ -21463,3 +21485,5 @@ const struct gcc_debug_hooks dwarf2_debug_hooks =
#endif /* DWARF2_DEBUGGING_INFO */
#include "gt-dwarf2out.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 6e1f9490614..c76aad4d1f2 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -60,6 +60,9 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "params.h"
#include "target.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Commonly used modes. */
@@ -139,6 +142,16 @@ rtx pic_offset_table_rtx; /* (REG:Pmode PIC_OFFSET_TABLE_REGNUM) */
See for instance the MIPS port. */
rtx return_address_pointer_rtx; /* (REG:Pmode RETURN_ADDRESS_POINTER_REGNUM) */
+END_TARGET_SPECIFIC
+
+extern GTY ((if_marked ("ggc_marked_p"), param_is (struct rtx_def)))
+ htab_t const_int_htab;
+extern GTY ((if_marked ("ggc_marked_p"), param_is (struct rtx_def)))
+ htab_t const_double_htab;
+
+START_TARGET_SPECIFIC
+
+#ifndef EXTRA_TARGET
/* We make one copy of (const_int C) where C is in
[- MAX_SAVED_CONST_INT, MAX_SAVED_CONST_INT]
to save space during the compilation and simplify comparisons of
@@ -149,8 +162,12 @@ rtx const_int_rtx[MAX_SAVED_CONST_INT * 2 + 1];
/* A hash table storing CONST_INTs whose absolute value is greater
than MAX_SAVED_CONST_INT. */
-static GTY ((if_marked ("ggc_marked_p"), param_is (struct rtx_def)))
- htab_t const_int_htab;
+htab_t const_int_htab;
+
+/* A hash table storing all CONST_DOUBLEs. */
+htab_t const_double_htab;
+
+#endif /* !EXTRA_TARGET */
/* A hash table storing memory attribute structures. */
static GTY ((if_marked ("ggc_marked_p"), param_is (struct mem_attrs)))
@@ -160,10 +177,6 @@ static GTY ((if_marked ("ggc_marked_p"), param_is (struct mem_attrs)))
static GTY ((if_marked ("ggc_marked_p"), param_is (struct reg_attrs)))
htab_t reg_attrs_htab;
-/* A hash table storing all CONST_DOUBLEs. */
-static GTY ((if_marked ("ggc_marked_p"), param_is (struct rtx_def)))
- htab_t const_double_htab;
-
/* A hash table storing all CONST_FIXEDs. */
static GTY ((if_marked ("ggc_marked_p"), param_is (struct rtx_def)))
htab_t const_fixed_htab;
@@ -415,6 +428,7 @@ gen_blockage (void)
#endif
+#ifndef EXTRA_TARGET
/* Generate a new REG rtx. Make sure ORIGINAL_REGNO is set properly, and
don't attempt to share with the various global pieces of rtl (such as
frame_pointer_rtx). */
@@ -426,6 +440,7 @@ gen_raw_REG (enum machine_mode mode, int regno)
ORIGINAL_REGNO (x) = regno;
return x;
}
+#endif /* EXTRA_TARGET */
/* There are some RTL codes that require special attention; the generation
functions do the raw handling. If you add to this list, modify
@@ -476,6 +491,7 @@ lookup_const_double (rtx real)
return (rtx) *slot;
}
+#ifndef EXTRA_TARGET
/* Return a CONST_DOUBLE rtx for a floating-point value specified by
VALUE in mode MODE. */
rtx
@@ -488,6 +504,7 @@ const_double_from_real_value (REAL_VALUE_TYPE value, enum machine_mode mode)
return lookup_const_double (real);
}
+#endif /* EXTRA_TARGET */
/* Determine whether FIXED, a CONST_FIXED, already exists in the
hash table. If so, return its counterpart; otherwise add it
@@ -634,6 +651,7 @@ gen_rtx_REG (enum machine_mode mode, unsigned int regno)
return gen_raw_REG (mode, regno);
}
+#ifndef EXTRA_TARGET
rtx
gen_rtx_MEM (enum machine_mode mode, rtx addr)
{
@@ -656,6 +674,7 @@ gen_const_mem (enum machine_mode mode, rtx addr)
MEM_NOTRAP_P (mem) = 1;
return mem;
}
+#endif /* !EXTRA_TARGET */
/* Generate a MEM referring to fixed portions of the frame, e.g., register
save areas. */
@@ -5635,6 +5654,8 @@ gen_const_vector (enum machine_mode mode, int constant)
return tem;
}
+#ifndef EXTRA_TARGET
+
/* Generate a vector like gen_rtx_raw_CONST_VEC, but use the zero vector when
all elements are zero, and the one vector when all elements are one. */
rtx
@@ -5664,6 +5685,8 @@ gen_rtx_CONST_VECTOR (enum machine_mode mode, rtvec v)
return gen_rtx_raw_CONST_VECTOR (mode, v);
}
+#endif /* !EXTRA_TARGET */
+
/* Initialise global register information required by all functions. */
void
@@ -5721,11 +5744,13 @@ init_emit_once (void)
/* Initialize the CONST_INT, CONST_DOUBLE, CONST_FIXED, and memory attribute
hash tables. */
+#ifndef EXTRA_TARGET
const_int_htab = htab_create_ggc (37, const_int_htab_hash,
const_int_htab_eq, NULL);
const_double_htab = htab_create_ggc (37, const_double_htab_hash,
const_double_htab_eq, NULL);
+#endif /* EXTRA_TARGET */
const_fixed_htab = htab_create_ggc (37, const_fixed_htab_hash,
const_fixed_htab_eq, NULL);
@@ -6043,3 +6068,5 @@ gen_hard_reg_clobber (enum machine_mode mode, unsigned int regno)
}
#include "gt-emit-rtl.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/except.c b/gcc/except.c
index 10b547dcf3c..9156c357fd5 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -142,6 +142,9 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "timevar.h"
#include "tree-flow.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Provide defaults for stuff that may not be defined when using
sjlj exceptions. */
@@ -167,6 +170,8 @@ static int sjlj_fc_data_ofs;
static int sjlj_fc_personality_ofs;
static int sjlj_fc_lsda_ofs;
static int sjlj_fc_jbuf_ofs;
+
+END_TARGET_SPECIFIC
struct GTY(()) call_site_record_d
@@ -175,6 +180,8 @@ struct GTY(()) call_site_record_d
int action;
};
+START_TARGET_SPECIFIC
+
static bool get_eh_region_and_lp_from_rtx (const_rtx, eh_region *,
eh_landing_pad *);
@@ -3429,3 +3436,5 @@ verify_eh_tree (struct function *fun)
}
#include "gt-except.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/except.h b/gcc/except.h
index 99f620be0d6..03f895a57a6 100644
--- a/gcc/except.h
+++ b/gcc/except.h
@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see
#include "sbitmap.h"
#include "vecprim.h"
+#include "multi-target.h"
struct function;
struct eh_region_d;
@@ -221,6 +222,8 @@ struct GTY(()) eh_status
};
+START_TARGET_SPECIFIC
+
/* Test: is exception handling turned on? */
extern int doing_eh (int);
@@ -297,6 +300,7 @@ extern tree (*lang_protect_cleanup_actions) (void);
/* Return true if type A catches type B. */
extern int (*lang_eh_type_covers) (tree a, tree b);
+END_TARGET_SPECIFIC
/* Just because the user configured --with-sjlj-exceptions=no doesn't
mean that we can use call frame exceptions. Detect that the target
@@ -346,8 +350,10 @@ struct GTY(()) throw_stmt_node {
int lp_nr;
};
+START_TARGET_SPECIFIC
extern struct htab *get_eh_throw_stmt_table (struct function *);
extern void set_eh_throw_stmt_table (struct function *, struct htab *);
+END_TARGET_SPECIFIC
enum eh_personality_kind {
eh_personality_none,
diff --git a/gcc/explow.c b/gcc/explow.c
index 1f66f3e7705..a0523db8e8b 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -40,6 +40,9 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "target.h"
#include "output.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
static rtx break_out_memory_refs (rtx);
static void emit_stack_probe (rtx);
@@ -1717,9 +1720,10 @@ hard_function_value (const_tree valtype, const_tree func, const_tree fntype,
rtx
hard_libcall_value (enum machine_mode mode, rtx fun)
{
- return targetm.calls.libcall_value (mode, fun);
+ return this_targetm.calls.libcall_value (mode, fun);
}
+#ifndef EXTRA_TARGET
/* Look up the tree code for a given rtx code
to provide the arithmetic operation for REAL_ARITHMETIC.
The function returns an int because the caller may not know
@@ -1756,5 +1760,8 @@ rtx_to_tree_code (enum rtx_code code)
}
return ((int) tcode);
}
+#endif /* !EXTRA_TARGET */
#include "gt-explow.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/expmed.c b/gcc/expmed.c
index d1fea0818c2..c6711bb47fa 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -38,6 +38,9 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "df.h"
#include "target.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
static void store_fixed_bit_field (rtx, unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT,
@@ -5850,3 +5853,5 @@ do_cmp_and_jump (rtx arg1, rtx arg2, enum rtx_code op, enum machine_mode mode,
do_compare_rtx_and_jump (arg1, arg2, op, unsignedp, mode,
NULL_RTX, NULL_RTX, label);
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/expr.c b/gcc/expr.c
index d1cd815dd9b..a9900b53ee3 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "diagnostic.h"
#include "ssaexpand.h"
+#include "multi-target.h"
/* Decide whether a function's arguments should be processed
from first to last or from last to first.
@@ -81,6 +82,7 @@ along with GCC; see the file COPYING3. If not see
#endif
+START_TARGET_SPECIFIC
/* If this is nonzero, we do not bother generating VOLATILE
around volatile memory references, and we are willing to
output indirect addresses. If cse is to follow, we reject
@@ -88,6 +90,7 @@ along with GCC; see the file COPYING3. If not see
if it is used only once, instruction combination will produce
the same indirect address eventually. */
int cse_not_expected;
+END_TARGET_SPECIFIC
/* This structure is used by move_by_pieces to describe the move to
be performed. */
@@ -122,6 +125,8 @@ struct store_by_pieces_d
int reverse;
};
+START_TARGET_SPECIFIC
+
static unsigned HOST_WIDE_INT move_by_pieces_ninsns (unsigned HOST_WIDE_INT,
unsigned int,
unsigned int);
@@ -4996,6 +5001,8 @@ categorize_ctor_elements (const_tree ctor, HOST_WIDE_INT *p_nz_elts,
categorize_ctor_elements_1 (ctor, p_nz_elts, p_elt_count, p_must_clear);
}
+#ifndef EXTRA_TARGET
+
/* Count the number of scalars in TYPE. Return -1 on overflow or
variable-sized. If ALLOW_FLEXARR is true, don't count flexible
array member at the end of the structure. */
@@ -5084,6 +5091,8 @@ count_type_elements (const_tree type, bool allow_flexarr)
}
}
+#endif /* !EXTRA_TARGET */
+
/* Return 1 if EXP contains mostly (3/4) zeros. */
static int
@@ -6128,6 +6137,7 @@ get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize,
return exp;
}
+#ifndef EXTRA_TARGET
/* Given an expression EXP that may be a COMPONENT_REF, an ARRAY_REF or an
ARRAY_RANGE_REF, look for whether EXP or any nested component-refs within
EXP is marked as PACKED. */
@@ -6234,6 +6244,7 @@ array_ref_up_bound (tree exp)
/* Otherwise fail. */
return NULL_TREE;
}
+#endif /* EXTRA_TARGET */
/* Return a tree representing the offset, in bytes, of the field referenced
by EXP. This does not include any offset in DECL_FIELD_BIT_OFFSET. */
@@ -10273,10 +10284,12 @@ tree
build_personality_function (const char *name)
{
tree decl, type;
+ /* build a pointer type with the current targets mode. */
+ tree ptr_type = build_pointer_type (void_type_node);
type = build_function_type_list (integer_type_node, integer_type_node,
long_long_unsigned_type_node,
- ptr_type_node, ptr_type_node, NULL_TREE);
+ ptr_type, ptr_type, NULL_TREE);
decl = build_decl (UNKNOWN_LOCATION, FUNCTION_DECL,
get_identifier (name), type);
DECL_ARTIFICIAL (decl) = 1;
@@ -10314,3 +10327,5 @@ get_personality_function (tree decl)
}
#include "gt-expr.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/expr.h b/gcc/expr.h
index 3ff0145f33e..7bd457fd62b 100644
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -297,6 +297,10 @@ enum optab_methods
OPTAB_MUST_WIDEN
};
+#ifdef EXTRA_TARGET
+namespace EXTRA_TARGET {
+#endif
+
/* Generate code for a simple binary or unary operation. "Simple" in
this case means "can be unambiguously described by a (mode, code)
pair and mapped to a single optab." */
@@ -337,8 +341,16 @@ extern void emit_indirect_jump (rtx);
/* Generate a conditional trap instruction. */
extern rtx gen_cond_trap (enum rtx_code, rtx, rtx, rtx);
+#ifdef EXTRA_TARGET
+} /* Close EXTRA_TARGET namespace. */
+#endif
+
#include "insn-config.h"
+#ifdef EXTRA_TARGET
+namespace EXTRA_TARGET {
+#endif
+
#ifdef HAVE_conditional_move
/* Emit a conditional move operation. */
rtx emit_conditional_move (rtx, enum rtx_code, rtx, rtx, enum machine_mode,
@@ -407,6 +419,10 @@ extern rtx convert_to_mode (enum machine_mode, rtx, int);
/* Convert an rtx to MODE from OLDMODE and return the result. */
extern rtx convert_modes (enum machine_mode, enum machine_mode, rtx, int);
+#ifdef EXTRA_TARGET
+} /* Close EXTRA_TARGET namespace. */
+#endif
+
/* Emit code to move a block Y to a block X. */
enum block_op_methods
@@ -418,6 +434,10 @@ enum block_op_methods
BLOCK_OP_TAILCALL
};
+#ifdef EXTRA_TARGET
+namespace EXTRA_TARGET {
+#endif
+
extern GTY(()) tree block_clear_fn;
extern void init_block_move_fn (const char *);
extern void init_block_clear_fn (const char *);
@@ -602,11 +622,19 @@ extern void do_compare_rtx_and_jump (rtx, rtx, enum rtx_code, int,
extern int try_casesi (tree, tree, tree, tree, rtx, rtx, rtx);
extern int try_tablejump (tree, tree, tree, tree, rtx, rtx);
+#ifdef EXTRA_TARGET
+} /* Close EXTRA_TARGET namespace. */
+#endif
+
/* Functions from alias.c */
#include "alias.h"
/* rtl.h and tree.h were included. */
+#ifdef EXTRA_TARGET
+namespace EXTRA_TARGET {
+#endif
+/* Functions from explow.c */
/* Return an rtx for the size in bytes of the value of an expr. */
extern rtx expr_size (tree);
@@ -618,6 +646,7 @@ extern HOST_WIDE_INT int_expr_size (tree);
in its original home. This becomes invalid if any more code is emitted. */
extern rtx hard_function_value (const_tree, const_tree, const_tree, int);
+/* Functions from calls.c */
extern rtx prepare_call_address (tree, rtx, rtx, rtx *, int, int);
extern bool shift_return_value (enum machine_mode, bool, rtx);
@@ -694,9 +723,17 @@ extern rtx adjust_automodify_address_1 (rtx, enum machine_mode, rtx,
known to be in OFFSET (possibly 1). */
extern rtx offset_address (rtx, rtx, unsigned HOST_WIDE_INT);
+#ifdef EXTRA_TARGET
+} /* Close EXTRA_TARGET namespace. */
+#endif
+
/* Definitions from emit-rtl.c */
#include "emit-rtl.h"
+#ifdef EXTRA_TARGET
+namespace EXTRA_TARGET {
+#endif
+
/* Return a memory reference like MEMREF, but with its mode widened to
MODE and adjusted by OFFSET. */
extern rtx widen_memory_access (rtx, enum machine_mode, HOST_WIDE_INT);
@@ -765,9 +802,19 @@ extern void anti_adjust_stack (rtx);
/* Add some bytes to the stack while probing it. An rtx says how many. */
extern void anti_adjust_stack_and_probe (rtx, bool);
+#ifdef EXTRA_TARGET
+} /* Close EXTRA_TARGET namespace. */
+#endif
+
/* This enum is used for the following two functions. */
enum save_level {SAVE_BLOCK, SAVE_FUNCTION, SAVE_NONLOCAL};
+enum extraction_pattern { EP_insv, EP_extv, EP_extzv };
+
+#ifdef EXTRA_TARGET
+namespace EXTRA_TARGET {
+#endif
+
/* Save the stack pointer at the specified level. */
extern void emit_stack_save (enum save_level, rtx *, rtx);
@@ -795,7 +842,6 @@ extern rtx hard_libcall_value (enum machine_mode, rtx);
insert/extract insn, or MAX_MACHINE_MODE if no such insn is
available. */
-enum extraction_pattern { EP_insv, EP_extv, EP_extzv };
extern enum machine_mode
mode_for_extraction (enum extraction_pattern, int);
@@ -830,4 +876,8 @@ rtx get_personality_function (tree);
extern int vector_mode_valid_p (enum machine_mode);
+#ifdef EXTRA_TARGET
+} /* Close EXTRA_TARGET namespace. */
+#endif
+
#endif /* GCC_EXPR_H */
diff --git a/gcc/final.c b/gcc/final.c
index 0d19562acbf..196949e3e10 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -81,6 +81,7 @@ along with GCC; see the file COPYING3. If not see
#include "ggc.h"
#include "cfgloop.h"
#include "params.h"
+#include "multi-target.h"
#ifdef XCOFF_DEBUGGING_INFO
#include "xcoffout.h" /* Needed for external data
@@ -124,6 +125,8 @@ along with GCC; see the file COPYING3. If not see
#define SEEN_NOTE 2
#define SEEN_EMITTED 4
+START_TARGET_SPECIFIC
+
/* Last insn processed by final_scan_insn. */
static rtx debug_insn;
rtx current_output_insn;
@@ -4495,3 +4498,5 @@ struct rtl_opt_pass pass_clean_state =
0 /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/fixed-value.h b/gcc/fixed-value.h
index ca0ee93d48a..07948a9eb6b 100644
--- a/gcc/fixed-value.h
+++ b/gcc/fixed-value.h
@@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see
#include "machmode.h"
#include "real.h"
#include "double-int.h"
+#include "multi-target.h"
struct GTY(()) fixed_value
{
@@ -44,10 +45,12 @@ extern FIXED_VALUE_TYPE fconst1[MAX_FCONST1];
#define FCONST0(mode) fconst0[mode - QQmode]
#define FCONST1(mode) fconst1[mode - HAmode]
+START_TARGET_SPECIFIC
/* Return a CONST_FIXED with value R and mode M. */
#define CONST_FIXED_FROM_FIXED_VALUE(r, m) \
const_fixed_from_fixed_value (r, m)
extern rtx const_fixed_from_fixed_value (FIXED_VALUE_TYPE, enum machine_mode);
+END_TARGET_SPECIFIC
/* Initialize from a decimal or hexadecimal string. */
extern void fixed_from_string (FIXED_VALUE_TYPE *, const char *,
diff --git a/gcc/flags.h b/gcc/flags.h
index d1634bd9e11..a32d8c7ac97 100644
--- a/gcc/flags.h
+++ b/gcc/flags.h
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "options.h"
+#include "multi-target.h"
enum debug_info_type
{
@@ -218,7 +219,9 @@ enum ira_algorithm
IRA_ALGORITHM_PRIORITY
};
+START_TARGET_SPECIFIC
extern enum ira_algorithm flag_ira_algorithm;
+END_TARGET_SPECIFIC
/* The regions used for the integrated register allocator (IRA). */
enum ira_region
diff --git a/gcc/function.c b/gcc/function.c
index f85f780e916..cf381446c3e 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -65,6 +65,9 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "timevar.h"
#include "vecprim.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* So we can assign to cfun in this file. */
#undef cfun
@@ -121,8 +124,10 @@ static GTY(()) int funcdef_no;
target specific, per-function data structures. */
struct machine_function * (*init_machine_status) (void);
+#ifndef EXTRA_TARGET
/* The currently compiled function. */
struct function *cfun = 0;
+#endif /* !EXTRA_TARGET */
/* These hashes record the prologue and epilogue insns. */
static GTY((if_marked ("ggc_marked_p"), param_is (struct rtx_def)))
@@ -154,6 +159,8 @@ static void prepare_function_start (void);
static void do_clobber_return_reg (rtx, void *);
static void do_use_return_reg (rtx, void *);
static void set_insn_locators (rtx, int) ATTRIBUTE_UNUSED;
+extern void allocate_struct_function_1 (tree fndecl, bool abstract_p);
+EXTRA_TARGETS_DECL (void allocate_struct_function_1 (tree, bool));
/* Stack of nested functions. */
/* Keep track of the cfun stack. */
@@ -435,6 +442,7 @@ assign_stack_local (enum machine_mode mode, HOST_WIDE_INT size, int align)
}
+END_TARGET_SPECIFIC
/* In order to evaluate some expressions, such as function calls returning
structures in memory, we need to temporarily allocate stack locations.
We record each allocated temporary in the following structure.
@@ -484,6 +492,7 @@ struct GTY(()) temp_slot {
info is for combine_temp_slots. */
HOST_WIDE_INT full_size;
};
+START_TARGET_SPECIFIC
/* A table of addresses that represent a stack slot. The table is a mapping
from address RTXen to a temp slot. */
@@ -1849,6 +1858,10 @@ struct rtl_opt_pass pass_instantiate_virtual_regs =
This means a type for which function calls must pass an address to the
function or get an address back from the function.
EXP may be a type node or an expression (whose type is tested). */
+/* FIXME: This function uses target-specific information, but is used
+ by tree passes. Should check if anything needs to be fixed up when
+ moving (part of) a function to another target, and henceforth dispatch
+ to appropriate aggregate_value_p function. */
int
aggregate_value_p (const_tree exp, const_tree fntype)
@@ -4068,6 +4081,7 @@ set_cfun (struct function *new_cfun)
if (cfun != new_cfun)
{
cfun = new_cfun;
+ targetm_pnt = targetm_array[cfun ? cfun->target_arch : 0];
invoke_set_current_function_hook (new_cfun ? new_cfun->decl : NULL_TREE);
}
}
@@ -4101,6 +4115,12 @@ get_next_funcdef_no (void)
return funcdef_no++;
}
+#ifndef EXTRA_TARGET
+static void (* const allocate_struct_function_1_array[]) (tree, bool)
+ = { &allocate_struct_function_1,
+ EXTRA_TARGETS_EXPAND_COMMA (&,allocate_struct_function_1)
+ };
+
/* Allocate a function structure for FNDECL and set its contents
to the defaults. Set cfun to the newly-allocated object.
Some of the helper functions invoked during initialization assume
@@ -4117,11 +4137,34 @@ get_next_funcdef_no (void)
void
allocate_struct_function (tree fndecl, bool abstract_p)
{
+ int i = 0;
+#if NUM_TARGETS > 1
+ const char *arch_name = targetm.name;
+ tree attr = NULL_TREE;
+
+ if (fndecl)
+ attr = lookup_attribute ("target_arch", DECL_ATTRIBUTES (fndecl));
+ if (attr)
+ arch_name = TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr)));
+ for (; targetm_array[i]; i++)
+ if (strcmp (targetm_array[i]->name, arch_name) == 0)
+ break;
+#endif
+ cfun = GGC_CNEW (struct function);
+ cfun->target_arch = i;
+ targetm_pnt = targetm_array[i];
+ gcc_assert (targetm_pnt);
+ allocate_struct_function_1_array[i] (fndecl, abstract_p);
+ return;
+}
+#endif /* !EXTRA_TARGET */
+
+void
+allocate_struct_function_1 (tree fndecl, bool abstract_p)
+{
tree result;
tree fntype = fndecl ? TREE_TYPE (fndecl) : NULL_TREE;
- cfun = GGC_CNEW (struct function);
-
cfun->function_frequency = FUNCTION_FREQUENCY_NORMAL;
init_eh_for_function ();
@@ -4217,6 +4260,8 @@ init_dummy_function_start (void)
prepare_function_start ();
}
+EXTRA_TARGETS_DECL (void init_function_start (tree));
+
/* Generate RTL for the start of the function SUBR (a FUNCTION_DECL tree node)
and initialize static variables for generating RTL for the statements
of the function. */
@@ -4224,6 +4269,7 @@ init_dummy_function_start (void)
void
init_function_start (tree subr)
{
+ EXTRA_TARGETS_CALL (init_function_start (subr));
if (subr && DECL_STRUCT_FUNCTION (subr))
set_cfun (DECL_STRUCT_FUNCTION (subr));
else
@@ -5805,3 +5851,5 @@ struct rtl_opt_pass pass_match_asm_constraints =
#include "gt-function.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/function.h b/gcc/function.h
index fb2965a2c6b..2b6410b20a6 100644
--- a/gcc/function.h
+++ b/gcc/function.h
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "hashtab.h"
#include "vecprim.h"
+#include "multi-target.h"
/* Stack of pending (incomplete) sequences saved by `start_sequence'.
Each element describes one pending sequence.
@@ -84,13 +85,14 @@ struct GTY(()) emit_status {
unsigned char * GTY((skip)) regno_pointer_align;
};
-
+START_TARGET_SPECIFIC
/* Indexed by pseudo register number, gives the rtx for that pseudo.
Allocated in parallel with regno_pointer_align.
FIXME: We could put it into emit_status struct, but gengtype is not able to deal
with length attribute nested in top level structures. */
extern GTY ((length ("crtl->emit.x_reg_rtx_no"))) rtx * regno_reg_rtx;
+END_TARGET_SPECIFIC
/* For backward compatibility... eventually these should all go away. */
#define reg_rtx_no (crtl->emit.x_reg_rtx_no)
@@ -196,6 +198,7 @@ struct GTY(()) varasm_status {
unsigned int deferred_constants;
};
+START_TARGET_SPECIFIC
/* Information mainlined about RTL representation of incoming arguments. */
struct GTY(()) incoming_args {
/* Number of bytes of args popped by function being compiled on its return.
@@ -224,6 +227,7 @@ struct GTY(()) incoming_args {
/* The arg pointer hard register, or the pseudo into which it was copied. */
rtx internal_arg_pointer;
};
+END_TARGET_SPECIFIC
/* Data for function partitioning. */
struct GTY(()) function_subsections {
@@ -242,6 +246,9 @@ struct GTY(()) function_subsections {
const char *unlikely_text_section_name;
};
+struct initial_value_struct;
+
+START_TARGET_SPECIFIC
/* Datastructures maintained for currently processed function in RTL form. */
struct GTY(()) rtl_data {
struct expr_status expr;
@@ -434,6 +441,7 @@ struct GTY(()) rtl_data {
function where currently compiled version of it is nothrow. */
bool nothrow;
};
+END_TARGET_SPECIFIC
#define return_label (crtl->x_return_label)
#define naked_return_label (crtl->x_naked_return_label)
@@ -450,12 +458,14 @@ struct GTY(()) rtl_data {
#define stack_realign_fp (crtl->stack_realign_needed && !crtl->need_drap)
#define stack_realign_drap (crtl->stack_realign_needed && crtl->need_drap)
+START_TARGET_SPECIFIC
extern GTY(()) struct rtl_data x_rtl;
/* Accessor to RTL datastructures. We keep them statically allocated now since
we never keep multiple functions. For threaded compiler we might however
want to do differently. */
#define crtl (&x_rtl)
+END_TARGET_SPECIFIC
/* This structure can save all the important global and static variables
describing the status of the current function. */
@@ -596,6 +606,9 @@ struct GTY(()) function {
adjusts one of its arguments and forwards to another
function. */
unsigned int is_thunk : 1;
+
+ /* Target architecture to compile this function for. */
+ unsigned int target_arch : 8;
};
/* If va_list_[gf]pr_size is set to this, it means we don't know how
@@ -611,6 +624,7 @@ extern GTY(()) struct function *cfun;
push_cfun or set_cfun. */
#define cfun (cfun + 0)
+START_TARGET_SPECIFIC
/* Nonzero if we've already converted virtual regs to hard regs. */
extern int virtuals_instantiated;
@@ -703,4 +717,5 @@ extern bool reference_callee_copied (CUMULATIVE_ARGS *, enum machine_mode,
extern void used_types_insert (tree);
extern int get_next_funcdef_no (void);
+END_TARGET_SPECIFIC
#endif /* GCC_FUNCTION_H */
diff --git a/gcc/fwprop.c b/gcc/fwprop.c
index 708ab3f8edc..9d86d384c75 100644
--- a/gcc/fwprop.c
+++ b/gcc/fwprop.c
@@ -39,6 +39,7 @@ along with GCC; see the file COPYING3. If not see
#include "cfgloop.h"
#include "tree-pass.h"
#include "domwalk.h"
+#include "multi-target.h"
/* This pass does simple forward propagation and simplification when an
@@ -114,6 +115,8 @@ along with GCC; see the file COPYING3. If not see
all that is needed by fwprop. */
+START_TARGET_SPECIFIC
+
static int num_changes;
DEF_VEC_P(df_ref);
@@ -1505,3 +1508,4 @@ struct rtl_opt_pass pass_rtl_fwprop_addr =
TODO_dump_func /* todo_flags_finish */
}
};
+END_TARGET_SPECIFIC
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 6c7cc6b2640..ec0311ceb48 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -170,6 +170,7 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "dbgcnt.h"
#include "target.h"
+#include "multi-target.h"
/* Propagate flow information through back edges and thus enable PRE's
moving loop invariant calculations out of loops.
@@ -284,6 +285,8 @@ along with GCC; see the file COPYING3. If not see
/* Set to non-zero if CSE should run after all GCSE optimizations are done. */
int flag_rerun_cse_after_global_opts;
+START_TARGET_SPECIFIC
+
/* An obstack for our working variables. */
static struct obstack gcse_obstack;
@@ -5187,3 +5190,5 @@ struct rtl_opt_pass pass_rtl_hoist =
};
#include "gt-gcse.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/genattr.c b/gcc/genattr.c
index 18bba53034d..764e804a9be 100644
--- a/gcc/genattr.c
+++ b/gcc/genattr.c
@@ -81,7 +81,9 @@ extern int insn_default_length (rtx);\n\
extern int insn_min_length (rtx);\n\
extern int insn_variable_length_p (rtx);\n\
extern int insn_current_length (rtx);\n\n\
-#include \"insn-addr.h\"\n");
+END_TARGET_SPECIFIC /* insn-addr.h includes vecprim.h */\n\
+#include \"insn-addr.h\"\n"
+START_TARGET_SPECIFIC\n");
}
}
@@ -103,7 +105,10 @@ main (int argc, char **argv)
puts ("/* Generated automatically by the program `genattr'");
puts (" from the machine description file `md'. */\n");
puts ("#ifndef GCC_INSN_ATTR_H");
- puts ("#define GCC_INSN_ATTR_H\n");
+ puts ("#define GCC_INSN_ATTR_H");
+ puts ("");
+ puts ("#include \"multi-target.h\"");
+ puts ("START_TARGET_SPECIFIC\n");
/* For compatibility, define the attribute `alternative', which is just
a reference to the variable `which_alternative'. */
@@ -280,6 +285,8 @@ main (int argc, char **argv)
printf("#define ATTR_FLAG_very_likely\t0x8\n");
printf("#define ATTR_FLAG_unlikely\t0x10\n");
printf("#define ATTR_FLAG_very_unlikely\t0x20\n");
+ printf("\n");
+ printf("END_TARGET_SPECIFIC\n");
puts("\n#endif /* GCC_INSN_ATTR_H */");
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c
index 1e5198a3dad..136d8e9c8bd 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -4542,8 +4542,11 @@ from the machine description file `md'. */\n\n");
printf ("#include \"toplev.h\"\n");
printf ("#include \"flags.h\"\n");
printf ("#include \"function.h\"\n");
+ printf ("#include \"multi-target.h\"\n");
printf ("\n");
- printf ("#define operands recog_data.operand\n\n");
+ printf ("#define operands recog_data.operand\n");
+ printf ("\n");
+ printf ("START_TARGET_SPECIFIC\n\n");
/* Make `insn_alternatives'. */
insn_alternatives = oballocvec (int, insn_code_number);
@@ -4610,6 +4613,8 @@ from the machine description file `md'. */\n\n");
write_length_unit_log ();
+ printf ("\nEND_TARGET_SPECIFIC\n");
+
fflush (stdout);
return (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
}
diff --git a/gcc/genautomata.c b/gcc/genautomata.c
index f3321410da5..bf5bd86bd50 100644
--- a/gcc/genautomata.c
+++ b/gcc/genautomata.c
@@ -9570,9 +9570,13 @@ main (int argc, char **argv)
"#include \"insn-attr.h\"\n"
"#include \"toplev.h\"\n"
"#include \"flags.h\"\n"
- "#include \"function.h\"\n");
+ "#include \"function.h\"\n"
+ "#include \"multi-target.h\"\n"
+ "\n"
+ "START_TARGET_SPECIFIC\n");
write_automata ();
+ puts ("END_TARGET_SPECIFIC");
}
}
diff --git a/gcc/genemit.c b/gcc/genemit.c
index 7ac3c917067..051fac44ea2 100644
--- a/gcc/genemit.c
+++ b/gcc/genemit.c
@@ -863,9 +863,11 @@ from the machine description file `md'. */\n\n");
printf ("#include \"tm-constrs.h\"\n");
printf ("#include \"ggc.h\"\n");
printf ("#include \"basic-block.h\"\n");
- printf ("#include \"integrate.h\"\n\n");
+ printf ("#include \"integrate.h\"\n");
+ printf ("#include \"multi-target.h\"\n\n");
printf ("#define FAIL return (end_sequence (), _val)\n");
printf ("#define DONE return (_val = get_insns (), end_sequence (), _val)\n\n");
+ printf ("START_TARGET_SPECIFIC\n\n");
/* Read the machine description. */
@@ -909,6 +911,8 @@ from the machine description file `md'. */\n\n");
output_add_clobbers ();
output_added_clobbers_hard_reg_p ();
+ printf ("\nEND_TARGET_SPECIFIC\n");
+
fflush (stdout);
return (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
}
diff --git a/gcc/genextract.c b/gcc/genextract.c
index c414891bb6b..9407afaa849 100644
--- a/gcc/genextract.c
+++ b/gcc/genextract.c
@@ -365,6 +365,9 @@ print_header (void)
#include \"insn-config.h\"\n\
#include \"recog.h\"\n\
#include \"toplev.h\"\n\
+#include \"multi-target.h\"\n\
+\n\
+START_TARGET_SPECIFIC\n\
\n\
/* This variable is used as the \"location\" of any missing operand\n\
whose numbers are skipped by a given pattern. */\n\
@@ -490,7 +493,7 @@ main (int argc, char **argv)
puts (" break;\n");
}
- puts (" }\n}");
+ puts (" }\n}\nEND_TARGET_SPECIFIC");
fflush (stdout);
return (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
}
diff --git a/gcc/genflags.c b/gcc/genflags.c
index fcfd2f1bd89..1922cc1d6a8 100644
--- a/gcc/genflags.c
+++ b/gcc/genflags.c
@@ -269,6 +269,9 @@ main (int argc, char **argv)
puts ("#ifndef GCC_INSN_FLAGS_H");
puts ("#define GCC_INSN_FLAGS_H\n");
+ puts ("#include \"multi-target.h\"\n"
+ "START_TARGET_SPECIFIC\n");
+
/* Read the machine description. */
while (1)
@@ -290,6 +293,8 @@ main (int argc, char **argv)
for (insn_ptr = insns; *insn_ptr; insn_ptr++)
gen_proto (*insn_ptr);
+ puts ("\nEND_TARGET_SPECIFIC");
+
puts("\n#endif /* GCC_INSN_FLAGS_H */");
if (have_error || ferror (stdout) || fflush (stdout) || fclose (stdout))
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index 91f3f57d7c9..b9cfd61baea 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -1553,6 +1553,8 @@ open_base_files (void)
return;
header_file = create_file ("GCC", "gtype-desc.h");
+ oprintf (header_file, "\n#include \"multi-target.h\"\n");
+ oprintf (header_file, "\nSTART_TARGET_SPECIFIC\n");
base_files = XNEWVEC (outf_p, num_lang_dirs);
@@ -1571,7 +1573,7 @@ open_base_files (void)
"optabs.h", "libfuncs.h", "debug.h", "ggc.h", "cgraph.h",
"tree-flow.h", "reload.h", "cpp-id-data.h", "tree-chrec.h",
"cfglayout.h", "except.h", "output.h", "gimple.h", "cfgloop.h",
- "target.h", "ipa-prop.h", NULL
+ "target.h", "ipa-prop.h", "multi-target.h", NULL
};
const char *const *ifp;
outf_p gtype_desc_c;
@@ -1580,6 +1582,7 @@ open_base_files (void)
for (ifp = ifiles; *ifp; ifp++)
oprintf (gtype_desc_c, "#include \"%s\"\n", *ifp);
+ oprintf (gtype_desc_c, "\nSTART_TARGET_SPECIFIC\n");
/* Make sure we handle "cfun" specially. */
oprintf (gtype_desc_c, "\n/* See definition in function.h. */\n");
oprintf (gtype_desc_c, "#undef cfun\n");
@@ -2555,6 +2558,9 @@ write_func_for_structure (type_p orig_s, type_p s, type_p *param,
options_p opt;
struct walk_type_data d;
+#ifdef EXTRA_TARGET /* FIXME */
+ return;
+#endif
/* This is a hack, and not the good kind either. */
for (i = NUM_PARAM - 1; i >= 0; i--)
if (param && param[i] && param[i]->kind == TYPE_POINTER
@@ -3440,6 +3446,9 @@ write_roots (pair_p variables, bool emit_pch)
}
}
+#ifdef EXTRA_TARGET /* FIXME */
+ return;
+#endif
for (v = variables; v; v = v->next)
{
outf_p f = get_output_file_with_visibility (v->line.file);
@@ -3771,6 +3780,8 @@ main (int argc, char **argv)
}
write_roots (variables, plugin_files == NULL);
write_rtx_next ();
+ oprintf (get_output_file_with_visibility (NULL), "\nEND_TARGET_SPECIFIC\n");
+ oprintf (header_file, "\nEND_TARGET_SPECIFIC\n");
close_output_files ();
if (plugin_files)
diff --git a/gcc/genmodes.c b/gcc/genmodes.c
index 2aa559f3d25..a069e4ebdf4 100644
--- a/gcc/genmodes.c
+++ b/gcc/genmodes.c
@@ -23,6 +23,17 @@ along with GCC; see the file COPYING3. If not see
#include "errors.h"
#include "hashtab.h"
+#define DEBUG if (0) printf
+
+/* FIXME: The intention is that across targets, modes are considered
+ equivalent if they have the same bitsize, mode_class and (where applicable)
+ precision. Thus, QImode and a target with 32 bit units should be
+ equivalent to SImode on a target with 8 bit units.
+ However, at the moment we don't support mixing targets with different
+ BITS_PER_UNIT. */
+/* FIXME: We need to change the handling of RESET_FLOAT_FORMAT so that
+ it doesn't change the original mode for other targets. */
+
/* enum mode_class is normally defined by machmode.h but we can't
include that header here. */
#include "mode-classes.def"
@@ -54,6 +65,7 @@ struct mode_data
struct mode_data *next; /* next this class - arbitrary order */
const char *name; /* printable mode name -- SI, not SImode */
+ const char *target; /* the target this mode is specific to. */
enum mode_class cl; /* this mode class */
unsigned int precision; /* size in bits, equiv to TYPE_PRECISION */
unsigned int bytesize; /* storage size in addressable units */
@@ -81,7 +93,7 @@ static unsigned int n_modes[MAX_MODE_CLASS];
static struct mode_data *void_mode;
static const struct mode_data blank_mode = {
- 0, "<unknown>", MAX_MODE_CLASS,
+ 0, "<unknown>", (const char *) 0, MAX_MODE_CLASS,
-1U, -1U, -1U, -1U,
0, 0, 0, 0, 0, 0,
"<unknown>", 0, 0, 0, 0
@@ -139,6 +151,8 @@ vector_class (enum mode_class cl)
}
}
+static const char *target = (const char *) 0;
+
/* Utility routines. */
static inline struct mode_data *
find_mode (const char *name)
@@ -146,6 +160,7 @@ find_mode (const char *name)
struct mode_data key;
key.name = name;
+ key.target = target;
return (struct mode_data *) htab_find (modes_by_name, &key);
}
@@ -169,6 +184,7 @@ new_mode (enum mode_class cl, const char *name,
memcpy (m, &blank_mode, sizeof (struct mode_data));
m->cl = cl;
m->name = name;
+ m->target = target;
if (file)
m->file = trim_filename (file);
m->line = line;
@@ -196,7 +212,9 @@ eq_mode (const void *p, const void *q)
const struct mode_data *a = (const struct mode_data *)p;
const struct mode_data *b = (const struct mode_data *)q;
- return !strcmp (a->name, b->name);
+ return (!strcmp (a->name, b->name)
+ && ((a->target ? a->target : target)
+ == (b->target ? b->target : target)));
}
#define for_all_modes(C, M) \
@@ -420,6 +438,117 @@ complete_all_modes (void)
complete_mode (m);
}
+/* Remove the duplicate mode OLD. All referenecs to it should be replaced
+ with NEW. */
+static void
+drop_mode (struct mode_data *old, struct mode_data *new)
+{
+ struct mode_data *m, *last;
+
+ DEBUG ("dropping %s %s\n", m->name, m->target);
+ for (m = old->contained; m; last = m, m = m->next_cont)
+ m->component = new;
+ last->next_cont = new->contained;
+ new->contained = old->contained;
+}
+
+static void
+fixup_target_modes (void)
+{
+ struct mode_data *m, *m_prev, *m2, *m2_prev, *m3, *m3_prev;
+ int cl;
+
+ /* Find target-specific modes that describe the same data. When a mode
+ is found that matches a mode earlier in the list, move all earlier modes
+ from the same target in the same mode class in front of the earlier mode;
+ of the equivalent modes, keep only the one that is for the output
+ target. */
+ for (cl = 0; cl < MAX_MODE_CLASS; cl++)
+ {
+ if (cl == MODE_RANDOM || cl == MODE_CC)
+ continue;
+ for (m_prev = 0, m = modes[cl]; m; m_prev = m, m = m->next)
+ {
+ for (m2_prev = 0, m2 = modes[cl]; m2 != m;
+ m2_prev = m2, m2 = m2->next)
+ if (m->precision == m2->precision
+ && m->bytesize == m2->bytesize
+ && m->ncomponents == m2->ncomponents
+ && m->format == m2->format
+ && m->ibit == m2->ibit
+ && m->fbit == m2->fbit)
+ {
+ gcc_assert (m->target && m2->target);
+ gcc_assert (m->target != m2->target);
+ /* Find all modes between m2 and m which are for the same
+ target as m and insert them in front of m2. */
+ for (m3_prev = m2; m3 = m3_prev->next, m3 != m; )
+ {
+ if (m3->target != m->target)
+ {
+ m3_prev = m3;
+ continue;
+ }
+ m3_prev->next = m3->next;
+ if (m2_prev)
+ m2_prev->next = m3;
+ else
+ modes[cl] = m3;
+ m2_prev = m3;
+ m3->next = m2;
+ if (m3 == m_prev)
+ {
+ m_prev = m3_prev;
+ break;
+ }
+ }
+ /* Remove m from the list. */
+ gcc_assert (m_prev && m_prev->next == m);
+ gcc_assert (m->next != m);
+ gcc_assert (m_prev != m);
+ m_prev->next = m->next;
+ /* If m is for the output target, retain it in place of m2. */
+ if (!strcmp (m->target, output_target))
+ {
+ if (m2_prev)
+ m2_prev->next = m;
+ else
+ modes[cl] = m;
+ if (m_prev == m2)
+ m_prev = m;
+ m->next = m2->next;
+ drop_mode (m2, m);
+ }
+ else
+ drop_mode (m, m2);
+ m = m_prev;
+ break;
+ }
+ gcc_assert (m2 == m || m == m_prev);
+ }
+ }
+
+ /* Reset the target field for modes that are for the output target.
+ Henceforth, all modes with the target field set are not modes for
+ the output target. */
+ for_all_modes (cl, m)
+ if (m->target && !strcmp (m->target, output_target))
+ m->target = (const char *)0;
+ /* Mangle name of modes for other targets. */
+ else if (m->target)
+ {
+ size_t t_len = strlen (m->target);
+ size_t n_len = strlen (m->name);
+ char *new_name
+ = XNEWVEC (char, t_len + 1 + n_len + 1);
+
+ strcpy (new_name, m->target);
+ new_name[t_len] = '_';
+ strcat (new_name + t_len + 1, m->name);
+ m->name = new_name;
+ }
+}
+
/* For each mode in class CLASS, construct a corresponding complex mode. */
#define COMPLEX_MODES(C) make_complex_modes(MODE_##C, __FILE__, __LINE__)
static void
@@ -430,6 +559,7 @@ make_complex_modes (enum mode_class cl,
struct mode_data *c;
char buf[8];
enum mode_class cclass = complex_class (cl);
+ const char *save_target;
if (cclass == MODE_RANDOM)
return;
@@ -439,6 +569,8 @@ make_complex_modes (enum mode_class cl,
/* Skip BImode. FIXME: BImode probably shouldn't be MODE_INT. */
if (m->precision == 1)
continue;
+ if (m->target && target && m->target != target)
+ continue;
if (strlen (m->name) >= sizeof buf)
{
@@ -472,7 +604,10 @@ make_complex_modes (enum mode_class cl,
else
snprintf (buf, sizeof buf, "C%s", m->name);
+ save_target = target;
+ target = m->target;
c = new_mode (cclass, xstrdup (buf), file, line);
+ target = save_target;
c->component = m;
}
}
@@ -503,6 +638,8 @@ make_vector_modes (enum mode_class cl, unsigned int width,
continue;
if (width % m->bytesize)
continue;
+ if (m->target && target && m->target != target)
+ continue;
/* Skip QFmode and BImode. FIXME: this special case should
not be necessary. */
@@ -647,7 +784,7 @@ make_partial_integer_mode (const char *base, const char *name,
struct mode_data *component = find_mode (base);
if (!component)
{
- error ("%s:%d: no mode \"%s\"", file, line, name);
+ error ("%s:%d: no base mode \"%s\" for \"%s\"", file, line, base, name);
return;
}
if (component->cl != MODE_INT)
@@ -780,7 +917,7 @@ static void
calc_wider_mode (void)
{
int c;
- struct mode_data *m;
+ struct mode_data *m, *last;
struct mode_data **sortbuf;
unsigned int max_n_modes = 0;
unsigned int i, j;
@@ -824,9 +961,18 @@ calc_wider_mode (void)
qsort (sortbuf, i, sizeof (struct mode_data *), cmp_modes);
sortbuf[i] = 0;
+ last = 0;
for (j = 0; j < i; j++)
- sortbuf[j]->next = sortbuf[j]->wider = sortbuf[j + 1];
-
+ {
+ sortbuf[j]->wider = void_mode;
+ if (!sortbuf[j]->target)
+ {
+ if (last)
+ last->wider = sortbuf[j];
+ last = sortbuf[j];
+ }
+ sortbuf[j]->next = sortbuf[j + 1];
+ }
modes[c] = sortbuf[0];
}
@@ -844,8 +990,10 @@ calc_wider_mode (void)
puts ("\nconst " TYPE " " NAME "[" ASIZE "] =\n{");
#define print_maybe_const_decl(TYPE, NAME, ASIZE, CATEGORY) \
- printf ("\n" TYPE " " NAME "[" ASIZE "] = \n{\n", \
- adj_##CATEGORY ? "" : "const ")
+ printf ("\n%s" TYPE " " NAME "[" ASIZE "] = \n{\n", \
+ (adj_##CATEGORY \
+ ? "" \
+ : "extern const " TYPE " " NAME "[" ASIZE "];\nconst "));
#define print_closer() puts ("};")
@@ -881,14 +1029,14 @@ enum machine_mode\n{");
{
first = modes[c];
last = 0;
- for (m = first; m; last = m, m = m->next)
+ for (m = first; m && !m->target; last = m, m = m->next)
;
/* Don't use BImode for MIN_MODE_INT, since otherwise the middle
end will try to use it for bitfields in structures and the
like, which we do not want. Only the target md file should
generate BImode widgets. */
- if (first && first->precision == 1)
+ while (first && (first->precision == 1 || first->target))
first = first->next;
if (first && last)
@@ -933,7 +1081,10 @@ emit_insn_modes_c_header (void)
#include \"coretypes.h\"\n\
#include \"tm.h\"\n\
#include \"machmode.h\"\n\
-#include \"real.h\"");
+#include \"real.h\"\n\
+#include \"multi-target.h\"\n\
+\n\
+START_TARGET_SPECIFIC");
}
static void
@@ -948,7 +1099,10 @@ emit_min_insn_modes_c_header (void)
\n\
#include \"bconfig.h\"\n\
#include \"system.h\"\n\
-#include \"machmode.h\"");
+#include \"machmode.h\"\n\
+#include \"multi-target.h\"\n\
+\n\
+START_TARGET_SPECIFIC");
}
static void
@@ -1002,7 +1156,7 @@ emit_mode_size (void)
int c;
struct mode_data *m;
- print_maybe_const_decl ("%sunsigned char", "mode_size",
+ print_maybe_const_decl ("unsigned char", "mode_size",
"NUM_MACHINE_MODES", bytesize);
for_all_modes (c, m)
@@ -1049,6 +1203,8 @@ emit_mode_wider (void)
m2 && m2 != void_mode;
m2 = m2->wider)
{
+ if (m2->target)
+ continue;
if (m2->bytesize < 2 * m->bytesize)
continue;
if (m->precision != (unsigned int) -1)
@@ -1064,7 +1220,7 @@ emit_mode_wider (void)
break;
}
- if (m2 == void_mode)
+ if (m->target || m2 == void_mode)
m2 = 0;
tagged_printf ("%smode",
m2 ? m2->name : void_mode->name,
@@ -1120,7 +1276,7 @@ emit_mode_base_align (void)
int c;
struct mode_data *m;
- print_maybe_const_decl ("%sunsigned char",
+ print_maybe_const_decl ("unsigned char",
"mode_base_align", "NUM_MACHINE_MODES",
alignment);
@@ -1175,14 +1331,18 @@ emit_real_format_for_mode (void)
/* The beginning of the table is entries for float modes. */
for (m = modes[MODE_FLOAT]; m; m = m->next)
- if (!strcmp (m->format, "0"))
+ if (m->target)
+ ; /* Skip. */
+ else if (!strcmp (m->format, "0"))
tagged_printf ("%s", m->format, m->name);
else
tagged_printf ("&%s", m->format, m->name);
/* The end of the table is entries for decimal float modes. */
for (m = modes[MODE_DECIMAL_FLOAT]; m; m = m->next)
- if (!strcmp (m->format, "0"))
+ if (m->target)
+ ; /* Skip. */
+ else if (!strcmp (m->format, "0"))
tagged_printf ("%s", m->format, m->name);
else
tagged_printf ("&%s", m->format, m->name);
@@ -1312,7 +1472,7 @@ emit_mode_ibit (void)
int c;
struct mode_data *m;
- print_maybe_const_decl ("%sunsigned char",
+ print_maybe_const_decl ("unsigned char",
"mode_ibit", "NUM_MACHINE_MODES",
ibit);
@@ -1330,7 +1490,7 @@ emit_mode_fbit (void)
int c;
struct mode_data *m;
- print_maybe_const_decl ("%sunsigned char",
+ print_maybe_const_decl ("unsigned char",
"mode_fbit", "NUM_MACHINE_MODES",
fbit);
@@ -1359,6 +1519,7 @@ emit_insn_modes_c (void)
emit_mode_adjustments ();
emit_mode_ibit ();
emit_mode_fbit ();
+ puts ("END_TARGET_SPECIFIC");
}
static void
@@ -1369,6 +1530,7 @@ emit_min_insn_modes_c (void)
emit_mode_class ();
emit_mode_wider ();
emit_class_narrowest_mode ();
+ puts ("END_TARGET_SPECIFIC");
}
/* Master control. */
@@ -1398,6 +1560,8 @@ main (int argc, char **argv)
if (have_error)
return FATAL_EXIT_CODE;
+ fixup_target_modes ();
+
calc_wider_mode ();
if (gen_header)
diff --git a/gcc/genopinit.c b/gcc/genopinit.c
index d28baabba7f..0cf3de0b15f 100644
--- a/gcc/genopinit.c
+++ b/gcc/genopinit.c
@@ -490,6 +490,9 @@ from the machine description file `md'. */\n\n");
printf ("#include \"expr.h\"\n");
printf ("#include \"optabs.h\"\n");
printf ("#include \"reload.h\"\n\n");
+ printf ("#include \"multi-target.h\"\n\n");
+
+ printf ("START_TARGET_SPECIFIC\n\n");
printf ("void\ninit_all_optabs (void)\n{\n");
@@ -522,7 +525,9 @@ from the machine description file `md'. */\n\n");
convert_optab_handler (ufixtrunc_optab, i, j)->insn_code\n\
= convert_optab_handler (sfixtrunc_optab, i, j)->insn_code;\n\
#endif\n\
-}");
+}\
+\n\
+END_TARGET_SPECIFIC");
fflush (stdout);
return (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
diff --git a/gcc/genoutput.c b/gcc/genoutput.c
index e651cb4d878..5412bbfc38b 100644
--- a/gcc/genoutput.c
+++ b/gcc/genoutput.c
@@ -243,7 +243,10 @@ output_prologue (void)
printf ("#include \"toplev.h\"\n");
printf ("#include \"output.h\"\n");
printf ("#include \"target.h\"\n");
- printf ("#include \"tm-constrs.h\"\n");
+ printf ("#include \"multi-target.h\"\n");
+ printf ("#include \"tm-constrs.h\"\n\n");
+
+ printf ("START_TARGET_SPECIFIC\n");
}
static void
@@ -1082,6 +1085,8 @@ main (int argc, char **argv)
output_insn_data ();
output_get_insn_name ();
+ printf ("\nEND_TARGET_SPECIFIC\n");
+
fflush (stdout);
return (ferror (stdout) != 0 || have_error
? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
diff --git a/gcc/genpeep.c b/gcc/genpeep.c
index 282fdcb0f73..86a48e957f4 100644
--- a/gcc/genpeep.c
+++ b/gcc/genpeep.c
@@ -379,8 +379,11 @@ from the machine description file `md'. */\n\n");
printf ("#include \"function.h\"\n");
printf ("#include \"toplev.h\"\n");
printf ("#include \"flags.h\"\n");
+ printf ("#include \"multi-target.h\"\n");
printf ("#include \"tm-constrs.h\"\n\n");
+ printf ("START_TARGET_SPECIFIC\n\n");
+
printf ("#ifdef HAVE_peephole\n");
printf ("extern rtx peep_operand[];\n\n");
printf ("#define operands peep_operand\n\n");
@@ -423,7 +426,9 @@ from the machine description file `md'. */\n\n");
max_opno = 1;
printf ("rtx peep_operand[%d];\n", max_opno + 1);
- printf ("#endif\n");
+ printf ("#endif\n\n");
+
+ printf ("END_TARGET_SPECIFIC\n");
fflush (stdout);
return (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
diff --git a/gcc/genpreds.c b/gcc/genpreds.c
index db56c0a4948..353f00ff3bb 100644
--- a/gcc/genpreds.c
+++ b/gcc/genpreds.c
@@ -1085,7 +1085,11 @@ write_tm_constrs_h (void)
puts ("\
#ifndef GCC_TM_CONSTRS_H\n\
-#define GCC_TM_CONSTRS_H\n");
+#define GCC_TM_CONSTRS_H\n\
+\n\
+#include \"multi-target.h\"\n\
+\n\
+START_TARGET_SPECIFIC\n");
FOR_ALL_CONSTRAINTS (c)
if (!c->is_register)
@@ -1130,7 +1134,10 @@ write_tm_constrs_h (void)
write_predicate_stmts (c->exp);
fputs ("}\n", stdout);
}
- puts ("#endif /* tm-constrs.h */");
+ puts ("\
+END_TARGET_SPECIFIC\n\
+\n\
+#endif /* tm-constrs.h */");
}
/* Write out the wrapper function, constraint_satisfied_p, that maps
@@ -1255,6 +1262,10 @@ write_tm_preds_h (void)
#ifndef GCC_TM_PREDS_H\n\
#define GCC_TM_PREDS_H\n\
\n\
+#include \"multi-target.h\"\n\
+\n\
+START_TARGET_SPECIFIC\n\
+\n\
#ifdef HAVE_MACHINE_MODES");
FOR_ALL_PREDICATES (p)
@@ -1317,7 +1328,9 @@ write_tm_preds_h (void)
puts ("#define EXTRA_ADDRESS_CONSTRAINT(c_,s_) false\n");
}
- puts ("#endif /* tm-preds.h */");
+ puts ("END_TARGET_SPECIFIC\n"
+ "\n"
+ "#endif /* tm-preds.h */");
}
/* Write insn-preds.c.
@@ -1356,7 +1369,10 @@ write_insn_preds_c (void)
#include \"toplev.h\"\n\
#include \"reload.h\"\n\
#include \"regs.h\"\n\
-#include \"tm-constrs.h\"\n");
+#include \"multi-target.h\"\n\
+#include \"tm-constrs.h\"\n\
+\n\
+START_TARGET_SPECIFIC\n");
FOR_ALL_PREDICATES (p)
write_one_predicate_function (p);
@@ -1376,6 +1392,7 @@ write_insn_preds_c (void)
if (have_address_constraints)
write_insn_extra_address_constraint ();
}
+ puts ("END_TARGET_SPECIFIC");
}
/* Argument parsing. */
diff --git a/gcc/genrecog.c b/gcc/genrecog.c
index 6e82584cf9f..054fe406d1f 100644
--- a/gcc/genrecog.c
+++ b/gcc/genrecog.c
@@ -2482,8 +2482,10 @@ write_header (void)
#include \"toplev.h\"\n\
#include \"reload.h\"\n\
#include \"regs.h\"\n\
+#include \"multi-target.h\"\n\
#include \"tm-constrs.h\"\n\
-\n");
+\n\
+START_TARGET_SPECIFIC\n");
puts ("\n\
/* `recog' contains a decision tree that recognizes whether the rtx\n\
@@ -2780,6 +2782,8 @@ main (int argc, char **argv)
process_tree (&split_tree, SPLIT);
process_tree (&peephole2_tree, PEEPHOLE2);
+ puts ("END_TARGET_SPECIFIC");
+
fflush (stdout);
return (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
}
diff --git a/gcc/ggc.h b/gcc/ggc.h
index bc94d6c0c1b..8987a1b918c 100644
--- a/gcc/ggc.h
+++ b/gcc/ggc.h
@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_GGC_H
#define GCC_GGC_H
#include "statistics.h"
+#include "multi-target.h"
/* Symbols are marked with `ggc' for `gcc gc' so as not to interfere with
an external gc library that might be linked in. */
@@ -53,9 +54,11 @@ typedef void (*gt_note_pointers) (void *, void *, gt_pointer_operator,
typedef void (*gt_handle_reorder) (void *, void *, gt_pointer_operator,
void *);
+START_TARGET_SPECIFIC
/* Used by the gt_pch_n_* routines. Register an object in the hash table. */
extern int gt_pch_note_object (void *, void *, gt_note_pointers,
enum gt_types_enum);
+END_TARGET_SPECIFIC
/* Used by the gt_pch_n_* routines. Register that an object has a reorder
function. */
@@ -163,12 +166,14 @@ struct ggc_pch_data;
/* Return a new ggc_pch_data structure. */
extern struct ggc_pch_data *init_ggc_pch (void);
+START_TARGET_SPECIFIC
/* The second parameter and third parameters give the address and size
of an object. Update the ggc_pch_data structure with as much of
that information as is necessary. The bool argument should be true
if the object is a string. */
extern void ggc_pch_count_object (struct ggc_pch_data *, void *, size_t, bool,
enum gt_types_enum);
+END_TARGET_SPECIFIC
/* Return the total size of the data to be written to hold all
the objects previously passed to ggc_pch_count_object. */
@@ -178,11 +183,13 @@ extern size_t ggc_pch_total_size (struct ggc_pch_data *);
in the second parameter. */
extern void ggc_pch_this_base (struct ggc_pch_data *, void *);
+START_TARGET_SPECIFIC
/* Assuming that the objects really do end up at the address
passed to ggc_pch_this_base, return the address of this object.
The bool argument should be true if the object is a string. */
extern char *ggc_pch_alloc_object (struct ggc_pch_data *, void *, size_t, bool,
enum gt_types_enum);
+END_TARGET_SPECIFIC
/* Write out any initial information required. */
extern void ggc_pch_prepare_write (struct ggc_pch_data *, FILE *);
@@ -213,8 +220,10 @@ extern bool ggc_protect_identifiers;
/* The internal primitive. */
extern void *ggc_alloc_stat (size_t MEM_STAT_DECL);
#define ggc_alloc(s) ggc_alloc_stat (s MEM_STAT_INFO)
+START_TARGET_SPECIFIC
/* Allocate an object of the specified type and size. */
extern void *ggc_alloc_typed_stat (enum gt_types_enum, size_t MEM_STAT_DECL);
+END_TARGET_SPECIFIC
#define ggc_alloc_typed(s,z) ggc_alloc_typed_stat (s,z MEM_STAT_INFO)
/* Like ggc_alloc, but allocates cleared memory. */
extern void *ggc_alloc_cleared_stat (size_t MEM_STAT_DECL);
@@ -332,4 +341,4 @@ extern void *ggc_alloc_zone_stat (size_t, struct alloc_zone * MEM_STAT_DECL);
#endif
-#endif
+#endif /* GCC_GGC_H */
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 63779389636..79d2cf74f93 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -1035,11 +1035,17 @@ extern void insert_field_into_struct (tree, tree);
/* In gimplify.c. */
extern void gimplify_function_tree (tree);
+#ifdef EXTRA_TARGET
+namespace EXTRA_TARGET {
+#endif
/* In cfgexpand.c. */
extern tree gimple_assign_rhs_to_tree (gimple);
/* In builtins.c */
extern bool validate_gimple_arglist (const_gimple, ...);
+#ifdef EXTRA_TARGET
+} /* Close EXTRA_TARGET namespace. */
+#endif
/* In tree-ssa.c */
extern bool tree_ssa_useless_type_conversion (tree);
diff --git a/gcc/graph.c b/gcc/graph.c
index 38e72946789..5fbf4e5dd91 100644
--- a/gcc/graph.c
+++ b/gcc/graph.c
@@ -32,6 +32,9 @@ along with GCC; see the file COPYING3. If not see
#include "basic-block.h"
#include "toplev.h"
#include "graph.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
static const char *const graph_ext[] =
{
@@ -427,3 +430,5 @@ finish_graph_dump_file (const char *base)
fclose (fp);
}
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index b7f0cfce359..30b7c037f93 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -148,6 +148,9 @@ along with GCC; see the file COPYING3. If not see
#include "dbgcnt.h"
#include "cfgloop.h"
#include "ira.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
#ifdef INSN_SCHEDULING
@@ -5546,3 +5549,5 @@ sched_emit_insn (rtx pat)
}
#endif /* INSN_SCHEDULING */
+
+END_TARGET_SPECIFIC
diff --git a/gcc/hard-reg-set.h b/gcc/hard-reg-set.h
index 272a2394d5d..4de456f304d 100644
--- a/gcc/hard-reg-set.h
+++ b/gcc/hard-reg-set.h
@@ -39,6 +39,10 @@ along with GCC; see the file COPYING3. If not see
we have an array of HARD_REG_SETs, so it needn't be as complex as
it used to be. */
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
+
typedef unsigned HOST_WIDEST_FAST_INT HARD_REG_ELT_TYPE;
#if FIRST_PSEUDO_REGISTER <= HOST_BITS_PER_WIDEST_FAST_INT
@@ -674,4 +678,6 @@ extern const char * reg_class_names[];
#define REG_CANNOT_CHANGE_MODE_P(REGN, FROM, TO) \
CANNOT_CHANGE_MODE_CLASS (FROM, TO, REGNO_REG_CLASS (REGN))
+END_TARGET_SPECIFIC
+
#endif /* ! GCC_HARD_REG_SET_H */
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index c30b8049332..114e51bcde6 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -46,6 +46,9 @@
#include "vec.h"
#include "vecprim.h"
#include "dbgcnt.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
#ifndef HAVE_conditional_move
#define HAVE_conditional_move 0
@@ -4331,3 +4334,4 @@ struct rtl_opt_pass pass_if_after_reload =
TODO_ggc_collect /* todo_flags_finish */
}
};
+END_TARGET_SPECIFIC
diff --git a/gcc/init-regs.c b/gcc/init-regs.c
index b4dd5e9a1fb..d6dadf42108 100644
--- a/gcc/init-regs.c
+++ b/gcc/init-regs.c
@@ -29,6 +29,9 @@ along with GCC; see the file COPYING3. If not see
#include "basic-block.h"
#include "flags.h"
#include "df.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Check all of the uses of pseudo variables. If any use that is MUST
uninitialized, add a store of 0 immediately before it. For
@@ -157,3 +160,5 @@ struct rtl_opt_pass pass_initialize_regs =
TODO_df_finish /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/insn-addr.h b/gcc/insn-addr.h
index 0cf292cb10d..9f8271b61f2 100644
--- a/gcc/insn-addr.h
+++ b/gcc/insn-addr.h
@@ -21,6 +21,9 @@ along with GCC; see the file COPYING3. If not see
#define GCC_INSN_ADDR_H
#include "vecprim.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
extern VEC(int,heap) *insn_addresses_;
extern int insn_current_address;
@@ -62,4 +65,6 @@ insn_addresses_new (rtx insn, int insn_addr)
#define INSN_ADDRESSES_NEW(insn, addr) \
(insn_addresses_new (insn, addr))
+END_TARGET_SPECIFIC
+
#endif /* ! GCC_INSN_ADDR_H */
diff --git a/gcc/integrate.c b/gcc/integrate.c
index 0884017e391..44b453a1eca 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -47,6 +47,7 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "tree-pass.h"
#include "df.h"
+#include "multi-target.h"
/* Round to the next highest integer that meets the alignment. */
#define CEIL_ROUND(VALUE,ALIGN) (((VALUE) + (ALIGN) - 1) & ~((ALIGN)- 1))
@@ -63,6 +64,8 @@ typedef struct GTY(()) initial_value_struct {
initial_value_pair * GTY ((length ("%h.num_entries"))) entries;
} initial_value_struct;
+START_TARGET_SPECIFIC
+
static void set_block_origin_self (tree);
static void set_block_abstract_flags (tree, int);
@@ -374,3 +377,5 @@ allocate_initial_values (rtx *reg_equiv_memory_loc)
}
#include "gt-integrate.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/ira-build.c b/gcc/ira-build.c
index 16909a9a42a..91344cc36b9 100644
--- a/gcc/ira-build.c
+++ b/gcc/ira-build.c
@@ -39,6 +39,9 @@ along with GCC; see the file COPYING3. If not see
#include "reload.h"
#include "sparseset.h"
#include "ira-int.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
static ira_copy_t find_allocno_copy (ira_allocno_t, ira_allocno_t, rtx,
ira_loop_tree_node_t);
@@ -2851,3 +2854,5 @@ ira_destroy (void)
finish_cost_vectors ();
ira_finish_allocno_live_ranges ();
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/ira-color.c b/gcc/ira-color.c
index 4ba7112d7bf..6354c16d752 100644
--- a/gcc/ira-color.c
+++ b/gcc/ira-color.c
@@ -39,6 +39,9 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "splay-tree.h"
#include "ira-int.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* This file contains code for regional graph coloring, spill/restore
code placement optimization, and code helping the reload pass to do
@@ -3338,3 +3341,5 @@ ira_color (void)
else
fast_allocation ();
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/ira-conflicts.c b/gcc/ira-conflicts.c
index 251b527661f..ebe433cdd6e 100644
--- a/gcc/ira-conflicts.c
+++ b/gcc/ira-conflicts.c
@@ -38,6 +38,7 @@ along with GCC; see the file COPYING3. If not see
#include "sparseset.h"
#include "ira-int.h"
#include "addresses.h"
+#include "multi-target.h"
/* This file contains code responsible for allocno conflict creation,
allocno copy creation and allocno info accumulation on upper level
@@ -60,6 +61,7 @@ static IRA_INT_TYPE **conflicts;
ALLOCNO_MAX (A1)))
+START_TARGET_SPECIFIC
/* Build allocno conflict table by processing allocno live ranges.
Return true if the table was built. The table is not built if it
@@ -831,3 +833,5 @@ ira_build_conflicts (void)
&& internal_flag_ira_verbose > 2 && ira_dump_file != NULL)
print_conflicts (ira_dump_file, false);
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c
index 9e11219ce01..fb29dcad20d 100644
--- a/gcc/ira-costs.c
+++ b/gcc/ira-costs.c
@@ -37,6 +37,9 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "params.h"
#include "ira-int.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* The flags is set up every time when we calculate pseudo register
classes through function ira_set_pseudo_classes. */
@@ -151,7 +154,9 @@ copy_cost (rtx x, enum machine_mode mode, enum reg_class rclass, bool to_p,
copy it. */
sri.prev_sri = prev_sri;
sri.extra_cost = 0;
- secondary_class = targetm.secondary_reload (to_p, x, rclass, mode, &sri);
+ secondary_class
+ = (enum reg_class) targetm.secondary_reload (to_p, x, (int) rclass,
+ mode, &sri);
if (secondary_class != NO_REGS)
{
@@ -1767,3 +1772,5 @@ ira_tune_allocno_costs_and_cover_classes (void)
ALLOCNO_COVER_CLASS_COST (a) = min_cost;
}
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/ira-emit.c b/gcc/ira-emit.c
index 9d66bfe48ff..a8807a587e5 100644
--- a/gcc/ira-emit.c
+++ b/gcc/ira-emit.c
@@ -43,8 +43,11 @@ along with GCC; see the file COPYING3. If not see
#include "errors.h"
#include "df.h"
#include "ira-int.h"
+#include "multi-target.h"
+START_TARGET_SPECIFIC
+
typedef struct move *move_t;
/* The structure represents an allocno move. Both allocnos have the
@@ -1125,3 +1128,5 @@ ira_emit (bool loops_p)
ira_free (at_bb_end);
ira_free (at_bb_start);
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/ira-int.h b/gcc/ira-int.h
index a32c837ac0f..a682982ef4b 100644
--- a/gcc/ira-int.h
+++ b/gcc/ira-int.h
@@ -22,6 +22,9 @@ along with GCC; see the file COPYING3. If not see
#include "cfgloop.h"
#include "ira.h"
#include "alloc-pool.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* To provide consistency in naming, all IRA external variables,
functions, common typedefs start with prefix ira_. */
@@ -1222,3 +1225,5 @@ ira_allocate_and_set_or_copy_costs (int **vec, enum reg_class cover_class,
reg_costs[i] = val;
}
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/ira-lives.c b/gcc/ira-lives.c
index 7f2769f81e0..0f5386c83a3 100644
--- a/gcc/ira-lives.c
+++ b/gcc/ira-lives.c
@@ -38,6 +38,9 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "sparseset.h"
#include "ira-int.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* The code in this file is similar to one in global but the code
works on the allocno basis and creates live ranges instead of
@@ -1347,3 +1350,5 @@ ira_finish_allocno_live_ranges (void)
ira_free (ira_finish_point_ranges);
ira_free (ira_start_point_ranges);
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/ira.c b/gcc/ira.c
index e5a6171f067..13951cac102 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -323,7 +323,9 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "ggc.h"
#include "ira-int.h"
+#include "multi-target.h"
+START_TARGET_SPECIFIC
/* A modified value of flag `-fira-verbose' used internally. */
int internal_flag_ira_verbose;
@@ -730,14 +732,14 @@ setup_cover_and_important_classes (void)
{
int i, j, n, cl;
bool set_p;
- const enum reg_class *cover_classes;
+ const int /*enum reg_class*/ *cover_classes;
HARD_REG_SET temp_hard_regset2;
static enum reg_class classes[LIM_REG_CLASSES + 1];
- if (targetm.ira_cover_classes == NULL)
+ if (this_targetm.ira_cover_classes == NULL)
cover_classes = NULL;
else
- cover_classes = targetm.ira_cover_classes ();
+ cover_classes = this_targetm.ira_cover_classes ();
if (cover_classes == NULL)
ira_assert (flag_ira_algorithm == IRA_ALGORITHM_PRIORITY);
else
@@ -3372,3 +3374,5 @@ struct rtl_opt_pass pass_ira =
TODO_ggc_collect /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/ira.h b/gcc/ira.h
index 9688f7485dc..90589845c7e 100644
--- a/gcc/ira.h
+++ b/gcc/ira.h
@@ -20,6 +20,10 @@ 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 "multi-target.h"
+
+START_TARGET_SPECIFIC
+
/* Number of given class hard registers available for the register
allocation for given classes. */
extern int ira_available_class_regs[N_REG_CLASSES];
@@ -86,4 +90,4 @@ extern bool ira_reassign_pseudos (int *, int, HARD_REG_SET, HARD_REG_SET *,
extern rtx ira_reuse_stack_slot (int, unsigned int, unsigned int);
extern void ira_mark_new_stack_slot (rtx, int, unsigned int);
extern bool ira_better_spill_reload_regno_p (int *, int *, rtx, rtx, rtx);
-
+END_TARGET_SPECIFIC
diff --git a/gcc/jump.c b/gcc/jump.c
index c95c2116ba6..ecbf0de1e0c 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -57,6 +57,9 @@ along with GCC; see the file COPYING3. If not see
#include "timevar.h"
#include "tree-pass.h"
#include "target.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Optimize jump y; x: ... y: jumpif... x?
Don't know if it is worth bothering with. */
@@ -1810,3 +1813,5 @@ reg_or_subregno (const_rtx reg)
gcc_assert (REG_P (reg));
return REGNO (reg);
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/loop-doloop.c b/gcc/loop-doloop.c
index 0fa0fe21e51..be72440139f 100644
--- a/gcc/loop-doloop.c
+++ b/gcc/loop-doloop.c
@@ -34,6 +34,7 @@ along with GCC; see the file COPYING3. If not see
#include "output.h"
#include "params.h"
#include "target.h"
+#include "multi-target.h"
/* This module is used to modify loops with a determinable number of
iterations to use special low-overhead looping instructions.
@@ -64,6 +65,8 @@ along with GCC; see the file COPYING3. If not see
register cannot be used for anything else but doloop -- ??? detect these
cases). */
+START_TARGET_SPECIFIC
+
#ifdef HAVE_doloop_end
/* Return the loop termination condition for PATTERN or zero
@@ -700,3 +703,4 @@ doloop_optimize_loops (void)
}
#endif /* HAVE_doloop_end */
+END_TARGET_SPECIFIC
diff --git a/gcc/loop-init.c b/gcc/loop-init.c
index 854bb970879..d14c2d5d9e1 100644
--- a/gcc/loop-init.c
+++ b/gcc/loop-init.c
@@ -33,8 +33,11 @@ along with GCC; see the file COPYING3. If not see
#include "flags.h"
#include "df.h"
#include "ggc.h"
+#include "multi-target.h"
+START_TARGET_SPECIFIC
+
/* Initialize loop structures. This is used by the tree and RTL loop
optimizers. FLAGS specify what properties to compute and/or ensure for
loops. */
@@ -400,3 +403,4 @@ struct rtl_opt_pass pass_rtl_doloop =
}
};
+END_TARGET_SPECIFIC
diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c
index 03f0a13baa0..b5cec46100a 100644
--- a/gcc/loop-invariant.c
+++ b/gcc/loop-invariant.c
@@ -56,6 +56,9 @@ along with GCC; see the file COPYING3. If not see
#include "params.h"
#include "regs.h"
#include "ira.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* The data stored for the loop. */
@@ -1920,3 +1923,5 @@ move_loop_invariants (void)
verify_flow_info ();
#endif
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c
index 16e9a52697d..d64a43d93f3 100644
--- a/gcc/loop-iv.c
+++ b/gcc/loop-iv.c
@@ -63,6 +63,9 @@ along with GCC; see the file COPYING3. If not see
#include "toplev.h"
#include "df.h"
#include "hashtab.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Possible return values of iv_get_reaching_def. */
@@ -3002,3 +3005,5 @@ free_simple_loop_desc (struct loop *loop)
free (desc);
loop->aux = NULL;
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c
index 231d12db9eb..da3c6771e1b 100644
--- a/gcc/loop-unroll.c
+++ b/gcc/loop-unroll.c
@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see
#include "expr.h"
#include "hashtab.h"
#include "recog.h"
+#include "multi-target.h
/* This pass performs loop unrolling and peeling. We only perform these
optimizations on innermost loops (with single exception) because
@@ -69,6 +70,8 @@ along with GCC; see the file COPYING3. If not see
showed that this choice may affect performance in order of several %.
*/
+START_TARGET_SPECIFIC
+
/* Information about induction variables to split. */
struct iv_to_split
@@ -2336,3 +2339,5 @@ free_opt_info (struct opt_info *opt_info)
}
free (opt_info);
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/loop-unswitch.c b/gcc/loop-unswitch.c
index ca9543c02a3..9162529e76c 100644
--- a/gcc/loop-unswitch.c
+++ b/gcc/loop-unswitch.c
@@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. If not see
#include "params.h"
#include "output.h"
#include "expr.h"
+#include "multi-target.h"
/* This pass moves constant conditions out of loops, duplicating the loop
in progress, i.e. this code:
@@ -79,6 +80,8 @@ along with GCC; see the file COPYING3. If not see
containing subloops would not be very large compared to complications
with handling this case. */
+START_TARGET_SPECIFIC
+
static struct loop *unswitch_loop (struct loop *, basic_block, rtx, rtx);
static void unswitch_single_loop (struct loop *, rtx, int);
static rtx may_unswitch_on (basic_block, struct loop *, rtx *);
@@ -462,3 +465,5 @@ unswitch_loop (struct loop *loop, basic_block unswitch_on, rtx cond, rtx cinsn)
return nloop;
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c
index 3301a9db18c..1f22e450f4c 100644
--- a/gcc/lower-subreg.c
+++ b/gcc/lower-subreg.c
@@ -38,6 +38,9 @@ along with GCC; see the file COPYING3. If not see
#include "regs.h"
#include "tree-pass.h"
#include "df.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
#ifdef STACK_GROWS_DOWNWARD
# undef STACK_GROWS_DOWNWARD
@@ -1379,3 +1382,5 @@ struct rtl_opt_pass pass_lower_subreg2 =
TODO_verify_flow /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/machmode.def b/gcc/machmode.def
index fbaea1096a6..38e0133bfed 100644
--- a/gcc/machmode.def
+++ b/gcc/machmode.def
@@ -223,10 +223,8 @@ UACCUM_MODE (USA, 4, 16, 16); /* 16.16 */
UACCUM_MODE (UDA, 8, 32, 32); /* 32.32 */
UACCUM_MODE (UTA, 16, 64, 64); /* 64.64 */
-/* Allow the target to specify additional modes of various kinds. */
-#if HAVE_EXTRA_MODES
-# include EXTRA_MODES_FILE
-#endif
+/* Allow the target(s) to specify additional modes of various kinds. */
+#include "extra-modes.h"
/* Complex modes. */
COMPLEX_MODES (INT);
diff --git a/gcc/machmode.h b/gcc/machmode.h
index 936a36e6a0d..d72778919a2 100644
--- a/gcc/machmode.h
+++ b/gcc/machmode.h
@@ -21,11 +21,12 @@ along with GCC; see the file COPYING3. If not see
#ifndef HAVE_MACHINE_MODES
#define HAVE_MACHINE_MODES
+#include "multi-target.h"
+
/* Make an enum class that gives all the machine modes. */
#include "insn-modes.h"
/* Get the name of mode MODE as a string. */
-
extern const char * const mode_name[NUM_MACHINE_MODES];
#define GET_MODE_NAME(MODE) mode_name[MODE]
@@ -224,6 +225,7 @@ extern const unsigned char mode_wider[NUM_MACHINE_MODES];
extern const unsigned char mode_2xwider[NUM_MACHINE_MODES];
#define GET_MODE_2XWIDER_MODE(MODE) ((enum machine_mode) mode_2xwider[MODE])
+START_TARGET_SPECIFIC
/* Return the mode for data of a given size SIZE and mode class CLASS.
If LIMIT is nonzero, then don't use modes bigger than MAX_FIXED_MODE_SIZE.
The value is BLKmode if no other mode is found. */
@@ -251,6 +253,7 @@ extern enum machine_mode get_best_mode (int, int, unsigned int,
extern CONST_MODE_BASE_ALIGN unsigned char mode_base_align[NUM_MACHINE_MODES];
extern unsigned get_mode_alignment (enum machine_mode);
+END_TARGET_SPECIFIC
#define GET_MODE_ALIGNMENT(MODE) get_mode_alignment (MODE)
diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
index 9647ad7ec16..968434e9dbf 100644
--- a/gcc/mkconfig.sh
+++ b/gcc/mkconfig.sh
@@ -56,13 +56,15 @@ fi
# Provide defines for other macros set in config.gcc for this file.
for def in $DEFINES; do
- echo "#ifndef $def" | sed 's/=.*//' >> ${output}T
+ echo "#ifndef $def" | sed 's/[=(].*//' >> ${output}T
echo "# define $def" | sed 's/=/ /' >> ${output}T
echo "#endif" >> ${output}T
done
# The first entry in HEADERS may be auto-FOO.h ;
# it wants to be included even when not -DIN_GCC.
+# We wrap FOO/FOO-protos.h in START_TARGET_SPECIFIC / END_TARGET_SPECIFIC
+# so that we don't need to do this manually for every target.
if [ -n "$HEADERS" ]; then
set $HEADERS
case "$1" in auto-* )
@@ -73,8 +75,19 @@ if [ -n "$HEADERS" ]; then
if [ $# -ge 1 ]; then
echo '#ifdef IN_GCC' >> ${output}T
for file in "$@"; do
+ if test x"$file" = x"tm-preds.h"; then
+ echo 'END_TARGET_SPECIFIC' >> ${output}T
+ in_namespace=no
+ fi
echo "# include \"$file\"" >> ${output}T
+ if test x"$file" = x"multi-target.h"; then
+ echo 'START_TARGET_SPECIFIC' >> ${output}T
+ in_namespace=yes
+ fi
done
+ if test x"$in_namespace" = x"yes"; then
+ echo 'END_TARGET_SPECIFIC' >> ${output}T
+ fi
echo '#endif' >> ${output}T
fi
fi
diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c
index 140c513918e..5bd47468c7d 100644
--- a/gcc/mode-switching.c
+++ b/gcc/mode-switching.c
@@ -36,11 +36,14 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "timevar.h"
#include "df.h"
+#include "multi-target.h"
/* We want target macros for the mode switching code to be able to refer
to instruction attribute values. */
#include "insn-attr.h"
+START_TARGET_SPECIFIC
+
#ifdef OPTIMIZE_MODE_SWITCHING
/* The algorithm for setting the modes consists of scanning the insn list
@@ -775,3 +778,5 @@ struct rtl_opt_pass pass_mode_switching =
TODO_dump_func /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c
index cc9f788a8a7..deb1d7d1d78 100644
--- a/gcc/modulo-sched.c
+++ b/gcc/modulo-sched.c
@@ -48,6 +48,9 @@ along with GCC; see the file COPYING3. If not see
#include "timevar.h"
#include "tree-pass.h"
#include "dbgcnt.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
#ifdef INSN_SCHEDULING
@@ -2903,3 +2906,4 @@ struct rtl_opt_pass pass_sms =
}
};
+END_TARGET_SPECIFIC
diff --git a/gcc/multi-target.h b/gcc/multi-target.h
new file mode 100644
index 00000000000..5547a324259
--- /dev/null
+++ b/gcc/multi-target.h
@@ -0,0 +1,66 @@
+#ifndef MULTI_TARGET_H
+#define MULTI_TARGET_H
+
+#if defined(EXTRA_TARGET) && defined (__cplusplus)
+/* Macros to enclose code that should be put in a target-specific namespace. */
+#define START_TARGET_SPECIFIC namespace EXTRA_TARGET {
+#define END_TARGET_SPECIFIC } /* Close EXTRA_TARGET namespace. */
+#else /* !EXTRA_TARGET */
+#define START_TARGET_SPECIFIC
+#define END_TARGET_SPECIFIC
+#endif /* EXTRA_TARGET */
+
+/* Some files contain both code that is target-specific and code which
+ is not. In this case, the latter kind of code is conditionally
+ compiled like this: */
+#ifndef EXTRA_TARGET
+/* Code to be defined only in the main target files. */
+#endif /* !EXTRA_TARGET */
+
+#ifndef TARGET_NUM
+#define TARGET_NUM 0
+#endif
+
+typedef unsigned char arch_index_t;
+
+#define EXTRA_TARGETS_DECL(DECL) \
+ EXTRA_TARGETS_EXPAND(namespace,{ extern DECL; },)
+#define COMMA ,
+#define EXTRA_TARGETS_CALL(CALL) EXTRA_TARGETS_EXPAND(,::CALL,COMMA)
+#define EXTRA_TARGETS_EXPAND_COMMA(PREFIX,TMPL) \
+ EXTRA_TARGETS_EXPAND(PREFIX,::TMPL COMMA,)
+
+#endif /* MULTI_TARGET_H */
+#ifndef MULTI_TARGET_H
+#define MULTI_TARGET_H
+
+#if defined(EXTRA_TARGET) && defined (__cplusplus)
+/* Macros to enclose code that should be put in a target-specific namespace. */
+#define START_TARGET_SPECIFIC namespace EXTRA_TARGET {
+#define END_TARGET_SPECIFIC } /* Close EXTRA_TARGET namespace. */
+#else /* !EXTRA_TARGET */
+#define START_TARGET_SPECIFIC
+#define END_TARGET_SPECIFIC
+#endif /* EXTRA_TARGET */
+
+/* Some files contain both code that is target-specific and code which
+ is not. In this case, the latter kind of code is conditionally
+ compiled like this: */
+#ifndef EXTRA_TARGET
+/* Code to be defined only in the main target files. */
+#endif /* !EXTRA_TARGET */
+
+#ifndef TARGET_NUM
+#define TARGET_NUM 0
+#endif
+
+typedef unsigned char arch_index_t;
+
+#define EXTRA_TARGETS_DECL(DECL) \
+ EXTRA_TARGETS_EXPAND(namespace,{ extern DECL; },)
+#define COMMA ,
+#define EXTRA_TARGETS_CALL(CALL) EXTRA_TARGETS_EXPAND(,::CALL,COMMA)
+#define EXTRA_TARGETS_EXPAND_COMMA(PREFIX,TMPL) \
+ EXTRA_TARGETS_EXPAND(PREFIX,::TMPL COMMA,)
+
+#endif /* MULTI_TARGET_H */
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 87067d82e73..b45c36d375f 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -44,6 +44,9 @@ along with GCC; see the file COPYING3. If not see
#include "real.h"
#include "basic-block.h"
#include "target.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Each optab contains info on how this target machine
can perform a particular operation
@@ -7445,3 +7448,5 @@ expand_sync_lock_test_and_set (rtx mem, rtx val, rtx target)
}
#include "gt-optabs.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/optabs.h b/gcc/optabs.h
index 0161d3e6d3b..1f501aa4c09 100644
--- a/gcc/optabs.h
+++ b/gcc/optabs.h
@@ -21,8 +21,11 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_OPTABS_H
#define GCC_OPTABS_H
+#include "multi-target.h"
#include "insn-codes.h"
+START_TARGET_SPECIFIC
+
/* Optabs are tables saying how to generate insn bodies
for various machine modes and numbers of operands.
Each optab applies to one operation.
@@ -730,6 +733,8 @@ enum optab_subtype
/* Return the optab used for computing the given operation on the type given by
the second argument. The third argument distinguishes between the types of
vector shifts and rotates */
+/* FIXME: need a different interface to take optabs of extra targets into
+ account. */
extern optab optab_for_tree_code (enum tree_code, const_tree, enum optab_subtype);
/* The various uses that a comparison can have; used by can_compare_p:
@@ -786,4 +791,6 @@ extern rtx expand_vec_shift_expr (sepops, rtx);
extern rtx optab_libfunc (optab optab, enum machine_mode mode);
extern rtx convert_optab_libfunc (convert_optab optab, enum machine_mode mode1,
enum machine_mode mode2);
+END_TARGET_SPECIFIC
+
#endif /* GCC_OPTABS_H */
diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk
index 992e4d316ac..db4780a1b77 100644
--- a/gcc/optc-gen.awk
+++ b/gcc/optc-gen.awk
@@ -75,6 +75,8 @@ print "int target_flags;"
print "#else"
print "#include " quote "flags.h" quote
print "#include " quote "target.h" quote
+print "#include " quote "multi-target.h" quote
+print "START_TARGET_SPECIFIC"
print "#endif /* GCC_DRIVER */"
print ""
@@ -536,5 +538,8 @@ print " targetm.target_option.print (file, indent, ptr);";
print "}";
print "#endif";
+print "#ifndef GCC_DRIVER"
+print "END_TARGET_SPECIFIC";
+print "#endif";
}
diff --git a/gcc/opth-gen.awk b/gcc/opth-gen.awk
index fb262bd93b7..62352c4ee29 100644
--- a/gcc/opth-gen.awk
+++ b/gcc/opth-gen.awk
@@ -66,11 +66,18 @@ print ""
print "#ifndef OPTIONS_H"
print "#define OPTIONS_H"
print ""
+print "#include " quote "multi-target.h" quote
+print ""
+print "START_TARGET_SPECIFIC"
+print ""
print "extern int target_flags;"
print "extern int target_flags_explicit;"
print ""
+print "END_TARGET_SPECIFIC"
+print ""
have_save = 0;
+target_specific = 0;
for (i = 0; i < n_opts; i++) {
if (flag_set_p("Save", flags[i]))
@@ -84,8 +91,23 @@ for (i = 0; i < n_opts; i++) {
continue;
var_seen[name] = 1;
+ if (target_specific == 0 &&
+ (flag_set_p("Target", flags[i]) ||
+ flag_set_p("AllTarget", flags[i]))) {
+ print "START_TARGET_SPECIFIC"
+ target_specific = 1;
+ } else if (target_specific &&
+ !(flag_set_p("Target", flags[i]) ||
+ flag_set_p("AllTarget", flags[i]))) {
+ print "END_TARGET_SPECIFIC"
+ target_specific = 0;
+ }
print "extern " var_type(flags[i]) name ";"
}
+if (target_specific) {
+ print "END_TARGET_SPECIFIC"
+ target_specific = 0;
+}
print ""
# All of the optimization switches gathered together so they can be saved and restored.
diff --git a/gcc/opts.c b/gcc/opts.c
index 501deae6ea7..849214b9691 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -45,6 +45,10 @@ along with GCC; see the file COPYING3. If not see
#include "plugin.h"
#include "except.h"
#include "lto-streamer.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
+#ifndef EXTRA_TARGET
/* Value of the -G xx switch, and whether it was passed or not. */
unsigned HOST_WIDE_INT g_switch_value;
@@ -767,22 +771,30 @@ handle_options (unsigned int argc, const char **argv, unsigned int lang_mask)
}
}
+EXTRA_TARGETS_DECL (void decode_options (unsigned int argc, const char **argv));
+#endif /* !EXTRA_TARGET */
/* Parse command line options and set default flag values. Do minimal
options processing. */
void
-decode_options (unsigned int argc, const char **argv)
+decode_options (unsigned int argc ATTRIBUTE_UNUSED,
+ const char **argv ATTRIBUTE_UNUSED)
{
static bool first_time_p = true;
+#ifndef EXTRA_TARGET
static int initial_min_crossjump_insns;
static int initial_max_fields_for_field_sensitive;
static int initial_loop_invariant_max_bbs_in_loop;
static unsigned int initial_lang_mask;
unsigned int i, lang_mask;
+#endif /* !EXTRA_TARGET */
int opt1;
int opt2;
+#ifndef EXTRA_TARGET
int opt3;
+#endif /* !EXTRA_TARGET */
int opt1_max;
+#ifndef EXTRA_TARGET
if (first_time_p)
{
@@ -837,9 +849,10 @@ decode_options (unsigned int argc, const char **argv)
}
}
+#endif /* !EXTRA_TARGET */
/* Use priority coloring if cover classes is not defined for the
target. */
- if (targetm.ira_cover_classes == NULL)
+ if (this_targetm.ira_cover_classes == NULL)
flag_ira_algorithm = IRA_ALGORITHM_PRIORITY;
/* -O1 optimizations. */
@@ -851,11 +864,14 @@ decode_options (unsigned int argc, const char **argv)
#ifdef CAN_DEBUG_WITHOUT_FP
flag_omit_frame_pointer = opt1;
#endif
+#ifndef EXTRA_TARGET
flag_guess_branch_prob = opt1;
flag_cprop_registers = opt1;
flag_forward_propagate = opt1;
+#endif /* !EXTRA_TARGET */
flag_if_conversion = opt1;
flag_if_conversion2 = opt1;
+#ifndef EXTRA_TARGET
flag_ipa_pure_const = opt1;
flag_ipa_reference = opt1;
flag_merge_constants = opt1;
@@ -871,17 +887,22 @@ decode_options (unsigned int argc, const char **argv)
flag_tree_copy_prop = opt1;
flag_tree_sink = opt1;
flag_tree_ch = opt1;
+#endif /* !EXTRA_TARGET
/* -O2 optimizations. */
opt2 = (optimize >= 2);
+#ifndef EXTRA_TARGET
flag_inline_small_functions = opt2;
flag_indirect_inlining = opt2;
+#endif /* !EXTRA_TARGET */
flag_thread_jumps = opt2;
flag_crossjumping = opt2;
+#ifndef EXTRA_TARGET
flag_optimize_sibling_calls = opt2;
flag_cse_follow_jumps = opt2;
flag_gcse = opt2;
flag_expensive_optimizations = opt2;
+#endif /* !EXTRA_TARGET */
flag_rerun_cse_after_loop = opt2;
flag_caller_saves = opt2;
flag_peephole2 = opt2;
@@ -891,6 +912,7 @@ decode_options (unsigned int argc, const char **argv)
flag_schedule_insns_after_reload = opt2;
#endif
flag_regmove = opt2;
+#ifndef EXTRA_TARGET
flag_strict_aliasing = opt2;
flag_strict_overflow = opt2;
flag_reorder_blocks = opt2;
@@ -920,6 +942,7 @@ decode_options (unsigned int argc, const char **argv)
flag_ipa_cp_clone = opt3;
if (flag_ipa_cp_clone)
flag_ipa_cp = 1;
+#endif /* !EXTRA_TARGET */
/* Just -O1/-O0 optimizations. */
opt1_max = (optimize <= 1);
@@ -928,6 +951,7 @@ decode_options (unsigned int argc, const char **argv)
align_labels = opt1_max;
align_functions = opt1_max;
+#ifndef EXTRA_TARGET
if (optimize_size)
{
/* Inlining of functions reducing size is a good idea regardless of them
@@ -945,7 +969,9 @@ decode_options (unsigned int argc, const char **argv)
else
set_param_value ("min-crossjump-insns", initial_min_crossjump_insns);
+#endif /* !EXTRA_TARGET */
if (first_time_p)
+#ifndef EXTRA_TARGET
{
/* Initialize whether `char' is signed. */
flag_signed_char = DEFAULT_SIGNED_CHAR;
@@ -953,21 +979,26 @@ decode_options (unsigned int argc, const char **argv)
set after target options have been processed. */
flag_short_enums = 2;
+#endif /* !EXTRA_TARGET */
/* Initialize target_flags before OPTIMIZATION_OPTIONS so the latter can
modify it. */
- target_flags = targetm.default_target_flags;
+ target_flags = this_targetm.default_target_flags;
+#ifndef EXTRA_TARGET
/* Some targets have ABI-specified unwind tables. */
flag_unwind_tables = targetm.unwind_tables_default;
}
+ EXTRA_TARGETS_CALL (decode_options (argc, argv));
/* Clear any options currently held for LTO. */
lto_clear_user_options ();
+#endif /* !EXTRA_TARGET */
#ifdef OPTIMIZATION_OPTIONS
/* Allow default optimizations to be specified on a per-machine basis. */
OPTIMIZATION_OPTIONS (optimize, optimize_size);
#endif
+#ifndef EXTRA_TARGET
handle_options (argc, argv, lang_mask);
@@ -1103,8 +1134,9 @@ decode_options (unsigned int argc, const char **argv)
capabilities are requested. */
if (!flag_sel_sched_pipelining)
flag_sel_sched_pipelining_outer_loops = 0;
+#endif /* !EXTRA_TARGET */
- if (!targetm.ira_cover_classes
+ if (!this_targetm.ira_cover_classes
&& flag_ira_algorithm == IRA_ALGORITHM_CB)
{
inform (input_location,
@@ -1112,12 +1144,15 @@ decode_options (unsigned int argc, const char **argv)
flag_ira_algorithm = IRA_ALGORITHM_PRIORITY;
}
+#ifndef EXTRA_TARGET
/* Save the current optimization options if this is the first call. */
if (first_time_p)
{
optimization_default_node = build_optimization_node ();
optimization_current_node = optimization_default_node;
+#endif /* !EXTRA_TARGET */
first_time_p = false;
+#ifndef EXTRA_TARGET
}
if (flag_conserve_stack)
{
@@ -1145,7 +1180,9 @@ decode_options (unsigned int argc, const char **argv)
check option consistency. */
if (flag_lto && flag_whopr)
error ("-flto and -fwhopr are mutually exclusive");
+#endif /* !EXTRA_TARGET */
}
+#ifndef EXTRA_TARGET
#define LEFT_COLUMN 27
@@ -2427,3 +2464,6 @@ enable_warning_as_error (const char *arg, int value, unsigned int lang_mask)
}
free (new_option);
}
+
+#endif /* !EXTRA_TARGET */
+END_TARGET_SPECIFIC
diff --git a/gcc/output.h b/gcc/output.h
index 5d771d7d06f..174329d95f0 100644
--- a/gcc/output.h
+++ b/gcc/output.h
@@ -22,6 +22,10 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_OUTPUT_H
#define GCC_OUTPUT_H
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
+
/* Initialize data in final at the beginning of a compilation. */
extern void init_final (const char *);
@@ -112,6 +116,7 @@ extern void output_address (rtx);
Addition and subtraction are the only arithmetic
that may appear in these expressions. */
extern void output_addr_const (FILE *, rtx);
+END_TARGET_SPECIFIC
/* Output a string of assembler code, substituting numbers, strings
and fixed syntactic prefixes. */
@@ -125,6 +130,7 @@ typedef HOST_WIDE_INT __gcc_host_wide_int__;
#define ATTRIBUTE_ASM_FPRINTF(m, n) ATTRIBUTE_NONNULL(m)
#endif
+START_TARGET_SPECIFIC
extern void asm_fprintf (FILE *file, const char *p, ...)
ATTRIBUTE_ASM_FPRINTF(2, 3);
@@ -333,11 +339,13 @@ extern rtx final_sequence;
extern int sdb_begin_function_line;
#endif
+END_TARGET_SPECIFIC
/* File in which assembler code is being written. */
#ifdef BUFSIZ
extern FILE *asm_out_file;
#endif
+START_TARGET_SPECIFIC
/* The first global object in the file. */
extern const char *first_global_object_name;
@@ -405,6 +413,8 @@ extern void default_function_pro_epilogue (FILE *, HOST_WIDE_INT);
/* Default target hook that outputs nothing to a stream. */
extern void no_asm_to_stream (FILE *);
+END_TARGET_SPECIFIC
+
/* Flags controlling properties of a section. */
#define SECTION_ENTSIZE 0x000ff /* entity size in section */
#define SECTION_CODE 0x00100 /* contains code */
@@ -547,6 +557,8 @@ union GTY ((desc ("SECTION_STYLE (&(%h))"))) section {
struct object_block;
+START_TARGET_SPECIFIC
+
/* Special well-known sections. */
extern GTY(()) section *text_section;
extern GTY(()) section *data_section;
@@ -651,6 +663,8 @@ extern void dbxout_stab_value_internal_label (const char *, int *);
extern void dbxout_stab_value_internal_label_diff (const char *, int *,
const char *);
-#endif
+#endif /* defined DBX_DEBUGGING_INFO || defined XCOFF_DEBUGGING_INFO */
+
+END_TARGET_SPECIFIC
#endif /* ! GCC_OUTPUT_H */
diff --git a/gcc/passes.c b/gcc/passes.c
index a04a5eff92a..07e093ec35d 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -86,6 +86,7 @@ along with GCC; see the file COPYING3. If not see
#include "predict.h"
#include "lto-streamer.h"
#include "plugin.h"
+#include "multi-target.h"
#if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
#include "dwarf2out.h"
@@ -104,6 +105,7 @@ along with GCC; see the file COPYING3. If not see
declarations for e.g. AIX 4.x. */
#endif
+#ifndef EXTRA_TARGET
/* This is used for debugging. It allows the current pass to printed
from anywhere in compilation.
The variable current_pass is also used for statistics and plugins. */
@@ -278,7 +280,9 @@ finish_optimization_passes (void)
timevar_pop (TV_DUMP);
}
+#endif /* !EXTRA_TARGET */
+START_TARGET_SPECIFIC
static bool
gate_rest_of_compilation (void)
{
@@ -708,6 +712,8 @@ register_pass (struct register_pass_info *pass_info)
tree_rest_of_compilation (DECL (N)) -> all_passes
*/
+EXTRA_TARGETS_DECL (void init_optimization_passes (void))
+
void
init_optimization_passes (void)
{
@@ -715,6 +721,7 @@ init_optimization_passes (void)
#define NEXT_PASS(PASS) (p = next_pass_1 (p, &((PASS).pass)))
+#ifndef EXTRA_TARGET
/* All passes needed to lower the function into shape optimizers can
operate on. These passes are always run first on the function, but
backend might produce already lowered functions that are not processed
@@ -950,6 +957,10 @@ init_optimization_passes (void)
NEXT_PASS (pass_cleanup_cfg_post_optimizing);
NEXT_PASS (pass_warn_function_noreturn);
+ EXTRA_TARGETS_CALL (init_optimization_passes ());
+#else /* EXTRA_TARGET */
+ p = &pass_expand.target_variants[TARGET_NUM-1];
+#endif /* EXTRA_TARGET */
NEXT_PASS (pass_expand);
NEXT_PASS (pass_rest_of_compilation);
@@ -1057,6 +1068,7 @@ init_optimization_passes (void)
#undef NEXT_PASS
+#ifndef EXTRA_TARGET
/* Register the passes with the tree dump code. */
register_dump_files (all_lowering_passes, PROP_gimple_any);
register_dump_files (all_small_ipa_passes,
@@ -1071,8 +1083,10 @@ init_optimization_passes (void)
register_dump_files (all_passes,
PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh
| PROP_cfg);
+#endif /* !EXTRA_TARGET */
}
+#ifndef EXTRA_TARGET
/* If we are in IPA mode (i.e., current_function_decl is NULL), call
function CALLBACK for every function in the call graph. Otherwise,
call CALLBACK on the current function. */
@@ -1613,6 +1627,13 @@ execute_pass_list (struct opt_pass *pass)
{
gcc_assert (pass->type == GIMPLE_PASS
|| pass->type == RTL_PASS);
+ if (pass->todo_flags_start & TODO_arch_dispatch)
+ {
+ gcc_assert (cfun);
+ if (cfun->target_arch)
+ pass = ((struct rtl_dispatch_pass *)pass)->target_variants[cfun->target_arch-1];
+ }
+
if (execute_one_pass (pass) && pass->sub)
execute_pass_list (pass->sub);
pass = pass->next;
@@ -1920,3 +1941,6 @@ function_called_by_processed_nodes_p (void)
}
#include "gt-passes.h"
+
+#endif /* !EXTRA_TARGET */
+END_TARGET_SPECIFIC
diff --git a/gcc/postreload-gcse.c b/gcc/postreload-gcse.c
index dcd95eb71f8..0db4d8c468f 100644
--- a/gcc/postreload-gcse.c
+++ b/gcc/postreload-gcse.c
@@ -46,6 +46,7 @@ along with GCC; see the file COPYING3. If not see
#include "timevar.h"
#include "tree-pass.h"
#include "dbgcnt.h"
+#include "multi-target.h"
/* The following code implements gcse after reload, the purpose of this
pass is to cleanup redundant loads generated by reload and other
@@ -78,7 +79,7 @@ along with GCC; see the file COPYING3. If not see
register.
*/
-
+START_TARGET_SPECIFIC
/* Keep statistics of this pass. */
static struct
{
@@ -1339,4 +1340,4 @@ struct rtl_opt_pass pass_gcse2 =
| TODO_verify_flow | TODO_ggc_collect /* todo_flags_finish */
}
};
-
+END_TARGET_SPECIFIC
diff --git a/gcc/postreload.c b/gcc/postreload.c
index f8785821f63..982d1ca9df3 100644
--- a/gcc/postreload.c
+++ b/gcc/postreload.c
@@ -48,6 +48,9 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "df.h"
#include "dbgcnt.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
static int reload_cse_noop_set_p (rtx);
static void reload_cse_simplify (rtx, rtx);
@@ -1616,3 +1619,5 @@ struct rtl_opt_pass pass_postreload_cse =
TODO_dump_func /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/predict.c b/gcc/predict.c
index eb5ddef2e38..c49f77da1a0 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -60,6 +60,9 @@ along with GCC; see the file COPYING3. If not see
#include "tree-scalar-evolution.h"
#include "cfgloop.h"
#include "pointer-set.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* real constants: 0, 1, 1-1/REG_BR_PROB_BASE, REG_BR_PROB_BASE,
1/REG_BR_PROB_BASE, 0.5, BB_FREQ_MAX. */
@@ -2259,3 +2262,5 @@ struct gimple_opt_pass pass_strip_predict_hints =
TODO_ggc_collect | TODO_verify_ssa /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/predict.h b/gcc/predict.h
index 18e57d77065..a2dc12ca79a 100644
--- a/gcc/predict.h
+++ b/gcc/predict.h
@@ -20,6 +20,8 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_PREDICT_H
#define GCC_PREDICT_H
+#include "multi-target.h"
+
#define DEF_PREDICTOR(ENUM, NAME, HITRATE, FLAGS) ENUM,
enum br_predictor
{
@@ -35,7 +37,9 @@ enum prediction
TAKEN
};
+START_TARGET_SPECIFIC
extern void predict_insn_def (rtx, enum br_predictor, enum prediction);
+END_TARGET_SPECIFIC
extern int counts_to_freqs (void);
extern void estimate_bb_frequencies (void);
extern const char *predictor_name (enum br_predictor);
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index 75f034376cb..7137d7a765c 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
+#include "multi-target.h"
/* These headers all define things which are not available in
generator programs. */
@@ -45,6 +46,8 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#endif
+START_TARGET_SPECIFIC
+
static FILE *outfile;
static int sawclose = 0;
@@ -781,3 +784,5 @@ print_simple_rtl (FILE *outf, const_rtx x)
print_rtl (outf, x);
flag_simple = 0;
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/recog.c b/gcc/recog.c
index 810270625a2..85297e8f334 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -44,6 +44,9 @@ along with GCC; see the file COPYING3. If not see
#include "timevar.h"
#include "tree-pass.h"
#include "df.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
#ifndef STACK_PUSH_CODE
#ifdef STACK_GROWS_DOWNWARD
@@ -3692,3 +3695,5 @@ struct rtl_opt_pass pass_split_for_shorten_branches =
TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/recog.h b/gcc/recog.h
index 3354a66496a..6f785e225aa 100644
--- a/gcc/recog.h
+++ b/gcc/recog.h
@@ -18,6 +18,8 @@ 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 "multi-target.h"
+
/* Random number that should be large enough for all purposes. */
#define MAX_RECOG_ALTERNATIVES 30
@@ -28,6 +30,8 @@ enum op_type {
OP_INOUT
};
+START_TARGET_SPECIFIC
+
struct operand_alternative
{
/* Pointer to the beginning of the constraint string for this alternative,
@@ -297,3 +301,5 @@ struct insn_data
extern const struct insn_data insn_data[];
extern int peep2_current_count;
+
+END_TARGET_SPECIFIC
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index a17f4f80e0d..4c20b29cd00 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -176,6 +176,9 @@
#include "target.h"
#include "df.h"
#include "vecprim.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
#ifdef STACK_REGS
@@ -3322,3 +3325,5 @@ struct rtl_opt_pass pass_stack_regs_run =
TODO_ggc_collect /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/reginfo.c b/gcc/reginfo.c
index ee6c7ee6447..c1e5e918714 100644
--- a/gcc/reginfo.c
+++ b/gcc/reginfo.c
@@ -53,6 +53,9 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "df.h"
#include "ira.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Maximum register number used in this function, plus one. */
@@ -226,6 +229,7 @@ reg_set_to_hard_reg_set (HARD_REG_SET *to, const_bitmap from)
}
}
+EXTRA_TARGETS_DECL (void init_reg_sets (void));
/* Function called only once to initialize the above data on reg usage.
Once this is done, various switches may override. */
void
@@ -255,6 +259,7 @@ init_reg_sets (void)
memcpy (fixed_regs, initial_fixed_regs, sizeof fixed_regs);
memcpy (call_used_regs, initial_call_used_regs, sizeof call_used_regs);
memset (global_regs, 0, sizeof global_regs);
+ EXTRA_TARGETS_CALL (init_reg_sets ());
}
/* Initialize may_move_cost and friends for mode M. */
@@ -1385,3 +1390,5 @@ finish_subregs_of_mode (void)
#endif /* CANNOT_CHANGE_MODE_CLASS */
#include "gt-reginfo.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/regmove.c b/gcc/regmove.c
index 25fcc52b213..fc90a53d72a 100644
--- a/gcc/regmove.c
+++ b/gcc/regmove.c
@@ -45,6 +45,9 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "df.h"
#include "ira.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
static int optimize_reg_copy_1 (rtx, rtx, rtx);
static void optimize_reg_copy_2 (rtx, rtx, rtx);
@@ -1374,3 +1377,5 @@ struct rtl_opt_pass pass_regmove =
TODO_ggc_collect /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/regrename.c b/gcc/regrename.c
index e003fd4d34b..a2b5220b7db 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -39,11 +39,14 @@
#include "timevar.h"
#include "tree-pass.h"
#include "df.h"
+#include "multi-target.h"
#if HOST_BITS_PER_WIDE_INT <= MAX_RECOG_OPERANDS
#error "Use a different bitmap implementation for untracked_operands."
#endif
+START_TARGET_SPECIFIC
+
/* We keep linked lists of DU_HEAD structures, each of which describes
a chain of occurrences of a reg. */
struct du_head
@@ -1345,3 +1348,4 @@ struct rtl_opt_pass pass_regrename =
}
};
+END_TARGET_SPECIFIC
diff --git a/gcc/regs.h b/gcc/regs.h
index 39c4fa32c68..3795e8b8d9f 100644
--- a/gcc/regs.h
+++ b/gcc/regs.h
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "obstack.h"
#include "hard-reg-set.h"
#include "basic-block.h"
+#include "multi-target.h"
#define REG_BYTES(R) mode_size[(int) GET_MODE (R)]
@@ -72,6 +73,7 @@ struct regstat_n_sets_and_refs_t
int refs; /* # of times (REG n) is used or set */
};
+START_TARGET_SPECIFIC
extern struct regstat_n_sets_and_refs_t *regstat_n_sets_and_refs;
/* Indexed by n, gives number of times (REG n) is used or set. */
@@ -105,6 +107,7 @@ extern void regstat_free_ri (void);
extern bitmap regstat_get_setjmp_crosses (void);
extern void regstat_compute_calls_crossed (void);
extern void regstat_free_calls_crossed (void);
+END_TARGET_SPECIFIC
/* Register information indexed by register number. This structure is
@@ -211,6 +214,7 @@ extern size_t reg_info_p_size;
#define REG_BASIC_BLOCK(N) (reg_info_p[N].basic_block)
+START_TARGET_SPECIFIC
/* Vector of substitutions of register numbers,
used to map pseudo regs into hardware regs.
@@ -230,6 +234,7 @@ extern bool have_regs_of_mode [MAX_MACHINE_MODE];
register. */
extern enum machine_mode reg_raw_mode[FIRST_PSEUDO_REGISTER];
+END_TARGET_SPECIFIC
/* Flag set by local-alloc or global-alloc if they decide to allocate
something in a call-clobbered register. */
@@ -262,6 +267,7 @@ extern int caller_save_needed;
#define HARD_REGNO_CALL_PART_CLOBBERED(REGNO, MODE) 0
#endif
+START_TARGET_SPECIFIC
/* 1 if the corresponding class does contain register of given
mode. */
extern char contains_reg_of_mode [N_REG_CLASSES] [MAX_MACHINE_MODE];
@@ -366,5 +372,6 @@ overlaps_hard_reg_set_p (const HARD_REG_SET regs, enum machine_mode mode,
return false;
}
+END_TARGET_SPECIFIC
#endif /* GCC_REGS_H */
diff --git a/gcc/regstat.c b/gcc/regstat.c
index cb4471b235b..1de856c6e17 100644
--- a/gcc/regstat.c
+++ b/gcc/regstat.c
@@ -34,7 +34,9 @@ along with GCC; see the file COPYING3. If not see
#include "basic-block.h"
#include "timevar.h"
#include "df.h"
+#include "multi-target.h"
+START_TARGET_SPECIFIC
struct regstat_n_sets_and_refs_t *regstat_n_sets_and_refs;
@@ -526,3 +528,4 @@ regstat_free_calls_crossed (void)
reg_info_p = NULL;
}
+END_TARGET_SPECIFIC
diff --git a/gcc/reload.c b/gcc/reload.c
index 4601b4aeacd..bf0e2481bdf 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -113,6 +113,7 @@ a register with any other reload. */
#include "target.h"
#include "df.h"
#include "ira.h"
+#include "multi-target.h"
/* True if X is a constant that can be forced into the constant pool. */
#define CONST_POOL_OK_P(X) \
@@ -127,6 +128,8 @@ a register with any other reload. */
|| (reg_class_size [(C)] >= 1 && CLASS_LIKELY_SPILLED_P (C)))
+START_TARGET_SPECIFIC
+
/* All reloads of the current insn are recorded here. See reload.h for
comments. */
int n_reloads;
@@ -364,7 +367,9 @@ push_secondary_reload (int in_p, rtx x, int opnum, int optional,
sri.icode = CODE_FOR_nothing;
sri.prev_sri = prev_sri;
- rclass = targetm.secondary_reload (in_p, x, reload_class, reload_mode, &sri);
+ rclass = (enum reg_class) targetm.secondary_reload (in_p, x,
+ (int) reload_class,
+ reload_mode, &sri);
icode = (enum insn_code) sri.icode;
/* If we don't need any secondary registers, done. */
@@ -526,7 +531,8 @@ secondary_reload_class (bool in_p, enum reg_class rclass,
sri.icode = CODE_FOR_nothing;
sri.prev_sri = NULL;
- rclass = targetm.secondary_reload (in_p, x, rclass, mode, &sri);
+ rclass = (enum reg_class) targetm.secondary_reload (in_p, x, (int) rclass,
+ mode, &sri);
icode = (enum insn_code) sri.icode;
/* If there are no secondary reloads at all, we return NO_REGS.
@@ -7435,3 +7441,5 @@ debug_reload (void)
{
debug_reload_to_stream (stderr);
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/reload.h b/gcc/reload.h
index 5d8375b9589..6b87e528347 100644
--- a/gcc/reload.h
+++ b/gcc/reload.h
@@ -19,6 +19,8 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#include "multi-target.h"
+
/* If secondary reloads are the same for inputs and outputs, define those
macros here. */
@@ -34,7 +36,9 @@ along with GCC; see the file COPYING3. If not see
#define MEMORY_MOVE_COST(MODE,CLASS,IN) \
(4 + memory_move_secondary_cost ((MODE), (CLASS), (IN)))
#endif
+START_TARGET_SPECIFIC
extern int memory_move_secondary_cost (enum machine_mode, enum reg_class, int);
+END_TARGET_SPECIFIC
/* Maximum number of reloads we can need. */
#define MAX_RELOADS (2 * MAX_RECOG_OPERANDS * (MAX_REGS_PER_ADDRESS + 1))
@@ -73,6 +77,7 @@ enum reload_type
};
#ifdef GCC_INSN_CODES_H
+START_TARGET_SPECIFIC
/* Each reload is recorded with a structure like this. */
struct reload
{
@@ -152,8 +157,11 @@ struct reload
extern struct reload rld[MAX_RELOADS];
extern int n_reloads;
+END_TARGET_SPECIFIC
#endif
+START_TARGET_SPECIFIC
+
extern GTY (()) VEC(rtx,gc) *reg_equiv_memory_loc_vec;
extern rtx *reg_equiv_constant;
extern rtx *reg_equiv_invariant;
@@ -373,3 +381,5 @@ extern void debug_reload (void);
/* Compute the actual register we should reload to, in case we're
reloading to/from a register that is wider than a word. */
extern rtx reload_adjust_reg_for_mode (rtx, enum machine_mode);
+
+END_TARGET_SPECIFIC
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 2555dc8b33c..a3f00a2c1f3 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -48,6 +48,7 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "target.h"
#include "emit-rtl.h"
+#include "multi-target.h"
/* This file contains the reload pass of the compiler, which is
run after register allocation has been done. It checks that
@@ -83,6 +84,8 @@ along with GCC; see the file COPYING3. If not see
fixing up each insn, and generating the new insns to copy values
into the reload registers. */
+START_TARGET_SPECIFIC
+
/* During reload_as_needed, element N contains a REG rtx for the hard reg
into which reg N has been reloaded (perhaps for a previous insn). */
static rtx *reg_last_reload_reg;
@@ -7129,8 +7132,10 @@ emit_input_reload_insns (struct insn_chain *chain, struct reload *rl,
sri.icode = CODE_FOR_nothing;
sri.prev_sri = NULL;
- new_class = targetm.secondary_reload (1, real_oldequiv, rl->rclass,
- mode, &sri);
+ new_class
+ = (enum reg_class) targetm.secondary_reload (1, real_oldequiv,
+ (int) rl->rclass,
+ mode, &sri);
if (new_class == NO_REGS && sri.icode == CODE_FOR_nothing)
second_reload_reg = 0;
@@ -7156,8 +7161,10 @@ emit_input_reload_insns (struct insn_chain *chain, struct reload *rl,
{
sri2.icode = CODE_FOR_nothing;
sri2.prev_sri = &sri;
- new_t_class = targetm.secondary_reload (1, real_oldequiv,
- new_class, mode, &sri);
+ new_t_class
+ = (enum reg_class) targetm.secondary_reload (1, real_oldequiv,
+ (int) new_class,
+ mode, &sri);
if (new_t_class == NO_REGS && sri2.icode == CODE_FOR_nothing)
{
if (reload_adjust_reg_for_temp (&second_reload_reg,
@@ -8998,3 +9005,5 @@ fixup_abnormal_edges (void)
verify_flow_info ();
#endif
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/reorg.c b/gcc/reorg.c
index b1de4bec60f..6251ba7e7c5 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -136,6 +136,9 @@ along with GCC; see the file COPYING3. If not see
#include "timevar.h"
#include "target.h"
#include "tree-pass.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
#ifdef DELAY_SLOTS
@@ -4126,3 +4129,5 @@ struct rtl_opt_pass pass_machine_reorg =
TODO_ggc_collect /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/resource.c b/gcc/resource.c
index 9dc44b9ac29..223edecd6d0 100644
--- a/gcc/resource.c
+++ b/gcc/resource.c
@@ -35,6 +35,9 @@ along with GCC; see the file COPYING3. If not see
#include "insn-attr.h"
#include "params.h"
#include "df.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* This structure is used to record liveness information at the targets or
fallthrough insns of branches. We will most likely need the information
@@ -1283,3 +1286,5 @@ mark_end_of_function_resources (rtx trial, bool include_delayed_effects)
mark_referenced_resources (trial, &end_of_function_needs,
include_delayed_effects);
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/resource.h b/gcc/resource.h
index b13782f1ab0..9eb0349bc43 100644
--- a/gcc/resource.h
+++ b/gcc/resource.h
@@ -23,6 +23,9 @@ along with GCC; see the file COPYING3. If not see
#include "hard-reg-set.h"
#include "df.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Macro to clear all resources. */
#define CLEAR_RESOURCE(RES) \
@@ -56,4 +59,6 @@ extern void mark_end_of_function_resources (rtx, bool);
extern void init_resource_info (rtx);
extern void free_resource_info (void);
+END_TARGET_SPECIFIC
+
#endif /* GCC_RESOURCE_H */
diff --git a/gcc/rtl.c b/gcc/rtl.c
index fe9c9514f1c..712dd324a24 100644
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -37,8 +37,11 @@ along with GCC; see the file COPYING3. If not see
#else
# include "toplev.h"
#endif
+#include "multi-target.h"
+START_TARGET_SPECIFIC
+
/* Indexed by rtx code, gives number of operands for an rtx with that code.
Does NOT include rtx header data (code and links). */
@@ -723,3 +726,5 @@ rtl_check_failed_flag (const char *name, const_rtx r, const char *file,
name, GET_RTX_NAME (GET_CODE (r)), func, trim_filename (file), line);
}
#endif /* ENABLE_RTL_FLAG_CHECKING */
+
+END_TARGET_SPECIFIC
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 960237cec53..5215ff1b4da 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see
#include "vec.h"
#include "fixed-value.h"
#include "alias.h"
+#include "multi-target.h"
#undef FFS /* Some systems predefine this symbol; don't let it interfere. */
#undef FLOAT /* Likewise. */
@@ -1111,6 +1112,7 @@ rhs_regno (const_rtx x)
#define SUBREG_REG(RTX) XCEXP (RTX, 0, SUBREG)
#define SUBREG_BYTE(RTX) XCUINT (RTX, 1, SUBREG)
+START_TARGET_SPECIFIC
/* in rtlanal.c */
/* Return the right cost to give to an operation
to make the cost of the corresponding register-to-register instruction
@@ -1141,6 +1143,7 @@ extern unsigned int num_sign_bit_copies (const_rtx, enum machine_mode);
extern bool constant_pool_constant_p (rtx);
extern bool truncated_to_mode (enum machine_mode, const_rtx);
extern int low_bitmask_len (enum machine_mode, unsigned HOST_WIDE_INT);
+END_TARGET_SPECIFIC
/* 1 if RTX is a subreg containing a reg that is already known to be
@@ -1547,6 +1550,8 @@ extern int currently_expanding_to_rtl;
/* Generally useful functions. */
+START_TARGET_SPECIFIC
+
/* In expmed.c */
extern int ceil_log2 (unsigned HOST_WIDE_INT);
@@ -1639,7 +1644,6 @@ extern rtx force_const_mem (enum machine_mode, rtx);
/* In varasm.c */
-struct function;
extern rtx get_pool_constant (rtx);
extern rtx get_pool_constant_mark (rtx, bool *);
extern enum machine_mode get_pool_mode (const_rtx);
@@ -1748,7 +1752,7 @@ extern rtx *find_constant_term_loc (rtx *);
extern rtx try_split (rtx, rtx, int);
extern int split_branch_probability;
-/* In unknown file */
+/* In $(TA)insn-recog.c */
extern rtx split_insns (rtx, rtx);
/* In simplify-rtx.c */
@@ -1793,6 +1797,8 @@ extern enum machine_mode choose_hard_reg_mode (unsigned int, unsigned int,
extern rtx set_unique_reg_note (rtx, enum reg_note, rtx);
extern void set_insn_deleted (rtx);
+END_TARGET_SPECIFIC
+
/* Functions in rtlanal.c */
/* Single set is implemented as macro for performance reasons. */
@@ -1810,6 +1816,7 @@ typedef struct replace_label_data
bool update_label_nuses;
} replace_label_data;
+START_TARGET_SPECIFIC
extern int rtx_addr_can_trap_p (const_rtx);
extern bool nonzero_address_p (const_rtx);
extern int rtx_unstable_p (const_rtx);
@@ -1902,6 +1909,7 @@ extern rtx canonicalize_condition (rtx, rtx, int, rtx *, rtx, int, int);
/* Given a JUMP_INSN, return a canonical description of the test
being made. */
extern rtx get_condition (rtx, rtx *, int, int);
+END_TARGET_SPECIFIC
/* Information about a subreg of a hard register. */
struct subreg_info
@@ -1915,9 +1923,11 @@ struct subreg_info
bool representable_p;
};
+START_TARGET_SPECIFIC
extern void subreg_get_info (unsigned int, enum machine_mode,
unsigned int, enum machine_mode,
struct subreg_info *);
+END_TARGET_SPECIFIC
/* lists.c */
@@ -1933,6 +1943,7 @@ extern rtx remove_free_INSN_LIST_node (rtx *);
extern rtx remove_free_EXPR_LIST_node (rtx *);
+START_TARGET_SPECIFIC
/* reginfo.c */
/* Initialize may_move_cost and friends for mode M. */
@@ -1958,6 +1969,7 @@ extern void setup_reg_classes (int, enum reg_class, enum reg_class,
extern void split_all_insns (void);
extern unsigned int split_all_insns_noflow (void);
+END_TARGET_SPECIFIC
#define MAX_SAVED_CONST_INT 64
extern GTY(()) rtx const_int_rtx[MAX_SAVED_CONST_INT * 2 + 1];
@@ -1966,10 +1978,14 @@ extern GTY(()) rtx const_int_rtx[MAX_SAVED_CONST_INT * 2 + 1];
#define const1_rtx (const_int_rtx[MAX_SAVED_CONST_INT+1])
#define const2_rtx (const_int_rtx[MAX_SAVED_CONST_INT+2])
#define constm1_rtx (const_int_rtx[MAX_SAVED_CONST_INT-1])
+
+START_TARGET_SPECIFIC
extern GTY(()) rtx const_true_rtx;
extern GTY(()) rtx const_tiny_rtx[3][(int) MAX_MACHINE_MODE];
+END_TARGET_SPECIFIC
+
/* Returns a constant 0 rtx in mode MODE. Integer modes are treated the
same as VOIDmode. */
@@ -2039,8 +2055,10 @@ extern GTY(()) rtx global_rtl[GR_MAX];
#define hard_frame_pointer_rtx (global_rtl[GR_HARD_FRAME_POINTER])
#define arg_pointer_rtx (global_rtl[GR_ARG_POINTER])
+START_TARGET_SPECIFIC
extern GTY(()) rtx pic_offset_table_rtx;
extern GTY(()) rtx return_address_pointer_rtx;
+END_TARGET_SPECIFIC
/* Include the RTL generation functions. */
@@ -2057,12 +2075,14 @@ extern GTY(()) rtx return_address_pointer_rtx;
generation functions included above do the raw handling. If you
add to this list, modify special_rtx in gengenrtl.c as well. */
-extern rtx gen_rtx_CONST_INT (enum machine_mode, HOST_WIDE_INT);
extern rtx gen_rtx_CONST_VECTOR (enum machine_mode, rtvec);
extern rtx gen_raw_REG (enum machine_mode, int);
+extern rtx gen_rtx_MEM (enum machine_mode, rtx);
+START_TARGET_SPECIFIC
+extern rtx gen_rtx_CONST_INT (enum machine_mode, HOST_WIDE_INT);
extern rtx gen_rtx_REG (enum machine_mode, unsigned);
extern rtx gen_rtx_SUBREG (enum machine_mode, rtx, int);
-extern rtx gen_rtx_MEM (enum machine_mode, rtx);
+END_TARGET_SPECIFIC
#define GEN_INT(N) gen_rtx_CONST_INT (VOIDmode, (N))
@@ -2130,6 +2150,7 @@ extern rtx gen_rtx_MEM (enum machine_mode, rtx);
/* REGNUM never really appearing in the INSN stream. */
#define INVALID_REGNUM (~(unsigned int) 0)
+START_TARGET_SPECIFIC
extern rtx output_constant_def (tree, int);
extern rtx lookup_constant_def (tree);
@@ -2164,6 +2185,7 @@ extern int regstack_completed;
if it is used only once, instruction combination will produce
the same indirect address eventually. */
extern int cse_not_expected;
+END_TARGET_SPECIFIC
/* Translates rtx code to tree code, for those codes needed by
REAL_ARITHMETIC. The function returns an int because the caller may not
@@ -2171,6 +2193,7 @@ extern int cse_not_expected;
extern int rtx_to_tree_code (enum rtx_code);
+START_TARGET_SPECIFIC
/* In cse.c */
extern int delete_trivially_dead_insns (rtx, int);
extern int cse_main (rtx, int);
@@ -2240,14 +2263,15 @@ extern void add_insn_before (rtx, rtx, struct basic_block_def *);
extern void add_insn_after (rtx, rtx, struct basic_block_def *);
extern void remove_insn (rtx);
extern rtx emit (rtx);
-extern rtx delete_insn (rtx);
extern rtx entry_of_function (void);
extern void emit_insn_at_entry (rtx);
extern void delete_insn_chain (rtx, rtx, bool);
extern rtx unlink_insn_chain (rtx, rtx);
extern rtx delete_insn_and_edges (rtx);
extern rtx gen_lowpart_SUBREG (enum machine_mode, rtx);
+END_TARGET_SPECIFIC
extern rtx gen_const_mem (enum machine_mode, rtx);
+START_TARGET_SPECIFIC
extern rtx gen_frame_mem (enum machine_mode, rtx);
extern rtx gen_tmp_stack_mem (enum machine_mode, rtx);
extern bool validate_subreg (enum machine_mode, enum machine_mode,
@@ -2313,6 +2337,7 @@ extern rtx move_by_pieces (rtx, rtx, unsigned HOST_WIDE_INT,
/* In cfgrtl.c */
extern void print_rtl_with_bb (FILE *, const_rtx);
+extern rtx delete_insn (rtx);
/* In cfg.c. */
extern void dump_reg_info (FILE *);
@@ -2418,6 +2443,7 @@ extern GTY(()) rtx stack_limit_rtx;
/* In predict.c */
extern void invert_br_probabilities (rtx);
extern bool expensive_function_p (int);
+
/* In cfgexpand.c */
extern void add_reg_br_prob_note (rtx last, int probability);
@@ -2458,10 +2484,12 @@ extern struct rtl_hooks rtl_hooks;
/* ... but then it has to restore these. */
extern const struct rtl_hooks general_rtl_hooks;
+END_TARGET_SPECIFIC
/* Keep this for the nonce. */
#define gen_lowpart rtl_hooks.gen_lowpart
+START_TARGET_SPECIFIC
extern void insn_locators_alloc (void);
extern void insn_locators_free (void);
extern void insn_locators_finalize (void);
@@ -2470,6 +2498,7 @@ extern location_t get_curr_insn_source_location (void);
extern void set_curr_insn_block (tree);
extern tree get_curr_insn_block (void);
extern int curr_insn_locator (void);
+END_TARGET_SPECIFIC
extern bool optimize_insn_for_size_p (void);
extern bool optimize_insn_for_speed_p (void);
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 0e3b77bc0c9..fae4622a4fc 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -38,6 +38,9 @@ along with GCC; see the file COPYING3. If not see
#include "function.h"
#include "df.h"
#include "tree.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Forward declarations */
static void set_of_1 (rtx, const_rtx, void *);
@@ -5083,3 +5086,5 @@ low_bitmask_len (enum machine_mode mode, unsigned HOST_WIDE_INT m)
return exact_log2 (m + 1);
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/rtlhooks-def.h b/gcc/rtlhooks-def.h
index 07d8fcfce38..65c3a2a77c1 100644
--- a/gcc/rtlhooks-def.h
+++ b/gcc/rtlhooks-def.h
@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see
#define GCC_RTL_HOOKS_DEF_H
#include "rtl.h"
+#include "multi-target.h"
#define RTL_HOOKS_GEN_LOWPART gen_lowpart_general
#define RTL_HOOKS_GEN_LOWPART_NO_EMIT gen_lowpart_no_emit_general
@@ -37,6 +38,7 @@ along with GCC; see the file COPYING3. If not see
RTL_HOOKS_REG_TRUNCATED_TO_MODE \
}
+START_TARGET_SPECIFIC
extern rtx gen_lowpart_general (enum machine_mode, rtx);
extern rtx gen_lowpart_no_emit_general (enum machine_mode, rtx);
extern rtx reg_nonzero_bits_general (const_rtx, enum machine_mode, const_rtx,
@@ -47,5 +49,6 @@ extern rtx reg_num_sign_bit_copies_general (const_rtx, enum machine_mode, const_
enum machine_mode,
unsigned int, unsigned int *);
extern bool reg_truncated_to_mode_general (enum machine_mode, const_rtx);
+END_TARGET_SPECIFIC
#endif /* GCC_RTL_HOOKS_DEF_H */
diff --git a/gcc/rtlhooks.c b/gcc/rtlhooks.c
index a64c0674dc8..25cfeca1dd9 100644
--- a/gcc/rtlhooks.c
+++ b/gcc/rtlhooks.c
@@ -25,7 +25,9 @@ along with GCC; see the file COPYING3. If not see
#include "rtlhooks-def.h"
#include "expr.h"
#include "recog.h"
+#include "multi-target.h"
+START_TARGET_SPECIFIC
/* For speed, we will copy the RTX hooks struct member-by-member
instead of doing indirect calls. For these reason, we initialize
@@ -167,3 +169,4 @@ gen_lowpart_if_possible (enum machine_mode mode, rtx x)
return 0;
}
+END_TARGET_SPECIFIC
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index 21632c3b5ed..015402fd997 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -43,6 +43,7 @@ along with GCC; see the file COPYING3. If not see
#include "cselib.h"
#include "ira.h"
#include "target.h"
+#include "multi-target.h"
#ifdef INSN_SCHEDULING
@@ -52,6 +53,8 @@ along with GCC; see the file COPYING3. If not see
#define CHECK (false)
#endif
+START_TARGET_SPECIFIC
+
/* Holds current parameters for the dependency analyzer. */
struct sched_deps_info_def *sched_deps_info;
@@ -4167,4 +4170,6 @@ check_dep (dep_t dep, bool relaxed_p)
}
#endif /* ENABLE_CHECKING */
+END_TARGET_SPECIFIC
+
#endif /* INSN_SCHEDULING */
diff --git a/gcc/sched-ebb.c b/gcc/sched-ebb.c
index f4875601f16..40f46caffed 100644
--- a/gcc/sched-ebb.c
+++ b/gcc/sched-ebb.c
@@ -42,8 +42,11 @@ along with GCC; see the file COPYING3. If not see
#include "sched-int.h"
#include "target.h"
#include "output.h"
+#include "multi-target.h"
+START_TARGET_SPECIFIC
+
#ifdef INSN_SCHEDULING
/* The number of insns to be scheduled in total. */
@@ -704,3 +707,5 @@ ebb_fix_recovery_cfg (int bbi ATTRIBUTE_UNUSED, int jump_bbi,
}
#endif /* INSN_SCHEDULING */
+
+END_TARGET_SPECIFIC
diff --git a/gcc/sched-int.h b/gcc/sched-int.h
index c3b463e76a1..9da27dd6068 100644
--- a/gcc/sched-int.h
+++ b/gcc/sched-int.h
@@ -23,6 +23,8 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_SCHED_INT_H
#define GCC_SCHED_INT_H
+#include "multi-target.h"
+
#ifdef INSN_SCHEDULING
/* For state_t. */
@@ -62,6 +64,8 @@ struct sched_scan_info_def
void (*init_insn) (rtx);
};
+START_TARGET_SPECIFIC
+
extern const struct sched_scan_info_def *sched_scan_info;
extern void sched_scan (const struct sched_scan_info_def *,
@@ -77,6 +81,8 @@ extern void sched_extend_target (void);
extern void haifa_init_h_i_d (bb_vec_t, basic_block, insn_vec_t, rtx);
extern void haifa_finish_h_i_d (void);
+END_TARGET_SPECIFIC
+
/* Hooks that are common to all the schedulers. */
struct common_sched_info_def
{
@@ -108,6 +114,8 @@ struct common_sched_info_def
enum sched_pass_id_t sched_pass_id;
};
+START_TARGET_SPECIFIC
+
extern struct common_sched_info_def *common_sched_info;
extern const struct common_sched_info_def haifa_common_sched_info;
@@ -175,6 +183,8 @@ extern void sched_finish (void);
extern bool sel_insn_is_speculation_check (rtx);
+END_TARGET_SPECIFIC
+
/* Describe the ready list of the scheduler.
VEC holds space enough for all insns in the current region. VECLEN
says how many exactly.
@@ -192,6 +202,8 @@ struct ready_list
int n_debug;
};
+START_TARGET_SPECIFIC
+
extern char *ready_try;
extern struct ready_list ready;
@@ -214,15 +226,13 @@ extern void sched_create_recovery_edges (basic_block, basic_block,
/* Pointer to data describing the current DFA state. */
extern state_t curr_state;
+END_TARGET_SPECIFIC
/* Type to represent status of a dependence. */
typedef int ds_t;
/* Type to represent weakness of speculative dependence. */
typedef int dw_t;
-extern enum reg_note ds_to_dk (ds_t);
-extern ds_t dk_to_ds (enum reg_note);
-
/* Information about the dependency. */
struct _dep
{
@@ -241,6 +251,11 @@ struct _dep
ds_t status;
};
+START_TARGET_SPECIFIC
+extern enum reg_note ds_to_dk (ds_t);
+extern ds_t dk_to_ds (enum reg_note);
+END_TARGET_SPECIFIC
+
typedef struct _dep dep_def;
typedef dep_def *dep_t;
@@ -249,12 +264,14 @@ typedef dep_def *dep_t;
#define DEP_TYPE(D) ((D)->type)
#define DEP_STATUS(D) ((D)->status)
+START_TARGET_SPECIFIC
/* Functions to work with dep. */
extern void init_dep_1 (dep_t, rtx, rtx, enum reg_note, ds_t);
extern void init_dep (dep_t, rtx, rtx, enum reg_note);
extern void sd_debug_dep (dep_t);
+END_TARGET_SPECIFIC
/* Definition of this struct resides below. */
struct _dep_node;
@@ -644,6 +661,7 @@ struct spec_info_def
int flags;
};
typedef struct spec_info_def *spec_info_t;
+START_TARGET_SPECIFIC
extern spec_info_t spec_info;
@@ -1489,12 +1507,16 @@ extern void sd_copy_back_deps (rtx, rtx, bool);
extern void sd_delete_dep (sd_iterator_def);
extern void sd_debug_lists (rtx, sd_list_types_def);
+END_TARGET_SPECIFIC
+
#endif /* INSN_SCHEDULING */
+START_TARGET_SPECIFIC
/* Functions in sched-vis.c. These must be outside INSN_SCHEDULING as
sched-vis.c is compiled always. */
extern void print_insn (char *, const_rtx, int);
extern void print_pattern (char *, const_rtx, int);
extern void print_value (char *, const_rtx, int);
+END_TARGET_SPECIFIC
#endif /* GCC_SCHED_INT_H */
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index 68da37bbd7e..4cb9939ecc5 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -69,6 +69,9 @@ along with GCC; see the file COPYING3. If not see
#include "timevar.h"
#include "tree-pass.h"
#include "dbgcnt.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
#ifdef INSN_SCHEDULING
@@ -3589,3 +3592,5 @@ struct rtl_opt_pass pass_sched2 =
TODO_ggc_collect /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/sched-vis.c b/gcc/sched-vis.c
index 5754a56a5fa..30bc324f433 100644
--- a/gcc/sched-vis.c
+++ b/gcc/sched-vis.c
@@ -32,6 +32,9 @@ along with GCC; see the file COPYING3. If not see
#include "insn-attr.h"
#include "sched-int.h"
#include "tree-pass.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
static char *safe_concat (char *, char *, const char *);
@@ -828,3 +831,4 @@ debug_bb_n_slim (int n)
debug_bb_slim (bb);
}
+END_TARGET_SPECIFIC
diff --git a/gcc/sdbout.c b/gcc/sdbout.c
index f4541ea0763..b948f460952 100644
--- a/gcc/sdbout.c
+++ b/gcc/sdbout.c
@@ -49,6 +49,9 @@ AT&T C compiler. From the example below I would conclude the following:
#include "tree.h"
#include "ggc.h"
#include "varray.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
static GTY(()) tree anonymous_types;
@@ -1743,3 +1746,5 @@ const struct gcc_debug_hooks sdb_debug_hooks =
#endif /* SDB_DEBUGGING_INFO */
#include "gt-sdbout.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/sel-sched-dump.c b/gcc/sel-sched-dump.c
index dbf1c34fccc..65576978466 100644
--- a/gcc/sel-sched-dump.c
+++ b/gcc/sel-sched-dump.c
@@ -39,7 +39,9 @@ along with GCC; see the file COPYING3. If not see
#ifdef INSN_SCHEDULING
#include "sel-sched-ir.h"
#include "sel-sched-dump.h"
+#include "multi-target.h"
+START_TARGET_SPECIFIC
/* These variables control high-level pretty printing. */
static int sel_dump_cfg_flags = SEL_DUMP_CFG_FLAGS;
@@ -947,5 +949,5 @@ debug_mem_addr_value (rtx x)
debug_rtx (addr);
return t;
}
-#endif
-
+END_TARGET_SPECIFIC
+#endif /* INSN_SCHEDULING */
diff --git a/gcc/sel-sched-dump.h b/gcc/sel-sched-dump.h
index d4ebd779a7a..c0a81aea873 100644
--- a/gcc/sel-sched-dump.h
+++ b/gcc/sel-sched-dump.h
@@ -22,7 +22,9 @@ along with GCC; see the file COPYING3. If not see
#define GCC_SEL_SCHED_DUMP_H
#include "sel-sched-ir.h"
+#include "multi-target.h"
+START_TARGET_SPECIFIC
/* These values control the dumping of control flow graph to the .dot file. */
enum sel_dump_cfg_def
@@ -238,4 +240,7 @@ extern void debug_blist (blist_t);
extern void debug_insn_vector (rtx_vec_t);
extern void debug_hard_reg_set (HARD_REG_SET);
extern rtx debug_mem_addr_value (rtx);
-#endif
+
+END_TARGET_SPECIFIC
+
+#endif /* GCC_SEL_SCHED_DUMP_H */
diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index 4647c4793d8..7a4846729f3 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -48,6 +48,9 @@ along with GCC; see the file COPYING3. If not see
#include "sel-sched-ir.h"
/* We don't have to use it except for sel_print_insn. */
#include "sel-sched-dump.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* A vector holding bb info for whole scheduling pass. */
VEC(sel_global_bb_info_def, heap) *sel_global_bb_info = NULL;
@@ -6203,4 +6206,5 @@ sel_remove_loop_preheader (void)
SET_LOOP_PREHEADER_BLOCKS (loop_outer (current_loop_nest),
preheader_blocks);
}
-#endif
+END_TARGET_SPECIFIC
+#endif /* INSN_SCHEDULING */
diff --git a/gcc/sel-sched-ir.h b/gcc/sel-sched-ir.h
index 20f0bba5374..bb6571e9158 100644
--- a/gcc/sel-sched-ir.h
+++ b/gcc/sel-sched-ir.h
@@ -32,6 +32,9 @@ along with GCC; see the file COPYING3. If not see
#include "vecprim.h"
#include "sched-int.h"
#include "cfgloop.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* tc_t is a short for target context. This is a state of the target
backend. */
@@ -1660,12 +1663,6 @@ extern void sel_setup_sched_infos (void);
extern void alloc_sched_pools (void);
extern void free_sched_pools (void);
-#endif /* GCC_SEL_SCHED_IR_H */
-
-
-
-
-
-
-
+END_TARGET_SPECIFIC
+#endif /* GCC_SEL_SCHED_IR_H */
diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c
index 0981440fde7..fec15e71f4f 100644
--- a/gcc/sel-sched.c
+++ b/gcc/sel-sched.c
@@ -51,6 +51,7 @@ along with GCC; see the file COPYING3. If not see
#include "sel-sched-dump.h"
#include "sel-sched.h"
#include "dbgcnt.h"
+#include "multi-target.h"
/* Implementation of selective scheduling approach.
The below implementation follows the original approach with the following
@@ -251,6 +252,8 @@ along with GCC; see the file COPYING3. If not see
*/
+START_TARGET_SPECIFIC
+
/* True when pipelining is enabled. */
bool pipelining_p;
@@ -7621,4 +7624,6 @@ run_selective_scheduling (void)
sel_global_finish ();
}
-#endif
+END_TARGET_SPECIFIC
+
+#endif /* INSN_SCHEDULING */
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 5ad5b1aceb9..92c126de81b 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -39,6 +39,7 @@ along with GCC; see the file COPYING3. If not see
#include "output.h"
#include "ggc.h"
#include "target.h"
+#include "multi-target.h"
/* Simplification and canonicalization of RTL. */
@@ -49,6 +50,8 @@ along with GCC; see the file COPYING3. If not see
#define HWI_SIGN_EXTEND(low) \
((((HOST_WIDE_INT) low) < 0) ? ((HOST_WIDE_INT) -1) : ((HOST_WIDE_INT) 0))
+START_TARGET_SPECIFIC
+
static rtx neg_const_int (enum machine_mode, const_rtx);
static bool plus_minus_operand_p (const_rtx);
static bool simplify_plus_minus_op_data_cmp (rtx, rtx);
@@ -5563,3 +5566,5 @@ simplify_rtx (const_rtx x)
}
return NULL;
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/stack-ptr-mod.c b/gcc/stack-ptr-mod.c
index e7d92a5e7b9..90c002d4009 100644
--- a/gcc/stack-ptr-mod.c
+++ b/gcc/stack-ptr-mod.c
@@ -31,6 +31,9 @@ along with GCC; see the file COPYING3. If not see
#include "flags.h"
#include "output.h"
#include "df.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Determine if the stack pointer is constant over the life of the function.
Only useful before prologues have been emitted. */
@@ -109,3 +112,5 @@ struct rtl_opt_pass pass_stack_ptr_mod =
0 /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 14f13812b36..067037c9697 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -52,6 +52,7 @@ along with GCC; see the file COPYING3. If not see
#include "regs.h"
#include "alloc-pool.h"
#include "pretty-print.h"
+#include "multi-target.h"
/* Functions and data structures for expanding case statements. */
@@ -95,6 +96,8 @@ struct case_node
typedef struct case_node case_node;
typedef struct case_node *case_node_ptr;
+START_TARGET_SPECIFIC
+
/* These are used by estimate_case_costs and balance_case_nodes. */
/* This must be a signed type, and non-ANSI compilers lack signed char. */
@@ -3241,3 +3244,4 @@ emit_case_nodes (rtx index, case_node_ptr node, rtx default_label,
}
}
}
+END_TARGET_SPECIFIC
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 6f08d8cdf97..e203a517b91 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -41,6 +41,9 @@ along with GCC; see the file COPYING3. If not see
#include "tree-inline.h"
#include "tree-dump.h"
#include "gimple.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Data type for the expressions representing sizes of data types.
It is the first integer type laid out. */
@@ -2522,3 +2525,5 @@ get_mode_bounds (enum machine_mode mode, int sign,
}
#include "gt-stor-layout.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/store-motion.c b/gcc/store-motion.c
index 97638619bb4..9c0b96bc543 100644
--- a/gcc/store-motion.c
+++ b/gcc/store-motion.c
@@ -45,6 +45,7 @@ along with GCC; see the file COPYING3. If not see
#include "hashtab.h"
#include "df.h"
#include "dbgcnt.h"
+#include "multi-target.h"
/* This pass implements downward store motion.
As of May 1, 2009, the pass is not enabled by default on any target,
@@ -90,6 +91,8 @@ struct st_expr
rtx reaching_reg;
};
+START_TARGET_SPECIFIC
+
/* Head of the list of load/store memory refs. */
static struct st_expr * store_motion_mems = NULL;
@@ -1263,3 +1266,4 @@ struct rtl_opt_pass pass_rtl_store_motion =
}
};
+END_TARGET_SPECIFIC
diff --git a/gcc/target-def.h b/gcc/target-def.h
index 0fe5d1339d4..5cb70de9f62 100644
--- a/gcc/target-def.h
+++ b/gcc/target-def.h
@@ -30,6 +30,8 @@
rather than the .c file, then we need to wrap the default
definition in a #ifndef, since files include tm.h before this one. */
+/* TARGET_NAME is defined by the Makefile. */
+
/* Assembler output. */
#ifndef TARGET_ASM_OPEN_PAREN
#define TARGET_ASM_OPEN_PAREN "("
@@ -893,6 +895,10 @@
#define TARGET_CAN_INLINE_P default_target_can_inline_p
#endif
+#ifndef TARGET_OVERRIDE_OPTIONS
+#define TARGET_OVERRIDE_OPTIONS default_override_options
+#endif
+
#define TARGET_OPTION_HOOKS \
{ \
TARGET_OPTION_VALID_ATTRIBUTE_P, \
@@ -901,11 +907,13 @@
TARGET_OPTION_PRINT, \
TARGET_OPTION_PRAGMA_PARSE, \
TARGET_CAN_INLINE_P, \
+ TARGET_OVERRIDE_OPTIONS, \
}
/* The whole shebang. */
#define TARGET_INITIALIZER \
{ \
+ TARGET_NAME, \
TARGET_ASM_OUT, \
TARGET_SCHED, \
TARGET_VECTORIZE, \
diff --git a/gcc/target.h b/gcc/target.h
index ae3b352342f..2bf946b003b 100644
--- a/gcc/target.h
+++ b/gcc/target.h
@@ -51,6 +51,7 @@
#include "tm.h"
#include "insn-modes.h"
+#include "multi-target.h"
/* Types used by the record_gcc_switches() target function. */
typedef enum
@@ -109,8 +110,16 @@ struct asm_int_op
/* The target structure. This holds all the backend hooks. */
+/* ??? the use of the target vector makes it necessary to cast
+ target-specific enums from/to int, since we expose the function
+ signatures of target specific hooks that operate e.g. on enum reg_class
+ to target-independent passes. */
struct gcc_target
{
+ /* For multi-targeted configurations, the name to be used to describe
+ this target for options, attributes and error messages. */
+ const char *name;
+
/* Functions that output assembler for the target. */
struct asm_out
{
@@ -622,7 +631,7 @@ struct gcc_target
/* Return a register class for which branch target register
optimizations should be applied. */
- enum reg_class (* branch_target_register_class) (void);
+ int /*enum reg_class*/ (* branch_target_register_class) (void);
/* Return true if branch target register optimizations should include
callee-saved registers that are not already live during the current
@@ -1016,10 +1025,10 @@ struct gcc_target
tree (*convert_to_type) (tree type, tree expr);
/* Return the array of IRA cover classes for the current target. */
- const enum reg_class *(*ira_cover_classes) (void);
+ const int /*enum reg_class*/ *(*ira_cover_classes) (void);
/* Return the class for a secondary reload, and fill in extra information. */
- enum reg_class (*secondary_reload) (bool, rtx, enum reg_class,
+ int /*enum reg_class*/ (*secondary_reload) (bool, rtx, int /*enum reg_class*/,
enum machine_mode,
secondary_reload_info *);
@@ -1160,6 +1169,16 @@ struct gcc_target
/* Function to determine if one function can inline another function. */
bool (*can_inline_p) (tree, tree);
+
+ /* Do option overrides for the target. Only if main_taget is true are
+ global options like flag_pic or flag_finite_math_only allowed to be
+ tampered with. Return true if code can be genarated for this target
+ (e.g. if flag_pic is set and main_taget is false, and the target can't
+ return pic code, return false.) */
+ /* ??? should add another hook elsewhere if code can sometimes be
+ generated, depending on the tree in question. E.g. might be able to
+ do pic if no statically allocated data is involved. */
+ bool (*override) (bool main_target);
} target_option;
/* For targets that need to mark extra registers as live on entry to
@@ -1215,7 +1234,20 @@ struct gcc_target
/* Leave the boolean fields at the end. */
};
-extern struct gcc_target targetm;
+/* *targetm_pnt is the target for the current compilation
+ (e.g. of one function); this_targetm is the target of the current namespace;
+ targetm_array is a zero-terminated array of all targets.
+ In most files, targetm is the same as *targetm_pnt, except in <tyarget>.c,
+ where it is this_targetm. */
+extern struct gcc_target *targetm_pnt, *targetm_array[];
+#ifndef targetm
+#define targetm (*targetm_pnt)
+#endif
+
+START_TARGET_SPECIFIC
+extern struct gcc_target this_targetm;
+END_TARGET_SPECIFIC
+EXTRA_TARGETS_DECL(struct gcc_target this_targetm);
struct gcc_targetcm {
/* Handle target switch CODE (an OPT_* value). ARG is the argument
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index d619ae53c3e..1addb0ddf3c 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -66,7 +66,9 @@ along with GCC; see the file COPYING3. If not see
#include "reload.h"
#include "optabs.h"
#include "recog.h"
+#include "multi-target.h"
+START_TARGET_SPECIFIC
bool
default_legitimate_address_p (enum machine_mode mode ATTRIBUTE_UNUSED,
@@ -134,6 +136,7 @@ default_promote_function_mode_always_promote (const_tree type,
return promote_mode (type, mode, punsignedp);
}
+#ifndef EXTRA_TARGET
enum machine_mode
default_cc_modes_compatible (enum machine_mode m1, enum machine_mode m2)
@@ -164,6 +167,10 @@ default_expand_builtin_saveregs (void)
return const0_rtx;
}
+#endif /* !EXTRA_TARGET */
+
+/* Because the type in CUMULATIVE_ARGS varies across targets, the name
+ mangling will vary. In principle even the argument passing might vary. */
void
default_setup_incoming_varargs (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
enum machine_mode mode ATTRIBUTE_UNUSED,
@@ -173,6 +180,8 @@ default_setup_incoming_varargs (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
{
}
+#ifndef EXTRA_TARGET
+
/* The default implementation of TARGET_BUILTIN_SETJMP_FRAME_VALUE. */
rtx
@@ -181,6 +190,8 @@ default_builtin_setjmp_frame_value (void)
return virtual_stack_vars_rtx;
}
+#endif /* !EXTRA_TARGET */
+
/* Generic hook that takes a CUMULATIVE_ARGS pointer and returns false. */
bool
@@ -196,12 +207,16 @@ default_pretend_outgoing_varargs_named (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED)
!= default_setup_incoming_varargs);
}
+#ifndef EXTRA_TARGET
+
enum machine_mode
default_eh_return_filter_mode (void)
{
return targetm.unwind_word_mode ();
}
+#endif /* !EXTRA_TARGET */
+
enum machine_mode
default_libgcc_cmp_return_mode (void)
{
@@ -236,6 +251,8 @@ default_min_divisions_for_recip_mul (enum machine_mode mode ATTRIBUTE_UNUSED)
return have_insn_for (DIV, mode) ? 3 : 2;
}
+#ifndef EXTRA_TARGET
+
/* The default implementation of TARGET_MODE_REP_EXTENDED. */
int
@@ -245,6 +262,8 @@ default_mode_rep_extended (enum machine_mode mode ATTRIBUTE_UNUSED,
return UNKNOWN;
}
+#endif /* !EXTRA_TARGET */
+
/* Generic hook that takes a CUMULATIVE_ARGS pointer and returns true. */
bool
@@ -253,6 +272,8 @@ hook_bool_CUMULATIVE_ARGS_true (CUMULATIVE_ARGS * a ATTRIBUTE_UNUSED)
return true;
}
+#ifndef EXTRA_TARGET
+
/* Return machine mode for non-standard suffix
or VOIDmode if non-standard suffixes are unsupported. */
enum machine_mode
@@ -268,6 +289,7 @@ default_cxx_guard_type (void)
return long_long_integer_type_node;
}
+#endif /* !EXTRA_TARGET */
/* Returns the size of the cookie to use when allocating an array
whose elements have the indicated TYPE. Assumes that it is already
@@ -315,6 +337,8 @@ hook_callee_copies_named (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
return named;
}
+#ifndef EXTRA_TARGET
+
/* Emit any directives required to unwind this instruction. */
void
@@ -325,6 +349,8 @@ default_unwind_emit (FILE * stream ATTRIBUTE_UNUSED,
gcc_unreachable ();
}
+#endif /* !EXTRA_TARGET */
+
/* True if MODE is valid for the target. By "valid", we mean able to
be manipulated in non-trivial ways. In particular, this means all
the arithmetic is supported.
@@ -394,6 +420,8 @@ default_fixed_point_supported_p (void)
return ENABLE_FIXED_POINT;
}
+#ifndef EXTRA_TARGET
+
/* NULL if INSN insn is valid within a low-overhead loop, otherwise returns
an error message.
@@ -445,6 +473,8 @@ default_builtin_reciprocal (unsigned int fn ATTRIBUTE_UNUSED,
return NULL_TREE;
}
+#endif /* !EXTRA_TARGET */
+
bool
hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false (
CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
@@ -472,6 +502,8 @@ hook_int_CUMULATIVE_ARGS_mode_tree_bool_0 (
return 0;
}
+#ifndef EXTRA_TARGET
+
void
hook_void_bitmap (bitmap regs ATTRIBUTE_UNUSED)
{
@@ -544,6 +576,8 @@ default_external_stack_protect_fail (void)
return build_call_expr (t, 0);
}
+#endif /* !EXTRA_TARGET */
+
tree
default_hidden_stack_protect_fail (void)
{
@@ -578,12 +612,14 @@ default_hidden_stack_protect_fail (void)
#endif
}
+#ifndef EXTRA_TARGET
bool
hook_bool_const_rtx_commutative_p (const_rtx x,
int outer_code ATTRIBUTE_UNUSED)
{
return COMMUTATIVE_P (x);
}
+#endif /* !EXTRA_TARGET */
rtx
default_function_value (const_tree ret_type ATTRIBUTE_UNUSED,
@@ -664,6 +700,7 @@ default_static_chain (const_tree fndecl, bool incoming_p)
}
}
+#ifndef EXTRA_TARGET
void
default_trampoline_init (rtx ARG_UNUSED (m_tramp), tree ARG_UNUSED (t_func),
rtx ARG_UNUSED (r_chain))
@@ -671,33 +708,35 @@ default_trampoline_init (rtx ARG_UNUSED (m_tramp), tree ARG_UNUSED (t_func),
sorry ("nested function trampolines not supported on this target");
}
-enum reg_class
+int /*enum reg_class*/
default_branch_target_register_class (void)
{
- return NO_REGS;
+ return (int) NO_REGS;
}
+#endif /* !EXTRA_TARGET */
#ifdef IRA_COVER_CLASSES
-const enum reg_class *
+const int /*enum reg_class*/ *
default_ira_cover_classes (void)
{
- static enum reg_class classes[] = IRA_COVER_CLASSES;
+ static int /*enum reg_class*/ classes[] = IRA_COVER_CLASSES;
return classes;
}
#endif
-enum reg_class
+int /*enum reg_class*/
default_secondary_reload (bool in_p ATTRIBUTE_UNUSED, rtx x ATTRIBUTE_UNUSED,
- enum reg_class reload_class ATTRIBUTE_UNUSED,
+ int /*enum reg_class*/ reload_class_i,
enum machine_mode reload_mode ATTRIBUTE_UNUSED,
secondary_reload_info *sri)
{
enum reg_class rclass = NO_REGS;
+ enum reg_class reload_class = (enum reg_class) reload_class_i;
if (sri->prev_sri && sri->prev_sri->t_icode != CODE_FOR_nothing)
{
sri->icode = sri->prev_sri->t_icode;
- return NO_REGS;
+ return (int) NO_REGS;
}
#ifdef SECONDARY_INPUT_RELOAD_CLASS
if (in_p)
@@ -771,10 +810,24 @@ default_secondary_reload (bool in_p ATTRIBUTE_UNUSED, rtx x ATTRIBUTE_UNUSED,
else
sri->t_icode = icode;
}
- return rclass;
+ return (int) rclass;
}
bool
+default_override_options (bool main_target ATTRIBUTE_UNUSED)
+{
+#ifdef OVERRIDE_OPTIONS
+ if (!main_target)
+ internal_error ("Must override TARGET_OVERRIDE_OPTIONS for %s",
+ this_targetm.name);
+ OVERRIDE_OPTIONS;
+#endif
+ return true;
+}
+
+#ifndef EXTRA_TARGET
+
+bool
default_handle_c_option (size_t code ATTRIBUTE_UNUSED,
const char *arg ATTRIBUTE_UNUSED,
int value ATTRIBUTE_UNUSED)
@@ -985,6 +1038,8 @@ default_target_can_inline_p (tree caller, tree callee)
return ret;
}
+#endif /* !EXTRA_TARGET */
+
#ifndef HAVE_casesi
# define HAVE_casesi 0
#endif
@@ -1009,3 +1064,5 @@ default_have_conditional_execution (void)
}
#include "gt-targhooks.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/targhooks.h b/gcc/targhooks.h
index 631bdf216df..74c985af1fb 100644
--- a/gcc/targhooks.h
+++ b/gcc/targhooks.h
@@ -18,16 +18,21 @@ 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 "multi-target.h"
+
+extern rtx default_legitimize_address (rtx, rtx, enum machine_mode);
+START_TARGET_SPECIFIC
extern bool default_legitimate_address_p (enum machine_mode, rtx, bool);
extern void default_external_libcall (rtx);
-extern rtx default_legitimize_address (rtx, rtx, enum machine_mode);
extern int default_unspec_may_trap_p (const_rtx, unsigned);
+
extern enum machine_mode default_promote_function_mode (const_tree, enum machine_mode,
int *, const_tree, int);
extern enum machine_mode default_promote_function_mode_always_promote
(const_tree, enum machine_mode, int *, const_tree, int);
+END_TARGET_SPECIFIC
extern enum machine_mode default_cc_modes_compatible (enum machine_mode,
enum machine_mode);
@@ -35,38 +40,50 @@ extern enum machine_mode default_cc_modes_compatible (enum machine_mode,
extern bool default_return_in_memory (const_tree, const_tree);
extern rtx default_expand_builtin_saveregs (void);
+START_TARGET_SPECIFIC
extern void default_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode, tree, int *, int);
+END_TARGET_SPECIFIC
extern rtx default_builtin_setjmp_frame_value (void);
+START_TARGET_SPECIFIC
extern bool default_pretend_outgoing_varargs_named (CUMULATIVE_ARGS *);
+END_TARGET_SPECIFIC
extern enum machine_mode default_eh_return_filter_mode (void);
+START_TARGET_SPECIFIC
extern enum machine_mode default_libgcc_cmp_return_mode (void);
extern enum machine_mode default_libgcc_shift_count_mode (void);
extern enum machine_mode default_unwind_word_mode (void);
extern unsigned HOST_WIDE_INT default_shift_truncation_mask
(enum machine_mode);
extern unsigned int default_min_divisions_for_recip_mul (enum machine_mode);
+END_TARGET_SPECIFIC
extern int default_mode_rep_extended (enum machine_mode, enum machine_mode);
extern tree default_stack_protect_guard (void);
extern tree default_external_stack_protect_fail (void);
+START_TARGET_SPECIFIC
extern tree default_hidden_stack_protect_fail (void);
+END_TARGET_SPECIFIC
extern enum machine_mode default_mode_for_suffix (char);
extern tree default_cxx_guard_type (void);
+START_TARGET_SPECIFIC
extern tree default_cxx_get_cookie_size (tree);
extern bool hook_pass_by_reference_must_pass_in_stack
(CUMULATIVE_ARGS *, enum machine_mode mode, const_tree, bool);
extern bool hook_callee_copies_named
(CUMULATIVE_ARGS *ca, enum machine_mode, const_tree, bool);
+END_TARGET_SPECIFIC
extern void default_unwind_emit (FILE *, rtx);
+START_TARGET_SPECIFIC
extern bool default_scalar_mode_supported_p (enum machine_mode);
extern bool default_decimal_float_supported_p (void);
extern bool default_fixed_point_supported_p (void);
+END_TARGET_SPECIFIC
extern const char * default_invalid_within_doloop (const_rtx);
@@ -85,6 +102,7 @@ default_builtin_support_vector_misalignment (enum machine_mode mode,
/* These are here, and not in hooks.[ch], because not all users of
hooks.h include tm.h, and thus we don't have CUMULATIVE_ARGS. */
+START_TARGET_SPECIFIC
extern bool hook_bool_CUMULATIVE_ARGS_false (CUMULATIVE_ARGS *);
extern bool hook_bool_CUMULATIVE_ARGS_true (CUMULATIVE_ARGS *);
@@ -97,18 +115,22 @@ extern int hook_int_CUMULATIVE_ARGS_mode_tree_bool_0
extern const char *hook_invalid_arg_for_unprototyped_fn
(const_tree, const_tree, const_tree);
extern bool hook_bool_const_rtx_commutative_p (const_rtx, int);
+extern void default_trampoline_init (rtx, tree, rtx);
+START_TARGET_SPECIFIC
extern rtx default_function_value (const_tree, const_tree, bool);
extern rtx default_libcall_value (enum machine_mode, const_rtx);
extern rtx default_internal_arg_pointer (void);
extern rtx default_static_chain (const_tree, bool);
-extern void default_trampoline_init (rtx, tree, rtx);
-extern enum reg_class default_branch_target_register_class (void);
+extern int /*enum reg_class*/ default_branch_target_register_class (void);
#ifdef IRA_COVER_CLASSES
-extern const enum reg_class *default_ira_cover_classes (void);
+extern const int /*enum reg_class*/ *default_ira_cover_classes (void);
#endif
-extern enum reg_class default_secondary_reload (bool, rtx, enum reg_class,
+extern int /*enum reg_class*/ default_secondary_reload (bool, rtx,
+ int */enum reg_class*/,
enum machine_mode,
secondary_reload_info *);
+extern bool default_override_options (bool);
+END_TARGET_SPECIFIC
extern void hook_void_bitmap (bitmap);
extern bool default_handle_c_option (size_t, const char *, int);
extern int default_reloc_rw_mask (void);
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 402ad826f87..9e8da3a8a65 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -86,6 +86,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple.h"
#include "tree-ssa-alias.h"
#include "plugin.h"
+#include "multi-target.h"
#if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
#include "dwarf2out.h"
@@ -104,17 +105,23 @@ along with GCC; see the file COPYING3. If not see
declarations for e.g. AIX 4.x. */
#endif
-static void general_init (const char *);
-static void do_compile (void);
-static void process_options (void);
-static void backend_init (void);
-static int lang_dependent_init (const char *);
+START_TARGET_SPECIFIC
+
+void process_options (void);
+EXTRA_TARGETS_DECL (void process_options (void));
+void backend_init (void);
+int lang_dependent_init (const char *);
static void init_asm_output (const char *);
static void finalize (void);
+#ifndef EXTRA_TARGET
+static void general_init (const char *);
+static void do_compile (void);
+
static void crash_signal (int) ATTRIBUTE_NORETURN;
static void setup_core_dumping (void);
static void compile_file (void);
+#endif /* !EXTRA_TARGET */
/* Nonzero to dump debug info whilst parsing (-dy option). */
static int set_yydebug;
@@ -163,6 +170,15 @@ const char *aux_base_name;
/* Prefix for profile data files */
const char *profile_data_prefix;
+#ifndef EXTRA_TARGET
+/* An array of target vector pointers for all configured targets. */
+struct gcc_target *targetm_array[NUM_TARGETS + 1]
+ = { &this_targetm, EXTRA_TARGETS_EXPAND_COMMA (&,this_targetm) 0};
+
+/* A pointer to the current target vector. */
+struct gcc_target *targetm_pnt = &this_targetm;
+#endif /* !EXTRA_TARGET */
+
/* A mask of target_flags that includes bit X if X was set or cleared
on the command line. */
@@ -372,6 +388,8 @@ int align_labels_log;
int align_labels_max_skip;
int align_functions_log;
+#ifndef EXTRA_TARGET
+
typedef struct
{
const char *const string;
@@ -383,6 +401,8 @@ lang_independent_options;
/* Nonzero if subexpressions must be evaluated from left-to-right. */
int flag_evaluation_order = 0;
+#endif /* !EXTRA_TARGET */
+
/* The user symbol prefix after having resolved same. */
const char *user_label_prefix;
@@ -397,11 +417,15 @@ static const param_info lang_independent_params[] = {
/* Output files for assembler code (real compiler output)
and debugging dumps. */
+#ifndef EXTRA_TARGET
FILE *asm_out_file;
+#endif /* !EXTRA_TARGET */
FILE *aux_info_file;
FILE *dump_file = NULL;
const char *dump_file_name;
+#ifndef EXTRA_TARGET
+
/* The current working directory of a translation. It's generally the
directory from which compilation was initiated, but a preprocessed
file may specify the original directory in which it was
@@ -497,7 +521,7 @@ init_local_tick (void)
/* Set up a default flag_random_seed and local_tick, unless the user
already specified one. Must be called after init_local_tick. */
-static void
+void
init_random_seed (void)
{
unsigned HOST_WIDE_INT value;
@@ -671,6 +695,8 @@ strip_off_ending (char *name, int len)
}
}
+#endif /* !EXTRA_TARGET */
+
/* Output a quoted string. */
void
@@ -730,6 +756,8 @@ output_file_directive (FILE *asm_file, const char *input_name)
#endif
}
+#ifndef EXTRA_TARGET
+
/* A subroutine of wrapup_global_declarations. We've come to the end of
the compilation unit. All deferred variables should be undeferred,
and all incomplete decls should be finalized. */
@@ -1272,6 +1300,8 @@ print_version (FILE *file, const char *indent)
print_plugins_versions (file, indent);
}
+#endif /* !EXTRA_TARGET */
+
#ifdef ASM_COMMENT_START
static int
print_to_asm_out_file (print_switch_type type, const char * text)
@@ -1666,8 +1696,9 @@ realloc_for_line_map (void *ptr, size_t len)
options are parsed. Signal handlers, internationalization etc.
ARGV0 is main's argv[0]. */
static void
-general_init (const char *argv0)
+general_init (const char *argv0 ATTRIBUTE_UNUSED)
{
+#ifndef EXTRA_TARGET
const char *p;
p = argv0 + strlen (argv0);
@@ -1722,6 +1753,7 @@ general_init (const char *argv0)
linemap_init (line_table);
line_table->reallocator = realloc_for_line_map;
init_ttree ();
+#endif /* !EXTRA_TARGET */
/* Initialize register usage now so switches may override. */
init_reg_sets ();
@@ -1778,50 +1810,61 @@ init_alignments (void)
static void
process_options (void)
{
+ bool main_target = false;
+
+#ifndef EXTRA_TARGET
+ main_target = true;
+#endif
+
/* Just in case lang_hooks.post_options ends up calling a debug_hook.
This can happen with incorrect pre-processed input. */
debug_hooks = &do_nothing_debug_hooks;
- /* This replaces set_Wunused. */
- if (warn_unused_function == -1)
- warn_unused_function = warn_unused;
- if (warn_unused_label == -1)
- warn_unused_label = warn_unused;
- /* Wunused-parameter is enabled if both -Wunused -Wextra are enabled. */
- if (warn_unused_parameter == -1)
- warn_unused_parameter = (warn_unused && extra_warnings);
- if (warn_unused_variable == -1)
- warn_unused_variable = warn_unused;
- if (warn_unused_value == -1)
- warn_unused_value = warn_unused;
-
- /* This replaces set_Wextra. */
- if (warn_uninitialized == -1)
- warn_uninitialized = extra_warnings;
-
- /* Allow the front end to perform consistency checks and do further
- initialization based on the command line options. This hook also
- sets the original filename if appropriate (e.g. foo.i -> foo.c)
- so we can correctly initialize debug output. */
- no_backend = lang_hooks.post_options (&main_input_filename);
-
-#ifdef OVERRIDE_OPTIONS
+ if (main_target)
+ {
+ /* This replaces set_Wunused. */
+ if (warn_unused_function == -1)
+ warn_unused_function = warn_unused;
+ if (warn_unused_label == -1)
+ warn_unused_label = warn_unused;
+ /* Wunused-parameter is enabled if both -Wunused -Wextra are enabled. */
+ if (warn_unused_parameter == -1)
+ warn_unused_parameter = (warn_unused && extra_warnings);
+ if (warn_unused_variable == -1)
+ warn_unused_variable = warn_unused;
+ if (warn_unused_value == -1)
+ warn_unused_value = warn_unused;
+
+ /* This replaces set_Wextra. */
+ if (warn_uninitialized == -1)
+ warn_uninitialized = extra_warnings;
+
+ /* Allow the front end to perform consistency checks and do further
+ initialization based on the command line options. This hook also
+ sets the original filename if appropriate (e.g. foo.i -> foo.c)
+ so we can correctly initialize debug output. */
+ no_backend = lang_hooks.post_options (&main_input_filename);
+ }
+
/* Some machines may reject certain combinations of options. */
- OVERRIDE_OPTIONS;
-#endif
+ this_targetm.target_option.override (main_target);
- if (flag_section_anchors && !target_supports_section_anchors_p ())
+ /* ??? Should we punt on section anchors if any of the extra targets
+ doesn't support section anchors, or punt on migrating code that uses
+ a section anchor to an extra target which doesn't support them? */
+ if (main_target
+ && flag_section_anchors && !target_supports_section_anchors_p ())
{
warning (OPT_fsection_anchors,
"this target does not support %qs", "-fsection-anchors");
flag_section_anchors = 0;
}
- if (flag_short_enums == 2)
+ if (main_target && flag_short_enums == 2)
flag_short_enums = targetm.default_short_enums ();
/* Set aux_base_name if not already set. */
- if (aux_base_name)
+ if (!main_target || aux_base_name)
;
else if (main_input_filename)
{
@@ -1833,7 +1876,7 @@ process_options (void)
else
aux_base_name = "gccaux";
-#ifndef HAVE_cloog
+#if !defined (HAVE_cloog) && !defined (EXTRA_TARGET)
if (flag_graphite
|| flag_loop_block
|| flag_loop_interchange
@@ -1845,28 +1888,30 @@ process_options (void)
/* Unrolling all loops implies that standard loop unrolling must also
be done. */
- if (flag_unroll_all_loops)
+ if (main_target && flag_unroll_all_loops)
flag_unroll_loops = 1;
/* The loop unrolling code assumes that cse will be run after loop.
web and rename-registers also help when run after loop unrolling. */
- if (flag_rerun_cse_after_loop == AUTODETECT_VALUE)
+ if (main_target && flag_rerun_cse_after_loop == AUTODETECT_VALUE)
flag_rerun_cse_after_loop = flag_unroll_loops || flag_peel_loops;
- if (flag_web == AUTODETECT_VALUE)
+ if (main_target && flag_web == AUTODETECT_VALUE)
flag_web = flag_unroll_loops || flag_peel_loops;
if (flag_rename_registers == AUTODETECT_VALUE)
flag_rename_registers = flag_unroll_loops || flag_peel_loops;
- if (flag_non_call_exceptions)
+ if (main_target && flag_non_call_exceptions)
flag_asynchronous_unwind_tables = 1;
- if (flag_asynchronous_unwind_tables)
+ if (main_target && flag_asynchronous_unwind_tables)
flag_unwind_tables = 1;
- if (flag_value_profile_transformations)
+ if (main_target && flag_value_profile_transformations)
flag_profile_values = 1;
+ /* ??? Should we warn about these if some, but not all targets support the
+ option? */
/* Warn about options that are not supported on this machine. */
#ifndef INSN_SCHEDULING
if (flag_schedule_insns || flag_schedule_insns_after_reload)
@@ -2021,10 +2066,10 @@ process_options (void)
/* If the user specifically requested variable tracking with tagging
uninitialized variables, we need to turn on variable tracking.
(We already determined above that variable tracking is feasible.) */
- if (flag_var_tracking_uninit)
+ if (main_target && flag_var_tracking_uninit)
flag_var_tracking = 1;
- if (flag_var_tracking == AUTODETECT_VALUE)
+ if (main_target && flag_var_tracking == AUTODETECT_VALUE)
flag_var_tracking = optimize >= 1;
if (flag_var_tracking_assignments == AUTODETECT_VALUE)
@@ -2041,7 +2086,7 @@ process_options (void)
&& (flag_selective_scheduling || flag_selective_scheduling2))
warning (0, "var-tracking-assignments changes selective scheduling");
- if (flag_tree_cselim == AUTODETECT_VALUE)
+ if (main_target && flag_tree_cselim == AUTODETECT_VALUE)
#ifdef HAVE_conditional_move
flag_tree_cselim = 1;
#else
@@ -2051,7 +2096,7 @@ process_options (void)
/* If auxiliary info generation is desired, open the output file.
This goes in the same directory as the source file--unlike
all the other output files. */
- if (flag_gen_aux_info)
+ if (main_target && flag_gen_aux_info)
{
aux_info_file = fopen (aux_info_file_name, "w");
if (aux_info_file == 0)
@@ -2078,14 +2123,18 @@ process_options (void)
flag_function_sections = 0;
}
+/* The main target needs to have at least a dummy prefetch pattern for this to
+ work, since the decision to insert prefectches is done at the tree level;
+ the expander might emit nothing if there is nothing to do for the
+ particular target. */
#ifndef HAVE_prefetch
- if (flag_prefetch_loop_arrays)
+ if (main_target && flag_prefetch_loop_arrays)
{
warning (0, "-fprefetch-loop-arrays not supported for this target");
flag_prefetch_loop_arrays = 0;
}
#else
- if (flag_prefetch_loop_arrays && !HAVE_prefetch)
+ if (main_target && flag_prefetch_loop_arrays && !HAVE_prefetch)
{
warning (0, "-fprefetch-loop-arrays not supported for this target (try -march switches)");
flag_prefetch_loop_arrays = 0;
@@ -2094,29 +2143,30 @@ process_options (void)
/* This combination of options isn't handled for i386 targets and doesn't
make much sense anyway, so don't allow it. */
- if (flag_prefetch_loop_arrays && optimize_size)
+ if (main_target && flag_prefetch_loop_arrays && optimize_size)
{
warning (0, "-fprefetch-loop-arrays is not supported with -Os");
flag_prefetch_loop_arrays = 0;
}
/* The presence of IEEE signaling NaNs, implies all math can trap. */
- if (flag_signaling_nans)
+ if (main_target && flag_signaling_nans)
flag_trapping_math = 1;
/* We cannot reassociate if we want traps or signed zeros. */
- if (flag_associative_math && (flag_trapping_math || flag_signed_zeros))
+ if (main_target && flag_associative_math
+ && (flag_trapping_math || flag_signed_zeros))
{
warning (0, "-fassociative-math disabled; other options take precedence");
flag_associative_math = 0;
}
/* With -fcx-limited-range, we do cheap and quick complex arithmetic. */
- if (flag_cx_limited_range)
+ if (main_target && flag_cx_limited_range)
flag_complex_method = 0;
/* With -fcx-fortran-rules, we do something in-between cheap and C99. */
- if (flag_cx_fortran_rules)
+ if (main_target && flag_cx_fortran_rules)
flag_complex_method = 1;
/* Targets must be able to place spill slots at lower addresses. If the
@@ -2145,7 +2195,7 @@ process_options (void)
/* This function can be called multiple times to reinitialize the compiler
back end when register classes or instruction sets have changed,
before each function. */
-static void
+void
backend_init_target (void)
{
/* Initialize alignment variables. */
@@ -2184,13 +2234,16 @@ backend_init_target (void)
expand_dummy_function_end ();
}
+EXTRA_TARGETS_DECL (void backend_init (void));
/* Initialize the compiler back end. This function is called only once,
when starting the compiler. */
-static void
+void
backend_init (void)
{
init_emit_once ();
+ EXTRA_TARGETS_CALL (backend_init ());
+
init_rtlanal ();
init_inline_once ();
init_varasm_once ();
@@ -2240,7 +2293,7 @@ init_excess_precision (void)
/* Initialize things that are both lang-dependent and target-dependent.
This function can be called more than once if target parameters change. */
-static void
+void
lang_dependent_init_target (void)
{
/* This determines excess precision settings. */
@@ -2266,10 +2319,13 @@ lang_dependent_init_target (void)
expand_dummy_function_end ();
}
+EXTRA_TARGETS_DECL (int lang_dependent_init (const char *));
+
/* Language-dependent initialization. Returns nonzero on success. */
-static int
+int
lang_dependent_init (const char *name)
{
+#ifndef EXTRA_TARGET
location_t save_loc = input_location;
if (dump_base_name == 0)
dump_base_name = name && name[0] ? name : "gccdump";
@@ -2279,8 +2335,10 @@ lang_dependent_init (const char *name)
if (lang_hooks.init () == 0)
return 0;
input_location = save_loc;
+ EXTRA_TARGETS_CALL (lang_dependent_init (name));
init_asm_output (name);
+#endif /* !EXTRA_TARGET */
/* This creates various _DECL nodes, so needs to be called after the
front end is initialized. */
@@ -2307,12 +2365,15 @@ lang_dependent_init (const char *name)
return 1;
}
+EXTRA_TARGETS_DECL (void target_reinit (void));
/* Reinitialize everything when target parameters, such as register usage,
have changed. */
void
target_reinit (void)
{
+ EXTRA_TARGETS_CALL (target_reinit ());
+
/* Reinitialize RTL backend. */
backend_init_target ();
@@ -2376,6 +2437,8 @@ finalize (void)
lang_hooks.finish ();
}
+#ifndef EXTRA_TARGET
+
/* Initialize the compiler, and compile the input file. */
static void
do_compile (void)
@@ -2387,6 +2450,7 @@ do_compile (void)
timevar_start (TV_TOTAL);
process_options ();
+ EXTRA_TARGETS_CALL (process_options ());
/* Don't do any more if an error has already occurred. */
if (!errorcount)
@@ -2458,3 +2522,7 @@ toplev_main (int argc, char **argv)
return (SUCCESS_EXIT_CODE);
}
+
+#endif /* !EXTRA_TARGET */
+
+END_TARGET_SPECIFIC
diff --git a/gcc/toplev.h b/gcc/toplev.h
index 983022eff69..c6e9fc37d6f 100644
--- a/gcc/toplev.h
+++ b/gcc/toplev.h
@@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see
#define GCC_TOPLEV_H
#include "input.h"
#include "bversion.h"
+#include "multi-target.h"
/* If non-NULL, return one past-the-end of the matching SUBPART of
the WHOLE string. */
@@ -88,10 +89,12 @@ extern void warning_for_asm (const_rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,
extern void warn_deprecated_use (tree, tree);
extern bool parse_optimize_options (tree, bool);
+START_TARGET_SPECIFIC
#ifdef BUFSIZ
extern void output_quoted_string (FILE *, const char *);
extern void output_file_directive (FILE *, const char *);
#endif
+END_TARGET_SPECIFIC
#ifdef BUFSIZ
/* N.B. Unlike all the others, fnotice is just gettext+fprintf, and
@@ -216,6 +219,7 @@ extern bool set_src_pwd (const char *);
/* Functions used to manipulate the random seed. */
+extern void init_random_seed (void);
extern const char *get_random_seed (bool);
extern const char *set_random_seed (const char *);
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h
index 383a164004c..36bda1f71ac 100644
--- a/gcc/tree-pass.h
+++ b/gcc/tree-pass.h
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#define GCC_TREE_PASS_H 1
#include "timevar.h"
+#include "multi-target.h"
/* Different tree dump places. When you add new tree dump places,
extend the DUMP_FILES array in tree-dump.c. */
@@ -164,6 +165,16 @@ struct rtl_opt_pass
struct opt_pass pass;
};
+#ifdef NUM_TARGETS
+/* Description of RTL pass which dispatches according to the target
+ architecure. */
+struct rtl_dispatch_pass
+{
+ struct opt_pass pass;
+ struct opt_pass *target_variants[NUM_TARGETS-1];
+};
+#endif
+
struct varpool_node;
struct cgraph_node;
struct cgraph_node_set_def;
@@ -237,12 +248,13 @@ struct dump_file_info
#define TODO_verify_ssa (1 << 2)
#define TODO_verify_flow (1 << 3)
#define TODO_verify_stmts (1 << 4)
-#define TODO_cleanup_cfg (1 << 5)
+#define TODO_cleanup_cfg (1 << 5)
#define TODO_verify_loops (1 << 6)
#define TODO_dump_cgraph (1 << 7)
#define TODO_remove_functions (1 << 8)
#define TODO_rebuild_frequencies (1 << 9)
-#define TODO_verify_rtl_sharing (1 << 10)
+#define TODO_verify_rtl_sharing (1 << 10)
+#define TODO_arch_dispatch (1 << 11)
/* To-do flags for calls to update_ssa. */
@@ -417,7 +429,9 @@ extern struct gimple_opt_pass pass_tree_ifcombine;
extern struct gimple_opt_pass pass_dse;
extern struct gimple_opt_pass pass_nrv;
extern struct gimple_opt_pass pass_rename_ssa_copies;
+START_TARGET_SPECIFIC
extern struct gimple_opt_pass pass_rest_of_compilation;
+END_TARGET_SPECIFIC
extern struct gimple_opt_pass pass_sink_code;
extern struct gimple_opt_pass pass_fre;
extern struct gimple_opt_pass pass_linear_transform;
@@ -460,7 +474,8 @@ extern struct gimple_opt_pass pass_cleanup_cfg_post_optimizing;
extern struct gimple_opt_pass pass_init_datastructures;
extern struct gimple_opt_pass pass_fixup_cfg;
-extern struct rtl_opt_pass pass_expand;
+START_TARGET_SPECIFIC
+extern struct rtl_dispatch_pass pass_expand;
extern struct rtl_opt_pass pass_init_function;
extern struct rtl_opt_pass pass_jump;
extern struct rtl_opt_pass pass_rtl_eh;
@@ -552,6 +567,7 @@ extern struct rtl_opt_pass pass_shorten_branches;
extern struct rtl_opt_pass pass_set_nothrow_function_flags;
extern struct rtl_opt_pass pass_final;
extern struct rtl_opt_pass pass_rtl_seqabstr;
+END_TARGET_SPECIFIC
extern struct gimple_opt_pass pass_release_ssa_names;
extern struct gimple_opt_pass pass_early_inline;
extern struct gimple_opt_pass pass_inline_parameters;
diff --git a/gcc/tree-scalar-evolution.h b/gcc/tree-scalar-evolution.h
index e09e19ae5f5..a7616503bc1 100644
--- a/gcc/tree-scalar-evolution.h
+++ b/gcc/tree-scalar-evolution.h
@@ -39,6 +39,7 @@ extern bool expression_expensive_p (tree);
extern bool simple_iv (struct loop *, struct loop *, tree, affine_iv *, bool);
extern tree compute_overall_effect_of_inner_loop (struct loop *, tree);
+#ifndef EXTRA_TARGET
/* Returns the basic block preceding LOOP or ENTRY_BLOCK_PTR when the
loop is function's body. */
@@ -66,5 +67,6 @@ get_chrec_loop (const_tree chrec)
{
return get_loop (CHREC_VARIABLE (chrec));
}
+#endif /* !EXTRA_TARGET */
#endif /* GCC_TREE_SCALAR_EVOLUTION_H */
diff --git a/gcc/tree.h b/gcc/tree.h
index f5827d59f89..1be33115ae3 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see
#include "double-int.h"
#include "alias.h"
#include "options.h"
+#include "multi-target.h"
/* Codes of tree nodes */
@@ -4026,11 +4027,13 @@ extern tree make_accum_type (int, int, int);
#define make_or_reuse_sat_unsigned_accum_type(P) \
make_or_reuse_accum_type (P, 1, 1)
+START_TARGET_SPECIFIC
/* From expmed.c. Since rtl.h is included after tree.h, we can't
put the prototype here. Rtl.h does declare the prototype if
tree.h had been included. */
extern tree make_tree (tree, rtx);
+END_TARGET_SPECIFIC
/* Return a type like TTYPE except that its TYPE_ATTRIBUTES
is ATTRIBUTE.
@@ -4176,6 +4179,7 @@ extern tree build_qualified_type (tree, int);
extern tree build_distinct_type_copy (tree);
extern tree build_variant_type_copy (tree);
+START_TARGET_SPECIFIC
/* Finish up a builtin RECORD_TYPE. Give it a name and provide its
fields. Optionally specify an alignment, and then lay it out. */
@@ -4187,6 +4191,7 @@ extern void finish_builtin_struct (tree, const char *,
node, does nothing except for the first time. */
extern void layout_type (tree);
+END_TARGET_SPECIFIC
/* These functions allow a front-end to perform a manual layout of a
RECORD_TYPE. (For instance, if the placement of subsequent fields
@@ -4223,6 +4228,7 @@ typedef struct record_layout_info_s
int packed_maybe_necessary;
} *record_layout_info;
+START_TARGET_SPECIFIC
extern record_layout_info start_record_layout (tree);
extern tree bit_from_pos (tree, tree);
extern tree byte_from_pos (tree, tree);
@@ -4234,6 +4240,7 @@ extern void normalize_rli (record_layout_info);
extern void place_field (record_layout_info, tree);
extern void compute_record_mode (tree);
extern void finish_record_layout (record_layout_info, int);
+END_TARGET_SPECIFIC
/* Given a hashcode and a ..._TYPE node (for which the hashcode was made),
return a canonicalized ..._TYPE node, so that duplicates are not made.
@@ -4242,6 +4249,7 @@ extern void finish_record_layout (record_layout_info, int);
extern tree type_hash_canon (unsigned int, tree);
+START_TARGET_SPECIFIC
/* Given a VAR_DECL, PARM_DECL, RESULT_DECL or FIELD_DECL node,
calculates the DECL_SIZE, DECL_SIZE_UNIT, DECL_ALIGN and DECL_MODE
fields. Call this only once for any given decl node.
@@ -4263,6 +4271,7 @@ extern void relayout_decl (tree);
mode_for_size, but is passed a tree. */
extern enum machine_mode mode_for_size_tree (const_tree, enum mode_class, int);
+END_TARGET_SPECIFIC
/* Return an expr equal to X but certainly not valid as an lvalue. */
@@ -4317,9 +4326,11 @@ extern tree size_diffop_loc (location_t, tree, tree);
extern tree round_up_loc (location_t, tree, int);
#define round_down(T,N) round_down_loc (UNKNOWN_LOCATION, T, N)
extern tree round_down_loc (location_t, tree, int);
+START_TARGET_SPECIFIC
extern tree get_pending_sizes (void);
extern void put_pending_size (tree);
extern void put_pending_sizes (tree);
+END_TARGET_SPECIFIC
extern void finalize_size_functions (void);
/* Type for sizes of data-type. */
@@ -4379,6 +4390,7 @@ extern tree ctor_to_list (tree);
extern VEC(tree,gc) *ctor_to_vec (tree);
+START_TARGET_SPECIFIC
/* Examine CTOR to discover:
* how many scalar fields are set to nonzero values,
and place it in *P_NZ_ELTS;
@@ -4392,6 +4404,7 @@ extern VEC(tree,gc) *ctor_to_vec (tree);
extern bool categorize_ctor_elements (const_tree, HOST_WIDE_INT *, HOST_WIDE_INT *,
bool *);
+END_TARGET_SPECIFIC
extern HOST_WIDE_INT count_type_elements (const_tree, bool);
@@ -4511,6 +4524,7 @@ extern tree substitute_placeholder_in_expr (tree, tree);
((EXP) == 0 || TREE_CONSTANT (EXP) ? (EXP) \
: substitute_placeholder_in_expr (EXP, OBJ))
+START_TARGET_SPECIFIC
/* variable_size (EXP) is like save_expr (EXP) except that it
is for the special case of something that is part of a
variable size for a data type. It makes special arrangements
@@ -4518,6 +4532,7 @@ extern tree substitute_placeholder_in_expr (tree, tree);
belongs to a function parameter. */
extern tree variable_size (tree);
+END_TARGET_SPECIFIC
/* stabilize_reference (EXP) returns a reference equivalent to EXP
but it can be used multiple times
@@ -4566,6 +4581,7 @@ handled_component_p (const_tree t)
}
}
+START_TARGET_SPECIFIC
/* Given an expression EXP that is a handled_component_p,
look for the ultimate containing object, which is returned and specify
the access position and size. */
@@ -4573,6 +4589,7 @@ handled_component_p (const_tree t)
extern tree get_inner_reference (tree, HOST_WIDE_INT *, HOST_WIDE_INT *,
tree *, enum machine_mode *, int *, int *,
bool);
+END_TARGET_SPECIFIC
/* Given an expression EXP that may be a COMPONENT_REF, an ARRAY_REF or an
ARRAY_RANGE_REF, look for whether EXP or any nested component-refs within
@@ -4727,6 +4744,7 @@ extern void change_decl_assembler_name (tree, tree);
/* In gimplify.c */
extern tree unshare_expr (tree);
+START_TARGET_SPECIFIC
/* In stmt.c */
extern void expand_expr_stmt (tree);
@@ -4737,6 +4755,7 @@ extern void expand_goto (tree);
extern rtx expand_stack_save (void);
extern void expand_stack_restore (tree);
extern void expand_return (tree);
+END_TARGET_SPECIFIC
/* In tree-eh.c */
extern void using_eh_for_cleanups (void);
@@ -4923,6 +4942,7 @@ truth_value_p (enum tree_code code)
}
+START_TARGET_SPECIFIC
/* In builtins.c */
extern tree fold_call_expr (location_t, tree, bool);
extern tree fold_builtin_fputs (location_t, tree, tree, bool, bool, tree);
@@ -4955,11 +4975,14 @@ extern bool is_builtin_fn (tree);
extern int get_object_alignment (tree, unsigned int, unsigned int);
extern tree fold_call_stmt (gimple, bool);
extern tree gimple_fold_builtin_snprintf_chk (gimple, tree, enum built_in_function);
+END_TARGET_SPECIFIC$
+extern void set_builtin_user_assembler_name (tree decl, const char *asmspec);
+
+/* In fold-const.c */
extern tree make_range (tree, int *, tree *, tree *, bool *);
extern tree build_range_check (location_t, tree, tree, int, tree, tree);
extern bool merge_ranges (int *, tree *, tree *, int, tree, tree, int,
tree, tree);
-extern void set_builtin_user_assembler_name (tree decl, const char *asmspec);
/* In convert.c */
extern tree strip_float_extensions (tree);
@@ -5018,6 +5041,7 @@ extern tree block_ultimate_origin (const_tree);
/* In tree-nested.c */
extern tree build_addr (tree, tree);
+START_TARGET_SPECIFIC
/* In function.c */
extern void expand_main_function (void);
extern void expand_function_end (void);
@@ -5027,7 +5051,10 @@ extern void stack_protect_epilogue (void);
extern void init_dummy_function_start (void);
extern void expand_dummy_function_end (void);
extern unsigned int init_function_for_compilation (void);
+END_TARGET_SPECIFIC
+/* Allocate_struct_function uses targetm->name. */
extern void allocate_struct_function (tree, bool);
+START_TARGET_SPECIFIC
extern void push_struct_function (tree fndecl);
extern void init_function_start (tree);
extern bool use_register_for_decl (const_tree);
@@ -5041,11 +5068,14 @@ extern int aggregate_value_p (const_tree, const_tree);
extern void push_function_context (void);
extern void pop_function_context (void);
extern gimple_seq gimplify_parameters (void);
+END_TARGET_SPECIFIC
+START_TARGET_SPECIFIC
/* In print-rtl.c */
#ifdef BUFSIZ
extern void print_rtl (FILE *, const_rtx);
#endif
+END_TARGET_SPECIFIC
/* In print-tree.c */
extern void debug_tree (tree);
@@ -5121,6 +5151,7 @@ extern tree decl_attributes (tree *, tree, int);
extern void set_decl_abstract_flags (tree, int);
extern void set_decl_origin_self (tree);
+START_TARGET_SPECIFIC
/* In stor-layout.c */
extern void set_min_and_max_values_for_integral_type (tree, int, bool);
extern void fixup_signed_type (tree);
@@ -5156,6 +5187,7 @@ extern void expand_decl (tree);
/* Silly ifdef to avoid having all includers depend on hard-reg-set.h. */
extern tree tree_overlaps_hard_reg_set (tree, HARD_REG_SET *);
#endif
+END_TARGET_SPECIFIC
/* In dwarf2out.c */
@@ -5216,8 +5248,10 @@ extern tree walk_tree_without_duplicates_1 (tree*, walk_tree_fn, void*,
/* In emit-rtl.c */
/* Assign the RTX to declaration. */
+START_TARGET_SPECIFIC
extern void set_decl_rtl (tree, rtx);
extern void set_decl_incoming_rtl (tree, rtx, bool);
+END_TARGET_SPECIFIC
/* Enum and arrays used for tree allocation stats.
Keep in sync with tree.c:tree_node_kind_names. */
@@ -5326,8 +5360,10 @@ extern void init_object_sizes (void);
extern void fini_object_sizes (void);
extern unsigned HOST_WIDE_INT compute_builtin_object_size (tree, int);
+START_TARGET_SPECIFIC
/* In expr.c. */
extern unsigned HOST_WIDE_INT highest_pow2_factor (const_tree);
+END_TARGET_SPECIFIC
extern tree build_personality_function (const char *);
/* In tree-inline.c. */
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index 58a11c1031b..8e48f62513b 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -109,6 +109,7 @@
#include "tree-flow.h"
#include "cselib.h"
#include "target.h"
+#include "multi-target.h"
/* var-tracking.c assumes that tree code with the same value as VALUE rtx code
has no chance to appear in REG_EXPR/MEM_EXPRs and isn't a decl.
@@ -354,6 +355,8 @@ typedef const struct value_chain_def *const_value_chain;
/* Macro to access MEM_OFFSET as an HOST_WIDE_INT. Evaluates MEM twice. */
#define INT_MEM_OFFSET(mem) (MEM_OFFSET (mem) ? INTVAL (MEM_OFFSET (mem)) : 0)
+START_TARGET_SPECIFIC
+
/* Alloc pool for struct attrs_def. */
static alloc_pool attrs_pool;
@@ -7691,3 +7694,5 @@ struct rtl_opt_pass pass_variable_tracking =
TODO_dump_func | TODO_verify_rtl_sharing/* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 310647e7e2b..13f80c194be 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -53,18 +53,21 @@ along with GCC; see the file COPYING3. If not see
#include "cfglayout.h"
#include "basic-block.h"
#include "tree-iterator.h"
+#include "multi-target.h"
#ifdef XCOFF_DEBUGGING_INFO
#include "xcoffout.h" /* Needed for external data
declarations for e.g. AIX 4.x. */
#endif
+START_TARGET_SPECIFIC
/* The (assembler) name of the first globally-visible object output. */
extern GTY(()) const char *first_global_object_name;
extern GTY(()) const char *weak_global_object_name;
const char *first_global_object_name;
const char *weak_global_object_name;
+END_TARGET_SPECIFIC
struct addr_const;
struct constant_descriptor_rtx;
@@ -72,6 +75,13 @@ struct rtx_constant_pool;
#define n_deferred_constants (crtl->varasm.deferred_constants)
+extern struct gcc_target *last_arch;
+#ifndef EXTRA_TARGET
+struct gcc_target *last_arch = &this_targetm;
+#endif /* !EXTRA_TARGET */
+
+START_TARGET_SPECIFIC
+
/* Number for making the label on the next
constant that is stored in memory. */
@@ -1658,6 +1668,12 @@ assemble_start_function (tree decl, const char *fnname)
char tmp_label[100];
bool hot_label_written = false;
+ if (last_arch != &targetm)
+ {
+ fprintf (asm_out_file, "\t.arch\t\"%s\"\n", targetm.name);
+ last_arch = &targetm;
+ }
+
crtl->subsections.unlikely_text_section_name = NULL;
first_function_block_is_cold = false;
@@ -3377,6 +3393,7 @@ lookup_constant_def (tree exp)
return (desc ? desc->rtl : NULL_RTX);
}
+END_TARGET_SPECIFIC
/* Used in the hash tables to avoid outputting the same constant
twice. Unlike 'struct constant_descriptor_tree', RTX constants
are output once per function, not once per file. */
@@ -3412,6 +3429,7 @@ struct GTY((chain_next ("%h.next"))) constant_descriptor_rtx {
int labelno;
int mark;
};
+START_TARGET_SPECIFIC
/* Hash and compare functions for const_rtx_htab. */
@@ -7098,3 +7116,5 @@ default_elf_asm_output_external (FILE *file ATTRIBUTE_UNUSED,
}
#include "gt-varasm.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/web.c b/gcc/web.c
index 7e15c2ce4c9..c48ace3e34a 100644
--- a/gcc/web.c
+++ b/gcc/web.c
@@ -50,7 +50,9 @@ along with GCC; see the file COPYING3. If not see
#include "function.h"
#include "timevar.h"
#include "tree-pass.h"
+#include "multi-target.h"
+START_TARGET_SPECIFIC
/* Find the root of unionfind tree (the representative of set). */
@@ -401,3 +403,4 @@ struct rtl_opt_pass pass_web =
}
};
+END_TARGET_SPECIFIC