aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ"orn Rennecke <joern.rennecke@st.com>2009-06-05 19:13:49 +0000
committerJ"orn Rennecke <joern.rennecke@st.com>2009-06-05 19:13:49 +0000
commita801796f14f838e2d9d24ee095a0d7ecbbc3eefb (patch)
tree3d2204a035501b4f26c7e19fadfa7282b4adf6b2
parente143d0f2ccf69b83b30b5962e72ee62cbd951f6e (diff)
Applied:
svn merge svn+ssh://amylaar@gcc.gnu.org/svn/gcc/branches/gcc-4_4-branch@145488 svn+ssh://amylaar@gcc.gnu.org/svn/gcc/branches/arc-milepost-branch , then removed obsolete gcc/config/arc port, and reversed merge direction for files with more than 40 lines worth of diff from the arc-milepost-branch: configure Makefile.in gcc/doc/extend.texi gcc/doc/tm.texi gcc/doc/invoke.texi gcc/targhooks.c gcc/tree-dump.c gcc/tree-complex.c gcc/targhooks.h gcc/regstat.c gcc/machmode.h gcc/genrecog.c gcc/gengtype.c gcc/mkconfig.sh gcc/java/Make-lang.in gcc/java/builtins.c gcc/optabs.c gcc/optabs.h gcc/postreload.c gcc/tree-ssa-loop-ch.c gcc/tree.c gcc/tree.h gcc/reload.c gcc/tree-pass.h gcc/reload.h gcc/target.h gcc/rtlanal.c gcc/configure gcc/final.c gcc/builtins.c gcc/genoutput.c gcc/fold-const.c gcc/genautomata.c gcc/toplev.c gcc/toplev.h gcc/reorg.c gcc/omega.c gcc/regs.h gcc/df-scan.c gcc/cp/typeck.c gcc/cp/init.c gcc/cp/call.c gcc/cp/Make-lang.in gcc/cp/tree.c gcc/cp/cp-tree.h gcc/cp/pt.c gcc/cp/semantics.c gcc/cp/parser.c gcc/haifa-sched.c gcc/dbxout.c gcc/tree-ssa-loop-ivopts.c gcc/df-core.c gcc/cse.c gcc/sel-sched.c gcc/c-pch.c gcc/dwarf2out.c gcc/expr.c gcc/expr.h gcc/longlong.h gcc/opts.c gcc/genattrtab.c gcc/genattr.c gcc/tree-ssa-loop-ivcanon.c gcc/predict.c gcc/tree-parloops.c gcc/recog.c gcc/tree-ssa-address.c gcc/timevar.c gcc/dse.c gcc/matrix-reorg.c gcc/tree-eh.c gcc/fortran/gfortran.h gcc/fortran/module.c gcc/fortran/trans-intrinsic.c gcc/regmove.c gcc/configure.ac gcc/function.c gcc/tree-vectorizer.c gcc/function.h gcc/tree-vectorizer.h gcc/df.h gcc/sdbout.c gcc/stor-layout.c gcc/gcse.c gcc/alias.c gcc/ira-build.c gcc/ggc.h gcc/gimplify.c gcc/calls.c gcc/genmodes.c gcc/loop-doloop.c gcc/rtl-factoring.c gcc/bt-load.c gcc/except.c gcc/except.h gcc/emit-rtl.c gcc/cfgexpand.c gcc/tree-ssa-pre.c gcc/explow.c gcc/genpreds.c gcc/opth-gen.awk gcc/common.opt gcc/varasm.c gcc/ira.c gcc/target-def.h gcc/ira-costs.c gcc/rtl.h gcc/sched-int.h gcc/tree-optimize.c gcc/output.h gcc/combine.c gcc/resource.c gcc/var-tracking.c gcc/cfgloop.h gcc/c-common.c gcc/tree-flow.h gcc/df-problems.c gcc/config.gcc gcc/reginfo.c gcc/Makefile.in gcc/sched-rgn.c gcc/gimple.c gcc/basic-block.h gcc/gimple.h gcc/tree-cfg.c gcc/passes.c gcc/config/spu/spu.c gcc/config/spu/spu.h gcc/config/spu/spu-c.c gcc/config/i386/i386.md gcc/config/i386/i386.c gcc/config/sh/sh.c gcc/config/sh/sh.h gcc/config/sh/sh.md gcc/config/rs6000/rs6000.c gcc/combine-stack-adj.c gcc/collect2.c gcc/reload1.c libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/1.cc libstdc++-v3/testsuite/lib/libstdc++.exp configure.ac libcpp/symtab.c libcpp/include/symtab.h and resolved textual conflicts. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/milepost-integration@148225 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog.ARC13
-rw-r--r--ChangeLog.cxx26
-rw-r--r--MANIFEST159
-rw-r--r--Makefile.def5
-rw-r--r--Makefile.in692
-rw-r--r--Makefile.tpl22
-rw-r--r--config-ml.in9
-rwxr-xr-xconfig.sub2
-rwxr-xr-xconfigure93
-rw-r--r--configure.ac48
-rw-r--r--gcc/ChangeLog32
-rw-r--r--gcc/ChangeLog.ARC2537
-rw-r--r--gcc/ChangeLog.cxx1088
-rw-r--r--gcc/ChangeLog.multi-target566
-rw-r--r--gcc/Makefile.in1196
-rw-r--r--gcc/README-multi-target36
-rw-r--r--gcc/T-extra.in62
-rw-r--r--gcc/TDEP-SOURCES124
-rw-r--r--gcc/addresses.h4
-rw-r--r--gcc/alias.c11
-rw-r--r--gcc/alias.h5
-rw-r--r--gcc/attribs.c6
-rw-r--r--gcc/auto-inc-dec.c10
-rw-r--r--gcc/basic-block.h132
-rw-r--r--gcc/bb-reorder.c4
-rw-r--r--gcc/bitmap.c2
-rw-r--r--gcc/bt-load.c11
-rw-r--r--gcc/builtins.c40
-rw-r--r--gcc/c-common.c24
-rw-r--r--gcc/c-pch.c9
-rw-r--r--gcc/caller-save.c5
-rw-r--r--gcc/calls.c14
-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.c15
-rw-r--r--gcc/cfghooks.c16
-rw-r--r--gcc/cfghooks.h8
-rw-r--r--gcc/cfglayout.c9
-rw-r--r--gcc/cfglayout.h8
-rw-r--r--gcc/cfgloop.c1
-rw-r--r--gcc/cfgloop.h54
-rw-r--r--gcc/cfgloopanal.c4
-rw-r--r--gcc/cfgrtl.c7
-rw-r--r--gcc/cgraph.h17
-rw-r--r--gcc/cgraphbuild.c4
-rw-r--r--gcc/cgraphunit.c9
-rw-r--r--gcc/collect2.c15
-rw-r--r--gcc/combine-stack-adj.c10
-rw-r--r--gcc/combine.c123
-rw-r--r--gcc/common.opt43
-rw-r--r--gcc/config.gcc51
-rw-r--r--gcc/config/arc/arc-modes.def24
-rw-r--r--gcc/config/arc/arc-protos.h64
-rw-r--r--gcc/config/arc/arc.c2355
-rw-r--r--gcc/config/arc/arc.h1088
-rw-r--r--gcc/config/arc/arc.md1637
-rw-r--r--gcc/config/arc/arc.opt54
-rw-r--r--gcc/config/arc/initfini.c155
-rw-r--r--gcc/config/arc/lib1funcs.asm266
-rw-r--r--gcc/config/arc/t-arc41
-rw-r--r--gcc/config/fp-bit.c27
-rw-r--r--gcc/config/i386/i386-c.c12
-rw-r--r--gcc/config/i386/i386.c299
-rw-r--r--gcc/config/i386/i386.h15
-rw-r--r--gcc/config/i386/i386.md16
-rw-r--r--gcc/config/i386/t-i3862
-rw-r--r--gcc/config/i386/x-darwin2
-rw-r--r--gcc/config/i386/x-i3862
-rw-r--r--gcc/config/linux.opt10
-rw-r--r--gcc/config/m32r/m32r-protos.h6
-rw-r--r--gcc/config/m32r/m32r.c7
-rw-r--r--gcc/config/m32r/m32r.h2
-rw-r--r--gcc/config/mxp/constraints.md91
-rw-r--r--gcc/config/mxp/demo/Makefile78
-rw-r--r--gcc/config/mxp/demo/array.c9
-rw-r--r--gcc/config/mxp/demo/crtroend.S3
-rw-r--r--gcc/config/mxp/demo/crtrostart.S3
-rw-r--r--gcc/config/mxp/demo/crtvend.S3
-rw-r--r--gcc/config/mxp/demo/demo.c35
-rw-r--r--gcc/config/mxp/demo/demo.h12
-rw-r--r--gcc/config/mxp/demo/dma-gen.c79
-rw-r--r--gcc/config/mxp/demo/max.c25
-rw-r--r--gcc/config/mxp/demo/mxp-start.S13
-rw-r--r--gcc/config/mxp/demo/mxp-wrap.S39
-rw-r--r--gcc/config/mxp/demo/mxp.x254
-rw-r--r--gcc/config/mxp/mxp-genregset.c464
-rw-r--r--gcc/config/mxp/mxp-modes.def15
-rw-r--r--gcc/config/mxp/mxp-protos.h16
-rw-r--r--gcc/config/mxp/mxp.c693
-rw-r--r--gcc/config/mxp/mxp.h285
-rw-r--r--gcc/config/mxp/mxp.md917
-rw-r--r--gcc/config/mxp/mxp.opt15
-rw-r--r--gcc/config/mxp/predicates.md19
-rw-r--r--gcc/config/mxp/regset-config.h96
-rw-r--r--gcc/config/mxp/t-mxp28
-rw-r--r--gcc/config/rs6000/rs6000-c.c2
-rw-r--r--gcc/config/rs6000/rs6000.c135
-rw-r--r--gcc/config/rs6000/rs6000.md3
-rw-r--r--gcc/config/rs6000/t-rs60002
-rw-r--r--gcc/config/sh/predicates.md12
-rw-r--r--gcc/config/sh/sh-protos.h10
-rw-r--r--gcc/config/sh/sh.c365
-rw-r--r--gcc/config/sh/sh.h248
-rw-r--r--gcc/config/sh/sh.md44
-rw-r--r--gcc/config/sh/t-sh1
-rw-r--r--gcc/config/spu/spu-c.c17
-rw-r--r--gcc/config/spu/spu-protos.h4
-rw-r--r--gcc/config/spu/spu.c47
-rw-r--r--gcc/config/spu/spu.h8
-rw-r--r--gcc/config/spu/spu.md3
-rw-r--r--gcc/config/spu/t-spu-elf15
-rw-r--r--gcc/config/t-darwin8
-rw-r--r--gcc/config/x-darwin2
-rw-r--r--gcc/config/x-linux2
-rwxr-xr-xgcc/configure4083
-rw-r--r--gcc/configure.ac18
-rw-r--r--gcc/coverage.c4
-rw-r--r--gcc/cp/Make-lang.in13
-rw-r--r--gcc/cp/call.c35
-rw-r--r--gcc/cp/class.c8
-rw-r--r--gcc/cp/cp-gimplify.c2
-rw-r--r--gcc/cp/cp-lang.c2
-rw-r--r--gcc/cp/cp-objcp-common.h3
-rw-r--r--gcc/cp/cp-tree.h105
-rw-r--r--gcc/cp/cvt.c7
-rw-r--r--gcc/cp/decl.c6
-rw-r--r--gcc/cp/decl2.c8
-rw-r--r--gcc/cp/error.c4
-rw-r--r--gcc/cp/init.c16
-rw-r--r--gcc/cp/parser.c388
-rw-r--r--gcc/cp/pt.c123
-rw-r--r--gcc/cp/rtti.c6
-rw-r--r--gcc/cp/search.c2
-rw-r--r--gcc/cp/semantics.c10
-rw-r--r--gcc/cp/tree.c12
-rw-r--r--gcc/cp/typeck.c72
-rw-r--r--gcc/cp/typeck2.c2
-rw-r--r--gcc/cse.c23
-rw-r--r--gcc/cselib.c5
-rw-r--r--gcc/cselib.h8
-rw-r--r--gcc/dbgcnt.c2
-rw-r--r--gcc/dbxout.c12
-rw-r--r--gcc/dbxout.h6
-rw-r--r--gcc/dce.c8
-rw-r--r--gcc/dce.h4
-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.c31
-rw-r--r--gcc/df-problems.c47
-rw-r--r--gcc/df-scan.c84
-rw-r--r--gcc/df.h38
-rw-r--r--gcc/doc/extend.texi291
-rw-r--r--gcc/doc/invoke.texi198
-rw-r--r--gcc/doc/mxp.texi106
-rw-r--r--gcc/doc/tm.texi16
-rw-r--r--gcc/dojump.c5
-rw-r--r--gcc/dominance.c7
-rw-r--r--gcc/double-int.c5
-rw-r--r--gcc/dse.c24
-rw-r--r--gcc/dse.h2
-rw-r--r--gcc/dummy-checksum.c3
-rw-r--r--gcc/dwarf2.h8
-rw-r--r--gcc/dwarf2asm.c5
-rw-r--r--gcc/dwarf2asm.h7
-rw-r--r--gcc/dwarf2out.c66
-rw-r--r--gcc/emit-rtl.c49
-rw-r--r--gcc/errors.h7
-rw-r--r--gcc/except.c211
-rw-r--r--gcc/except.h35
-rw-r--r--gcc/explow.c18
-rw-r--r--gcc/expmed.c7
-rw-r--r--gcc/expr.c85
-rw-r--r--gcc/expr.h56
-rw-r--r--gcc/final.c123
-rw-r--r--gcc/fixed-value.c2
-rw-r--r--gcc/fixed-value.h7
-rw-r--r--gcc/flags.h5
-rw-r--r--gcc/fold-const.c20
-rw-r--r--gcc/fortran/Make-lang.in8
-rw-r--r--gcc/fortran/cpp.c2
-rw-r--r--gcc/fortran/decl.c8
-rw-r--r--gcc/fortran/dump-parse-tree.c4
-rw-r--r--gcc/fortran/gfortran.h60
-rw-r--r--gcc/fortran/interface.c6
-rw-r--r--gcc/fortran/module.c41
-rw-r--r--gcc/fortran/parse.c12
-rw-r--r--gcc/fortran/resolve.c5
-rw-r--r--gcc/fortran/symbol.c4
-rw-r--r--gcc/fortran/trans-intrinsic.c24
-rw-r--r--gcc/fortran/trans-io.c8
-rw-r--r--gcc/fortran/trans-types.c12
-rw-r--r--gcc/function.c88
-rw-r--r--gcc/function.h45
-rw-r--r--gcc/fwprop.c6
-rw-r--r--gcc/gcc.c7
-rw-r--r--gcc/gcov.c7
-rw-r--r--gcc/gcse.c46
-rw-r--r--gcc/genattr.c17
-rw-r--r--gcc/genattrtab.c34
-rw-r--r--gcc/genautomata.c17
-rw-r--r--gcc/genchecksum.c3
-rw-r--r--gcc/genemit.c6
-rw-r--r--gcc/genextract.c5
-rw-r--r--gcc/genflags.c5
-rw-r--r--gcc/gengtype-lex.l10
-rw-r--r--gcc/gengtype-parse.c9
-rw-r--r--gcc/gengtype.c42
-rw-r--r--gcc/gengtype.h1
-rw-r--r--gcc/genmodes.c245
-rw-r--r--gcc/genopinit.c7
-rw-r--r--gcc/genoutput.c84
-rw-r--r--gcc/genpeep.c7
-rw-r--r--gcc/genpreds.c65
-rw-r--r--gcc/genrecog.c10
-rw-r--r--gcc/gensupport.c2
-rw-r--r--gcc/gentargtype.cc29
-rw-r--r--gcc/ggc-page.c12
-rw-r--r--gcc/ggc.h9
-rw-r--r--gcc/gimple-low.c6
-rw-r--r--gcc/gimple.c55
-rw-r--r--gcc/gimple.h12
-rw-r--r--gcc/gimplify.c30
-rw-r--r--gcc/graph.c5
-rw-r--r--gcc/haifa-sched.c22
-rw-r--r--gcc/hard-reg-set.h6
-rw-r--r--gcc/hooks.c15
-rw-r--r--gcc/hooks.h2
-rw-r--r--gcc/ifcvt.c4
-rw-r--r--gcc/init-regs.c7
-rw-r--r--gcc/insn-addr.h5
-rw-r--r--gcc/integrate.c7
-rw-r--r--gcc/ipa-cp.c2
-rw-r--r--gcc/ipa-inline.c2
-rw-r--r--gcc/ipa-prop.c2
-rw-r--r--gcc/ipa-pure-const.c2
-rw-r--r--gcc/ipa-reference.c2
-rw-r--r--gcc/ipa-struct-reorg.c3
-rw-r--r--gcc/ira-build.c16
-rw-r--r--gcc/ira-color.c5
-rw-r--r--gcc/ira-conflicts.c4
-rw-r--r--gcc/ira-costs.c12
-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.c62
-rw-r--r--gcc/ira.h5
-rw-r--r--gcc/java/ChangeLog.cxx33
-rw-r--r--gcc/java/Make-lang.in16
-rw-r--r--gcc/java/builtins.c65
-rw-r--r--gcc/java/jcf-io.c5
-rw-r--r--gcc/java/jcf-parse.c2
-rw-r--r--gcc/java/mangle.c3
-rw-r--r--gcc/java/verify-impl.c8
-rw-r--r--gcc/java/verify.h11
-rw-r--r--gcc/jump.c7
-rw-r--r--gcc/langhooks.c5
-rw-r--r--gcc/libgcc2.c7
-rw-r--r--gcc/lists.c2
-rw-r--r--gcc/longlong.h29
-rw-r--r--gcc/loop-doloop.c172
-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.h16
-rw-r--r--gcc/main.c2
-rw-r--r--gcc/matrix-reorg.c18
-rw-r--r--gcc/mcf.c5
-rw-r--r--gcc/mkconfig.sh15
-rw-r--r--gcc/mode-classes.def4
-rw-r--r--gcc/mode-switching.c5
-rw-r--r--gcc/modulo-sched.c4
-rw-r--r--gcc/multi-target.h35
-rw-r--r--gcc/objc/Make-lang.in4
-rw-r--r--gcc/objc/objc-act.c2
-rw-r--r--gcc/objc/objc-act.h2
-rw-r--r--gcc/objcp/objcp-lang.c2
-rw-r--r--gcc/omega.c13
-rw-r--r--gcc/omega.h8
-rw-r--r--gcc/omp-low.c8
-rw-r--r--gcc/optabs.c50
-rw-r--r--gcc/optabs.h40
-rw-r--r--gcc/optc-gen.awk16
-rw-r--r--gcc/opth-gen.awk22
-rw-r--r--gcc/opts.c70
-rw-r--r--gcc/output.h65
-rw-r--r--gcc/params.def9
-rw-r--r--gcc/passes.c54
-rw-r--r--gcc/postreload-gcse.c8
-rw-r--r--gcc/postreload.c43
-rw-r--r--gcc/predict.c15
-rw-r--r--gcc/predict.h4
-rw-r--r--gcc/print-rtl.c5
-rw-r--r--gcc/profile.c2
-rw-r--r--gcc/read-rtl.c2
-rw-r--r--gcc/real.c6
-rw-r--r--gcc/recog.c15
-rw-r--r--gcc/recog.h6
-rw-r--r--gcc/reg-stack.c5
-rw-r--r--gcc/reginfo.c45
-rw-r--r--gcc/regmove.c17
-rw-r--r--gcc/regrename.c5
-rw-r--r--gcc/regs.h9
-rw-r--r--gcc/regstat.c15
-rw-r--r--gcc/reload.c43
-rw-r--r--gcc/reload.h10
-rw-r--r--gcc/reload1.c56
-rw-r--r--gcc/reorg.c56
-rw-r--r--gcc/resource.c48
-rw-r--r--gcc/resource.h5
-rw-r--r--gcc/rtl-factoring.c22
-rw-r--r--gcc/rtl.c5
-rw-r--r--gcc/rtl.h45
-rw-r--r--gcc/rtlanal.c77
-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.h58
-rw-r--r--gcc/sched-rgn.c13
-rw-r--r--gcc/sched-vis.c4
-rw-r--r--gcc/sdbout.c35
-rw-r--r--gcc/see.c5
-rw-r--r--gcc/sel-sched-dump.c6
-rw-r--r--gcc/sel-sched-dump.h7
-rw-r--r--gcc/sel-sched-ir.c8
-rw-r--r--gcc/sel-sched-ir.h13
-rw-r--r--gcc/sel-sched.c11
-rw-r--r--gcc/simplify-rtx.c5
-rw-r--r--gcc/stack-ptr-mod.c7
-rw-r--r--gcc/stmt.c4
-rw-r--r--gcc/stor-layout.c16
-rw-r--r--gcc/stringpool.c4
-rw-r--r--gcc/system.h9
-rw-r--r--gcc/target-def.h24
-rw-r--r--gcc/target.h1205
-rw-r--r--gcc/targhooks.c133
-rw-r--r--gcc/targhooks.h36
-rw-r--r--gcc/testsuite/ChangeLog.ARC72
-rw-r--r--gcc/testsuite/g++.dg/cpp/_Pragma1.C2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20000804-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20001226-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20010327-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20010518-2.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20020604-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20050622-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/920501-12.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/920501-4.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/930506-2.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/961203-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/limits-blockid.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/limits-fnargs.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/denorm-rand.c199
-rw-r--r--gcc/testsuite/gcc.dg/builtin-apply2.c1
-rw-r--r--gcc/testsuite/gcc.dg/cpp/_Pragma6.c2
-rw-r--r--gcc/testsuite/gcc.dg/func-ptr-prof.c18
-rw-r--r--gcc/testsuite/gcc.dg/pr28243.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr35044.c235
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert.h4
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr37868.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c2
-rw-r--r--gcc/testsuite/gcc.target/arc/adc.c29
-rw-r--r--gcc/testsuite/gcc.target/arc/add_f.c29
-rw-r--r--gcc/testsuite/gcc.target/arc/arc.exp41
-rw-r--r--gcc/testsuite/gcc.target/arc/sbc.c15
-rw-r--r--gcc/testsuite/lib/scanasm.exp11
-rw-r--r--gcc/timevar.c13
-rw-r--r--gcc/timevar.def5
-rw-r--r--gcc/toplev.c186
-rw-r--r--gcc/toplev.h26
-rw-r--r--gcc/tree-cfg.c10
-rw-r--r--gcc/tree-complex.c18
-rw-r--r--gcc/tree-data-ref.c3
-rw-r--r--gcc/tree-dump.c18
-rw-r--r--gcc/tree-dump.h2
-rw-r--r--gcc/tree-eh.c42
-rw-r--r--gcc/tree-flow.h19
-rw-r--r--gcc/tree-if-conv.c2
-rw-r--r--gcc/tree-inline.h14
-rw-r--r--gcc/tree-into-ssa.c4
-rw-r--r--gcc/tree-loop-distribution.c3
-rw-r--r--gcc/tree-mudflap.c4
-rw-r--r--gcc/tree-nomudflap.c7
-rw-r--r--gcc/tree-nrv.c2
-rw-r--r--gcc/tree-object-size.c2
-rw-r--r--gcc/tree-optimize.c16
-rw-r--r--gcc/tree-parloops.c38
-rw-r--r--gcc/tree-pass.h68
-rw-r--r--gcc/tree-predcom.c8
-rw-r--r--gcc/tree-scalar-evolution.h2
-rw-r--r--gcc/tree-ssa-address.c11
-rw-r--r--gcc/tree-ssa-alias.c6
-rw-r--r--gcc/tree-ssa-ccp.c2
-rw-r--r--gcc/tree-ssa-dse.c2
-rw-r--r--gcc/tree-ssa-loop-ch.c38
-rw-r--r--gcc/tree-ssa-loop-ivcanon.c112
-rw-r--r--gcc/tree-ssa-loop-ivopts.c235
-rw-r--r--gcc/tree-ssa-loop-manip.c15
-rw-r--r--gcc/tree-ssa-loop.c12
-rw-r--r--gcc/tree-ssa-math-opts.c6
-rw-r--r--gcc/tree-ssa-pre.c127
-rw-r--r--gcc/tree-ssa-sccvn.c2
-rw-r--r--gcc/tree-ssa.c6
-rw-r--r--gcc/tree-ssanames.c2
-rw-r--r--gcc/tree-stdarg.c2
-rw-r--r--gcc/tree-tailcall.c4
-rw-r--r--gcc/tree-vect-analyze.c13
-rw-r--r--gcc/tree-vect-generic.c4
-rw-r--r--gcc/tree-vect-patterns.c2
-rw-r--r--gcc/tree-vect-transform.c43
-rw-r--r--gcc/tree-vectorizer.c126
-rw-r--r--gcc/tree-vectorizer.h15
-rw-r--r--gcc/tree.c17
-rw-r--r--gcc/tree.h43
-rw-r--r--gcc/value-prof.c2
-rw-r--r--gcc/var-tracking.c9
-rw-r--r--gcc/varasm.c99
-rw-r--r--gcc/vec.c2
-rw-r--r--gcc/vec.h2
-rw-r--r--gcc/web.c3
-rw-r--r--include/ChangeLog.cxx13
-rw-r--r--include/ansidecl.h8
-rw-r--r--include/dyn-string.h7
-rw-r--r--include/fibheap.h8
-rw-r--r--libcpp/ChangeLog.cxx26
-rw-r--r--libcpp/identifiers.c8
-rw-r--r--libcpp/include/cpplib.h4
-rw-r--r--libcpp/include/line-map.h9
-rw-r--r--libcpp/include/mkdeps.h10
-rw-r--r--libcpp/include/symtab.h29
-rw-r--r--libcpp/init.c8
-rw-r--r--libcpp/internal.h10
-rw-r--r--libcpp/symtab.c24
-rw-r--r--libdecnumber/ChangeLog.cxx14
-rw-r--r--libdecnumber/decContext.h8
-rw-r--r--libdecnumber/decDouble.h8
-rw-r--r--libdecnumber/decExcept.h8
-rw-r--r--libdecnumber/decNumber.h8
-rw-r--r--libdecnumber/decPacked.h8
-rw-r--r--libdecnumber/decQuad.h8
-rw-r--r--libdecnumber/decRound.h8
-rw-r--r--libdecnumber/decSingle.h8
-rw-r--r--libdecnumber/dpd/decimal128.h8
-rw-r--r--libdecnumber/dpd/decimal32.h8
-rw-r--r--libdecnumber/dpd/decimal64.h8
-rw-r--r--libgcc/ChangeLog.ARC4
-rw-r--r--libgcc/config.host2
-rw-r--r--libstdc++-v3/ChangeLog.ARC20
-rwxr-xr-xlibstdc++-v3/scripts/testsuite_flags.in5
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/1.cc2
-rw-r--r--libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_dijkstra.cc5
-rw-r--r--libstdc++-v3/testsuite/lib/libstdc++.exp6
461 files changed, 21554 insertions, 9485 deletions
diff --git a/ChangeLog.ARC b/ChangeLog.ARC
new file mode 100644
index 00000000000..0a895b43a58
--- /dev/null
+++ b/ChangeLog.ARC
@@ -0,0 +1,13 @@
+2008-04-25 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config.sub: Add mxp support.
+
+2007-09-17 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * configure.in (FLAGS_FOR_TARGET):
+ Add -isystem $$s/newlib/libc/sys/'$target_cpu'/sys .
+ * configure: Regenerate.
+
+2007-04-17 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config-ml.in: Merge codito patches.
diff --git a/ChangeLog.cxx b/ChangeLog.cxx
new file mode 100644
index 00000000000..dfe38d31df5
--- /dev/null
+++ b/ChangeLog.cxx
@@ -0,0 +1,26 @@
+2009-03-04 Ian Lance Taylor <iant@google.com>
+
+ * Makefile.tpl (POSTSTAGE1_HOST_EXPORTS): Add -L option to CXX and
+ CXX_FOR_BUILD to pick up previous libstdc++. Set RPATH_ENVVAR to
+ point to previous libstdc++.
+ * Makefile.in: Rebuild.
+
+2009-02-04 Ian Lance Taylor <iant@google.com>
+
+ * Makefile.def: Bootstrap the libstdc++-v3 target module.
+ * Makefile.tpl (POSTSTAGE1_HOST_EXPORTS): Add CXX and
+ CXX_FOR_BUILD.
+ (POSTSTAGE1_FLAGS_TO_PASS): Likewise.
+ * Makefile.in: Rebuild.
+
+2009-01-30 Ian Lance Taylor <iant@google.com>
+
+ * configure.ac: Don't add c++ to missing_languages. Don't use
+ -fkeep-inline-functions.
+ * configure: Rebuild.
+
+2008-06-18 Ian Lance Taylor <iant@google.com>
+
+ * configure.ac: Build C++ in stage 1.
+ * configure: Rebuild.
+
diff --git a/MANIFEST b/MANIFEST
new file mode 100644
index 00000000000..2f09c07ebea
--- /dev/null
+++ b/MANIFEST
@@ -0,0 +1,159 @@
+From codito-20070401 / codito-20070406:
+ added files:
+ gcc/gcc/config/arc/crti.asm
+ gcc/gcc/config/arc/predicates.md
+ gcc/gcc/config/arc/crti.asm
+ gcc/gcc/config/arc/crtn.asm
+ gcc/gcc/config/arc/crtn.asm
+ gcc/gcc/config/arc/arc-simd.h
+ gcc/gcc/config/arc/fpx.md
+ gcc/gcc/config/arc/t-arc700-uClibc
+ gcc/gcc/config/arc/constraints.md
+ gcc/gcc/config/arc/simdext.md
+ gcc/gcc/config/arc/xm-arc.h
+ gcc/gcc/testsuite/gcc.dg/pr35044.c
+ changed files:
+ gcc/config-ml.in (merge from codito's gcc/newlib/config-ml.in)
+ gcc/configure.in
+ gcc/configure
+ gcc/doc/invoke.texi
+ gcc/gcc/doc/extend.texi
+ gcc/gcc/reload.c
+ gcc/gcc/version.c
+ gcc/gcc/config.gcc
+ gcc/gcc/config/arc/arc-protos.h
+ gcc/gcc/config/arc/arc.c
+ gcc/gcc/config/arc/arc.h
+ gcc/gcc/config/arc/arc.md
+ gcc/gcc/config/arc/lib1funcs.asm
+ gcc/gcc/config/arc/t-arc
+ gcc/gcc/config/arc/arc.opt
+ gcc/gcc/config/arc/arc-modes.def
+
+By ARC employees:
+ added files:
+ gcc/gcc/config/arc/divtab-arc700.c
+ gcc/gcc/config/arc/gmon
+ gcc/gcc/config/arc/asm.h
+ gcc/gcc/config/arc/crtg.asm
+ gcc/gcc/config/arc/crtgend.asm
+ gcc/gcc/config/arc/t-arc-newlib
+ gcc/gcc/config/arc/arc600.md
+ gcc/gcc/config/arc/arc700.md
+ gcc/gcc/config/arc/gmon/auxreg.h
+ gcc/gcc/config/arc/gmon/machine-gmon.h
+ gcc/gcc/config/arc/gmon/profil.S
+ gcc/gcc/config/arc/gmon/dcache_linesz.S
+ gcc/gcc/config/arc/gmon/prof-freq-stub.S
+ gcc/gcc/config/arc/t-arc700-uClibc
+ gcc/gcc/config/arc/dp-hack.h
+ gcc/gcc/config/arc/fp-hack.h
+ gcc/gcc/config/arc/ieee-754/floatunsidf.S
+ gcc/gcc/config/arc/ieee-754/divdf3.S
+ gcc/gcc/config/arc/ieee-754/orddf2.S
+ gcc/gcc/config/arc/ieee-754/eqsf2.S
+ gcc/gcc/config/arc/ieee-754/truncdfsf2.S
+ gcc/gcc/config/arc/ieee-754/fixunsdfsi.S
+ gcc/gcc/config/arc/ieee-754/divtab-arc-df.c
+ gcc/gcc/config/arc/ieee-754/uneqsf2.S
+ gcc/gcc/config/arc/ieee-754/adddf3.S
+ gcc/gcc/config/arc/ieee-754/gtsf2.S
+ gcc/gcc/config/arc/ieee-754/gedf2.S
+ gcc/gcc/config/arc/ieee-754/floatsisf.S
+ gcc/gcc/config/arc/ieee-754/muldf3.S
+ gcc/gcc/config/arc/ieee-754/fixdfsi.S
+ gcc/gcc/config/arc/ieee-754/divsf3.S
+ gcc/gcc/config/arc/ieee-754/ordsf2.S
+ gcc/gcc/config/arc/ieee-754/eqdf2.S
+ gcc/gcc/config/arc/ieee-754/divtab-arc-sf.c
+ gcc/gcc/config/arc/ieee-754/divsf3-stdmul.S
+ gcc/gcc/config/arc/ieee-754/addsf3.S
+ gcc/gcc/config/arc/ieee-754/uneqdf2.S
+ gcc/gcc/config/arc/ieee-754/gesf2.S
+ gcc/gcc/config/arc/ieee-754/gtdf2.S
+ gcc/gcc/config/arc/ieee-754/mulsf3.S
+ gcc/gcc/config/arc/ieee-754/floatsidf.S
+ gcc/gcc/config/arc/ieee-754/fixsfsi.S
+ gcc/gcc/config/arc/ieee-754/arc-ieee-754.h
+ gcc/gcc/config/arc/ieee-754/extendsfdf2.S
+ gcc/gcc/config/arc/ieee-754/arc600/divdf3.S
+ gcc/gcc/config/arc/ieee-754/arc600/divsf3.S
+ gcc/gcc/config/arc/ieee-754/arc600/muldf3.S
+ gcc/gcc/config/arc/ieee-754/arc600/mulsf3.S
+ gcc/gcc/config/arc/ieee-754/arc600-dsp/mulsf.S
+ gcc/gcc/config/arc/ieee-754/arc600-dsp/muldf.S
+ gcc/gcc/config/arc/ieee-754/arc600-dsp/divdf3.S
+ gcc/gcc/config/arc/ieee-754/arc600-dsp/divsf3.S
+ gcc/gcc/config/mxp
+ gcc/gcc/ChangeLog.ARC
+ gcc/testsuite/ChangeLog.ARC
+ gcc/testsuite/gcc.c-torture/execute/ieee/denorm-rand.c
+ gcc/testsuite/gcc.dg/func-ptr-prof.c
+ gcc/testsuite/gcc.target/arc/arc.exp
+ gcc/testsuite/gcc.target/arc/adc.c
+ gcc/testsuite/gcc.target/arc/sbc.c
+ gcc/testsuite/gcc.target/arc/add_f.c
+ gcc/libstdc++-v3/ChangeLog.ARC
+ gcc/gcc/doc/mxp.texi
+ changed files:
+ gcc/config.sub
+ gcc/gcc/output.h
+ gcc/gcc/target-def.h
+ gcc/gcc/varasm.c
+ gcc/gcc/c-pch.c
+ gcc/gcc/longlong.h
+ gcc/gcc/libgcc2.c
+ gcc/gcc/builtins.c
+ gcc/gcc/combine.c
+ gcc/gcc/expr.h
+ gcc/gcc/expr.c
+ gcc/gcc/gimplify.c
+ gcc/gcc/cse.c
+ gcc/gcc/regmove.c
+ gcc/gcc/genmodes.c
+ gcc/gcc/mode-classes.def
+ gcc/gcc/loop-doloop.c
+ gcc/gcc/doc/tm.texi
+ gcc/gcc/config.gcc
+ gcc/gcc/tree-flow.h
+ gcc/gcc/tree-ssa-loop-cp.c
+ gcc/gcc/tree-ssa-loop-ivopts.c
+ gcc/gcc/tree-ssa-loop-ivcanon.c
+ gcc/gcc/tree-ssa-loop-manip.c
+ gcc/gcc/tree-ssa-pre.c
+ gcc/gcc/common.opt
+ gcc/gcc/cfgloop.h
+ gcc/gcc/params.def
+ gcc/gcc/Makefile.in
+ gcc/gcc/config/arc/t-arc
+ gcc/gcc/config/arc/arc-protos.h
+ gcc/gcc/config/arc/arc.h
+ gcc/gcc/config/arc/arc.c
+ gcc/gcc/config/arc/arc.md
+ gcc/gcc/config/arc/crti.asm
+ gcc/gcc/config/arc/crtn.asm
+ gcc/gcc/config/arc/predicates.md
+ gcc/gcc/config/arc/lib1funcs.asm
+ gcc/gcc/config/arc/t-arc700-uClibc
+ gcc/gcc/config/arc/constraints.md
+ gcc/gcc/config/arc/libgcc-excl.ver
+ gcc/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/1.cc
+ gcc/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_dijkstra.cc
+ gcc/libstdc++-v3/testsuite/lib/libstdc++.exp
+ gcc/libstdc++-v3/scripts/testsuite_flags.in
+ gcc/testsuite/gcc.dg/builtin-apply2.c
+ gcc/testsuite/gcc.dg/sibcall-3.c
+ gcc/testsuite/gcc.dg/sibcall-4.c
+ gcc/testsuite/gcc.dg/gcc.dg/cpp/_Pragma6.c
+ gcc/testsuite/g++.dg/cpp/_Pragma1.C
+ gcc/testsuite/gcc.dg/torture/pr37868.c
+ gcc/testsuite/gcc.dg/pr28243.c
+ gcc/testsuite/lib/scanasm.exp
+
+Others:
+ added files:
+ gcc/config/arc/gmon/sys/gmon.h (from BSD)
+ gcc/config/arc/gmon/sys/gmon_out.h (from BSD)
+ gcc/config/arc/gmon/gmon.c (from BSD)
+ gcc/config/arc/gmon/mcount.c (from BSD)
+ gcc/config/arc/gmon/prof-freq.c
diff --git a/Makefile.def b/Makefile.def
index 060d4dbee9d..2a3ca354f24 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -138,7 +138,10 @@ host_modules= { module= libtermcap; no_check=true;
host_modules= { module= utils; no_check=true; };
host_modules= { module= gnattools; };
-target_modules = { module= libstdc++-v3; lib_path=.libs; raw_cxx=true; };
+target_modules = { module= libstdc++-v3;
+ bootstrap=true;
+ lib_path=.libs;
+ raw_cxx=true; };
target_modules = { module= libmudflap; lib_path=.libs; };
target_modules = { module= libssp; lib_path=.libs; };
target_modules = { module= newlib; };
diff --git a/Makefile.in b/Makefile.in
index 9b597489f9a..ccb9f99c103 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -215,7 +215,26 @@ POSTSTAGE1_HOST_EXPORTS = \
$$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \
-B$$r/$(HOST_SUBDIR)/prev-gcc/ \
-B$(build_tooldir)/bin/"; export CC_FOR_BUILD; \
- LDFLAGS="$(BOOT_LDFLAGS)"; export LDFLAGS;
+ CXX="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/g++$(exeext) \
+ -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ \
+ -nostdinc++ \
+ -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \
+ -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \
+ -I$$r/$(srcdir)/libstdc++-v3/libsupc++ \
+ -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs"; export CXX; \
+ CXX_FOR_BUILD="$(STAGE_CC_WRAPPER) \
+ $$r/$(HOST_SUBDIR)/prev-gcc/g++$(exeext) \
+ -B$$r/$(HOST_SUBDIR)/prev-gcc/ \
+ -B$(build_tooldir)/bin/ \
+ -nostdinc++ \
+ -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \
+ -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \
+ -I$$r/$(srcdir)/libstdc++-v3/libsupc++ \
+ -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs"; \
+ export CXX_FOR_BUILD; \
+ LDFLAGS="$(BOOT_LDFLAGS)"; export LDFLAGS; \
+ $(RPATH_ENVVAR)=`echo "$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:$$$(RPATH_ENVVAR)"| sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; \
+ export $(RPATH_ENVVAR);
# Target libraries are put under this directory:
TARGET_SUBDIR = @target_subdir@
@@ -626,6 +645,7 @@ X11_FLAGS_TO_PASS = \
POSTSTAGE1_FLAGS_TO_PASS = \
CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
+ CXX="$${CXX}" CXX_FOR_BUILD="$${CXX_FOR_BUILD}" \
GNATBIND="$$r/$(HOST_SUBDIR)/prev-gcc/gnatbind" \
LDFLAGS="$(BOOT_LDFLAGS)" \
"`echo 'ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
@@ -910,7 +930,9 @@ all-host: maybe-all-gnattools
.PHONY: all-target
+@if target-libstdc++-v3-no-bootstrap
all-target: maybe-all-target-libstdc++-v3
+@endif target-libstdc++-v3-no-bootstrap
all-target: maybe-all-target-libmudflap
all-target: maybe-all-target-libssp
all-target: maybe-all-target-newlib
@@ -43069,7 +43091,6 @@ configure-target-libstdc++-v3: stage_current
@if target-libstdc++-v3
maybe-configure-target-libstdc++-v3: configure-target-libstdc++-v3
configure-target-libstdc++-v3:
- @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libstdc++-v3..."; \
@@ -43106,6 +43127,351 @@ configure-target-libstdc++-v3:
+.PHONY: configure-stage1-target-libstdc++-v3 maybe-configure-stage1-target-libstdc++-v3
+maybe-configure-stage1-target-libstdc++-v3:
+@if target-libstdc++-v3-bootstrap
+maybe-configure-stage1-target-libstdc++-v3: configure-stage1-target-libstdc++-v3
+configure-stage1-target-libstdc++-v3:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libstdc++-v3..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile; \
+ mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ CFLAGS="$(STAGE1_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE1_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ echo Configuring stage 1 in $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libstdc++-v3/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
+ libsrcdir="$$s/libstdc++-v3"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ \
+ --disable-intermodule $(STAGE1_CHECKING) --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+@endif target-libstdc++-v3-bootstrap
+
+.PHONY: configure-stage2-target-libstdc++-v3 maybe-configure-stage2-target-libstdc++-v3
+maybe-configure-stage2-target-libstdc++-v3:
+@if target-libstdc++-v3-bootstrap
+maybe-configure-stage2-target-libstdc++-v3: configure-stage2-target-libstdc++-v3
+configure-stage2-target-libstdc++-v3:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libstdc++-v3..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile; \
+ mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(STAGE2_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE2_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ echo Configuring stage 2 in $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libstdc++-v3/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
+ libsrcdir="$$s/libstdc++-v3"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@
+@endif target-libstdc++-v3-bootstrap
+
+.PHONY: configure-stageb2g0-target-libstdc++-v3 maybe-configure-stageb2g0-target-libstdc++-v3
+maybe-configure-stageb2g0-target-libstdc++-v3:
+@if target-libstdc++-v3-bootstrap
+maybe-configure-stageb2g0-target-libstdc++-v3: configure-stageb2g0-target-libstdc++-v3
+configure-stageb2g0-target-libstdc++-v3:
+ @[ $(current_stage) = stageb2g0 ] || $(MAKE) stageb2g0-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libstdc++-v3..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile; \
+ mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(STAGE2_LIBCFLAGS) -g0 $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE2_LIBCFLAGS) -g0 $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ echo Configuring stage b2g0 in $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libstdc++-v3/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
+ libsrcdir="$$s/libstdc++-v3"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@
+@endif target-libstdc++-v3-bootstrap
+
+.PHONY: configure-stage3-target-libstdc++-v3 maybe-configure-stage3-target-libstdc++-v3
+maybe-configure-stage3-target-libstdc++-v3:
+@if target-libstdc++-v3-bootstrap
+maybe-configure-stage3-target-libstdc++-v3: configure-stage3-target-libstdc++-v3
+configure-stage3-target-libstdc++-v3:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libstdc++-v3..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile; \
+ mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(STAGE3_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE3_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ echo Configuring stage 3 in $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libstdc++-v3/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
+ libsrcdir="$$s/libstdc++-v3"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@
+@endif target-libstdc++-v3-bootstrap
+
+.PHONY: configure-stageb3g2-target-libstdc++-v3 maybe-configure-stageb3g2-target-libstdc++-v3
+maybe-configure-stageb3g2-target-libstdc++-v3:
+@if target-libstdc++-v3-bootstrap
+maybe-configure-stageb3g2-target-libstdc++-v3: configure-stageb3g2-target-libstdc++-v3
+configure-stageb3g2-target-libstdc++-v3:
+ @[ $(current_stage) = stageb3g2 ] || $(MAKE) stageb3g2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libstdc++-v3..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile; \
+ mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(STAGE3_LIBCFLAGS) -g2 $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE3_LIBCFLAGS) -g2 $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ echo Configuring stage b3g2 in $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libstdc++-v3/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
+ libsrcdir="$$s/libstdc++-v3"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@
+@endif target-libstdc++-v3-bootstrap
+
+.PHONY: configure-stage4-target-libstdc++-v3 maybe-configure-stage4-target-libstdc++-v3
+maybe-configure-stage4-target-libstdc++-v3:
+@if target-libstdc++-v3-bootstrap
+maybe-configure-stage4-target-libstdc++-v3: configure-stage4-target-libstdc++-v3
+configure-stage4-target-libstdc++-v3:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libstdc++-v3..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile; \
+ mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(STAGE4_CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE4_CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ echo Configuring stage 4 in $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libstdc++-v3/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
+ libsrcdir="$$s/libstdc++-v3"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@
+@endif target-libstdc++-v3-bootstrap
+
+.PHONY: configure-stageprofile-target-libstdc++-v3 maybe-configure-stageprofile-target-libstdc++-v3
+maybe-configure-stageprofile-target-libstdc++-v3:
+@if target-libstdc++-v3-bootstrap
+maybe-configure-stageprofile-target-libstdc++-v3: configure-stageprofile-target-libstdc++-v3
+configure-stageprofile-target-libstdc++-v3:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libstdc++-v3..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile; \
+ mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(STAGE2_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE2_LIBCFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ echo Configuring stage profile in $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libstdc++-v3/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
+ libsrcdir="$$s/libstdc++-v3"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@
+@endif target-libstdc++-v3-bootstrap
+
+.PHONY: configure-stagefeedback-target-libstdc++-v3 maybe-configure-stagefeedback-target-libstdc++-v3
+maybe-configure-stagefeedback-target-libstdc++-v3:
+@if target-libstdc++-v3-bootstrap
+maybe-configure-stagefeedback-target-libstdc++-v3: configure-stagefeedback-target-libstdc++-v3
+configure-stagefeedback-target-libstdc++-v3:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libstdc++-v3..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile; \
+ mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ echo Configuring stage feedback in $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libstdc++-v3/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
+ libsrcdir="$$s/libstdc++-v3"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@
+@endif target-libstdc++-v3-bootstrap
+
+
+
.PHONY: all-target-libstdc++-v3 maybe-all-target-libstdc++-v3
@@ -43117,7 +43483,6 @@ all-target-libstdc++-v3: stage_current
TARGET-target-libstdc++-v3=all
maybe-all-target-libstdc++-v3: all-target-libstdc++-v3
all-target-libstdc++-v3: configure-target-libstdc++-v3
- @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
@@ -43128,6 +43493,310 @@ all-target-libstdc++-v3: configure-target-libstdc++-v3
+.PHONY: all-stage1-target-libstdc++-v3 maybe-all-stage1-target-libstdc++-v3
+.PHONY: clean-stage1-target-libstdc++-v3 maybe-clean-stage1-target-libstdc++-v3
+maybe-all-stage1-target-libstdc++-v3:
+maybe-clean-stage1-target-libstdc++-v3:
+@if target-libstdc++-v3-bootstrap
+maybe-all-stage1-target-libstdc++-v3: all-stage1-target-libstdc++-v3
+all-stage1: all-stage1-target-libstdc++-v3
+TARGET-stage1-target-libstdc++-v3 = $(TARGET-target-libstdc++-v3)
+all-stage1-target-libstdc++-v3: configure-stage1-target-libstdc++-v3
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" CXXFLAGS="$(STAGE1_CFLAGS)" \
+ LIBCFLAGS="$(STAGE1_LIBCFLAGS)" \
+ CFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" \
+ CXXFLAGS_FOR_TARGET="$(STAGE1_LIBCFLAGS)" $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ $(TARGET-stage1-target-libstdc++-v3)
+
+maybe-clean-stage1-target-libstdc++-v3: clean-stage1-target-libstdc++-v3
+clean-stage1: clean-stage1-target-libstdc++-v3
+clean-stage1-target-libstdc++-v3:
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage1-libstdc++-v3/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ clean
+@endif target-libstdc++-v3-bootstrap
+
+
+.PHONY: all-stage2-target-libstdc++-v3 maybe-all-stage2-target-libstdc++-v3
+.PHONY: clean-stage2-target-libstdc++-v3 maybe-clean-stage2-target-libstdc++-v3
+maybe-all-stage2-target-libstdc++-v3:
+maybe-clean-stage2-target-libstdc++-v3:
+@if target-libstdc++-v3-bootstrap
+maybe-all-stage2-target-libstdc++-v3: all-stage2-target-libstdc++-v3
+all-stage2: all-stage2-target-libstdc++-v3
+TARGET-stage2-target-libstdc++-v3 = $(TARGET-target-libstdc++-v3)
+all-stage2-target-libstdc++-v3: configure-stage2-target-libstdc++-v3
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE2_CFLAGS)" CXXFLAGS="$(STAGE2_CFLAGS)" \
+ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ $(TARGET-stage2-target-libstdc++-v3)
+
+maybe-clean-stage2-target-libstdc++-v3: clean-stage2-target-libstdc++-v3
+clean-stage2: clean-stage2-target-libstdc++-v3
+clean-stage2-target-libstdc++-v3:
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage2-libstdc++-v3/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ \
+ clean
+@endif target-libstdc++-v3-bootstrap
+
+
+.PHONY: all-stageb2g0-target-libstdc++-v3 maybe-all-stageb2g0-target-libstdc++-v3
+.PHONY: clean-stageb2g0-target-libstdc++-v3 maybe-clean-stageb2g0-target-libstdc++-v3
+maybe-all-stageb2g0-target-libstdc++-v3:
+maybe-clean-stageb2g0-target-libstdc++-v3:
+@if target-libstdc++-v3-bootstrap
+maybe-all-stageb2g0-target-libstdc++-v3: all-stageb2g0-target-libstdc++-v3
+all-stageb2g0: all-stageb2g0-target-libstdc++-v3
+TARGET-stageb2g0-target-libstdc++-v3 = $(TARGET-target-libstdc++-v3)
+all-stageb2g0-target-libstdc++-v3: configure-stageb2g0-target-libstdc++-v3
+ @[ $(current_stage) = stageb2g0 ] || $(MAKE) stageb2g0-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE2_CFLAGS) -g0" CXXFLAGS="$(STAGE2_CFLAGS) -g0" \
+ LIBCFLAGS="$(STAGE2_LIBCFLAGS) -g0" \
+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" \
+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS) -g0" $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ $(TARGET-stageb2g0-target-libstdc++-v3)
+
+maybe-clean-stageb2g0-target-libstdc++-v3: clean-stageb2g0-target-libstdc++-v3
+clean-stageb2g0: clean-stageb2g0-target-libstdc++-v3
+clean-stageb2g0-target-libstdc++-v3:
+ @if [ $(current_stage) = stageb2g0 ]; then \
+ [ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stageb2g0-libstdc++-v3/Makefile ] || exit 0; \
+ $(MAKE) stageb2g0-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ \
+ clean
+@endif target-libstdc++-v3-bootstrap
+
+
+.PHONY: all-stage3-target-libstdc++-v3 maybe-all-stage3-target-libstdc++-v3
+.PHONY: clean-stage3-target-libstdc++-v3 maybe-clean-stage3-target-libstdc++-v3
+maybe-all-stage3-target-libstdc++-v3:
+maybe-clean-stage3-target-libstdc++-v3:
+@if target-libstdc++-v3-bootstrap
+maybe-all-stage3-target-libstdc++-v3: all-stage3-target-libstdc++-v3
+all-stage3: all-stage3-target-libstdc++-v3
+TARGET-stage3-target-libstdc++-v3 = $(TARGET-target-libstdc++-v3)
+all-stage3-target-libstdc++-v3: configure-stage3-target-libstdc++-v3
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE3_CFLAGS)" CXXFLAGS="$(STAGE3_CFLAGS)" \
+ LIBCFLAGS="$(STAGE3_LIBCFLAGS)" \
+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" \
+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS)" $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ $(TARGET-stage3-target-libstdc++-v3)
+
+maybe-clean-stage3-target-libstdc++-v3: clean-stage3-target-libstdc++-v3
+clean-stage3: clean-stage3-target-libstdc++-v3
+clean-stage3-target-libstdc++-v3:
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage3-libstdc++-v3/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ \
+ clean
+@endif target-libstdc++-v3-bootstrap
+
+
+.PHONY: all-stageb3g2-target-libstdc++-v3 maybe-all-stageb3g2-target-libstdc++-v3
+.PHONY: clean-stageb3g2-target-libstdc++-v3 maybe-clean-stageb3g2-target-libstdc++-v3
+maybe-all-stageb3g2-target-libstdc++-v3:
+maybe-clean-stageb3g2-target-libstdc++-v3:
+@if target-libstdc++-v3-bootstrap
+maybe-all-stageb3g2-target-libstdc++-v3: all-stageb3g2-target-libstdc++-v3
+all-stageb3g2: all-stageb3g2-target-libstdc++-v3
+TARGET-stageb3g2-target-libstdc++-v3 = $(TARGET-target-libstdc++-v3)
+all-stageb3g2-target-libstdc++-v3: configure-stageb3g2-target-libstdc++-v3
+ @[ $(current_stage) = stageb3g2 ] || $(MAKE) stageb3g2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE3_CFLAGS) -g2" CXXFLAGS="$(STAGE3_CFLAGS) -g2" \
+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -g2" \
+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" \
+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -g2" $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ $(TARGET-stageb3g2-target-libstdc++-v3)
+
+maybe-clean-stageb3g2-target-libstdc++-v3: clean-stageb3g2-target-libstdc++-v3
+clean-stageb3g2: clean-stageb3g2-target-libstdc++-v3
+clean-stageb3g2-target-libstdc++-v3:
+ @if [ $(current_stage) = stageb3g2 ]; then \
+ [ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stageb3g2-libstdc++-v3/Makefile ] || exit 0; \
+ $(MAKE) stageb3g2-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ \
+ clean
+@endif target-libstdc++-v3-bootstrap
+
+
+.PHONY: all-stage4-target-libstdc++-v3 maybe-all-stage4-target-libstdc++-v3
+.PHONY: clean-stage4-target-libstdc++-v3 maybe-clean-stage4-target-libstdc++-v3
+maybe-all-stage4-target-libstdc++-v3:
+maybe-clean-stage4-target-libstdc++-v3:
+@if target-libstdc++-v3-bootstrap
+maybe-all-stage4-target-libstdc++-v3: all-stage4-target-libstdc++-v3
+all-stage4: all-stage4-target-libstdc++-v3
+TARGET-stage4-target-libstdc++-v3 = $(TARGET-target-libstdc++-v3)
+all-stage4-target-libstdc++-v3: configure-stage4-target-libstdc++-v3
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE4_CFLAGS)" CXXFLAGS="$(STAGE4_CFLAGS)" \
+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" \
+ CXXFLAGS_FOR_TARGET="$(STAGE4_CFLAGS)" $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ $(TARGET-stage4-target-libstdc++-v3)
+
+maybe-clean-stage4-target-libstdc++-v3: clean-stage4-target-libstdc++-v3
+clean-stage4: clean-stage4-target-libstdc++-v3
+clean-stage4-target-libstdc++-v3:
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage4-libstdc++-v3/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ \
+ clean
+@endif target-libstdc++-v3-bootstrap
+
+
+.PHONY: all-stageprofile-target-libstdc++-v3 maybe-all-stageprofile-target-libstdc++-v3
+.PHONY: clean-stageprofile-target-libstdc++-v3 maybe-clean-stageprofile-target-libstdc++-v3
+maybe-all-stageprofile-target-libstdc++-v3:
+maybe-clean-stageprofile-target-libstdc++-v3:
+@if target-libstdc++-v3-bootstrap
+maybe-all-stageprofile-target-libstdc++-v3: all-stageprofile-target-libstdc++-v3
+all-stageprofile: all-stageprofile-target-libstdc++-v3
+TARGET-stageprofile-target-libstdc++-v3 = $(TARGET-target-libstdc++-v3)
+all-stageprofile-target-libstdc++-v3: configure-stageprofile-target-libstdc++-v3
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" CXXFLAGS="$(STAGE2_CFLAGS) -fprofile-generate" \
+ LIBCFLAGS="$(STAGE2_LIBCFLAGS)" \
+ CFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" \
+ CXXFLAGS_FOR_TARGET="$(STAGE2_LIBCFLAGS)" $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ $(TARGET-stageprofile-target-libstdc++-v3)
+
+maybe-clean-stageprofile-target-libstdc++-v3: clean-stageprofile-target-libstdc++-v3
+clean-stageprofile: clean-stageprofile-target-libstdc++-v3
+clean-stageprofile-target-libstdc++-v3:
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stageprofile-libstdc++-v3/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ \
+ clean
+@endif target-libstdc++-v3-bootstrap
+
+
+.PHONY: all-stagefeedback-target-libstdc++-v3 maybe-all-stagefeedback-target-libstdc++-v3
+.PHONY: clean-stagefeedback-target-libstdc++-v3 maybe-clean-stagefeedback-target-libstdc++-v3
+maybe-all-stagefeedback-target-libstdc++-v3:
+maybe-clean-stagefeedback-target-libstdc++-v3:
+@if target-libstdc++-v3-bootstrap
+maybe-all-stagefeedback-target-libstdc++-v3: all-stagefeedback-target-libstdc++-v3
+all-stagefeedback: all-stagefeedback-target-libstdc++-v3
+TARGET-stagefeedback-target-libstdc++-v3 = $(TARGET-target-libstdc++-v3)
+all-stagefeedback-target-libstdc++-v3: configure-stagefeedback-target-libstdc++-v3
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE3_CFLAGS) -fprofile-use" CXXFLAGS="$(STAGE3_CFLAGS) -fprofile-use" \
+ LIBCFLAGS="$(STAGE3_LIBCFLAGS) -fprofile-use" \
+ CFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" \
+ CXXFLAGS_FOR_TARGET="$(STAGE3_LIBCFLAGS) -fprofile-use" $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ $(TARGET-stagefeedback-target-libstdc++-v3)
+
+maybe-clean-stagefeedback-target-libstdc++-v3: clean-stagefeedback-target-libstdc++-v3
+clean-stagefeedback: clean-stagefeedback-target-libstdc++-v3
+clean-stagefeedback-target-libstdc++-v3:
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stagefeedback-libstdc++-v3/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' \
+ \
+ clean
+@endif target-libstdc++-v3-bootstrap
+
+
+
+
.PHONY: check-target-libstdc++-v3 maybe-check-target-libstdc++-v3
@@ -55270,7 +55939,14 @@ restrap:: all
# Generic dependencies for target modules on host stuff, especially gcc
@if gcc-bootstrap
-configure-target-libstdc++-v3: stage_last
+configure-stage1-target-libstdc++-v3: maybe-all-stage1-gcc
+configure-stage2-target-libstdc++-v3: maybe-all-stage2-gcc
+configure-stageb2g0-target-libstdc++-v3: maybe-all-stageb2g0-gcc
+configure-stage3-target-libstdc++-v3: maybe-all-stage3-gcc
+configure-stageb3g2-target-libstdc++-v3: maybe-all-stageb3g2-gcc
+configure-stage4-target-libstdc++-v3: maybe-all-stage4-gcc
+configure-stageprofile-target-libstdc++-v3: maybe-all-stageprofile-gcc
+configure-stagefeedback-target-libstdc++-v3: maybe-all-stagefeedback-gcc
configure-target-libmudflap: stage_last
configure-target-libssp: stage_last
configure-target-newlib: stage_last
@@ -56143,6 +56819,14 @@ all-target-winsup: maybe-all-target-libtermcap
@if gcc-bootstrap
+configure-stage1-target-libstdc++-v3: maybe-all-stage1-target-libgcc
+configure-stage2-target-libstdc++-v3: maybe-all-stage2-target-libgcc
+configure-stageb2g0-target-libstdc++-v3: maybe-all-stageb2g0-target-libgcc
+configure-stage3-target-libstdc++-v3: maybe-all-stage3-target-libgcc
+configure-stageb3g2-target-libstdc++-v3: maybe-all-stageb3g2-target-libgcc
+configure-stage4-target-libstdc++-v3: maybe-all-stage4-target-libgcc
+configure-stageprofile-target-libstdc++-v3: maybe-all-stageprofile-target-libgcc
+configure-stagefeedback-target-libstdc++-v3: maybe-all-stagefeedback-target-libgcc
@endif gcc-bootstrap
@if gcc-no-bootstrap
diff --git a/Makefile.tpl b/Makefile.tpl
index d7dc6335635..d7ce79defd6 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -218,7 +218,26 @@ POSTSTAGE1_HOST_EXPORTS = \
$$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \
-B$$r/$(HOST_SUBDIR)/prev-gcc/ \
-B$(build_tooldir)/bin/"; export CC_FOR_BUILD; \
- LDFLAGS="$(BOOT_LDFLAGS)"; export LDFLAGS;
+ CXX="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/g++$(exeext) \
+ -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ \
+ -nostdinc++ \
+ -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \
+ -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \
+ -I$$r/$(srcdir)/libstdc++-v3/libsupc++ \
+ -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs"; export CXX; \
+ CXX_FOR_BUILD="$(STAGE_CC_WRAPPER) \
+ $$r/$(HOST_SUBDIR)/prev-gcc/g++$(exeext) \
+ -B$$r/$(HOST_SUBDIR)/prev-gcc/ \
+ -B$(build_tooldir)/bin/ \
+ -nostdinc++ \
+ -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \
+ -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \
+ -I$$r/$(srcdir)/libstdc++-v3/libsupc++ \
+ -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs"; \
+ export CXX_FOR_BUILD; \
+ LDFLAGS="$(BOOT_LDFLAGS)"; export LDFLAGS; \
+ $(RPATH_ENVVAR)=`echo "$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:$$$(RPATH_ENVVAR)"| sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; \
+ export $(RPATH_ENVVAR);
# Target libraries are put under this directory:
TARGET_SUBDIR = @target_subdir@
@@ -514,6 +533,7 @@ X11_FLAGS_TO_PASS = \
POSTSTAGE1_FLAGS_TO_PASS = \
CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
+ CXX="$${CXX}" CXX_FOR_BUILD="$${CXX_FOR_BUILD}" \
GNATBIND="$$r/$(HOST_SUBDIR)/prev-gcc/gnatbind" \
LDFLAGS="$(BOOT_LDFLAGS)" \
"`echo 'ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
diff --git a/config-ml.in b/config-ml.in
index f2497ada4f8..9cbbc74a818 100644
--- a/config-ml.in
+++ b/config-ml.in
@@ -225,13 +225,14 @@ done
case "${host}" in
arc-*-elf*)
- if [ x$enable_biendian != xyes ]
+ if [ x$enable_biendian = xno ]
then
- old_multidirs=${multidirs}
+ old_multidirs="${multidirs}"
multidirs=""
for x in ${old_multidirs}; do
- case "${x}" in
- *be*) : ;;
+ case "$x" in
+ *le* ) : ;;
+ *be* ) : ;;
*) multidirs="${multidirs} ${x}" ;;
esac
done
diff --git a/config.sub b/config.sub
index 9489dc7867b..69e748b1fed 100755
--- a/config.sub
+++ b/config.sub
@@ -273,6 +273,7 @@ case $basic_machine in
| mn10200 | mn10300 \
| mt \
| msp430 \
+ | mxp \
| nios | nios2 \
| ns16k | ns32k \
| or32 \
@@ -357,6 +358,7 @@ case $basic_machine in
| mmix-* \
| mt-* \
| msp430-* \
+ | mxp-* \
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
diff --git a/configure b/configure
index ed01a96a5a6..c25b0f47c32 100755
--- a/configure
+++ b/configure
@@ -5065,8 +5065,8 @@ fi
-# By default, C is the only stage 1 language.
-stage1_languages=,c,
+# By default, C and C++ are the only stage 1 languages.
+stage1_languages=,c,c++,
# Figure out what language subdirectories are present.
# Look if the user specified --enable-languages="..."; if not, use
@@ -5128,9 +5128,9 @@ if test -d ${srcdir}/gcc; then
esac
done
- new_enable_languages=,c,
- missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
- potential_languages=,c,
+ new_enable_languages=,c,c++,
+ missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ -e s/,c++,/,/ `
+ potential_languages=,c,c++,
for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
case ${lang_frag} in
@@ -6280,7 +6280,7 @@ case " $target_configdirs " in
# If we're building newlib, use its generic headers last, but search
# for any libc-related directories first (so make it the last -B
# switch).
- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/sys/'$target_cpu'/sys -isystem $$s/newlib/libc/include'
# If we're building libgloss, find the startup file, simulator library
# and linker script.
@@ -12443,69 +12443,24 @@ case $build in
esac
# This is aimed to mimic bootstrap with a non-GCC compiler to catch problems.
-if test "$GCC" = yes; then
- saved_CFLAGS="$CFLAGS"
-
- # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
- CFLAGS="$CFLAGS -fkeep-inline-functions"
- echo "$as_me:$LINENO: checking whether -fkeep-inline-functions is supported" >&5
-echo $ECHO_N "checking whether -fkeep-inline-functions is supported... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#if (__GNUC__ < 3) \
- || (__GNUC__ == 3 && (__GNUC_MINOR__ < 3 \
- || (__GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ < 1)))
-#error http://gcc.gnu.org/PR29382
-#endif
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; stage1_cflags="$stage1_cflags -fkeep-inline-functions"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
- CFLAGS="$saved_CFLAGS"
-fi
+#if test "$GCC" = yes; then
+# saved_CFLAGS="$CFLAGS"
+#
+# # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
+# CFLAGS="$CFLAGS -fkeep-inline-functions"
+# AC_MSG_CHECKING([whether -fkeep-inline-functions is supported])
+# AC_TRY_COMPILE([
+##if (__GNUC__ < 3) \
+# || (__GNUC__ == 3 && (__GNUC_MINOR__ < 3 \
+# || (__GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ < 1)))
+##error http://gcc.gnu.org/PR29382
+##endif
+# ],,
+# [AC_MSG_RESULT([yes]); stage1_cflags="$stage1_cflags -fkeep-inline-functions"],
+# [AC_MSG_RESULT([no])])
+#
+# CFLAGS="$saved_CFLAGS"
+#fi
diff --git a/configure.ac b/configure.ac
index c8fb23f2d5c..af54c35b917 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1438,8 +1438,8 @@ AC_SUBST(clooglibs)
AC_SUBST(clooginc)
-# By default, C is the only stage 1 language.
-stage1_languages=,c,
+# By default, C and C++ are the only stage 1 languages.
+stage1_languages=,c,c++,
# Figure out what language subdirectories are present.
# Look if the user specified --enable-languages="..."; if not, use
@@ -1501,9 +1501,9 @@ if test -d ${srcdir}/gcc; then
esac
done
- new_enable_languages=,c,
- missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
- potential_languages=,c,
+ new_enable_languages=,c,c++,
+ missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ -e s/,c++,/,/ `
+ potential_languages=,c,c++,
for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
case ${lang_frag} in
@@ -2581,7 +2581,7 @@ case " $target_configdirs " in
# If we're building newlib, use its generic headers last, but search
# for any libc-related directories first (so make it the last -B
# switch).
- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/sys/'$target_cpu'/sys -isystem $$s/newlib/libc/include'
# If we're building libgloss, find the startup file, simulator library
# and linker script.
@@ -2901,24 +2901,24 @@ case $build in
esac
# This is aimed to mimic bootstrap with a non-GCC compiler to catch problems.
-if test "$GCC" = yes; then
- saved_CFLAGS="$CFLAGS"
-
- # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
- CFLAGS="$CFLAGS -fkeep-inline-functions"
- AC_MSG_CHECKING([whether -fkeep-inline-functions is supported])
- AC_TRY_COMPILE([
-#if (__GNUC__ < 3) \
- || (__GNUC__ == 3 && (__GNUC_MINOR__ < 3 \
- || (__GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ < 1)))
-#error http://gcc.gnu.org/PR29382
-#endif
- ],,
- [AC_MSG_RESULT([yes]); stage1_cflags="$stage1_cflags -fkeep-inline-functions"],
- [AC_MSG_RESULT([no])])
-
- CFLAGS="$saved_CFLAGS"
-fi
+#if test "$GCC" = yes; then
+# saved_CFLAGS="$CFLAGS"
+#
+# # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
+# CFLAGS="$CFLAGS -fkeep-inline-functions"
+# AC_MSG_CHECKING([whether -fkeep-inline-functions is supported])
+# AC_TRY_COMPILE([
+##if (__GNUC__ < 3) \
+# || (__GNUC__ == 3 && (__GNUC_MINOR__ < 3 \
+# || (__GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ < 1)))
+##error http://gcc.gnu.org/PR29382
+##endif
+# ],,
+# [AC_MSG_RESULT([yes]); stage1_cflags="$stage1_cflags -fkeep-inline-functions"],
+# [AC_MSG_RESULT([no])])
+#
+# CFLAGS="$saved_CFLAGS"
+#fi
AC_SUBST(stage1_cflags)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7a150a37755..d267b4bf9d4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,35 @@
+2009-05-13 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * Makefile.in (($(TA)ira-emit.o): Depend on $(DF_H).
+
+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).
+
+ * config/arc/arc.c: #include "df.h".
+ (arc_address_cost): Use INTVAL to refer to the value of a CONST_INT.
+
+2009-04-25 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/sh/sh.md (cbranchsi4): Use UNKNOWN as not-defined rtx code.
+ (cbranchdi4): Likewise.
+ * config/sh/sh.c (prepare_cbranch_operands): Likewise.
+ (expand_cbranchdi4): Likewise.
+
+2009-04-24 J"orn Rennecke <joern.rennecke@arc.com>
+
+ config/sh/t-sh: (gt-sh.h): Remove redundant rule.
+
+2009-04-07 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * haifa-sched.c (insn_cost): No longer HAIFA_INLINE.
+
2009-04-21 Release Manager
* GCC 4.4.0 released.
diff --git a/gcc/ChangeLog.ARC b/gcc/ChangeLog.ARC
new file mode 100644
index 00000000000..057208b32bb
--- /dev/null
+++ b/gcc/ChangeLog.ARC
@@ -0,0 +1,2537 @@
+2009-05-20 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/rs6000/rs6000.md (doloop_end): Accept extra operand.
+
+ * config/spu/spu.md (doloop_end): Accept extra operand.
+
+2009-05-13 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/mxp/mxp-genregset.c (emit_regsets): Emit REG_ALLOC_ORDER
+ definition.
+ * config/mxp/mxp.h (REG_ALLOC_ORDER): Don't define.
+
+ * config/mpx/t-mxp ($(out_object_file), gt-sh.h): Remove.
+ (tm_file_list): Add mxp-regset.h instead of s-mxp-regset-h.
+ * config/mxp/mxp.h (mxp-regset.h): Don't include for target-types.h.
+ * config/arc/arc.c (arc_expand_prologue): If fame_size_to_allocate
+ is narrower than HOST_WIDE_INT, zero-extend it before negation.
+
+2009-05-12 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/mxp/t-mxp (tm_file_list): Add s-mxp-regset-h.
+ (build/genconstants.o): Remove extra dependency.
+
+2009-05-11 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * varasm.c (pickle_in_section): Add / change casts to make g++ content.
+ * genmodes.c (fixup_target_modes): Skip commoning for MODE_VECTOR_CC.
+ * config/arc/arc-protos.h (regno_clobbered_p): Declare.
+ * config/mxp/mxp.md (doloop_end): Accept new argument.
+ (nop): New pattern.
+ * config/mxp/mxp-protos.h (mxp_secondary_reload): Move decalration
+ from here...
+ * config/mxp/mxp.c: ... to here.
+ * config/mxp/mxp.c: Include multi-target.h, and add
+ START_TARGET_SPECIFIC / END_TARGET_SPECIFIC markers.
+ * config/mxp/mxp.h: Likewise.
+ * config/mxp/mxp.c: (mxp_init_machine_status): Cast return value of
+ ggc_alloc_cleared.
+ (mxp_secondary_reload): Change arguments / return type to match
+ target.h declaration. Rename class to rclass.
+ (mxp_conditional_register_usage): Cast argument to
+ reg_classes_intersect_p .
+ (mxp_memory_move_cost): Rename class to rclass.
+ * config/mxp/mxp-genregset.h (emit_c): Make emitted program include
+ multi-target.h and have START_TARGET_SPECIFIC / END_TARGET_SPECIFIC
+ markers.
+ * config/arc/arc-protos.h (arc_secondary_reload): Move declaration
+ from here...
+ * config/arc/arc.c: ... to here.
+ * config/arc/arc.c (arc_override_options): Avoid changing general
+ flags for !main_target.
+ (frame_move_inc): Use alloc_reg_note.
+ (arc_finalize_pic): Rename new to newx.
+ (arc_verify_short): Rename operator to oprtr.
+ (arc_rtx_costs): cast argument to rtx_cost.
+ (arc_legitimize_pic_address): Rename new to newx.
+ (arc_expand_builtin, arc_expand_simd_builtin): Use EXPAND_NORMAL
+ instead of 0 to pass to expand_expr.
+ (arc_reorg): Use alloc_reg_note. Rename operator to oprtr.
+ (arc_simd_builtin_desc_list): Use UNKNOWN for first rtx_code.
+ (arc_secondary_reload): Rename class to rclass.
+ (prepare_move_operands): Rename new to newx.
+ (arc_legitimize_address): Cast argument to memory_address_p.
+ * config/arc/arc.h (enum reg_class): Rename SP_REG to SP_REGS.
+ Changed user.
+ (ARG_POINTER_CFA_OFFSET): Add TARGET_SCOPE.
+
+2009-04-03 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * longlong.h [__ARC700__] (umul_ppmm): Add earlyclobber
+ constraint modifier for operand 1.
+
+2009-02-24 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * loop-doloop.c (doloop_valid_p): Rename to:
+ (validize_doloop). Try to fix up loops with conditons for infinite
+ looping by enclosing them in an outer loop.
+ Changed caller.
+ (add_test): Add new parameter edgep. Changed caller.
+
+ * loop-iv.c (get_simple_loop_desc): Use XCNEW.
+
+2009-02-11 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * postreload.c (reload_combine): Also seek to combine a constant set
+ into a single mem-ref use.
+ * global.c (find_reg): Don't make allocations that are denied by
+ DONT_REALLOC.
+ * gcse.c (constprop_register): Don't propagate constants into
+ memory accesses, or into binary operations where the rtx_cost is
+ non-negligible.
+ (one_cprop_pass): Make function calls to provide REG_N_REFS.
+ * explow.c (memory_address): Call LEGITIMATE_ADDRESS also in the
+ cse-driven case.
+ * config/arc/arc-protos.h (arc_legitimize_address): Declare.
+ * config/arc/arc.c (TARGET_MIN_ANCHOR_OFFSET): Redefine.
+ (TARGET_MAX_ANCHOR_OFFSET): Likewise.
+ (prepare_move_operands): Call arc_legitimize_address on memory
+ addresses.
+ (arc_legitimize_address): New function.
+ * config/arc/arc.h (LEGITIMIZE_ADDRESS): Call arc_legitimize_address.
+ (LEGITIMIZE_RELOAD_ADDRESS): Decompose reg+offset into
+ anchor + small offset, and including non-allocated registers.
+ (DONT_REALLOC): Define.
+ * config/arc/arc.md (movsi): Replace VUsc/Cal with VUsc/C32 alternative.
+ * config/arc/constraints.md (C32): New constraint.
+
+ * config/arc/arc.c (arc_save_restore): Fix handling of extra registers
+ for epilogue_p == 2.
+
+2009-02-09 J"orn Rennecke <joern.rennecke@arc.com>
+
+ PR 39141:
+ * tree-ssa-loop-manip.c (gimple_can_duplicate_loop_to_header_edge):
+ New function.
+ * tree-ssa-loop-ivcanon.c (enum unroll_level): New value
+ UL_ESTIMATE_GROWTH.
+ (try_unroll_loop_completely): Handle UL_ESTIMATE_GROWTH.
+ (canonicalize_loop_induction_variables): Likewise.
+ (tree_unroll_loops_completely): Don't completely unroll loops where
+ the outer loop/function is larger than
+ PARAM_MAX_COMPLETELY_PEELED_OUTER_INSNS, or will/would become thus
+ due to unrolling.
+ * cfgloop.h (enum li_flags): New value LI_REALLY_FROM_INNERMOST.
+ (fel_init): Handle LI_REALLY_FROM_INNERMOST.
+ * tree-flow.h (gimple_can_duplicate_loop_to_header_edge): Declare.
+ * params.def (PARAM_MAX_COMPLETELY_PEELED_OUTER_INSNS): New parameter.
+
+2009-02-02 J"orn Rennecke <joern.rennecke@arc.com>
+
+ PR 38785:
+ * tree-ssa-pre.c (ppre_n_insert_for_speed_p): New function.
+ * (do_partial_partial_insertion): Use it to throttle
+ insert_into_preds_of_block calls.
+ * common.opt (-ftree-pre-partial-partial-obliviously): New option.
+
+2009-01-15 Steven Bosscher <steven@gcc.gnu.org>
+
+ http://gcc.gnu.org/ml/gcc-patches/2008-12/msg00199.html
+ * opts.c (decode_options): Fix initialization of
+ flag_tree_switch_conversion. Don't set optimize_size in block
+ that is conditional on optimize_size (sic). Explicitly disable
+ PRE when optimizing for size (and add comment for rationale).
+ * tree-ssa-pre.c: Update outline of the algorithm.
+ (bitmap_set_and): Prototype.
+ (insert_into_preds_of_block): Don't report discovery of partial
+ redundancies here, do so from the callers instead (see below).
+ (do_regular_insertion): Add counter for an estimate for the number
+ of inserts required to eliminate a partial redundancy. If the
+ current function is optimized for size, only perform the partial
+ redundancy elimination if this requires inserting in only one
+ predecessor. Report all found partial redundancies from here.
+ (do_partial_partial_insertion): Report them from here too.
+ (insert_aux): Do not insert for partial-partial redundancies when
+ optimizing for size.
+ (execute_pre): Remove bogus ATTRIBUTE_UNUSED.
+ (do_pre): Run FRE at least, if PRE is disabled.
+ (gate_pre): Return true if flag_tree pre or flag_tree_fre is set.
+
+2009-01-15 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * common.opt (ftree-pre-partial-partial): New option.
+ * opts.c (decode_options): Initialize flag_tree_pre_partial_partial.
+ * tree-ssa-pre.c (execute_pre): Use flag_tree_pre_partial_partial.
+
+2009-01-07 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/constraints.md (Rcw): Remove ARC700 conditional.
+ (Rcr): New constraint.
+ * config/arc/arc.md (mulsi3_700, mulsi3_highpart, umulsi3_highpart_i):
+ Use "r" and "Rcr" constraints for destination.
+
+2008-12-17 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_verify_short): For out-of-range
+ brcc / bbit with short delay insn, prefer short compare.
+
+2008-12-17 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/adddf3.S (Ladd_same_exp): Fix corner case with
+ round-to-even obscuring or generating a carry.
+ (Lpast_denorm_large_cancel_sub): Fix handling of shift by 32.
+ * config/arc/ieee-754/arc600/muldf3.S (Linf_nan): Avoid clobbering
+ DBL1L before we have checked its value.
+ * config/arc/ieee-754/arc600-dsp/muldf3.S (Linf_nan): Likewise.
+ * config/arc/ieee-754/muldf3.S (Linf_nan): Likewise.
+
+2008-12-16 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_dead_or_set_postreload_p): Constify paramters.
+ Don't clear reg while processing a sequence. Use find_reg_fusage.
+ * config/arc/arc-protos.h (arc_dead_or_set_postreload_p): Update.
+ * config/arc/arc.md (flush_icache+3): Add comment on found use.
+ Remove TARGET_DROS condition.
+
+2008-12-16 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_dead_or_set_postreload_1): New function.
+ (arc_dead_or_set_postreload_p): Likewise.
+ * config/arc/arc-protos.h (arc_dead_or_set_postreload_p): Declare.
+ * config/arc/arc.md (flush_icache+2, flush_icache+3): Use it.
+ (flush_icache+4, flush_icache+7): Likewise.
+
+2008-12-15 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (doloop_begin_i): When checking size of loop,
+ verify that end belongs to the loop being examined.
+
+2008-12-11 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_encode_section_info): Don't try to get
+ TYPE_ATTRIBUTES from error_mark_node.
+
+2008-12-11 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (doloop_end_i): Use %? to output nop of right size.
+ Length is not zero when outputting a nop.
+
+2008-12-11 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (movsicc_insn+1): Generate plus.
+ Use REVERSE_CONDITION.
+
+2008-12-11 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (adddi3_i): Fix case where we are adding
+ a zero lowpart and the destination lowpart is the same as source
+ highpart.
+
+2008-12-10 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * reorg.c (fill_slots_from_thread): Initialize crossing.
+
+2008-12-10 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * tree-ssa-loop-ivopts.c (get_computation_cost_at): Guard code using
+ int_cst_value call with cst_and_fits_in_hwi check.
+
+2008-12-10 Zdenek Dvorak <ook@ucw.cz>
+ J"orn Rennecke <joern.rennecke@arc.com>
+
+ PR38440 / PR31849:
+ * tree-ssa-loop-ivopts.c (CP_AUTOINC_OFFSET): Define.
+ (struct iv_ca): New member cand_autoinc_distance.
+ (get_address_cost): New parameter may_autoinc. Changed all callers.
+ (autoinc_distance, cand_autoincrement_p): New functions.
+ (recompute_autoinc_bonus): Likewise.
+ (get_computation_cost_at): New parameter autoinc_distance.
+ Changed all callers.
+ (get_computation_cost): Likewise.
+ (iv_ca_set_no_cp <USE_ADDRESS>): Call recompute_autoinc_bonus.
+ (iv_ca_set_cp): Likewise.
+ (iv_ca_new): Allocate nw->cand_autoinc_distance.
+ (iv_ca_dump): Indicate autoincrement.
+ (gt-tree-ssa-loop-ivopts.h): Include.
+ * common.opt: Add new options fivopts-post-inc and fivopts-post-modify.
+ * Makfile.in (GTFILES): Add $(srcdir)/tree-ssa-loop-ivopts.c .
+ (tree-ssa-loop-ivopts.o): Depend on gt-tree-ssa-loop-ivopts.h .
+
+2008-12-09 J"orn Rennecke <joern.rennecke@arc.com>
+
+ cr95949:
+ * config/arc/arc.md (movqi_insn): Split w/cI alternative into
+ w/cL and w/I.
+
+2008-12-08 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * hooks.c (hook_bool_const_rtx_const_rtx_true): New function.
+ * hooks.h (hook_bool_const_rtx_const_rtx_true): Declare.
+ * target.h (can_follow_jump): New hook.
+ * target-def.h (TARGET_CAN_FOLLOW_JUMP): Define.
+ (TARGET_INITIALIZER): Include it.
+ * reorg.c (follow_jumps): New parameters jump and cp.
+ Changed all callers.
+ * config/arc/arc.c (arc_can_follow_jump): New function.
+ (TARGET_CAN_FOLLOW_JUMP): Override.
+ * config/arc/arc.md (jump_i): If a REG_CROSSING_JUMP is present,
+ length is 4.
+
+ * config/arc/arc.h (arc_compute_function_type): Declare.
+
+2008-12-08 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_reorg): When giving up on zero-overhead
+ loop only containing zero size asm, remove loop insn.
+
+2008-12-07 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * tree-ssa-loop-ch.c (copy_loop_headers): Fixed merge problems
+ (tentatively).
+ * config/arc/arc.h (OPTIMIZATION_OPPTIONS, OVERRIDE_OPTIONS):
+ Fixed merge problem.
+
+2008-12-05 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_need_delay): Don't attempt to get type of
+ a SEQUENCE.
+
+2008-12-05 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc700.md (umulti_SI): Split into:
+ (umulti_xmac, umulti_std).
+ (define_bypass): Remove bogus multiply bypasses.
+ * config/arc/arc.md (mulsi3_700): Use mpyu instruction.
+ Change type to umulti.
+ (mulsidi3_700, umulsidi3_700): Now define_insn_and_split.
+ (mulsi3_highpart): New pattern.
+ (umulsi3_highpart_i, umulsi3_highpart_int): Now type multi.
+ * config/arc/ieee-754/divdf3.S: Take reduced mpyu latency for
+ standard multiplier block into account.
+ * config/arc/ieee-754/muldf3.S: Likewise.
+ * config/arc/ieee-754/divsf3-stdmul.S: Likewise.
+
+2008-12-04 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_save_restore): Set RTX_FRAME_RELATED_P on
+ the *emitted* sibthunk_insn.
+
+2008-12-04 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * varasm.c (get_unnamed_section): Case return value of xmalloc.
+ (get_noswitch_section): Likewise.
+ (pickle_in_section): Use GGC_NEW.
+ (unpickle_in_section): Make definition a prototype.
+ * config/arc/arc.c (arc_verify_short): Restore recog_data before
+ returning early.
+
+2008-12-04 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (define_delay [return]): Remove duplicate.
+ (adddi3): Put parts into parallel.
+
+2008-12-04 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * genrecog.c (validate_pattern): Accept combinations of VOIDmode with
+ MODE_CC operands like ones with CC0.
+ * config/arc/predicates.md (zn_compare_operator): Now special predicate.
+ * config/arc/arc.md (unary_comparison): Add mode to opreand 1.
+ (noncommutative_binary_comparison): Add mode to operand 1 and 2.
+
+ * config/sh/sh.md (doloop_end): Accept extra operand.
+
+ * config/arc/arc.c (arc_compute_frame_size): Don't try to use
+ REG_N_SETS.
+ (arc_expand_epilogue): Update call to gen_return_i.
+ * config/arc/arc.h (EPILOGUE_USES): Define.
+ * config/arc/arc.md (in_ret_delay_slot): Reject insns that
+ set / clobber the return address register.
+ (sibcall, sibcall_insn): Remove explicit return address register use.
+ (sibcall_value_insn, return_i): Likewise.
+
+ * config/arc/arc.md (define_delay): Don't put an sfunc in a delay slot.
+
+ * config/arc/arc.md (millicode_sibthunk_ld): Set is_SIBCALL.
+
+ * config/arc/t-arc (gt-arc.h): Remove rule.
+
+2008-12-03 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.opt (mexpand-adddi): New option.
+ * config/arc/arc.md (adddi3, subdi3): Make expansion dependent
+ on TARGET_EXPAND_ADDDI.
+
+2008-12-03 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_init): Tweak mult_cost defaults.
+
+2008-12-02 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * combine.c (try_combine): Revert hack to suppress loosing
+ 'simplifications'.
+ (undo_since): Fix loop.
+ (combine_simplify_bittest): New function.
+ (combine_simplify_rtx, simplify_if_then_else): Use it.
+ * config/arc/arc.c (arc_rtx_costs): Check for bbit test.
+
+2008-12-01 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/t-arc-newlib (MULTILIB_EXCEPTIONS): Allow mARC700*/mnorm*.
+ Disallow mnorm*.
+ (MULTILIB_EXCLUSIONS): Allow mARC700*/mnorm*. Exclude mARC700/!mnorm.
+ * config/arc/arc.h (DRIVER_SELF_SPECS): For -mA7 / -mARC700, provide
+ -mnorm.
+
+2008-11-28 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/lib1funcs.asm (__divsi3 [__ARC700__,MULDIV]):
+ Avoid references of lp_count.
+
+2008-11-27 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_print_operand): Clarify distinction between
+ '#' and '*'.
+ * config/arc/arc.md (define_delay <brcc>): Don't say we can annull
+ the delay slot if TARGET_AT_DBR_COND_EXEC is set.
+ (cbranchsi4_scratch): Change delay slot suffix output directive for
+ fallback template to '*'.
+
+2008-11-27 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_text_label): Tolerate NOTE_INSN_DELETED_LABEL.
+
+2008-11-27 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_text_label): New function.
+ * config/arc/arc-protos.h (arc_text_label): Declare.
+ * config/arc/constraints.md (Clb): Require a text label.
+
+2008-11-27 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (casesi_compact_jump): Fix offset calculation
+ for unaligned add_s / ld / add_s / j_s cases.
+
+2008-11-26 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (mixed_code_enabled): Delete.
+ (arc_conditional_register_usage): Use TARGET_Q_CLASS.
+ * config/arc/arc.h (mixed_code_enabled): Don't declare.
+ (OPTIMIZATION_OPTIONS): Initialize TARGET_Q_CLASS.
+ (OVERRIDE_OPTIONS): TARGET_MIXED_CODE implies TARGET_Q_CLASS.
+ * config/arc/arc.opt (mq-class): New option.
+
+ * config/arc/arc.c (arc_get_unalign, arc_toggle_unalign): New functions.
+ * config/arc/arc.h (OPTIMIZATION_OPTIONS): Initialize
+ TARGET_COMPACT_CASESI.
+ (OVERRIDE_OPTIONS): TARGET_COMPACT_CASESI requires TARGET_Q_CLASS.
+ TARGET_COMPACT_CASESI implies TARGET_CASE_VECTOR_PC_RELATIVE .
+ (ASM_OUTPUT_ADDR_DIFF_ELT): Add 4 resp. 6 for TARGET_COMPACT_CASESI.
+ (CASE_VECTOR_SHORTEN_MODE_1): New macro, broken out of:
+ CASE_VECTOR_SHORTEN_MODE). For TARGET_COMPACT_CASESI, add six to
+ MAX_OFFSET before passing it on to CASE_VECTOR_SHORTEN_MODE_1.
+ (cmpsi_cc_insn_mixed, casesi_jump, casesi_load): Generate expander.
+ (casesi): Emit casesi_compact_jump for TARGET_COMPACT_CASESI.
+ (casesi_compact_jump): New pattern.
+ * config/arc/arc-protos.h (arc_get_unalign): Declare.
+ (arc_toggle_unalign): Likewise.
+ * config/arc/arc.opt (mcompact-casesi): New option.
+
+ * config/arc/arc.c (arc_legitimate_pic_addr_p): LABEL_REF is ok.
+ (arc_raw_symbolic_reference_mentioned_p): Don't flag LABEL_REF.
+ (arc_legitimize_pic_address): Leave LABEL_REF alone.
+ * config/arc/arc.md (movsi_insn): Add w/Clb alternative.
+ * config/arc/constraints.md (Clb): New constraint.
+
+2008-11-26 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_verify_short): Fix typo in test for next insn
+ being compact.
+ * config/arc/arc.md (ashlsi3_insn_mixed): Fix type in insn predicate.
+ (ashrsi3_insn_mixed, lshrsi3_insn_mixed): Likewise.
+
+2008-11-25 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_next_active_insn): Don't use label_to_alignment
+ before arc_reorg.
+ (arc_verify_short): Allow NEXT_INSN (insn) to be NULL before arc_reorg.
+ * config/arc/arc.md (return_i): Make length 2 dependent on
+ arc_verify_short.
+
+2008-11-25 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_label_align): Don't call recog_memoized on
+ non-insns.
+
+2008-11-25 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * final.c (uid_lock_length): Now file-scope variable.
+ (get_attr_lock_length): Use it.
+ (shorten_branches): Clear uid_lock_length after freeing it.
+ * config/arc/arc.c (arc_adjust_insn_length): Use get_attr_lock_length
+ to find length of first part of a SEQUENCE.
+
+ * config/arc/arc.c (arc_setup_incoming_varargs): Remove unused variable.
+
+2008-11-24 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (delay_slot_length): New attribute.
+ (branch_insn, rev_branch_insn, jump, cbranchsi4_scratch, bbit): Use it.
+
+ * config/arc/arc.md (call_i): Refine cond attribute for Cbr alterative.
+ (call_value_i): Likewise.
+
+2008-11-24 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc-protos.h (arc_split_dilogic): Move declaration inside
+ RTX_CODE conditional.
+ * config/arc/ieee-754/arc600-dsp/mulsf3.S: Turn off debug code.
+ * config/arc/ieee-754/arc600-dsp/muldf3.S: Likewise.
+ * config/arc/ieee-754/arc600-dsp/divsf3.S: Likewise.
+ * config/arc/ieee-754/arc600-dsp/divdf3.S: Likewise.
+
+2008-11-24 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arg_setup_incoming_varargs): Don't add increase
+ alignment. Always set pretend_size.
+ (arc_va_start): Delete.
+ (arc_va_arg): TYPE_ALIGN should be no larger than BITS_PER_WORD.
+ * config.arc/arc-protos.h (arc_va_start): Don't declare.
+ * config/arc/arc.h (FUNCTION_ARG_BOUNDARY): Delete.
+ (EXPAND_BUILTIN_VA_START): Delete.
+
+2008-11-24 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h (CASE_VECTOR_MODE): When not optimizing, use SImode.
+
+2008-11-24 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_print_operand <!>): Print condition before _s.
+
+2008-11-24 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_verify_short): Fix calculation of this_sequence.
+
+2008-11-24 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_need_delay): Don't use num_delay_slots
+ on non-insns.
+
+2008-11-24 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/predicates.md (cc_use_register): New predicate.
+ * config/arc/arc.c (arc_need_delay): New function.
+ * config/arc/arc-protos.h (arc_need_delay): Declare.
+ * config/arc/arc.md (addi3): Check first if l0 is const0_rtx.
+ Fix length attribute.
+ (add_f): Remove constant alternative constraint parts from operand1.
+ Add Rcw/0/I alternative.
+ (adc): Likewise. Don't split if we anticipate this insn to go into
+ a delay slot. Simplify SET_SRC of first splitter output insn.
+ (add_f_2): New pattern.
+ (adc+1): Remove constraints.
+ (subdi3): New define_expand.
+ (subdi3_i, sbc_0, sbc, sub_f, sub_f+1, sub_f+2): New patterns.
+ (negdi2): Delete.
+
+2008-11-24 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_split_dilogic): New function.
+ * config/arc/arc-protos.h (arc_split_dilogic): Declare.
+ * config/arc/arc.md (adddi3): Avoid non-cononical rtl when low part
+ of opperands[2] is const0_rtx.
+ (add_f): Call extract_insn_cached at end of predicate test.
+ (anddi3, iordi3, xordi3): New define_insn_and_split. New alternatives.
+ (negdi2): New alternatives.
+
+2008-11-22 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h (LABEL_ALIGN): Define.
+ * config/arc/arc.c (arc_label_align): New function.
+ * config/arc/arc-protos.h (label_align): Declare.
+
+ * config/arc/arc.md (adc): Restore operands before emitting split.
+
+2008-11-22 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (add_f): Fix pattern.
+ (adc+2): Adjust generated pattern to add_f fix.
+ * config/arc/arc.c (arc_sets_cc_p): When being passed a sequence,
+ look at the delay slot insn.
+
+2008-11-21 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (call_i, call_value_i): Fix length for potentially
+ compact alternative.
+
+2008-11-21 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (adddi3): Don't use w/c/i alternative for
+ reloading.
+ Try to change to subdi3 first.
+ Use conditional add of 1 rather than add.f 0 / add.
+ (subdi3): Allow partial overlap when adding a constant.
+
+2008-11-21 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (addsi_compare_2): Change predicate for operand 2
+ to nonmemory_operand.
+
+2008-11-21 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_select_cc_mode): Use CC_ZNmode for test of
+ (a+b) == 0.
+ (arc_rtx_costs): Add some add.f / adc special cases.
+ (arc_attr_type, arc_sets_cc_p): New functions.
+ (arc_scheduling_not_expected): Likewise.
+ * config/arc/arc-protos.h (arc_attr_type, arc_sets_cc_p): Declare.
+ (arc_scheduling_not_expected): Likewise.
+ * config/arc/arc700.md (core_insn): Split out:
+ (cmove).
+ (cc_arith): New reservation.
+ (define_bypass): Mention more insns for which compare has latency 1.
+ Add compare / cmove vypass with latency 2.
+ * config/arc/arc.md (attribute type): Add value cc_arith
+ (addsi_compare): Change CC_REG mode to CC_ZN.
+ (addsi_compare_2, addsi_compare_3): New patterns.
+ (adddi3): Now define_insn_and_split. Add more alternatives.
+ (add_f, adc, adc+1,adc+2): New patterns.
+ (adddi3): Add more alternatives.
+ (add_cond_exec, commutative_cond_exec, sub_cond_exec): Now type cmove.
+ (noncommutative_cond_exec): Likewise.
+
+ * config/arc/arc.c (arc_save_restore): Emit sibcall thunk insn as
+ jump insn.
+
+ * combine.c (combine_validate_cost): Revert to old behaviour when
+ combining two insns to one.
+
+2008-11-21 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/predicates.md (immediate_usidi_opperand): New predicate.
+ * config/arc/arc.md (umulsi3_highpart_int): Use it.
+ (umulsidi3_highpart): Avoid using negative CONST_INTs.
+
+2008-11-20 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (casesi_jump): New pattern.
+ (casesi): Use it.
+
+2008-11-20 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_output_casesi_insn): Delete.
+ * config/arc/arc-protos.h (arc_output_casesi_insn): Don't declare.
+ * config/arc/arc.h (OPTIMIZATION_OPTIONS):
+ Set TARGET_CASE_VECTOR_PC_RELATIVE to (SIZE !=0).
+ (JUMP_TABLES_IN_TEXT_SECTION): Also true for
+ TARGET_CASE_VECTOR_PC_RELATIVE.
+ (ASM_OUTPUT_ADDR_DIFF_ELT): Use proper directives for QImode / Simode.
+ (LABEL_ALIGN_AFTER_BARRIER): Always align at least to 2^1 after an
+ ADDR_DIFF_VEC.
+ (CASE_VECTOR_PC_RELATIVE, CASE_VECTOR_SHORTEN_MODE): Define.
+ (ADDR_VEC_ALIGN): Likewise.
+ (ASM_OUTPUT_BEFORE_CASE_LABEL): Override.
+ * config/arc/arc.md (UNSPEC_CASESI): New constant.
+ (indirect_jump): Expand q alternative to Rcqq.
+ (casesi_insn): Deleted.
+ (casesi_load): New pattern.
+ (casesi): Rewrite to use casesi_load.
+ * config/arc/arc.opt (mcase-vector-pcrel): New option.
+
+ * config/arc/arc.md (VUNSPEC_EPILOGUE): Deleted.
+ (ARC_UNSPEC_PROLOGUE_USE): Likewise.
+
+2008-11-20 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_expand_epilogue): Don't use a sibcall thunk
+ in a sibcall epilogue.
+
+ * config/arc/arc.c (arc_regno_use_in): New function.
+ * arc-protos.h (arc_regno_use_in): Declare.
+ * config/arc/arc.md (in_call_delay_slot): New predicate.
+ (in_sfunc_delay_slot): Use in_call_delay_slot and arc_regno_use_in.
+ (define_delay): Use separate form for call, using in_call_delay_slot.
+
+ * config/arc/arc.md (subsi3_insn): Fix output template for w/c/Cal
+ alternative.
+
+2008-11-20 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_compute_frame_size):
+ Don't zero the frame size even if it's the same as extra_size.
+
+2008-11-20 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_save_restore): Load offset for blink into r12.
+ (arc_expand_epilogue): No sibthunk if there are pretend_args.
+
+2008-11-20 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/predicates.md (millicode_load_operation):
+ Pass 2 as second argument to arc_check_millicode.
+ (millicode_load_clob_operation): New predicate.
+ * config/arc/arc.c (arc_compute_millicode_save_restore_regs):
+ Lower the required number of registers to save.
+ (arc_save_restore): If epilogue_p is 2, emit a thunk sibcall.
+ (arc_expand_epilogue): Check if we can emit a thunk sibcall.
+ (arc_next_active_insn): Check for NULL / BARRIER immediately
+ after advancing to next insn.
+ (arc_check_millicode): For load_p == {0,1}, require a final clobber.
+ Interpret load_p == 2 as no final clobber
+ is required, and minimumcount reduced to 2.
+ * config/arc/arc.md (millicode_thunk_st): Take final clobber into
+ account.
+ * config/arc/arc.md (millicode_thunk_ld): Use millicode_load_clob
+ predicate. Take final clobber into account.
+ (millicode_sibthunk_ld): New pattern.
+ * lib1funcs.asm (L_millicode_thunk): Split into:
+ (L_millicode_thunk_ld, Lmillicode_thunk_st). Bracket functions in
+ HIDDEN_FUNC / END_FUNC. Remove 1 / 2 register save / restore,
+ and optimize scheduling of function end.
+ (L_millicode_thunk_ld_ret): New part.
+ * t-arc (LIB1ASMFUNCS): Replace _millicodethunk with
+ _millicode_thunk_st, _millicodethunk_ld and _millicodethunk_ret.
+
+2008-11-19 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_save_restore): Allow larger values
+ of *first_offset for millicode generation if generating an epilogue.
+ (arc_expand_epilogue): Use cfun->machine->frame_info.millicode_end_reg
+ to decide if using a millicode call.
+ Don't make fram pointer use dependent on millicode generation.
+ Refine decision on how to adjust stack.
+
+2008-11-19 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h (IS_POWEROF2_P): Reject 0.
+ * config/arc/arc.md (attribute "length"):
+ Shift of immidiate has length 8.
+ * config/arc/arc.md (C1p): Reject 0.
+
+2008-11-19 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (andsi3): Call arc_rewrite_small_data on
+ operands[1] when indicated.
+
+2008-11-19 J"orn Rennecke <joern.rennecke@arc.com>
+
+ Wrap up of changes going back to r59971
+ * final.c (get_attr_length_1): Use direct recursion rather than
+ calling get_attr_length.
+ (get_attr_lock_length): New function.
+ (INSN_VARIABLE_LENGTH_P): Define.
+ (shorten_branches): Take HAVE_ATTR_lock_length into account.
+ Don't overwrite non-delay slot insn lengths with the lengths of
+ delay slot insns with same uid.
+ * genattrtab.c (lock_length_str): New variable.
+ (make_length_attrs): New parameter base.
+ (main): Initialize lock_length_str.
+ Generate lock_lengths attributes.
+ * genattr.c (gen_attr): Emit declarations for lock_length attributes.
+
+ * genoutput.c (process_template): Process '*' in '@' alternatives.
+
+ * read-rtl.c (read_rtx_1): Terminate when reading EOF.
+
+ Attempt at avoiding zero_extract->lshiftrt which didn't go far enough:
+ * combine.c (undo_since): New function, broken out of:
+ (undo_all).
+ (try_combine): Don't do pure simplifications if they increase the cost.
+
+ * combine.c (combine_validate_cost): Be more strict in !i1 case.
+ (try_combine): Allow to combine-split two expensive insns into two less
+ expensive insns.
+
+ * config/arc/predicates.md (extend_operand): New predicate.
+ (equality_comparison_operator, millicode_store_operation): Likewise.
+ (millicode_load_operation): Likewise.
+ (cc_register): Use CC_REG.
+ * config/arc/arc.c (struct arc_ccfsm): New struct.
+ (arc_ccfsm_state, arc_ccfsm_current_cc): Deleted.
+ (arc_ccfsm_target_insn, arc_ccfsm_target_label): Likewise.
+ (cfa_offset, cfa_store_offset, doing_dwarf): Likewise.
+ (last_insn_set_cc_p): Likewise.
+ (TARGET_ASM_FUNCTION_PROLOGUE): Likewise.
+ (arc_ccfsm_current, ARC_CCFSM_BRANCH_DELETED_P): Define.
+ (ARC_CCFSM_RECORD_BRANCH_DELETED, ARC_CCFSM_COND_EXEC_P): Likewise.
+ (CCFSM_ISCOMPACT, CCFSM_DBR_ISCOMPACT): Likewise.
+ (arc_output_function_prologue): Renamed to:
+ (arc_expand_prologue). No parameters. Now output rtl.
+ No longer static.
+ (arc_init): Set arc_punct_chars['&'].
+ (enum arc_cc_code_index): New enum.
+ (get_arc_condition_code): Use it.
+ (arc_select_cc_mode): Use CC_Zmode if we want to emit add / bmsk.f .
+ (frame_insn, frame_move, frame_move_inc, frame_add): New functions.
+ (frame_stack_add): Likewise.
+ (struct arc_frame_info): Add GTY marker.
+ New members millicode_start_reg and millicode_end_reg.
+ (current_frame_info): Deleted. Changed all users to use
+ cfun->machine->frame_info instead.
+ (machine_function): New struct / typedef.
+ (arc_compute_function_type): Take a struct function * parameter.
+ Initialize fun->machine->fn_type.
+ Changed all callers.
+ (ILINK1_REGNUM, ILINK2_REGNUM, RETURN_ADDR_REGNUM): Delete.
+ (MUST_SAVE_RETURN_ADDR): Only require save if register is set.
+ (arc_compute_millicode_save_restore_regs): Rewrite.
+ Take struct arc_frame_info * parameter. Changed all callers.
+ (arc_save_restore): No longer take file, op, parity parameters.
+ Add epilogue_p parameter. Changed all callers.
+ Emit rtl.
+ (arc_return_address_regs): New global scope array.
+ (arc_output_function_epilogue): Renamed to:
+ (arc_expand_epilogue). Take only sibcall_p parameter.
+ Now output rtl. Changed all callers.
+ (arc_finalize_pic): Use Pmode for addresses.
+ Don't add PROGRAM_COUNTER_REGNO. Use gen_rtx_SET.
+ Emit using emit_insn. Don't emit a USE. Return emitted insn.
+ (arc_cond_exec_p): Rename to:
+ (arc_ccfsm_cond_exec_p). Changed all callers.
+ Use cfun->machine->prescan_initialized / arc_ccfsm_current.
+ (arc_print_operand): Don't emit delay suffix if delay insn has
+ been deleted. Take TARGET_AT_DBR_CONDEXEC into account.
+ Use ARC_CCFSM_COND_EXEC_P.
+ For '?' / '!', call output_short_suffix if the insn can be short.
+ Add '&' case for TARGET_ANNOTATE_ALIGN.
+ (record_cc_ref): Deleted. Changed all callers.
+ (arc_ccfsm_advance): New function, broken out of:
+ (arc_final_prescan_insn).
+ (arc_ccfsm_at_label): Add state parameter. Changed all callers.
+ Now static.
+ (arc_ccfsm_record_condition, arc_ccfsm_post_advance): New functions.
+ (arc_ccfsm_branch_deleted_p): Use ARC_CCFSM_RECORD_BRANCH_DELETED.
+ (arc_ccfsm_advance_to, arc_next_active_insn): New functions.
+ (arc_verify_short, output_short_suffix): Likewise.
+ (arc_final_prescan_insn): Clear arc_ccfsm_current if this is the
+ first call for the current function.
+ Clear cfun->machine->size_reason.
+ (branch_dest): Cope with PARALLEL.
+ (arc_rtx_costs): Handle more cases of cheap constants.
+ Reflect higher cost of shifting a constant.
+ Add cases for btst / bit / bmsk.f .
+ (arc_is_longcall_p): Remove call_symbol parameter.
+ Changed all callers.
+ (arc_reorg_in_progress): New variable.
+ (arc_reorg): Set cfun->machine->arc_reorg_started and
+ arc_reorg_in_progress. Clear cfun->machine->ccfsm_current_insn after
+ each shorten_branches call.
+ Genrate bbit as well as brcc insn. Express suitability for brcc_s
+ with mode of clobber. If brcc insn are present from before arc_reorg,
+ wix up the clobber mode.
+ Clear arc_reorg_in_progress at the end.
+ (valid_brcc_with_delay_p): Update for changed cbranchsi4_scratch (brcc)
+ pattern. Use brcc_nolimm_operator.
+ (arc_output_addsi): Don't check arc_size_opt_level.
+ Use %? directive. Add logic to exploit commutativity for
+ matching constraint in reg/reg/reg case.
+ (arc_output_libcall): Use %! directive. Take TARGET_MEDIUM_CALLS into
+ account.
+ (arc_insn_length_adjustment): Rename to:
+ (arc_adjust_insn_length). Take length parameter. Changed all callers.
+ Add SEQUENCE case.
+ Add code for TARGET_PAD_RETURN.
+ Add code to take ccfsm actions into account.
+ (arc_unalign_branch_p, arc_branch_size_unknown_p): New functions.
+ (arc_pad_return, arc_init_machine_status): Likewise.
+ (arc_init_expanders, arc_check_millicode, arc_clear_unalign): Likewise.
+ (split_addsi, split_subsi, arc_split_move, arc_short_long): Likewise.
+ (gt-arc.h): Include.
+ * config/arc/arc.h (TARGET_UNALIGN_BRANCH, TARGET_UPSIZE_DBR): Define.
+ (TARGET_PAD_RETURN, TARGET_AT_DBR_CONDEXEC): Likewise.
+ (OPTIMIZATION_OPTIONS): Initialize TARGET_Rcq, TARGET_Rcw,
+ TARGET_ALIGN_CALL, TARGET_EARLY_CBRANCHSI and TARGET_BBIT_PEEPHOLE.
+ (ARC_STACK_ALIGN): Use STACK_BOUNDARY.
+ (REG_CLASS_CONTENTS): Include ap / pcl in WRITABLE_CORE_REGS.
+ (ASM_OUTPUT_ALIGN): Call arc_clear_unalign.
+ (arc_return_address_regs): Declare.
+ (CAN_DEBUG_WITHOUT_FP, CALL_ATTR, INIT_EXPANDERS): Define.
+ (TARGET_DROSS, DROSS): Likewise.
+ * config/arc/arc.md (SP_REG, ILINK1_REGNUM): New constants.
+ (ILINK2_REGNUM, RETURN_ADDR_REGNUM, CC_REG): Likewise.
+ (is_sfunc, is_CALL, is_SIBCALL, is_NON_SIBCALL): New attributes.
+ (attribute type): New value jump. Use special defauilt logic if
+ isfunc attribute is "yes".
+ (attribute iscompact): New values maybe, true_limm, maybe_limm.
+ Default to "maybe" if type is "sfunc".
+ (attribute cond): New values canuse_limm and canuse_limm_add.
+ (verify_short, delay_slot_filled, delay_slot_present): New attributes.
+ (lock_length): Likewise.
+ (attribute length): Add no-op clause to mark compact insns as
+ varying length, and make their length dependent on verify_short.
+ Set length of stores that store an immediate to 8.
+ Remove (eq_attr "cond" "set,set_zn,clob") clause.
+ Insn of type call_no_delay_slot have length 8.
+ Make use of new iscompact values.
+ (attribute in_delay_slot): Check for type "jump".
+ (cond_delay_insn, in_ret_delay_slot): New attributes.
+ (cond_ret_delay_insn): Likewise.
+ (define_delay forms): Check new insns types; add define_delay for
+ type "return" insns.
+ Separate branch/uncond_branch/jump define_delay and use
+ cond_delay_insn where indicated.
+ (all ARCompact patterns): Use %? / %! with %& instead of _s. Add new
+ attributes / use new attribute values. Rearrange alternatives
+ to make sure that short insns and conditional execution can be used.
+ Remove dependency of short insns emitting on arc_size_opt_level.
+ (movsi_pre_mod, tst, bset, bxor, bclr, btst): New patterns.
+ (movdi_insn, movdf_insn, addsi3_mixed): New define_insn_and_split.
+ (subsi3_insn): Likewise.
+ (movsicc_insn+1, btst+1): New peephole2 patterns.
+ (shift_and_add_insn_mixed, shift_and_add_insn): Delete.
+ (shift_and_sub_insn, bset_insn_mixed, bclr_insn_mixed): Likewise.
+ (bmsk_insn_mixed): Likewise.
+ (andsi3): Renamed to:
+ (andsi3_i). Add memory / register zero_extend alternatives.
+ (andsi3): New expander.
+ (andsi3_i+1): New splitter.
+ (call_via_reg_mixed, call_via_label, call_via_imm): Merge to:
+ (call_i).
+ (call_value_via_reg_mixed, call_value_via_label, call_value_via_imm):
+ Merge to:
+ (call_value_i).
+ (flush_icache+1, flush_icache+2, flush_icache+5): Mark as DROSS.
+ (flush_icache+6, flush_icache+7, flush_icache+8): Likewise.
+ (flush_icache+9, flush_icache+10, flush_icache+11): Likewise.
+ (flush_icache+12): Likewise.
+ (sibcall, sibcall_value, sibcall_insn): Add use of RETURN_ADDR_REGNUM.
+ (sibcall_value_insn): Likewise.
+ (prologue, return_i, bbit, millicode_thunk_st): New patterns.
+ (millicode_thunk_ld): Likewise.
+ (epilogue_i): Deleted.
+ (cbranchsi4_scratch): Include a clobber of CC_REG. The mode of the
+ clobber indicates if brcc_s is possible.
+ * config/arc/arc-protos.h (arc_finalize_pic): Update prototype.
+ (arc_compute_function_type, arc_is_longcall_p): Likewise.
+ (arc_ccfsm_at_label, arc_cond_exec_p): Remove prototype.
+ (arc_insn_length_adjustment): Likewise.
+ (arc_ccfsm_cond_exec_p, arc_adjust_insn_length): Add prototype.
+ (arc_unalign_branch_p, arc_branch_size_unknown_p): Likewise.
+ (arc_ccfsm_record_condition, arc_expand_prologue): Likewise.
+ (arc_expand_epilogue, arc_init_expanders): Likewise.
+ (arc_check_millicode, arc_clear_unalign, split_addsi): Likewise.
+ (split_subsi, arc_pad_return, arc_split_move): Likewise.
+ (arc_shorten_align, arc_ccfsm_advance_to, arc_verify_short): Likewise.
+ (arc_short_long): Likewise.
+ * config/arc/t-arc (gt-arc.h): New rule.
+ ($(out_object_file)): Depends on gt-arc.h.
+ * config/arc/constraints.md (Rcw): Now also register constraint.
+ (CnL, CmL, CL2, CM4, Csp, C0p, C1p, Ccp, Cux, Crr): New constraints.
+ (Us<, Us>, Rcw, Rcb, Rck): Likewise.
+ (Cbr): Use arc_is_longcall_p.
+ (Rcq): Don't check arc_size_opt_level, but rather TARGET_Rcq.
+ * config/arc/arc.opt (m2addr, munalign-prob-threshold=): New options.
+ (mmedium-calls, mannotate-align, malign-call, mRcq, mRcw): Likewise.
+ (mearly-cbranchsi, mbbit-peephole): Likewise.
+
+ * config/arc/lib1funcs.asm (__clzsi2): Shorten the !__ARC_NORM__ case.
+
+2008-11-18 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (one_cmpldi2): Change to a define_insn_and_split.
+
+2008-11-18 J"orn Rennecke <joern.rennecke@arc.com>
+
+ cr95728:
+ * config/arc/arc.md (sibcall, sibcall_value): If call address
+ is for a longcall, load it into a register.
+
+2008-11-10 J"orn Rennecke <joern.rennecke@arc.com>
+
+ Fix debug info problem with pretend_args:
+ * config/arc/arc.h (CFA_FRAME_BASE_OFFSET, ARG_POINTER_CFA_OFFSET):
+ Define.
+
+2008-11-10 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * genoutput.c (note_constraint): Ignore redefinition.
+ * genpreds.c (struct constraint_data): New member is_overloaded.
+ (add_constraint): Allow constraint overloading.
+ (write_enum_constraint_num): Don't emit duplicates for overloaded
+ constraints.
+ (write_lookup_constraint, write_insn_constraint_len): Likewise.
+
+ * dwarf2out.c (dwarf2out_frame_debug_expr): Don't abort on
+ expressions from function epilogue.
+
+FIXME: Document changes since rev 59970
+
+2008-10-10 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (*add_n): Fix length of c/c/Cal alternative.
+
+2008-10-08 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_output_function_epilogue): Remove
+ noepilogue logic.
+
+ * config/arc/arc.md: (type): Add return.
+ (toplevel): Add define_delay for "return" type patterns.
+ (epilogue_i): Remove !optimize_size condition. Set type to return.
+
+2008-10-03 Khurram.Riaz@arc.com
+ J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h (BITS_BIG_ENDIAN): Always 0.
+
+2008-09-29 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (TARGET_ASM_FUNCTION_EPILOGUE): Don't redefine.
+ (arc_output_function_epilogue): No longer static.
+ Take new parameter sibcall_epilogue.
+ * config/arc/arc-protos.h (arc_output_function_epilogue): Declare.
+ * config/arc/arc.md (sibcall_epilogue): Now an expander.
+ (epilogue_i, epilogue): New patterns.
+
+2008-09-29 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * target-def.h (TARGET_PRESERVE_RELOAD_P): Fix spelling.
+
+2008-09-24 Muhammad Khurram Riaz <khurram.riaz@arc.com>
+
+ * config/arc/predicates.md: (move_dest_operand) for MUL64 target
+ r57-r59 cannot be destination, the manual says they are read only.
+
+2008-09-23 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/mxp/mxp.opt (mno-vld-label): New option.
+ * config/arc/mxp.md (*mov<mode>_i): Support TARGET_NO_VLD_LABEL.
+
+ * config/mxp/mxp.opt (mno-vim-label): New option.
+ * config/arc/mxp.md (*mov<mode>_i): Use vmovw for HImode.
+ (addhi3): Support TARGET_NO_VIM_LABEL.
+
+2008-09-19 Muhammad Khurram Riaz <khurram.riaz@arc.com>
+
+ * config/arc/arc.md :
+ (mulsi3): for MULMAC32x16 unsigned range can be upto 65535, and
+ mululw in enough (alongwith mov from acc2) to get the result (no
+ need for use mac instruction) ; note that single mul instruction can not
+ be used with immediates less then 0 because
+ mululw 0,reg,limm ( and also mullw ) treats lower 16bits of imm operand
+ as unsigned, So in this case mac instruction is also required.
+ (umul_600) : limm can be the last operand in dsp-mul instructions
+ (mac_600, mul64_600, mac64_600, umul64_600, umac64_600) : Likewise
+
+2008-09-18 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/mxp/mxp.md (store_scalars, load_scalars): Add type attribute.
+ (mov<mode>_i): Fix type attribute.
+
+2008-09-17 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/mxp/mxp.h (ASM_OUTPUT_SYMBOL_REF): Define.
+ (ASM_OUTPUT_LABEL_REF): Likewise.
+
+2008-09-17 J"orn Rennecke <joern.rennecke@arc.com>
+
+ Enable use of symbol / label references.
+ * config/mxp/mxp.c (BINUTILS_FIXED): Define.
+
+ * config/mxp/mxp.md (attribute type): Add load and store.
+ (*mov<mode>_i): Set type of load/store instructions.
+ (branch_true, branch_false): Set type. Emit delay slot nops.
+ (decrement_and_branch_until_zero, doloop_end): New patterns.
+ (mxp): New scheduling automaton.
+ * config/mxp/mxp.c (mxp_print_operand): When emitting just one
+ delay slot nop, check if it should be between the two delay slot
+ insns.
+
+2008-09-15 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/mxp/mxp.md (smax<mode>3, smin<mode>3): New patterns.
+ * config/mxp/mxp.opt (mint16): New option.
+ * config/mxp/mxp.h (INT_TYPE_SIZE): Take TARGET_INT16 into account.
+
+2008-09-15 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/ieee-754/arc600-dsp/mulsf3.S (.Ldenorm_dbl1):
+ Fix register number of multiplicant.
+
+2008-09-15 Muhammad Khurram Riaz <khurram.riaz@arc.com>
+
+ * config/arc/arc.md : Bug fix in mul/mac instructions
+ * config/arc/arc.c : Bug fix in mul/mac instructions
+
+2008-09-13 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/ieee-754/arc600-dsp/mulsf3.S: Fix ld.as offsets.
+
+ * config/arc/ieee-754/arc600/divsf3-stdmul.S: Rename to:
+ * config/arc/ieee-754/arc600/divsf3.S.
+ * config/arc/ieee-754/arc600-dsp/divsf3-stdmul.S: Rename to:
+ * config/arc/ieee-754/arc600-dsp/divsf3.S.
+ * config/arc/lib1funcs.asm (L_divsf3): update.
+
+2008-09-12 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/ieee-754/arc600-dsp/muldf3.S: Fix offset for loading
+ 0x7ff00000.
+
+ * config/arc/dp-hack.h: Fix #ifdef condition for L_make_df etc.
+ * config/arc/ieee-754/arc600-dsp/divdf3.S: Fix issue where acc1 was
+ used as input to mululw/machulw sequence.
+ * config/arc/ieee-754/arc600-dsp/divsf3-stdmul.S: Likewise.
+ Re-schedule denorm_fp1 handling to reduce code duplication.
+
+ * config/arc/ieee-754/arc600/divsf3-stdmul.S (.Ldenorm_fp0):
+ Move upwards to execute mulu64.
+
+2008-09-12 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h (TARGET_CPU_CPP_BUILTINS): If
+ TARGET_MULMAC_32BY16_SET, define __ARC_MUL32BY16__ .
+ * config/arc/lib1funcs.asm (L_muldf3, L_mulsf3, L_divdf3, L_divsf3):
+ Add __ARC_MUL32BY16__ alternative.
+ * config/arc/ieee-754/arc600-dsp/divdf3.S: New file.
+ * config/arc/ieee-754/arc600-dsp/divsf3-stdmul.S: Likewise.
+
+ * config/arc/ieee-754/divdf3.S: Move constant data to end of file,
+ change code to address it to save limm.
+ * config/arc/ieee-754/divsf3-stdmul.S: Hard-code sub3 argument to
+ avoid limm.
+ * config/arc/ieee-754/arc600/divsf3-stdmul.S: Likewise.
+ * config/arc/ieee-754/arc600/divdf3.S: Likewise. Fix flag setting
+ problem when divisor is denormal.
+
+ * config/arc/arc.c (arc_compute_millicode_save_restore_regs): Only
+ consider save sequences starting with r13.
+
+2008-09-05 Muhammad Khurram Riaz <khurram.riaz@arc.com>
+
+ * config/arc/arc.h : WCHAR_T set to int type
+
+2008-09-05 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (doloop_fallback): Operand 0 is "+r,!w".
+ (doloop_fallback_m): Operand 0 is "+&r".
+
+2008-09-04 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * Makefile.in (targhooks.o): Depend on OPTABS_H.
+ * config/arc/arc.md (mulsidi3): Remove some junk.
+ (mulsidi3_700, umulsidi3_700): Remove 'J' Constraint.
+ * config/arc/ieee-754/arc600-dsp: New directory.
+
+2008-09-02 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/t-arc-newlib (MULTILIB_EXCLUSIONS): Re-enable multilibs
+ with -mnorm.
+ * config/arc/arc.h (ASM_SPEC): For -mmmul32x16, pass -mdsp.
+
+ * config/arc/lib1funcs.asm (__mulsi3): Fix invalid insn issues.
+
+ * config/arc/arc.md (*call_via_label): Replace %^%Pn with %Pn.
+ (call_prof, *call_value_via_label, call_value_prof): Likewise.
+ (*sibcall_insn, *sibcall_value_insn, sibcall_prof): Likewise.
+ (sibcall_value_prof): Likewise.
+
+ * config/arc/arc.md (doloop_begin_i): When n_insns is 0, output
+ three nops for ARC600.
+
+ * config/arc/predicates.md (arc_double_register_operand): Fix
+ indentation.
+ (vector_register_operand, vector_register_or_memory_operand): Likewise.
+ (arc_dpfp_operator): Likewise.
+ (acc1_operand, acc2_operand, mlo_operand, mhi_operand): New predicate.
+ * config/arc/arc.c (arc_init): For ARC600 with TARGET_MUL64_SET,
+ default multcost to 4.
+ (rname56, rname57, rname58, rname59): New character arrays.
+ (arc_init_regno_reg_class): Rename to:
+ (arc_conditional_register_usage). Add code from
+ arc.h:CONDITIONAL_REGISTER_USAGE. Establish special multiply result
+ register names, and use register numbers that work well with
+ the target endianness.
+ For ARC700, disable use of lp_count for SFmode.
+ (gen_acc1, gen-acc2, gen_mlo, gen_mhi): New functions.
+ * config/arc/arc-protos.h (arc_init_regno_reg_class): Don't declare.
+ (arc_conditional_register_usage): Declare.
+ (gen_acc1, gen-acc2, gen_mlo, gen_mhi): Likewise.
+ * config/arc/arc.h (CONDITIONAL_REGISTER_USAGE): Use
+ arc_conditional_register_usage.
+ (rname56, rname57, rname58, rname59): Declare.
+ (REGISTER_NAMES): Use them.
+ (DBX_REGISTER_NUMBER): Translate internal numbers for multiply
+ result registers into true hardware register numbers.
+ * config/arc/arc.md
+
+ * testsuite/gcc.c-torture/execute/ieee/denorm-rand.c (main):
+ Reduce iteration counts to 1000.
+ * varasm.c (pickle_in_section): Make defintion a declaration.
+ * config/arc/arc.c (arc_print_operand): Add 'o' to output
+ symbol without '@'.
+ (write_profile_sections): Use it.
+
+ * config/arc/arc.c (arc_final_prescan_insn): Call
+ extract_constrain_insn_cached after calling arc_hazard.
+ (arc_reorg): Check second parameter of compare before feeding it
+ to cbranchsi4_scratch.
+ * config/arc/arc.md (*unary_comparison_result_used): Use higher
+ operand numbers for match_operator than for ordinary operands.
+ Use match_dup for duplicated expression in match_operator.
+ (*commutative_binary_comparison_result_used): Likewise.
+ (*noncommutative_binary_comparison_result_used): Likewise.
+ (mulsi3): Generate expansion for TARGET_MUL64_SET.
+ (mulsi3): Refer to multiply result registers with special generator
+ / recognizer functions to account for the endian-dependent numbers.
+ (umul_600, smul_600, mac_600, mulsi_600, mulsidi3): Likewise.
+ (umulsidi3): Likewise.
+ (mulsi_600): Type multi.
+ (*split_mulsi3_600): Delete.
+ (mulsidi_600, umulsidi_600): New patterns.
+ (mulsidi3, umulsidi3): Result is nonimmediate_operand.
+ Add TARGET_MUL64_SET code.
+ (mac64_600): Fix semantics description to be consistent with
+ PARALLEL semantics.
+ (umulsidi3_700): Operand 2 is register_operand.
+ * config/arc/arc600.md (mul64_600): New cpu_unit.
+ (load_DI_600, load_600): Fix attribute test.
+ (mul_600_fast, mul_600_slow): New reservations.
+ * config/arc/arc.h (TARGET_OPTFPE): True for TARGET_ARC600
+ && TARGET_NORM_SET && TARGET_MULMAC_32BY16_SET.
+
+ * config/arc/arc.md (doloop_begin_i): Look inside SEQUENCEs.
+ (doloop_end_i) Change alternative 2 of operand 2 to C_0.
+ * config/arc/arc.h (HARD_REGNO_RENAME_OK): Delete.
+
+2008-09-02 Muhammad Khurram Riaz <khurram.riaz@arc.com>
+
+ * config/arc/arc.c (arc600_corereg_hazard): mul/mac and mul64 set the accum registers
+ and are not a hazard.
+ * config/arc/arc.md :
+ (*unary_comparison_result_used): added for flag setting instructions(unary) that also use result.
+ (*addsi_compare): added for add.f ; needed by combiner.
+ (*commutative_binary_comparison_result_used): added for flag setting instructions(binary,commutative)
+ that also use result.
+ (*noncommutative_binary_comparison_result_used): added for flag setting instructions(binary,commutative)
+ that also use result.
+
+2008-09-01 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/ieee-754/fixdfsi.S: Fix negative case.
+
+2008-08-30 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c: Give up on zero overhead loop if loop setup
+ precedes loop end with no label in-between.
+
+2008-08-30 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_final_prescan_insn): Don't try to eliminate
+ 'insns' of TYPE_LOOP_END.
+ * config/arc/arc.md (attr type): Replace loop with loop_start and
+ loop_end.
+ (attr in_delay_slot): Update.
+ (movqi_insn, movhi_insn): Add alternatives to read ALL_CORE_REGS.
+ (doloop_begin_i): Better estimate insn fetches with n_insns.
+ Allow zero n_insns if there is a code_label.
+ Don't emit nops for ARC600 with loop_top if n_insn is at least 3.
+ Change type to loop_setup.
+ (doloop_end_i): Set type to loop_end.
+
+2008-08-30 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (doloop_begin_i): Start insn counting with label
+ rather than label_ref. Check that jump sucessor insns exists before
+ calling recog_memoized on it.
+
+2008-08-30 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (doloop_begin_i): Do separate calculation of
+ minimum insns from loop setup to loop end.
+ * config/arc/arc.c (arc_reorg): Fix setting of insn after deletion.
+
+2008-08-29 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_reorg): Use the loop top label to check for
+ empty loops. When deleting an empty loop, put the set of the loop
+ count before the loop end.
+
+2008-08-29 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h (HARD_REGNO_RENAME_OK): Prohibit renaming from
+ LP_COUNT.
+ * config/arc/arc.md (doloop_begin_i): Change alternative 2 of
+ operand 1 to C_0.
+
+2008-08-29 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/predicates.md (dest_reg_operand): Use ALL_CORE_REGS.
+ config/arc/arc-protos.h (arc_init_regno_reg_class): Declare.
+ * config/arc/arc.h: Fix merge error.
+ (CONDITIONAL_REGISTER_USAGE): Call arc_init_regno_reg_class.
+ config/arc/arc.c (arc_init_reg_tables): Break out arc_regno_reg_class
+ initializing code into:
+ (arc_init_regno_reg_class): New function. Take new *CORE_REGS classes
+ into account.
+ * config/arc/arc.md (*umulsi3_highpart_int): Fix typo.
+
+2008-08-29 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/crtg.asm: Use _init / _fini instead of __init / __fini.
+ * config/arc/crti.asm: Likewise.
+
+ * config/arc/arc.c (arc_register_move_cost): Express costs of
+ writing / reading LP_COUNT register.
+ * config/arc/arc.h (CONDITIONAL_REGISTER_USAGE): Prune CHEAP_CORE_REGS.
+ (enum reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS): Split CORE_REGS
+ into CHEAP_CORE_REGS and ALL_CORE_REGS.
+ (PREFERRED_RELOAD_CLASS): Check for CHEAP_CORE_REGS.
+ (REGISTER_MOVE_COST): Use arc_register_move_cost.
+ * config/arc/arc.md (movsi_insn): Add alternatives to read
+ ALL_CORE_REGS.
+ * config/arc/constraints.md ("c"): Now for CHEAP_CORE_REGS.
+ ("Rac"): New constraint.
+
+ * loop-doloop.c (doloop_modify): Pass doloop_end pattern to
+ gen_doloop_begin.
+ * config/c4x/c4x.md (doloop_begin): Operand 4 is doloop_end pattern.
+ * loop-doloop.c (doloop_optimize): Pass flag to indicate if loop is
+ entered at top to gen_doloop_end.
+ * config/arc/arc.c (arc_reorg): If we can't find the loop entry at
+ the loop top, search entire function for a matching loop begin,
+ and record information about it if found.
+ * config/arc/arc.md (doloop_begin): Now takes five operands.
+ (doloop_begin_i): Likewise.
+ (doloop_end): Now takes 6 operands.
+
+ * config/arc/arc.md (umulsi3_highpart_i): New pattern.
+ (*umulsi3_highpart_int, umulsi3_highpart): Likewise.
+
+
+ * target-def.h (TARGET_PRESERVE_RELOAD_P): Define.
+ (TARGET_INITIALIZER): Add TARGET_PRESERVE_RELOAD_P.
+ * target.h (struct gcc_target): New member preserve_reload_p.
+ * reload.c (push_reload): Mark values flagged by
+ targetm.preserve_reload_p as RELOAD_OTHER.
+ * config/arc/arc.c (arc_preserve_reload_p): New function.
+ (TARGET_PRESERVE_RELOAD_P): Redefine.
+ * doc/tm.texi (TARGET_PRESERVE_RELOAD_P): Document.
+
+ * config/arc/arc.h (ASM_OUTPUT_SYMBOL_REF): Define.
+ (ASM_OUTPUT_LABEL_REF): Likewise.
+ * config/arc/arc.c (arc_assemble_integer, arc_print_operand):
+ Don't emit '@' before labels / symbols.
+ (arc_print_operand_address): Likewise.
+
+ * config/arc/arc.h (LINK_COMMAND_SPEC): When creating a shared
+ library with -nostdlib, add -lgcc_s.
+
+ * config/arc/fp-hack.c: Disable debug functions for ARC700.
+ * config/arc/dp-hack.c: Likewise.
+
+ * config/arc/arc.h (STATIC_LINK_SPEC): Make default to
+ use dynamic libraries where available.
+ * config.gcc (arc*-*-linux-uclibc*): Retain OS specific files in
+ tmake_file.
+ * config/arc/t-arc700-uClibc (SHLIB_MAPFILES): Fix pasto.
+ (SHLIB_LINK: Override to use a linker script libgcc_s.so.
+ (SHLIB_INSTALL): Likewise.
+ * config/arc/lib1funcs.asm (__mulsi3): Use (HIDDEN_)FUNC / ENDFUNC.
+ (__udivmodsi4, __umodsi3, __modsi3, __clzsi2): Likewise.
+ (__umulsidi3): Likewise. Add ARC700 optimized code.
+ * config/arc/ieee-754/adddf3.S: Use FUNC / ENDFUNC.
+ * config/arc/ieee-754/muldf3.S: Likewise.
+
+2008-08-26 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/ieee-754/fixdfsi.S: Fix shift by zero case.
+
+2008-08-08 Muhammad Khurram Riaz <khurram.riaz@arc.com>
+
+ * config/arc/predicates.md (move_dest_operand): r56 r57 cannot be destination
+ operand of move.
+ * config/arc/arc.c (arc_init): error for -mmul32x16 used for !ARC600.
+ * config/arc/arc.h (ASM_SPEC): mmul32x16 passed.
+ * config/arc/arc.md (mulsi3): added Arc600 dsp mul/mac also modified for mul64
+ (mulsidi3): added Arc600 mul/mac dsp instructions
+ * config/arc/arc600.md: scheduling info for new dsp mul/mac intructions.
+ * config/arc/arc.opt: new option -mmul32x16
+ * config/arc/t-arc-newlib: use -mmul32x16 for multilib
+
+2008-08-08 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (doloop_begin_i): Count asm insns only as a
+ single insn.
+
+2008-07-25 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * dwarf2out.c (loc_descriptor): Pass entire MEM expressions
+ through targetm.delegitimize_address.
+ * config/arc/arc.c (arc_delegitimize_address): New function.
+ (TARGET_DELEGITIMIZE_ADDRESS): Redefine.
+ (arc_output_addr_const_extrao): Remove.
+ * config/arc/arc.h (OUTPUT_ADDR_CONST_EXTRA): Remove.
+ * config/arc/arc-protos.h (arc_output_addr_const_extra): Don't declare.
+
+2008-07-25 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/ieee-754/eqdf2.S: Add some #ifdefed code for hardware
+ floating point compatibility.
+
+2008-07-23 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_output_libcall): Emit special sequence for
+ -fpic -mlong-calls.
+ * config/arc/arc.h (INSN_SETS_ARE_DELAYED): Also return true for
+ TYPE_SFUNC.
+ * config/arc/t-arc700-uClibc (SHLIB_MAPFILES): Define.
+ * config/arc/arc.md (attribute type): Add sfunc.
+ (attribute in_delay_slot): False for sfunc.
+ (attribute in_sfunc_delay_slot): New.
+ (toplevel): Add define_delay for sfunc.
+ (cmpsf_eq, cmpdf_eq): Type sfunc for -fpic -mlong-call.
+ (cmpsf_gt, cmpdf_gt, cmpsf_ge, cmpdf_ge: Likewise.
+ (cmpsf_uneq, cmpdf_uneq, cmpsf_ord, cmpdf_ord): Likewise.
+ * config/arc/lib1funcs.asm (HIDDEN_FUNC): Define.
+ * config/arc/ieee-754/eqsf2.S, onfig/arc/ieee-754/orddf2.S: Use it.
+ * config/arc/ieee-754/uneqsf2.S, config/arc/ieee-754/gtsf2.S: Likewise.
+ * config/arc/ieee-754/gedf2.S, config/arc/ieee-754/ordsf2.S: Likewise.
+ * config/arc/ieee-754/eqdf2.S, config/arc/ieee-754/uneqdf2.S: Likewise.
+ * config/arc/ieee-754/gesf2.S, config/arc/ieee-754/gtdf2.S: Likewise.
+ * config/arc/libgcc-excl.ver: New file.
+
+ * config/arc/arc.c (arc_legitimize_pic_address): Use gen_const_mem.
+ (arc_output_addr_const_extra): New function.
+ * config/arc/arc-protos.h (arc_output_addr_const_extra): Declare.
+ * config/arc/arc.h (LEGITIMIZE_ADDRESS): Don't pass OLDX.
+ (OUTPUT_ADDR_CONST_EXTRA): Define.
+
+2008-07-23 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (xorsi3): Use "w" constraint for output operand.
+ (call_value): Don't write past end of operands.
+
+ * gcc/config/arc/arc.c (arc_legitimate_pc_offset_p): New function.
+ (arc_legitimize_pic_address): Don't make addition of pcl explicit.
+ (arc_output_pic_addr_const): Also emit '+' for negative leading integer.
+ Emit leading "pcl," for ARC_UNSPEC_GOT.
+ * config/arc/arc-protos.h (arc_legitimate_pc_offset_p): Declare.
+ * config/arc/constraints.md ("Cpc", "Cal"): New constraints.
+ * config/arc/arc.md (entire file): Replace ARCompact "i", "J", "Ji" and
+ "iJ" constraints with "Cal".
+ (movsi_insn): Add missing 'S' output modifier.
+ Add "?w"/"Cpc" alternative.
+ (mulsi3_600, mulsi3_700, andsi3): Add missing 'S' output modifier.
+ (xorsi3, indirect_jump, normw, mul64, divaw, flag, sr): Likewise.
+
+2008-07-17 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/mxp/mxp.md (lshr<mode>3_imm): Rename to:
+ (vec_shr_<mode>).
+ (vec_unpacks_lo_v8hi, vec_unpacku_lo_v8hi): New patterns.
+ (vec_unpacks_hi_v8hi, vec_unpacku_hi_v8hi): Likewise.
+ (vec_pack_trunc_v4si): Likewise.
+
+2008-07-17 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/mxp/mxp.md (or<mode>3): Rename to:
+ (ior<mode>3).
+
+2008-07-17 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/sh/sh.c (expand_block_move): Update call to
+ can_move_by_pieces.
+
+ * config/mxp/mxp.h (FUNCTION_VALUE_REGNO_P): Use FIRST_PARM_REG.
+
+2008-07-16 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_final_prescan_insn): Fix bug in last change:
+ check for JUMP_INSN.
+
+2008-07-15 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_final_prescan_insn): Don't emit a nop
+ in front of a delay slot insn.
+ (arc_reorg): Use fall-back pattern for non-empty zero length loops.
+ (arc600_corereg_hazard_1): Fix extension register range.
+ (write_ext_corereg_1): Likewise.
+
+ * config/arc/arc.c (disi_highpart): Return result.
+
+2008-07-15 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * rtl-factoring.c (compute_dummy_rtx_cost): New function.
+ (compute_init_costs): Use it.
+
+ * config/arc/arc.h (IS_ASM_LOGICAL_LINE_SEPARATOR): Add STR parameter.
+
+2008-07-14 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/ieee-754/divdf3.S (.Lret0_NaN): Remove dead insn.
+ (.Linf_nan_dbl1): Reduce size (and cycle count).
+ Adjust affected offsets.
+ * config/arc/ieee-754/mulsf3.S (.Linf_nan_dbl0): Shorten NaN check.
+ Adjust affected offsets.
+ * lib1funcs.asm (__mulsi3): Remove __base conditional.
+
+ * config/arc/ieee-754/divdf3.S (.Linf_denorm): Fix handling of
+ 0x7fe / 0x7ff exponents.
+ * config/arc/ieee-754/mulsf3.S (.Ldenorm_dbl1): Avoid clobbering r4.
+
+ * config/arc/arc.md (umulqihi3, mulqihi3): Delete.
+
+ * config/arc/t-arc-newlib (MULTILIB_OPTIONS): Add mmul64 and mnorm.
+ (MULTILIB_DIRNAMES): Add mul64 and norm.
+ (MULTILIB_EXCEPTIONS): Exclude combinations of mARC700 with mmul64
+ and mnorm.
+ (MULTILIB_EXCLUSIONS): Don't build multilibs with only mmul64 or
+ only mnorm, but just one with both combined.
+ * config/arc/predicates.md (dest_reg_operand): New predicate.
+ (move_dest_operand): Use it.
+ * config/arc/arc.h (TARGET_CPU_CPP_BUILTINS): Define __ARC_NORM__ and
+ __ARC_MUL64__ when the eponymous instructions are available.
+ (TARGET_OPTFPE): Define.
+ * config/arc/arc.md (loadqi_update): Use dest_reg_operand.
+ (load_zeroextendqisi_update, load_signextendqisi_update): Likewise.
+ (load_zeroextendhisi_update, movsicc, movdicc, movsfcc): Likewise.
+ (movdfcc, movsicc_insn, movdicc_insn, movsfcc_insn): Likewise.
+ (movdfcc_insn, zero_extendqihi2_a4, zero_extendqihi2_i): Likewise.
+ (zero_extendqihi2, zero_extendqisi2_a4, zero_extendqisi2_ac): Likewise.
+ (zero_extendqisi2, zero_extendhisi2_a4, zero_extendhisi2_i): Likewise.
+ (zero_extendhisi2, zero_extendhisi2, extendqihi2_a4): Likewise.
+ (extendqihi2_i, extendqihi2, extendqisi2_a4, extendqisi2_ac): Likewise.
+ (extendqisi2): Likewise.
+ (extendhisi2_a4, extendhisi2_i, extendhisi2, abssi2): Likewise.
+ (smaxsi3, addsi3_mixed, addsi3_mixed, mulsi3i, mulsi3_700): Likewise.
+ (umulsidi3, mulsidi3, addsi3, addsi3_insn_a4, subsi3): Likewise.
+ (subsi3_insn, add_n, sub_n, shift_and_add_insn): Likewise.
+ (shift_and_sub_insn, bset_insn, bxor_insn, bclr_insn): Likewise.
+ (bmsk_insn, andsi3_insn_a4, bicsi3_insn, iorsi3_a4, xorsi3): Likewise.
+ (negsi2_a4, negsi2i, one_cmplsi2_a4, one_cmplsi2): Likewise.
+ (one_cmpldi2_a4, ashlsi3, ashrsi3, lshrsi3, shift_si3): Likewise.
+ (rotrsi3, seq, sne, sgt, sle, sge, slt, sgtu, sleu, sgeu): Likewise.
+ (sltu, scc_insn, neg_scc_insn, not_scc_insn, movsi_ne): Likewise.
+ (movsi_cond_exec, add_cond_exec, commutative_cond_exec): Likewise.
+ (sub_cond_exec, noncommutative_cond_exec, call_prof): Likewise.
+ (call_value_via_reg_mixed, call_value_via_label): Likewise.
+ (call_value_via_imm, call_value_prof, flush_icache+1): Likewise.
+ (flush_icache+2, flush_icache+3, flush_icache+4): Likewise.
+ (flush_icache+5, flush_icache+6, flush_icache+7): Likewise.
+ (flush_icache+8, flush_icache+9, flush_icache+10): Likewise.
+ (flush_icache+11, flush_icache+12, norm, normw, swap): Likewise.
+ (core_read, lr, sibcall_value, sibcall_value_insn): Likewise.
+ (sibcall_value_prof, abssf2, negsf2): Likewise.
+ (storeqi_update): Likewise. Use "w" / "c" constraints.
+ (loadhi_update, load_signextendhisi_update, storehi_update): Likewise.
+ (loadsi_update, storesi_update, loadsf_update): Likewise.
+ (storesf_update, sminsi3, mulsi3_600, adddi3, subdi3): Likewise.
+ (anddi3, iordi3, xordi3, negdi2, one_cmpldi2): Likewise.
+ (ashlsi3_insn_mixed, ashrsi3_insn_mixed, lshrsi3_insn_mixed): Likewise.
+ (divaw): Likewise.
+ (andsi3, iorsi3): Likewise. Mark commutative.
+ (cmpsf, cmpdf, cmpsf_eq, cmpdf_eq): Make conditional on TARGET_OPTFPE.
+ (cmpsf_gt, cmpdf_gt, cmpsf_ge, cmpdf_ge, cmpsf_uneq): Likewise.
+ (cmpdf_uneq, cmpsf_ord, cmpdf_ord): Likewise.
+ * config/arc/dp-hack.h: Make optimized floating-point support
+ dependent on __ARC_NORM__ instead of __ARC700__.
+ * config/arc/fp-hack.h: Likewise.
+ * longlong.h (count_leading_zeros): Make dependent on __ARC_NORM__
+ instead of __ARC700__.
+ * lib1funcs.asm (__clzsi2, L_adddf3, L_addsf3): Likewise.
+ (L_extendsfdf2, L_truncdfsf2, L_floatsidf, L_floatsisf): Likewise.
+ (L_floatunsidf, L_fixdfsi, L_fixsfsi, L_fixunsdfsi, L_eqdf2): Likewise.
+ (L_eqsf2, L_gtdf2, L_gtsf2, L_gedf2, L_gesf2, L_uneqdf2): Likewise.
+ (L_uneqsf2, L_orddf2, L_ordsf2): Likewise.
+ (L_muldf3): Provide variant for __ARC_NORM__ && __ARC_MUL64__.
+ (L_mulsf3, L_divdf3, L_divsf3): Likewise.
+ (__mulsi3): Provide new variants for __ARC_MUL64__,
+ __ARC_NORM__ and !__OPTIMIZE_SIZE__.
+ (__udivmodsi4): Provide new variant for __ARC_NORM__. Fix variant for
+ plain ARC600 to conform to lp instruction description of
+ document 5115-31.
+ * config/arc/ieee-754/arc600/divdf3.S: New file.
+ * config/arc/ieee-754/arc600/divsf3-stdmul.S: Likewise.
+ * config/arc/ieee-754/arc600/mulsf3.S: Likewise.
+ * config/arc/ieee-754/arc600/muldf3.S: Likewise.
+ * config/arc/arc.c (arc_select_cc_mode): Use TARGET_OPTFPE.
+ (gen_compare_reg): Likewise.
+
+ * config/arc/predicates.md (symbolic_memory_operand): Remove predicate.
+ * config/arc/arc-protos.h (symbolic_memory_operand): Don't declare.
+
+2008-07-07 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config.gcc (tm_defines): Set TARGET_CPU_DEFAULT_OPT to mA6.
+ * t-arc-newlib (MULTILIB_OPTIONS): Replace mA5 with mA6.
+ (MULTILIB_MATCHES): Likewise.
+ * config/arc/lib1funcs.asm (__divnorm): Only provide for A4.
+ Changed all callers.
+ (__udivmodsi4): Add optimized ARC600 version.
+
+2008-07-02 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * final.c (asm_insn_count): Make empty asm templates have zero length.
+ * config/arc/arc.c (arc_final_prescan_insn): Avoid calling arc_hazard
+ on epilogue delay slots.
+ (arc_reorg): When zero overhead loop is empty, replace it with a set
+ of lp_count to zero.
+ (arc600_corereg_hazard): Look into SEQUENCEs.
+ (arc_hazard): Don't look into SEQUENCEs.
+ * config/arc/arc.h (IS_ASM_LOGICAL_LINE_SEPARATOR): Define.
+ * config/arc/arc.md (attr "in_delay_slot"): use prev/next_active_insn.
+ (doloop_begin_i): Assert minimum number of insns, not size.
+
+2008-07-01 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc-protos.h (arc_insn_length_adjustment): Declare.
+ (arc_corereg_hazard, arc_hazard, arc_write_ext_corereg): Likewise.
+ * config/arc/arc.c (arc_final_prescan_insn): Output a nop where
+ necesary to avoid a hazards on ARC600.
+ (arc600_corereg_hazard_1, arc600_corereg_hazard): New functions.
+ (arc_hazard, arc_insn_length_adjustment): Likewise.
+ (write_ext_corereg_1, arc_write_ext_corereg): Likewise.
+ * config/arc/arc.md (in_delay_slot, doloop_begin_i, doloop_end_i):
+ Handle ARC600 idiosyncrasies concerning zero overhead loops.
+ (doloop_end): Enable for ARC600.
+
+ * config/arc/arc.c (arc_secondary_reload): Also require reload
+ for WRITABLE_CORE_REGS, but restrict LPCOUNT_REG / WRITABLE_CORE_REGS
+ secondary reloads to reloads from memory.
+
+ * config/arc/arc.c (arc_final_prescan_insn): Put TARGET_DUMPISIZE
+ code after declarations.
+
+ * config/arc/arc-protos.h (arc_output_mi_thunk): Unless long call
+ semantics apply, use branch.
+
+2008-07-15 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/mxp/mxp.md (mov<mode>_clob): Now define_insn_and_split.
+ Remove stray comma.
+ * config/mxp/mxp.c (TARGET_PROMOTE_FUNCTION_RETURN): Redefine.
+ * config/mxp/mxp.h (PREFERRED_STACK_BOUNDARY): Define.
+ (PREFERRED_RELOAD_CLASS): Change SffVff_REGS to Sff_REGS.
+ (STATIC_CHAIN): Define.
+ (HARD_REGNO_RENAME_OK): Define.
+
+2008-06-26 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config.gcc (mxp-arc-elf): Change to:
+ (mxp-*-elf).
+ * regclass.c (struct reg_pref): Use short rather than char for members.
+ * config/mxp/constraints.md: Rename constraints to satisfy new rule
+ on smale length for same leading character.
+ * config/mxp/mxp.md: Update to reflect constraint renaming.
+ Reflect rename of respectively define_code_macro and
+ define_mode_macro to define_code_iterator and define_mode_iterator.
+ * UNITS_PER_SIMD_WORD: Add MODE parameter.
+
+2008-06-26 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_expand_builtin) Use new CALL_EXPR accessors.
+ (arc_expand_simd_builtin): Likewise.
+
+ * config/arc/arc.c (arc_reorg): Don't try to create cbranchsi4_scratch
+ if a REG_CROSSING_JUMP is seen.
+ * config/arc/arc.md (jump): Rename to..
+ (jump_i). Reject for TARGET_LONG_CALLS_SET if REG_CROSSING_JUMP
+ note is found.
+ (jump): New define_expand.
+ (cbranchsi4_scratch): Re-indent; Clean up length calculation.
+
+2008-06-24 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (subsi3_insn): Alternative 4 is "nocond".
+
+ * config/arc/arc.md (cbranchsi4_scratch): Show clobber of CC register
+ in pattern.
+
+ * config/arc/arc.h (LINK_SPEC): s/shared/shared:-shared/ .
+
+ * config/arc/arc.h (IS_POWEROF2_P): Check for zero.
+ * config/arc/arc.md (andsi3, iorsi3, xorsi3):
+ Use 'w' instead of 'c' for output constraint. Drop J in Ji.
+ Use arc_size_opt_level. Fix formatting.
+
+ * config/arc/arc.md (anddi3): Fix result constraints to use 'w'.
+ (iordi3, xordi3, negdi2, divaw): Likewise.
+
+ * config/arc/arc-protos.h (disi_highpart): Declare.
+ * config/arc/arc.h (disi_highpart): New function.
+ * config/arc/arc.md (addf, adc, subf, sbc): New patterns.
+ (anddi3, iordi3, xordi3): Make conditional on TARGET_OLD_DI_PATTERNS.
+ (negdi3): Likewise.
+ (*movsi_set_cc_insn, unary_comparison): Use cc_set_register.
+ (*commutative_binary_comparison): Likewise.
+ (*noncommutative_binary_comparison): Likewise.
+ (adddi3, subdi3): Now define_expand.
+ (*not_scc_insn): Use cc_use_register.
+ * config/arc/arc.opt (mold-di-patterns): New options.
+ * config/arc/predicates.md (cc_set_register): New predicates.
+ (cc_use_register): Likewise.
+
+ * config/arc/arc.md (subsi3): Allow constant operand 1.
+ (subsi3_insn): Likewise.
+
+2008-06-12 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h (RTX_OK_FOR_OFFSET_P): Fix typo.
+
+2008-06-09 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * genattr.c (gen_attr): Include vec.h and statistics.h.
+ * Makefile.in (INSN_ATTR_H): Add vecprim.h, vec.h and statistics.h.
+
+ * expr.c (can_move_by_pieces): Fix logic.
+
+ * rtlanal.c (walk_stores): New function, uncostified copy
+ of note_stores.
+ * rtl.h (walk_stores): Declare.
+
+2008-06-09 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * doc/tm.texi (CAN_MOVE_BY_PIECES): Document.
+ * expr.c (emit_block_move_via_movmem): No longer static.
+ (can_move_by_pieces): New argument consider_movmem.
+ Changed all callers.
+ (expand_constructor): Use can_move_by_pieces.
+ * expr.h (emit_block_move_via_movmem): Declare.
+ (can_move_by_pieces): Adjust declaration.
+ * builtins.c (expand_builtin_mempcpy): Use target.
+ Use emit_block_move_via_movmem.
+ * config/arc/arc-protos.h (arc_expand_movmem): Declare.
+ * config/arc/arc.c (force_offsettable): New function.
+ (arc_expand_movmem): Likewise.
+ * config/arc/arc.h (MOVE_MAX_PIECES): Don't define.
+ (MOVE_BY_PIECES_P, CAN_MOVE_BY_PIECES, MOVE_RATIO): Define.
+ * config/arc/arc.md (movmemsi): New pattern.
+
+2008-06-06 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_init_reg_tables): Set proper
+ arc_regno_reg_class for core regs / writable core regs.
+ * config/arc/arc.h (CONDITIONAL_REGISTER_USAGE): If any of the
+ registers in the range 32..59 has been made non-fixed, include
+ them in WRITABLE_CORE_REGS.
+ (enum reg_class, REG_CLASS_NAMES): Add WRITABLE_CORE_REGS.
+ (REG_CLASS_CONTENTS): Likewise.
+ (PREFERRED_RELOAD_CLASS): Check for WRITABLE_CORE_REGS.
+ * config/arc/arc.md (*movqi_insn): Use 'w' constraint for
+ writable core regs.
+ (*movhi_insn, movsi, *movsi_set_cc_insn, *movdi_insn): Likewise.
+ (*movsf_insn, *movdf_insn, *movsicc_insn, *movdicc_insn): Likewise.
+ (*movdicc_insn, *movsfcc_insn, *movdfcc_insn): Likewise.
+ (*zero_extendqihi2_i, *zero_extendqisi2_ac): Likewise.
+ (*zero_extendhisi2_i, *extendqisi2_ac, *extendhisi2_i): Likewise.
+ (abssi2, smaxsi3, sminsi3, subsi3_insn, *add_n, *sub_n): Likewise.
+ (*shift_and_add_insn_mixed, *shift_and_add_insn): Likewise.
+ (*shift_and_sub_insn, *bset_insn_mixed, *bset_insn): Likewise.
+ (*bxor_insn, *bclr_insn, *bmsk_insn, *bicsi3_insn, iorsi3): Likewise.
+ (negsi2, one_cmplsi2, rotrsi3, *scc_insn, *neg_scc_insn): Likewise.
+ (*not_scc_insn, *movsi_ne, *movsi_cond_exec, *add_cond_exec): Likewise.
+ (*commutative_cond_exec, *sub_cond_exec): Likewise.
+ (*noncommutative_cond_exec, flush_icache+[23479], norm): Likewise.
+ (normw, swap, *doloop_fallback, abssf2, negsf2, negsf2): Likewise.
+ (mulsi3): Rename to:
+ (*mulsi3_700).
+ (mulsi3_600): New pattern.
+ (mulsi3): New define_expand.
+ * config/arc/arc.opt (mdynamic): New option.
+ * config/arc/constraints.md ("w"): New constraint.
+
+ * config/arc/arc.h (TARGET_CPU_CPP_BUILTINS): Fix ARC600 / ARC700 definitions.
+
+2008-05-22 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (flush_icache+5): Fix tests.
+
+2008-05-19 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h [UCLIBC_DEFAULT] (STATIC_LINK_SPEC): Define;
+ default to static linking.
+ (LINK_SPEC) [UCLIBC_DEFAULT]: Use STATIC_LINK_SPEC.
+
+2008-05-19 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h (LINK_SPEC) [UCLIBC_DEFAULT]: Pass '-shared'
+ through.
+
+2008-05-09 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config.gcc (arc-*-elf*): Add TARGET_CPU_DEFAULT_OPT to tm-defines.
+ (arc600-*-linux-uclibc): Likewise; remove USE_UCLIBC.
+ (arc*-*-linux-uclibc): Likewise.
+ (with-cpu): Recognize arc600.
+ * config/arc/arc.c: Use UCLIBC_DEFAULT instead of USE_UCLIBC.
+ * config/arc/arc.h (UCLIBC_DEFAULT): Define if not already defined.
+ Use instead of USE_UCLIBC.
+ (CPP_SPEC): Move everything from here...
+ (TARGET_CPU_CPP_BUILTINS): ... to here.
+ (CPP_SPEC): Unify.
+ (DRIVER_SELF_SPECS: Always define. Use TARGET_CPU_DEFAULT_OPT.
+ (MULTILIB_DEFAULTS): Use TARGET_CPU_DEFAULT_OPT.
+
+2008-04-27 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * mode-classes.def (MODE_VECTOR_CC): New mode class.
+ * genmodes.c (vector_class): Support MODE_VECTOR_CC.
+ (complete_mode): Allow bytesize to have been set for MODE_CC.
+ Support MODE_VECTOR_CC.
+ (SIZED_CC_MODE): New macro.
+ (make_special_mode ): Return mode_data struct.
+ *config.gcc (mxp-arc-elf*): Set extra_objs.
+
+2008-04-25 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config.gcc (mxp-arc-elf*): New configuration.
+ * doc/mxp.texi: New file.
+ * config/mxp: New directory. FIXME: details.
+ * mode-classes.def (MODE_CLASSES): Add MODE_VECTOR_PARTIAL_INT.
+ * cse.c (cse_insn): Fix loop to stop at VOIDmode.
+ * genmodes.c (vector_class): Support MODE_VECTOR_PARTIAL_INT.
+ (complete_mode, emit_mode_adjustments): Likewise.
+ * target-def.h (TARGET_PRESERVE_RELOAD): Fix spelling.
+
+2008-04-25 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h (LINK_SPEC) [USE_UCLIBC]: Add options
+ -z max-page-size=0x1000 -z common-page-size=0x1000 .
+
+2008-04-17 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_profile_call): Pass pointer as argument to
+ _mcount_call.
+
+2008-04-16 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h (CONDITIONAL_REGISTER_USAGE): Adjust SIBCALL_REGS
+ according to call_used_regs.
+ * config/arc/gmon/mcount.c (_MCOUNT_DECL): Remove stray
+ catomic_compare_and_exchange_bool_acq call.
+ * testsuite/gcc.dg/func-ptr-prof.c: New file.
+
+2008-04-09 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h (LINK_SPEC) [USE_UCLIBC]: When profiling, use
+ arclinux_prof emulation; else, use arclinux emulation.
+ (LINK_SPEC) [!USE_UCLIBC]: When profiling, use arcelf_prof emulation.
+
+2008-04-08 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config.gcc (arc600-*-linux-uclibc*): New configuration.
+ * config/arc/t-arc600-uClibc: New file.
+
+2008-04-05 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (gen_compare_reg): Swap operands for fpx
+ CC_FP_GEmode comparisons.
+ * config/arc/fpx.md (cmpsfpx_gt): Rename to:
+ (cmpfpx_gt). Also clear n flag if z flag is set.
+ (cmpsfpx_ge): Rename to:
+ (cmpfpx_ge). Assume swapped comparison operands. Don't
+ setc flag if z flag is set.
+
+2008-04-04 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/dp-hack.h (df_to_usi): Write as
+ (tf_to_usi).
+
+2008-04-04 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/fp-bit.c (_fpdiv_parts): Avoid double rounding.
+ * config/arc/arc-protos.h (prepare_extend_operands): Move into part
+ guarded by RTX_CODE.
+ (arc_output_addsi, arc_expand_movmem, prepare_move_operands): Likewise.
+ * config/arc/predicates.md (proper_comparison_operator):
+ Fix CC_Cmode case.
+ * config/arc/arc.c (branch_dest): Check for reversed branch.
+ * config/arc/arc.h (LEGITIMATE_SCALED_ADDRESS_P): Add missing
+ parentheses.
+ * config/arc/arc.md (*movsi_scaled_insn): Remove pattern.
+ (movdi_insn): Add %? output specifier.
+ (movdf_insn): Likewise. Add cond attribute.
+
+ * config/arc/arc-protos.h (gen_compare_reg): Update prototype.
+ (arc_output_libcall): Declare.
+ * config/arc/predicates.md (proper_comparison_operator):
+ Add cases for floating point CCmodes, SFmode and DFmode.
+ * config/arc/ieee-754/floatunsidf.S: New file.
+ * config/arc/ieee-754/divdf3.S: Likewise.
+ * config/arc/ieee-754/orddf2.S: Likewise.
+ * config/arc/ieee-754/eqsf2.S: Likewise.
+ * config/arc/ieee-754/truncdfsf2.S: Likewise.
+ * config/arc/ieee-754/fixunsdfsi.S: Likewise.
+ * config/arc/ieee-754/divtab-arc-df.c: Likewise.
+ * config/arc/ieee-754/uneqsf2.S: Likewise.
+ * config/arc/ieee-754/adddf3.S: Likewise.
+ * config/arc/ieee-754/gtsf2.S: Likewise.
+ * config/arc/ieee-754/gedf2.S: Likewise.
+ * config/arc/ieee-754/floatsisf.S: Likewise.
+ * config/arc/ieee-754/muldf3.S: Likewise.
+ * config/arc/ieee-754/fixdfsi.S: Likewise.
+ * config/arc/ieee-754/divsf3.S: Likewise.
+ * config/arc/ieee-754/ordsf2.S: Likewise.
+ * config/arc/ieee-754/eqdf2.S: Likewise.
+ * config/arc/ieee-754/divtab-arc-sf.c: Likewise.
+ * config/arc/ieee-754/divsf3-stdmul.S: Likewise.
+ * config/arc/ieee-754/addsf3.S: Likewise.
+ * config/arc/ieee-754/uneqdf2.S: Likewise.
+ * config/arc/ieee-754/gesf2.S: Likewise.
+ * config/arc/ieee-754/gtdf2.S: Likewise.
+ * config/arc/ieee-754/mulsf3.S: Likewise.
+ * config/arc/ieee-754/floatsidf.S: Likewise.
+ * config/arc/ieee-754/fixsfsi.S: Likewise.
+ * config/arc/ieee-754/arc-ieee-754.h: Likewise.
+ * config/arc/ieee-754/extendsfdf2.S: Likewise.
+ * config/arc/arc.c (get_arc_condition_code): Add floating point cases.
+ (arc_select_cc_mode, arc_init_reg_tables): Likewise.
+ (gen_compare_reg): Likewise. Don't take comparison operands, but
+ but result mode as parameter. Return appropriate comparison of
+ flags register against 0. Changed all callers.
+ (arc_output_libcall): New function.
+ * config/arc/arc.h (INSN_SETS_ARE_DELAYED): Define.
+ (INSN_REFERENCES_ARE_DELAYED, REVERSE_CONDITION): Likewise.
+ * config/arc/fpx.md (cmpsfpx_raw, cmpdfpx_raw): New patterns.
+ (cmpsfpx_gt, cmpsfpx_ge): Likewise.
+ * config/arc/dp-hack.h: New file.
+ * config/arc/fp-hack.h: New file.
+ * config/arc/arc.md (movsicc_insn): Use proper_comparison_operator.
+ (movdicc_insn, movsfcc_insn, movdfcc_insn, neg_scc_insn): Likewise.
+ (not_scc_insn, movsi_cond_exec, add_cond_exec): Likewise.
+ (commutative_cond_exec, sub_cond_exec): Likewise.
+ (noncommutative_cond_exec): Likewise.
+ (scc_insn): Use REVERSE_CONDITION.
+ (bunge, bungt, bunle, bunlt, buneq, bltgt, bordered): New patterns.
+ (bunordered, cmpsf, cmpdf, cmp_float, cmpsf_eq, cmpdf_eq): Likewise.
+ (cmpsf_gt, cmpdf_gt, cmpsf_ge, cmpdf_ge, cmpsf_uneq: Likewise.
+ (cmpdf_uneq, cmpsf_ord, cmpdf_ord, abssf2, negsf2): Likewise.
+ * config/arc/lib1funcs.asm (FUNC, ENDFUNC0, ENDFUNC): New macros.
+ (__udivsi3, __divsi3): Use FUNC / ENDFUNC.
+ Toplevel: Add code to include files from ieee-754 subdirectory.
+ * config/arc/t-arc (LIB1ASMFUNCS): Add floating-point functions.
+ (dp-bit.c): cat config/arc/dp-hack.h.
+ (fp-bit.c): cat config/arc/fp-hack.h.
+ * config/arc/arc-modes.def (CC_FP_GT, CC_FP_GE, CC_FP_ORD): New modes.
+ (CC_FP_UNEQ, CC_FPX): Likewise.
+
+2008-03-27 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/t-arc700-uClibc (TARGET_LIBGCC2_CFLAGS): Add -fPIC.
+
+2008-03-27 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (lr, sr): Enable r,r alternative.
+
+2008-03-25 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h (DRIVER_SELF_SPECS): Change condition to !mA*.
+
+2008-03-20 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h (DRIVER_SELF_SPECS): Change condition to !-mA.
+
+2008-03-20 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (movqi_insn_mixed, loadqi_insn_mixed): Remove.
+ (storeqi_insn_mixed, movhi_insn_mixed, loadhi_insn_mixed): Likewise.
+ (storehi_insn_mixed, movsi_insn_mixed, loadsi_insn_mixed): Likewise.
+ (storesi_insn_mixed): Likewise.
+ (movhi_insn): Rewrite after model of movsi pattern.
+
+2008-03-19 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_init): Fix default setting of processor
+ type in target_flags.
+
+2008-03-19 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * reload.c (push_secondary_reload): Add missing break.
+ * config/arc/arc.h (LEGITIMIZE_RELOAD_ADDRESS): Define.
+
+2008-03-18 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (commutative_binary_comparison): Fix position
+ of '%'.
+
+2008-03-17 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (doloop_begin_i): Fix offset for loop end.
+
+2008-03-06 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_encode_section_info): Use
+ targetm.binds_local_p instead of TREE_PUBLIC.
+
+2008-03-05 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/lib1funcs.asm (clzsi2) [!__ARC700__,!__A4__]:
+ Re-implement to avoid undefined behaviour and increase performance.
+
+ * config/arc/arc.h (CONDITIONAL_REGISTER_USAGE) <TARGET_ARC700>:
+ Set fixed_regs[LP_COUNT].
+
+2008-03-05 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h (OVERRIDE_OPTIONS): Disable small data for -fPIC.
+ (LEGITIMATE_SCALED_ADDRESS_P): For -fPIC, the only allowed constant
+ bases are CONST_INT.
+
+2008-02-27 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/constraints.md ("Cca", C2a): Check absolute value against
+ maximum scaled constant.
+
+2008-02-26 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/crti.asm, config/arc/crtn.asm: Fix stack layout.
+
+2008-02-08 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/predicates.md (long_immediate_loadstore_operand):
+ Also recognize that non-sdata SYMBOL_REFS require long immediates.
+
+2008-02-07 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_print_operand_address): Always add @sda
+ for small data symbols. Use recursion.
+ (prepare_move_operands): Also do small data address checks for
+ floating point point modes.
+ (prepare_extend_operands): New function.
+ * config/arc/arc-protos.h (prepare_extend_operands): Declare.
+ * config/arc/arc.md (zero_extendqihi2, zero_extendhisi2): Rename to:
+ (*zero_extendqihi2_i, *zero_extendhisi2_i).
+ (zero_extendqihi2, zero_extendhisi2): New expanders.
+ (zero_extendqisi2, extendqisi2): Use prepare_extend_operands.
+ (extendqihi2, extendhisi2): Rename to:
+ (*extendqihi2_i, *extendhisi2_i).
+ (extendqihi2i, extendhisi2): New expanders.
+
+2008-02-07 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (doloop_begin_i): If loop is too large for lp
+ instruction, emit code sequence using sr to set LOOP_START / LOOP_END
+ appropriately.
+
+2008-01-24 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h (RTX_OK_FOR_OFFSET_P): Before applying scaling,
+ check that offset is aligned.
+
+2008-01-19 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * resource.c (find_dead_or_set_registers): Don't consider sets inside
+ a COND_EXEC to kill the value in a register.
+
+2008-01-10 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/constraints.md ("Usc"): Reject small data.
+
+ * config/arc/arc.md (movsi_insn): Fix predicate test for valid constant
+ store address.
+
+2008-01-08 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * version.c (VERSUFFIX): Bump date.
+
+2007-12-06 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc-protos.h (arc_asm_output_aligned_decl_common):
+ Change to:
+ (arc_asm_output_aligned_decl_local).
+ * config/arc/arc.c: Likewise.
+ * config/arc/arc.h (OPTIMIZATION_OPTIONS): Initialize flag_no_common
+ as -1.
+ (OVERRIDE_OPTIONS): If flag_no_common is still -1, initialize according
+ to TARGET_NO_SDATA_SET.
+ (ASM_OUTPUT_ALIGNED_DECL_COMMON): Don't define.
+ (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use arc_asm_output_aligned_decl_local.
+
+2007-11-29 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (unspec_prof_hash): Only hash s1 string for
+ SYMBOL_REF.
+ (unspec_prof_htab_eq): Use rtx_equal_p.
+ * config/arc/arc.md (call): Use emit_call_insn for profiling call.
+ (call_value): Likewise.
+
+2007-11-26 J"orn Rennecke <joern.rennecke@arc.com>
+
+ target/27758:
+ * config/arc/arc.c (arc_output_pic_addr_const) <case SYMBOL_REF>:
+ Use output_addr_const instead of assemble_name.
+
+2007-11-20 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (movsi_insn): Add 'S' modifier for operand 1 of
+ alternative 10.
+
+2007-11-01 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc-protos.h (prepare_move_operands): Declare.
+ * config/arc/predicates.md (move_dest_operand): Reject scaled index.
+ (shouldbe_register_operand): New predicate.
+ * config/arc/arc.c (arc_address_cost): Scaled index and plain index
+ have low cost.
+ (arc_print_operand): Print ".as" for scaled index.
+ (arc_print_operand_address): Decompose scaled index.
+ base can be CONST_INT.
+ (arc_rewrite_small_data_1): If expression would get too complex,
+ force small data address into register.
+ (arc_rewrite_small_data): Pass &op as data.
+ (prepare_move_operands): New function.
+ * config/arc/arc.h (RTX_OK_FOR_INDEX_P): Enable.
+ (LEGITIMATE_OFFSET_ADDRESS_P): Add INDEX parameter. Changed all users.
+ Require MODE size to be no larger than 4.
+ (LEGITIMATE_SCALED_ADDRESS_P): Define.
+ (GO_IF_LEGITIMATE_ADDRESS): Use LEGITIMATE_SCALED_ADDRESS_P.
+ (GO_IF_MODE_DEPENDENT_ADDRESS): Only say REG-REG PRE/POST_MODIFY
+ is mode dependent.
+ Indexed addresses are mode dependent.
+ * config/arc/arc.md (movqi, movhi, movsi, movdf): Use
+ prepare_move_operands and prepare_move_operands.
+ (movdi): Use move_dest_operand.
+ (doloop_begin_i): Don't align if no lp instruction is used.
+ (doloop_end_i): Now define_insn_and_split.
+ * arc.opt (mindexed-load, mauto-modify-reg): New options.
+
+2007-10-30 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * Makefile.in (options.c): Depend on $(INSN_ATTR_H). Include it.
+ * config/arc/arc.h: Don't include insn-attr.h.
+
+2007-10-26 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (doloop_fallback_m): Avoid unaligning code.
+
+2007-10-26 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (doloop_begin_i): Add ????X alternative.
+ (doloop_end_i): Add m alternative.
+ (doloop_fallback_m): New pattern.
+ * config/arc/arc.c (arc_reorg): Fix up doloop_end_i instructions
+ that ended up with memory. When a doloop_begin_i doesn't have the
+ right register, try to find it in a preceding move.
+
+2007-10-26 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_init): Provide default for arc_tune and
+ arc_multcost.
+ (arc_rtx_costs): Use arc_multcost.
+ * arc.md: Move scheduling description to...
+ * config/arc/arc700.md: ... here. New file.
+ * config/arc/arc600.md: New file. Tie ARC700 scheduling description
+ to tune_arc700 attribute.
+ (mov_set_cc_insn, compare_insn): Combine to:
+ (compare_700).
+ (branch_700): New reservation. Create new bypass.
+ (multi_SI): Replace with:
+ (multi_xmac, multi_std): New reservations. Adjust bypasses.
+ * arc.md: Update Copyright blurb.
+ Include new files.
+ (tune, tune_arc700): New attributes.
+ (movsi_set_cc_insn): Set type to "compare".
+ * config/arc/arc.h: Protect against multiple inclusion.
+ Include "insn-attr.h".
+ * arc.opt (multcost, mtune): New options.
+
+2007-10-23 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h (TRAMPOLINE_ADJUST_ADDRESS): Properly define.
+ * config/arc/arc.md (sub_cond_exec): Add mode to set source.
+ (doloop_begin_i): Add mode to operand 0.
+
+ * config/arc/divtab-arc700.c (main): Emit reverse ordered table.
+ * config/arc/lib1funcs.asm (__divsi3): Use pcl as base addressing
+ register with a negative index.
+
+ * config/arc/predicates.md (cc_register): Now a special_predicate.
+ (_2_4_8_operand): New predicate.
+ * config/arc/arc.c (arc_rtx_costs): Add description for add_n and
+ sub_n costs.
+ * config/arc/arc.md (add_n, sub_n): New patterns.
+ (shift_and_add_insn_mixed): Type shift.
+
+ * combine.c (gen_lowpart_for_combine): Use omode when generating
+ clobber.
+
+2007-10-18 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc-protos.h (arc_save_restore): Don't declare.
+ * config/arc/predicates.md (p2_immediate_operand): New predicate.
+ (zn_compare_operator, commutative_operator): Likewise.
+ (noncommutative_operator, unary_operator): Likewise.
+ (move_dest_operand): Reject PRE_MODIFY / POST_MODIFY with
+ register-register increment.
+ (proper_comparison_operator): Replace.
+ * config/arc/arc.c ("tm-constrs.h", "reload.h"): #include.
+ (void arc_init): Don't set arc_punct_chars['~'].
+ (get_arc_condition_code): Take mode into account.
+ (arc_select_cc_mode): Replace.
+ (arc_init_reg_tables): Update CC*mode handling.
+ (arc_address_cost): Replace costs.
+ (arc_save_restore): New arguments parity and first_offset.
+ (arc_output_function_prologue): Emit short instructions.
+ Fold stack adjustments into pre-modify addressing.
+ (arc_output_function_epilogue): Likewise.
+ Don't emit a nop when delay slot remains unfilled.
+ If the delay insn is short, make jump long.
+ (output_scaled): New variable.
+ (arc_print_operand): Remove '~' case.
+ Add support for scaled address offsets.
+ Add 'B' and 'O' cases.
+ (record_cc_ref): Remove COND_SET_ZNC handling.
+ (arc_final_prescan_insn): Support -misize.
+ (arc_reorg): Handle case when end of zero-overhead loop has been
+ duplicated.
+ When generating brcc insn, check that first comparison operand is
+ a register.
+ (arc_output_addsi): New function.
+ * config/arc/arc.h (OPTIMIZATION_OPTIONS): Set default for
+ arc_size_opt_level.
+ (OVERRIDE_OPTIONS): When (arc_size_opt_level == 3), set optimize_size.
+ (DATA_ALIGNMENT): Don't add extra alignment when arc_size_opt_level
+ is 3.
+ (SMALL_INT_RAGE): New macro.
+ (HAVE_PRE_MODIFY_REG, HAVE_POST_MODIFY_REG): Define.
+ (RTX_OK_FOR_OFFSET_P): Allow scaled indices.
+ (LEGITIMATE_OFFSET_ADDRESS_P): Allow register-register
+ PRE_MODIFY / POST_MODIFY.
+ (JUMP_ALIGN, MOVE_MAX_PIECES): Define.
+ (LABEL_ALIGN_AFTER_BARRIER, LOOP_ALIGN): Set to JUMP_ALIGN.
+ * config/arc/arc.md (mov_set_cc_insn,core_insn, compare_insn):
+ Align write_port allocation with other insn_reservation definitions.
+ (atribute cond): Remove set_znc value. Changed all users.
+ (movqi_insn, movsi_insni, zero_extendqihi2): Rebalance alternatives.
+ (zero_extendqisi2_aci, addsi3_mixed, subsi3_insn): Likewise.
+ (cmpsi_cc_insn_mixed): Likewise.
+ (movsi_set_cc_insn): Match both CC_ZNmode and CC_Zmode.
+ (*movsi_insn_mixed): Changed another 'r' to 'c'.
+ (unary_comparison, commutative_binary_comparison): New patterns.
+ (noncommutative_binary_comparison, (cmpsi_cc_zn_insn): Likewise.
+ (cmpsi_cc_z_insn, cmpsi_cc_c_insn, movsi_ne): Likewise.
+ (movsi_cond_exec, add_cond_exec, commutative_cond_exec): Likewise.
+ (sub_cond_exec, noncommutative_cond_exec): Likewise.
+ (movdi_insn, movdf_insn): Add suport for scaled offsets.
+ (zero_extendhisi2, extendhisi2): Likewise.
+ (movsicc_insn, cbranchsi4_scratch): Tweak alternatives.
+ (zero_extendhisi2): Add suport for scaled offsets.
+ (addsi3_mixed): Use arc_output_addsi.
+ (cmpsi_ccznc_insn_a4, cmpsi_cczn_insn_mixed): Deleted.
+ (cmpsi_cczn_insn): Likewise.
+ (scc_insn): Now a define_split.
+ (branch_insn, rev_branch_insn, call_via_label): Don't output nops.
+ (call_prof, call_value_via_label, call_value_prof): Likewise.
+ (sibcall_value_insn, sibcall_prof, sibcall_value_prof): Lkewise.
+ (flush_icache+3): Use CC_ZN_mode.
+ (flush_icache+4): Likewise. Check that operand[4] dies.
+ (sibcall_insn): Add short alternative.
+ (doloop_begin_i): Align loop insn.
+ * config/arc/constraints.md (C_0, Usc, Rcq, Rs5): New constraints.
+ (U): Rename to:
+ (Usd).
+ * config/arc/arc.opt (-malign-loops,-mno-align-loops): Remove.
+ (msize-level=): Add.
+ * config/arc/arc-modes.def (CCZNC, CCZN): Remove.
+ (CC_ZN, CC_Z, CC_C): Add.
+
+2007-10-15 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * tree-ssa-loop-ch.c (copy_loop_headers): Suppress one case of
+ counter-productive copying.
+ * config/arc/arc-protos.h (arc_cond_exec_p): Declare.
+ (arc_secondary_reload, arc_register_move_cost): Likewise.
+ * config/arc/predicates.md (move_double_src_operand): Allow
+ auto inc/dec.
+ * config/arc/arc.c (arc_invalid_within_doloop): New function.
+ (arc_cond_exec_p, arc_secondary_reload): Likewise.
+ (arc_register_move_cost): Likewise.
+ (TARGET_INVALID_WITHIN_DOLOOP): Define.
+ (arc_print_operand): Handle POST_INC / POST_DEC / PRE_MODIFY /
+ POST_MODIFY.
+ (arc_reorg): Fix up zero-overhead loops.
+ * config/arc/arc.h (FIRST_PSEUDO_REGISTER): Now 146.
+ (FIXED_REGS): Make LP_COUNT non-fixed.
+ (FIXED_REGS, CALL_USED_REGS, REG_CLASS_CONTENTS): Add LP_START & LP_END.
+ Make LP_COUNT non-fixed.
+ (PREFERRED_RELOAD_CLASS): Substitute GENERAL_REGS for CORE_REGS.
+ (HAVE_POST_INCREMENT, HAVE_POST_DECREMENT): Define.
+ (HAVE_PRE_MODIFY_DISP, HAVE_POST_MODIFY_DISP): Likewise.
+ (SECONDARY_RELOAD_CLASS): Likewie.
+ (GO_IF_LEGITIMATE_ADDRESS, GO_IF_MODE_DEPENDENT_ADDRESS): Add handling
+ for POST_DEC / POST_INC / PRE_MODIFY / POST_MODIFY.
+ (REGISTER_NAMES): Add lp_start and lp_end.
+ * config/arc/arc.md (UNSPEC_LP, LP_COUNT, LP_START, LP_END): New
+ constants.
+ (type): Add loop.
+ (in_delay_slot): No loops.
+ (entire file): Use "c" constraint.
+ (movdi_insn): Handle POST_INC / POST_DEC / PRE_MODIFY / POST_MODIFY.
+ (movdf_insn): Likewise.
+ (addsi3_mixed): Make conditional execution take precedence over
+ short insns. Improve instruction selection.
+ (subsi3_insn): Add rsub support.
+ (doloop_begin, doloop_begin_i, doloop_end, doloop_end_i): New patterns.
+ (doloop_fallback): Likewise.
+ * config/arc/constraints.md (Cca, C2a): New constraints.
+ * config/arc/arc.opt (mexperimental-mask): New option.
+
+2007-10-08 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/t-arc-newlib (MULTILIB_OPTIONS): Remove mA4.
+ (MULTILIB_DIRNAMES): Remove arc.
+ * config/arc/arc.c (arc_init <!USE_UCLIB>): Default is A5.
+ * config/arc/arc.h (CPP_SPEC): Default to __A5__.
+ (ASM_SPEC): Default is -mA5.
+ (MULTILIB_DEFAULTS): Set to { "mA5", "EL" } .
+
+2007-10-03 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/gmon/gmon.c: #include <stddef.h> .
+
+2007-10-01 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * arc.h (LOCAL_ALIGNMENT): Define.
+
+2007-10-01 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config.gcc (arc-*-elf*): Set tmake_file.
+ (arc*-*-linux-uclibc*): Add arc/t-arc to tmake_file.
+ * config/arc/t-arc: Use $@ / $<.
+ (CRTSTUFF_T_CFLAGS_S): Remove.
+ ($(T)prof-freq-stub.o, $(T)dcache_linesz.o): New rules.
+ ($(T)profil-uclibc.o): Likewise.
+ ($(T)libgmon.a): Use $(PROFILE_OSDEP).
+ (EXTRA_MULTILIB_PARTS): Remove mcount.o, gmon.o and prof-freq.o.
+ (MULTILIB_OPTIONS, MULTILIB_DIRNAMES ULTILIB_MATCHES) Move to:
+ * config/arc/t-arc-newlib: New file.
+ (PPROFILE_OSDEP): Define.
+ * config/arc/t-arc700-uClibc: Remove pieces redundant with t-arc.
+ (PROFILE_OSDEP): Define.
+ * config/arc/arc.h (STARTFILE_SPEC) <USE_UCLIBC>: Remove references
+ to gcrt1.o.
+ (ENDFILE_SPEC) <USE_UCLIBC> : Use crtgend.o for profiling.
+ (LIB_SPEC) <USE_UCLIBC>: Use -lgmon -u profil --defsym __profil=profil
+ for profiling.
+ * config/arc/gmon/gmon.c (__profile_frequency): Remove.
+ * config/arc/gmon/machine-gmon.h (_mcount_tailcall): Don't declare.
+ * config/arc/gmon/profil.S (__profile_timer_cycles): New weak symbol.
+ (__profil): Use it. Fix FUNC usage. Streamline ARC700 cache
+ initialization a bit.
+ (__dcache_linesz): Move to:
+ * config/arc/gmon/dcache_linesz.S: New file.
+ * config/arc/gmon/prof-freq-stub.S: New file.
+
+2007-10-01 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/predicates.md (call_address_operand): Check CONSTANT_P
+ before using LEGITIMATE_CONSTANT_P.
+
+2007-09-28 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (DEFAULT_NO_SDATA): Define, set of USE_UCLIBC.
+ (TARGET_DEFAULT_TARGET_FLAGS): Use it.
+
+2007-09-19 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.md (sibcall_insn): Use call_address_operand.
+ (sibcall_value_insn, sibcall_prof, sibcall_value_prof): Likewise.
+
+2007-09-11 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c: Back out patches for callee-based profiling.
+ * config/arc/arc.h: Likewise.
+
+ * config/arc/arc-protos.h (arc_profile_call): Declare.
+ * config/arc/arc.c (arc_initialize_trampoline): Generate oddly aligned
+ trampoline.
+ (write_profile_sections, unspec_prof_hash): New functions.
+ (unspec_prof_htab_eq, arc_profile_call): Likewise.
+ (arc_legitimate_constant_p): Allow UNSPEC_PROF.
+ (arc_function_ok_for_sibcall): Allow long & indirect calls.
+ Fix interrupt function check.
+ (arc_reorg): Fix up UNSPEC_PROF and emit special profile sections.
+ * config/arc/arc.h (ENDFILE_SPEC) <!USE_UCLIBC>: Add crtgend.
+ (TRAMPOLINE_SIZE): Bump up to 20.
+ (TRAMPOLINE_ADJUST_ADDRES): Define.
+ * config/arc/gmon/gmon.c: Adjust for caller-based profiling.
+ * config/arc/gmon/mcount.c, gmon/machine-gmon.h: Likewise.
+ * config/arc/gmon/profil.S, config/arc/gmon/sys/gmon.h: Likewise.
+ * config/arc/arc.md (UNSPEC_PROF): Define.
+ (call, call_value, sibcall, sibcall_value): Add profiling code.
+ (call_prof, call_value_prof, sibcall_prof): New patterns.
+ (sibcall_value_prof): Likewise.
+ (sibcall_insn, sibcall_value_insn): Enable long / indirect sibcalls.
+ * config/arc/crtgend.asm: New file.
+ * config/arc/lib1funcs.asm (__udivsi3, __umodsi3):
+ Add .__arc_profile_forward entries.
+ * config/arc/t-arc (crtgend.o) New target.
+ (mcount.o): Remove -fcall-saved-r11.
+ (gmon.o): Add -mno-sdata
+ (EXTRA_MULTILIB_PARTS): Add crtgend.o
+ * config/arc/constraints.md (Cbr): New constraint.
+ * config/arc/crtg.asm: Add Start labels and alignment for
+ profile sections.
+
+ * config/arc/arc.h (enum reg_class): Add SIBCALL_REGS and CORE_REGS.
+ (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Likewise.
+ * contraints.md (c): Change to:
+ (Rgp).
+ (c, Rsc): New constraints.
+ * config/arc/arc.md (iorsi3): Use 'c' constraint.
+
+2007-09-07 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h (TARGET_VERSION): Fix spelling.
+ * config/arc/t-arc700-uClibc (LIB1ASMFUNCS): Remove excess space.
+
+ * config/arc/lib1funcs.asm (__modsi3): Make Ldivstart a local label.
+
+ * config/arc/arc.h (STARTFILE_SPEC): Add -mkernel option.
+
+ * config/arc/gmon/gmon.c (__profile_frequency): Define nonzero.
+ (__monstartup): On error, clear p->tolimit.
+ * config/arc/gmon/mcount.c (_MCOUNT_DECL): Don't use
+ catomic_compare_and_exchange_bool_acq.
+ * config/arc/gmon/machine-gmon.h: Don't use __builtin_frame_address.
+ * config/arc/gmon/profil.S (__profil): Fix vector initialization.
+ Enable interrrupts.
+ (__profil_irq): Fix register assignment. Make j.f explicit.
+
+2007-08-29 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/t-arc700-uClibc (CRTSTUFF_T_CFLAGS): Add -mno-sdata .
+ (MULTILIB_EXTRA_OPTS): Add mno-sdata .
+
+2007-08-23 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h (LINK_SPEC) [!USE_UCLIBC]: Use -marcelf.
+
+ * config/arc/arc.h (STARTFILE_SPEC) [!USE_UCLIBC] [pg|p]: Add crtg.o.
+ (LIB_SPEC) [!USE_UCLIBC] [pg|p]: Add -lgmon.
+ (REG_CLASS_CONTENTS): Add blink to GENERAL_REGS.
+ (LARGE_INT): Fix cast type.
+ (FUNCTION_PROFILER): Provide expansion.
+ (PROFILE_BEFORE_PROLOGUE): Define.
+ (NO_PROFILE_COUNTERS): Define.
+ * config/arc/arc.c (MUST_SAVE_RETURN_ADDR): Take
+ current_function_profile into account.
+ (arc_compute_frame_size): Don't use MUST_SAVE_RETURN_ADDR as lvalue.
+ arc_output_function_prologue): Don't push blink if it has already
+ been pushed by the profiling code.
+ * config/arc/gmon: New directory, containing atomic.h (empty),
+ auxreg.h, gmon.c, machine-gmon.h, mcount.c, prof-freq.c, profil.S,
+ sys/gmon.h, and sys/gmon_out.h .
+ * config/arc/t-arc (crtg.o, mcount.o, gmon.o, prof-freq.o): New rules.
+ (profil.o, libgmon.a): Likewise.
+ (EXTRA_MULTILIB_PARTS): Add mcount.o, gmon.o, prof-freq.o, libgmon.a
+ and crtg.o .
+ * config/arc/asm.h, config/arc/crtg.asm: New files.
+
+
+2007-05-29 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_decl_anon_ns_mem_p): New function, copied from
+ cp/tree.c .
+ (arc_in_small_data_p): Use default_binds_local_p_1 and
+ arc_decl_anon_ns_mem_p to determine if a symbol binds locally.
+
+2007-05-18 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/predicates.md (move_src_operand): Uncomment handling of
+ CONST.
+
+ * config/arc/arc.h (ASM_SPEC): Supply -mEA also for -mA7.
+
+2007-05-14 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * version.c: Add leading space. Add suffix to denote ARC changes.
+
+2007-05-14 J"orn Rennecke <joern.rennecke@arc.com>
+
+ Revert this patch:
+ 2007-04-19 J"orn Rennecke <joern.rennecke@arc.com>
+ * output.h (get_unnamed_section_ggc): New macro.
+ * varasm.c (init_varasm_once): Use it.
+
+ Instead, make section xmalloced:
+ * c-pch.c (c_common_write_pch): Call pickle_in_section and
+ unpickle_in_section.
+ (c_common_read_pch): Call unpickle_in_section.
+ * varasm.c (unnamed_sections): Remove GTY marker.
+ (get_unnamed_section, get_noswitch_section): xmalloc section.
+ (pickled_in_section): New static variable.
+ (pickle_in_section, unpickle_in_section): New functions.
+ * output.h (struct unnamed_section): Mark as GTY((skip)).
+ (union section): Mark members unnamed_section and noswitch_section
+ as GTY((skip)).
+ (text_section, data_section, readonly_data_section): Remove GTY marker.
+ (sdata_section, ctors_section, dtors_section, bss_section): Likewise.
+ (sbss_section, tls_comm_section, comm_section): Likewise.
+ (lcomm_section, bss_noswitch_section, in_section): Likewise.
+ (pickle_in_section, unpickle_in_section): Declare.
+
+ * config/arc/arc.c (arc_function_value): Mark unsignedp with
+ ATTRIBUTE_UNUSED.
+
+2007-04-26 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc-protos.h (arc_function_value): Declare.
+ * config/arc/arc.h (FUNCTION_VALUE): Don't define.
+ * config/arc/arc.c (TARGET_FUNCTION_VALUE): Define.
+ (arc_function_value): New function.
+
+2007-04-25 J"orn Rennecke <joern.rennecke@arc.com>
+
+ PR 20375
+ * config/arc/arc.c (arc_setup_incoming_varargs): Don't abort on
+ BLKmode. Use arc_function_arg_advance.
+
+2007-04-25 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (TARGET_MUST_PASS_IN_STACK):
+ Set to must_pass_in_stack_var_size.
+
+2007-04-25 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.h (TARGET_CPU_CPP_BUILTINS): Add __big_endian__ .
+ (CPP_SPEC): Remove __big_endian__ .
+ (ASM_SPEC, LINK_SPEC): For -mbig-endian, provide -EB.
+ * config/arc/t-arc (MULTILIB_MATCHES): Add EB=mbig-endian .
+
+2007-04-24 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/arc/arc.c (arc_function_arg_advance): Only use
+ ROUND_ADVANCE_CUM if the argument has a non-zero size.
+
+2007-04-24 J"orn Rennecke <joern.rennecke@arc.com>
+
+ Fix profile based feedback:
+ * config.gcc (arc-*-elf*): Don't use config/svr4.h.
+ * config/arc/arc.h: Don't include config/svr4.h.
+
+2007-04-20 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * longlong.h (__arc__): For __ARC700__, define umul_ppmm, UMUL_TIME,
+ __umulsidi3, count_leading_zeros, COUNT_LEADING_ZEROS_0 .
+ (COUNT_TRAILING_ZEROS_0): Define this according to
+ COUNT_LEADING_ZEROES_0 when defining count_trailing_zeros using
+ count_leading_zeroes.
+ * libgcc2.c (__ffsSI2): Use COUNT_TRAILING_ZEROS_0.
+
+ * config/arc/divtab-arc700.c: New file.
+
+ Fix nested functions:
+ * gcc/config/arc/arc.c (emit_store_direct): New function.
+ (arc_initialize_trampoline): Initialize trampoline.
+ * gcc/config/arc/arc.h (TRAMPOLINE_TEMPLATE): Disable definition
+ which uses the wrong architecture and ABI.
+ (TRAMPOLINE_ALIGNMENT): Define.
+ (INITIALIZE_TRAMPOLINE): Use arc_initialize_trampoline.
+
+ Fix stdarg argument passing:
+ * gcc/config/arc/arc.c (arc_va_arg, arc_pass_by_reference): Pass
+ variable size and addressable type by reference.
+ (arc_arg_partial_bytes): Adjust CUM according to alignment of argument.
+ (arc_function_arg, arc_function_arg_advance): Likewise.
+ * gcc/config/arc/arc.h (ROUND_ADVANCE_CUM): Round.
+
+ * gcc/config/arc/arc.h (TARGET_CPU_CPP_BUILTINS): Define
+ __BIG_ENDIAN__ or __LITTLE_ENDIAN__, as the case might be.
+
+ * gcc/config/arc/arc.h (ASM_SPEC): For mARC700, pass -mEA.
+
+2007-04-19 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * output.h (get_unnamed_section_ggc): New macro.
+ * varasm.c (init_varasm_once): Use it.
diff --git a/gcc/ChangeLog.cxx b/gcc/ChangeLog.cxx
new file mode 100644
index 00000000000..5d51175c0d0
--- /dev/null
+++ b/gcc/ChangeLog.cxx
@@ -0,0 +1,1088 @@
+2009-05-20 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/rs6000/rs6000.c (legitimate_indirect_address_p):
+ Don't define inline.
+
+ * opt-gen.awk: For all variables with an Init clause, set var_seen.
+ * config/rs6000/rs6000.c (rs6000_builtin_conversion): Adjust to
+ target.h declaration.
+ (rs6000_init_hard_regno_mode_ok): Add enum cast(s).
+ (rs6000_override_options): Likewise.
+ (bdesc_altivec_preds): Add enum casts.
+ (altivec_expand_vec_set_builtin): Use EXPAND_NORMAL instead of 0.
+ (rs6000_init_dwarf_reg_sizes_extra): Likewise.
+ (emit_unlikely_jump, rs6000_emit_allocate_stack): Use alloc_reg_note.
+ (rs6000_frame_related, rs6000_emit_prologue): Likewise.
+ (output_toc): Use INSERT as last argument to htab_find_slot.
+ (output_profile_hook): Use LCT_NORMAL Instead of 0.
+ (rs6000_initialize_trampoline): Likewise.
+
+ * config.gcc (spu-*-elf*): Use spu-cxx.o for cxx_target_objs.
+ * config/spu/spu-protos.h (struct cpp_reader): Forward declaration.
+ (spu_expand_epilogue) Use bool.
+ * config/spu/spu-c.c [CC1PLUS]: Include cp/cp-tree.h instead of
+ c-tree.h.
+ [!CC1PLUS]: Define same_type_p.
+ (spu_resolve_overloaded_builtin): Insert enum casts. Use same_type_p.
+ * config/spu/t-spu-elf (spu-c.o): Depend on $(C_TREE_H).
+ Use $(CXXX) to build.
+ (spu-cxx.o): New rule.
+ * config/spu/spu.c (spu_scalar_mode_supported_p): Declare with bool.
+ (spu_vector_mode_supported_p, spu_handle_fndecl_attribute): Likewise.
+ (spu_handle_vector_attribute, spu_pass_by_reference): Likewise.
+ (spu_rtx_costs, spu_function_ok_for_sibcall): Likewise.
+ (spu_attribute_table): Declare extern.
+ (spu_emit_branch_or_set): Fix type and scope of ior_code.
+ (spu_expand_prologue): Use alloc_reg_note.
+ (expand_builtin_args): Use EXPAND_NORMAL instead of 0.
+
+2009-05-01 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * var-tracking.c: Include tm_p.h .
+
+ * targhooks.c (default_builtin_vectorized_function): Make signature
+ agree with prototype in targhooks.h.
+ (default_builtin_vectorized_conversion): Likewise.
+ (default_builtin_reciprocal): Likewise.
+
+ * expr.c (move_by_pieces, store_by_pieces): Append _d to struct tag.
+ Changed all users.
+
+ * config/sh/sh.c (sh_attribute_table): Use extern in forward
+ declaration.
+ (prepare_move_operands): Cast return value of tls_symbolic_operand.
+ (expand_cbranchsi4, output_stack_adjust, push): Use alloc_reg_note.
+ (pop, sh_expand_prologue): Likewise.
+ (from_compare): Cast argument to gen_rtx_fmt_ee.
+ (sh_reorg): Use PUT_REG_NOTE_KIND.
+ (sh_expand_prologue): Add cast to enum machine_mode.
+ (sh_expand_epilogue): Likewise.
+ (get_free_reg): Add cast to enum attr_fp_mode.
+ (sh_insn_length_adjustment): Compare sh_cpu with enum value of the
+ proper type.
+ (sh_initialize_trampoline): Use LCT_NORMAL.
+ (sh_expand_builtin): Use EXPAND_NORMAL.
+
+ * config/arc/arc.c (arc_attribute_table): Use extern in forward
+ declaration.
+ (output_shift): Replace initializatin of n with assignment.
+
+2009-04-28 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/sh/sh.h (OVERRIDE_OPTIONS): Use enum processor_type values
+ to assign to sh_cpu.
+
+ * config/sh/sh.md (attribute cpu): Add comment about connection to
+ enum processor_type in sh.h.
+
+2009-04-27 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * reorg.c (insn_sets_resource_p): include_delayed_effects is now bool.
+ Pass proper type to mark_set_resources.
+
+2009-04-25 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/sh/sh.md (push_fpscr, pop_fpscr): Use alloc_reg_note.
+ (movdf_i4+1, reload_outdf__RnFRm+3, reload_outdf__RnFRm+4): Likewise.
+ (reload_outdf__RnFRm+5, fpu_switch+1, fpu_switch+2): Likewise.
+
+ * config/sh/predicates.md (trapping_target_operand): Rename and to
+ and_expr.
+
+2009-04-24 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * auto-inc-dec.c (attempt_change): Pass proper type to rtx_cost.
+ * regmove.c (try_auto_increment): Use PUT_REG_NOTE_KIND.
+ * targhooks.h (default_builtin_vectorized_function): Make prototype
+ agree with target.h:struct vectorize:builtin_vectorized_function.
+ (default_builtin_vectorized_conversion): Likewise with respect to
+ builtin_conversion.
+ (default_builtin_reciprocal): Likewise wrt.
+ struct gcc_target:builtin_reciprocal
+ * config/m32r/m32r.h (INITIALIZE_TRAMPOLINE): Use LCT_NORMAL.
+ * config/m32r/m32r.c (df.h): #include.
+ (m32r_attribute_table): Mark forward declaration with extern.
+ (pop): Use alloc_reg_note.
+ (block_move_call): Use LCT_NORMAL.
+
+2009-04-07 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * cp/pt.c (tsubst_decl): Adjust forward declaration.
+
+2009-03-25 Jerry Quinn <jlquinn@cerberus.qb5.org>
+
+ * config/i386/i386.c (ix86_function_specific_save): Don't check
+ range of enum values.
+
+2009-03-12 Tobias Schlüter <tobi@gcc.gnu.org>
+
+ * config/i386/x-darwin: Use ALL_CXXFLAGS.
+
+2009-03-11 Tobias Schlüter <tobi@gcc.gnu.org>
+
+ * config/t-darwin: Use ALL_CXXFLAGS instead of ALL_CFLAGS.
+ * config/x-darwin: Same.
+
+2009-03-10 Tobias Schlüter <tobi@gcc.gnu.org>
+
+ * config/t-darwin: Use CXX as compiler.
+ * config/x-darwin: Likewise.
+ * config/i386/x-darwin: Same.
+
+2009-03-06 Ian Lance Taylor <iant@google.com>
+
+ * toplev.h (floor_log2, exact_log2): Don't define as extern for
+ C++.
+
+2009-03-04 Ian Lance Taylor <iant@google.com>
+
+ * config/i386/i386.md (isinf<mode>2): Change slot to enum type.
+
+ * cp-tree.h (finish_call_expr): Correct declaration.
+
+ * rtl.h (SUBREG_PROMOTED_UNSIGNED_P): Add cast.
+ * ipa-struct-reorg.c (create_general_new_stmt): Initialize rhs.
+ * ira-build.c (copy_info_to_removed_store_destinations):
+ Initialize parent_a.
+ * varasm.c (const_rtx_hash_1): Don't declare 'shift' as const.
+ * config/i386/i386.c (ix86_expand_builtin): Change fcode to enum
+ type.
+
+ * tree-nomudflap.c (gt_ggc_r_gt_tree_mudflap_h): Declare as extern
+ if C++.
+
+ * vec.c (vec_gc_o_reserve_1): Don't initialize alloc to itself.
+
+ * gcc.c (process_command, main): Use CONST_CAST.
+ * collect2.c (main, scan_prog_file): Likewise.
+
+ * bitmap.c (bitmap_clear): Don't declare as inline.
+ * tree-ssa-sccvn.c (vn_nary_op_compute_hash): Likewise.
+
+ * cp/cvt.c (convert_to_void): Only warn about ?: operator with
+ no effect if neither side has an effect.
+
+ * objc/Make-lang.in (cc1obj-dummy$(exeext)): Link with $(CXX).
+ (cc1obj$(exeext)): Likewise.
+ * objc/objc-act.c (objc_rewrite_function_call): Change params to
+ tree.
+ (objc_gimplify_expr): Change return type to int.
+ * objc/objc-act.h (objc_gimplify_expr): Update declaration.
+
+ * java/jcf-io.c (find_class): Use CONST_CAST.
+
+ * fortran/Make-lang.in (gfortranspec.o): Compile with $(CXX).
+ (fortran/cpp.o): Likewise.
+ (gfortran$(exeext)): Link with $(CXX).
+ (f951$(exeext)): Likewise.
+ * fortran/gfortran.h (enum omp_sched_kind): Move out of struct
+ gfc_omp_clauses.
+ (enum omp_sharing): Likewise.
+ (enum gfc_symbol_type): Move out of struct gfc_gsymbol.
+ (enum gfc_array_ref_dimen_type): Move out of strutc
+ gfc_array_ref.
+ * fortran/cpp.c (struct gfc_cpp_option_data): Give name to
+ anonymous struct.
+ * fortran/decl.c (build_struct): Initialize first_len.
+ (match_attr_spec): Change variable 'd' to int.
+ (add_global_entry): Change variable 'type' to gfc_symbol_type.
+ * fortran/dump-parse-tree.c (show_namespace): Change variable 'op'
+ to int.
+ * fortran/interface.c (gfc_check_interfaces): Change loop to use
+ int type rather than enum type.
+ * fortran/module.c (enum rsym_state, enum wsym_state): Move out of
+ struct pointer_info.
+ (mio_array_ref, mio_symbol): Add casts to enum type.
+ (read_module): Change variable 'i' to int.
+ (write_module): Likewise.
+ (import_iso_c_binding_module): Add cast to enum type.
+ * fortran/parse.c (enum state_order): Move out of st_state
+ struct.
+ * fortran/resolve.c (resolve_global_procedure): Change variable
+ 'type' to gfc_symbol_type.
+ (check_host_association): Initialize tail.
+ * fortran/symbol.c (gfc_get_namespace): Change variable 'in' to
+ int.
+ (gfc_free_namespace): Change variable 'i' to int.
+ * fortran/trans-intrinsic.c (DEFINE_MATH_BUILTIN): Add casts to
+ enum type.
+ * fortran/trans-io.c (st_parameter_field): Add casts to enum
+ type.
+ (gfc_build_st_parameter): Change variable 'type' to int.
+ (gfc_build_io_library_fndecls): Change variable 'ptype' to int.
+ * fortran/trans-types.c (gfc_init_kinds): Change loops to use int
+ type rather than enum type.
+
+2009-03-03 Thomas Neumann <tneumann@users.sourceforge.net>
+
+ * cp/parser.c (cp_lexer_get_preprocessor_token): Add missing cast
+ to enum.
+
+2009-03-03 Thomas Neumann <tneumann@users.sourceforge.net>
+
+ * tree-into-ssa.c (get_ssa_name_ann): Use NEED_PHI_STATE_UNKNOWN
+ instead of 0.
+
+2009-03-03 Thomas Neumann <tneumann@users.sourceforge.net>
+
+ * langhooks.c (add_builtin_function_common): Avoid assigning -1 to
+ an enum for C++ compatibility.
+
+2009-02-17 Thomas Neumann <tneumann@users.sourceforge.net>
+
+ * ira.c (setup_prohibited_mode_move_regs): Add missing casts to
+ enum machine_mode.
+
+2009-02-10 Ian Lance Taylor <iant@google.com>
+
+ * df.h (struct df_mw_hardreg): Change flags field to int.
+ (struct df_base_ref): Likewise.
+
+ * parser.c (cp_parser_label_for_labeled_statement): Permit
+ attributes on a label.
+ * semantics.c (finish_label_stmt): Return the new label decl, not
+ the new statement.
+ * decl2.c (is_late_template_attribute): Return true for "unused"
+ on a label.
+ * pt.c (tsubst_expr): If the original label decl has attributes,
+ apply them to the new label decl.
+
+2009-02-06 Ian Lance Taylor <iant@google.com>
+
+ * decl2.c (constrain_visibility): Add cast to enum type.
+
+ * parser.c (cp_parser_question_colon_clause): Set skip_evaluation
+ if the condition is known to be true or false.
+ * typeck.c (cp_build_binary_op): Don't warn about out of range
+ shift counts if skip_evaluation is true.
+
+ * timevar.c (timevar_pop_1): Ignore TV_NONE.
+
+2009-02-04 Ian Lance Taylor <iant@google.com>
+
+ * configure.ac: Use AC_PROG_CXX.
+ * Makefile.in (CXX): Set to @CXX@.
+ * configure: Rebuild.
+
+ * main.c (main): Use CONST_CAST when adding potentially unsafe
+ const.
+ * attribs.c (init_attributes): Change slot to void** and use
+ CONST_CAST when assigning to it.
+
+ * collect2.c (is_ctor_dtor): Change ret field of struct names to
+ symkind.
+ * df-scan.c (df_ref_create_structure): Change struct df_ref * in
+ declaration to just df_ref.
+ (df_def_record_1): Change 0 to VOIDmode.
+ (df_get_conditional_uses): Likewise.
+ (df_defs_record): Change clobber_flags to int.
+ * fixed-value.c (fixed_compare): Add cast to enum type.
+ * haifa-sched.c (reemit_notes): Likewise
+ (max_issue): Put empty loop ';' on new line.
+ * ira.c (setup_class_subset_and_memory_move_costs): Add casts to
+ enum type.
+ (setup_cover_and_important_classes): Likewise.
+ (setup_reg_class_relations): Likewise.
+ * real.c (real_arithmetic): Likewise.
+ (real_compare): Likewise.
+ * rtl.h (NOTE_VAR_LOCATION_STATUS): Likewise.
+ * tree-cfg.c (gimple_redirect_edge_and_branch): Change ERROR_MARK
+ to GIMPLE_ERROR_MARK.
+ * tree-data-ref.c (print_direction_vector): Add cast to enum
+ type.
+ * tree-ssa-alias.c (set_initial_properties): Change
+ pt_anything_mask to int.
+ * tree-vectorizer.c (vect_set_verbosity_level): Add casts to enum
+ type.
+ (supportable_widening_operation): Likewise.
+ (new_stmt_vec_info): Change 0 to enum constants.
+ (vect_supportable_dr_alignment): Remove useless cast.
+ * tree-vect-analyze.c (vect_build_slp_tree): Change 0 to enum
+ constants.
+ * tree-vect-transform.c (vect_create_epilog_for_reduction):
+ Likewise.
+ (vectorizable_reduction): Likewise. Add casts to enum types.
+ * var-tracking.c (get_init_value): Change return type and ret_val
+ local variable to enum var_init_status.
+
+ * ira-build.c (setup_min_max_conflict_allocno_ids): Use
+ LIM_REG_CLASSES instead of -1.
+
+ * config/linux.opt: Put mglibc before muclibc.
+
+ * df-problems.c (df_byte_lr_alloc): Don't assign problem_data to
+ itself.
+ (df_simulate_one_insn_forwards): Move default case out of inner
+ block.
+
+ * gimplify.c (gimplify_omp_for): Use MIN, not bitwise or, to
+ gather gimplification status from subroutines.
+ (gimplify_expr): Add cast to enum type.
+
+ * dse.c (struct store_info): Change field name from bitmap to
+ bmap. Change all uses.
+
+ * dwarf2.h (enum dwarf_type): Add DW_ATE_lo_user and
+ DW_ATE_hi_user as explicit enum values rather than #define
+ macros.
+ * dwarf2out.c (struct indirect_string_node): Change form to enum
+ dwarf_form.
+ (INTERNAL_DW_OP_tls_addr): Add cast to enum type.
+ (AT_string_form): Change return type to enum dwarf_form.
+ (int_loc_descriptor): Add cast to enum type. Add cast to
+ HOST_WIDE_INT for unsigned constant.
+ (add_calling_convention_attribute): Add cast to enum type.
+
+ * cp/class.c (resolve_address_of_overloaded_function): Change
+ flags to int.
+ (instantiate_type): Change flags_in to int.
+ * cp/call.c (standard_conversion): Change flags to int.
+ (reference_binding): Change lvalue_p to int.
+ (build_temp): Change 0 to DK_UNSPECIFIED.
+ (convert_like_real): Change lvalue to int.
+ * cp/tree.c (lvalue_p_1): Change return type to int. Change
+ op1_lvalue_kind and op2_lvalue_kind to int.
+ (real_lvalue_p): Change return type to int.
+ * cp/cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
+ * cp/cp-tree.h (instantiate_template): Update declaration.
+ (real_lvalue_p): Likewise.
+ * cp/pt.c (check_instantiated_args): Change complain to int.
+ (instantiate_template): Likewise.
+
+ * cp/error.c (next_tcode, next_int): Pass int to va_arg.
+
+2009-02-03 Ian Lance Taylor <iant@google.com>
+
+ * opts.c (set_debug_level): Don't put an arbitrary int in an
+ enum.
+
+ * omega.c (omega_do_elimination): Avoid math on enum types.
+
+ * gcov.c (read_count_file): Avoid goto.
+
+ * fold-const.c (fold_undefer_overflow_warnings): Add cast to enum
+ type.
+ (combine_comparisons): Change compcode to int. Add cast.
+
+ * builtins.c (validate_gimple_arglist): Don't pass an enum typ eto
+ va_arg.
+ * calls.c (emit_library_call_value_1): Likewise.
+
+ * mcf.c (add_fixup_edge): Change type parameter to edge_type.
+
+ * tree.c (attribute_list_contained): Put empty loop ';' on new
+ line.
+ (build_common_builtin_nodes): Add casts to enum type.
+
+2009-02-01 Tom Tromey <tromey@redhat.com>
+
+ * c-pch.c (get_ident) <templ>: Don't specify array length.
+ (pch_init) <partial_pch>: Likewise.
+
+2009-01-31 Ian Lance Taylor <iant@google.com>
+
+ * genattrtab.c (write_length_unit_log): If C++, declare const to
+ be extern.
+ * genchecksum.c (dosum): Likewise.
+ * gengtype.c (write_rtx_next, finish_root_table): Likewise.
+ (write_roots): Likewise.
+ * dummy-checksum.c (executable_checksum): Likewise.
+ * gimple.c (gimple_ops_offset_): Likewise.
+ (gimplify_assign): Do not declare as inline.
+
+ * reginfo.c (init_move_cost): Add casts to enum type and integer
+ types.
+ (init_reg_sets_1, init_fake_stack_mems): Likewise.
+ (cannot_change_mode_set_regs): Change 'to' to unsigned int. Add
+ casts to enum type.
+ (invalid_mode_change_p): Likewise.
+ (pass_reginfo_init): Use TV_NONE for tv_id initializer.
+ (pass_subregs_of_mode_init): Likewise.
+ (pass_subregs_of_mode_finish): Likewise.
+
+ * reload.c (push_secondary_reload): Add cast for
+ secondary_reload_info icode field.
+ (secondary_reload_class): Likewise.
+ (find_valid_class): Likewise.
+ (alternative_allows_const_pool_ref): Put empty loop ';' on new
+ line.
+ * reload1.c (emit_input_reload_insns): Add cast for
+ secondary_reload_info icode field.
+
+ * cse.c (insert): Put empty loop ';' on new line.
+ * emit-rtl.c (push_to_sequence): Likewise.
+ * matrix-reorg.c (add_allocation_site): Likewise.
+ * postreload-gcse.c (eliminate_partially_redundant_load):
+ Likewise.
+ * sched-rgn.c (rgn_add_block): Likewise.
+ (rgn_fix_recovery_cfg): Likewise.
+ * tree-loop-distribution.c (rdg_flag_similar_memory_accesses):
+ Likewise.
+
+ * profile.c (compute_branch_probabilities): Remove useless
+ references to variable on right side of comma operator.
+
+ * parser.c (cp_parser_expression_stack_entry): Change prec field
+ to enum cp_parser_prec.
+ (cp_parser_decl_specifier_seq): Change flags to int.
+ (cp_parser_type_specifier): Likewise.
+ (cp_parser_simple_type_specifier): Likewise.
+ (cp_parser_type_specifier_seq): Likewise.
+ (cp_parser_direct_declarator): Don't jump into variable scope.
+
+ * cp/semantics.c (finish_omp_clauses): Change c_kind to enum
+ omp_clause_code.
+
+ * tree-complex.c (complex_lattice_t): Change to int type. Leave
+ enum type unnamed.
+ (expand_complex_libcall): Add casts to enum type.
+
+ * hooks.h (hook_int_void_no_regs): Don't declare.
+ * hooks.c (hook_int_void_no_regs): Don't define.
+
+ * target.h (struct sched): Correct needs_block_p prototype.
+ (struct gcc_target): Change return type of
+ branch_target_register_class to enum reg_class.
+ * target-def.h (TARGET_BRANCH_TARGET_REGISTER_CLASS): Change to
+ default_branch_target_register_class.
+ * targhooks.h (default_branch_target_register_class): Declare.
+ * targhooks.c (default_branch_target_register_class): Define.
+
+ * fwprop.c (update_df): Change 0 to VOIDmode.
+ * sel-sched-ir.c (hash_with_unspec_callback): Likewise.
+ * combine.c (record_value_for_reg): Likewise.
+ (record_dead_and_set_regs): Likewise.
+ * optabs.c (expand_widen_pattern_expr): Likewise.
+ (expand_vec_shift_expr): Don't cast insn_code field of
+ optab_handler to int.
+ (emit_cmp_and_jump_insn_1): Likewise.
+
+ * Makefile.in (xgcc$(exeext)): Link with $(CXX).
+ (cpp$(exeext)): Likewise.
+ (cc1-dummy$(exeext), cc1$(exeext)): Likewise.
+ (collect2$(exeext)): Likewise.
+ (protoize$(exeext), unprotoize$(exeext)): Likewise.
+ (gcov$(exeext), gcov-dump$(exeext)): Likewise.
+ (collect2.o, c-opts.o, c-cppbuiltin.o): Compile with $(CXX).
+ (c-pch.o, gcc.o, gccspec.o, gcc-options.o): Likewise.
+ (version.o, prefix.o, toplev.o, intl.o): Likewise.
+ ($(out_object_file)): Likewise.
+ (libbackend.o): Likewise.
+ (cppdefault.o): Likewise.
+ (protoize.o, unprotoize.o): Likewise.
+ * cp/Make-lang.in (g++spec.o): Likewise.
+ (g++$(exeext)): Link with $(CXX).
+ (cc1plus-dummy$(exeext), cc1plus$(exeext)): Likewise.
+ * config/x-linux (host-linux.o): Compile with $(CXX).
+
+ * Makefile.in (omp.low.o): Depend upon gt-omp-low.h.
+ (ipa-reference.o): Depend upon gt-ipa-reference.h.
+ (ipa-cp.o): Depend upon $(FIBHEAP_H) and $(PARAMS_H).
+ * cp/Make-lang.in (cp/class.o): Depend upon gt-cp-class.h.
+ (cp/semantics.o): Depend upon gt-cp-semantics.h.
+
+ * config/i386/i386.c (ix86_function_specific_restore): Add casts
+ to enum types.
+ (bdesc_multi_arg): Change 0 to UNKNOWN where appropriate. Add
+ casts to enum type where needed.
+ * config/i386/i386-c.c (ix86_pragma_target_parse): Add casts to
+ enum types.
+
+ * config/i386/x-i386 (driver-i386.o): Build with $(CXX).
+ * config/i386/t-i386 (i386-c.o): Likewise.
+
+2008-10-06 Tom Tromey <tromey@redhat.com>
+
+ * errors.h (progname): Wrap in 'extern "C"'.
+
+2008-10-05 Tom Tromey <tromey@redhat.com>
+
+ * bitmap.c (bitmap_obstack_alloc_stat): Remove extra cast.
+ (bitmap_obstack_free): Likewise.
+
+2008-10-05 Tom Tromey <tromey@redhat.com>
+
+ * dominance.c (iterate_fix_dominators): Cast argument to
+ BITMAP_FREE.
+ * bitmap.c (bitmap_obstack_alloc_stat): Add cast.
+ (bitmap_obstack_free): Likewise.
+
+2008-10-05 Tom Tromey <tromey@redhat.com>
+
+ * fold-const.c (fold_unary): Rename 'and' to 'and_expr'.
+
+2008-10-05 Tom Tromey <tromey@redhat.com>
+
+ * sel-sched.c (move_op_hooks, fur_hooks): Mark forward
+ declarations 'extern'.
+ * regstat.c (regstat_n_sets_and_refs): Remove duplicate.
+ * haifa-sched.c (sched_scan_info): Remove duplicate.
+
+2008-10-05 Tom Tromey <tromey@redhat.com>
+
+ * cgraph.h (struct inline_summary): Move to top level.
+ (cgraph_local_info): Update.
+ * target.h (struct asm_out): Move to top level.
+ (struct asm_int_op): Likewise.
+ (struct sched): Likewise.
+ (struct vectorize): Likewise.
+ (struct calls): Likewise.
+ (struct c): Likewise.
+ (struct cxx): Likewise.
+ (struct emutls): Likewise.
+ (struct target_option_hooks): Likewise.
+ (struct gcc_target): Update.
+ * matrix-reorg.c (struct free_info): Move to top level.
+ (struct matrix_info): Update.
+ * tree-eh.c (struct goto_queue_node): Move to top level.
+ (struct leh_tf_state): Update.
+ * sched-int.h (struct deps_reg): Move to top level.
+ (enum post_call_value): Likewise. Give name.
+ (struct deps): Update.
+ * cse.c (struct branch_path): Move to top level.
+ (struct cse_basic_block_data): Update.
+
+2008-10-05 Tom Tromey <tromey@redhat.com>
+
+ * sdbout.c (sdb_debug_hooks): Initialize.
+ * ggc-page.c (ggc_pch_write_object): Initialize emptyBytes.
+
+2008-09-19 Tom Tromey <tromey@redhat.com>
+
+ * gimple.h (gimple_cond_code): Cast result to tree_code.
+
+2008-09-19 Tom Tromey <tromey@redhat.com>
+
+ * tree-flow.h (struct ptr_info_def) <escape_mask>: Now unsigned
+ int.
+ (struct var_ann_d) <escape_mask>: Likewise.
+
+2008-09-19 Tom Tromey <tromey@redhat.com>
+
+ * tree.c (tree_range_check_failed): Use 'int' to iterate.
+ (omp_clause_range_check_failed): Likewise.
+ (build_common_builtin_nodes): Likewise.
+ * sel-sched.c (init_hard_regs_data): Use 'int' to iterate.
+ * regclass.c (cannot_change_mode_set_regs): Use 'int' to iterate.
+ (invalid_mode_change_p): Likewise.
+ * passes.c (finish_optimization_passes): Use 'int' to iterate.
+ * ira.c (setup_class_subset_and_memory_move_costs): Use 'int' to
+ iterate.
+ (setup_cover_and_important_classes): Likewise.
+ (setup_class_translate): Likewise.
+ (setup_reg_class_nregs): Likewise.
+ (ira_init_once): Likewise.
+ (free_register_move_costs): Likewise.
+ * gimple.c (gimple_range_check_failed): Use 'int' to iterate.
+
+2008-09-18 Tom Tromey <tromey@redhat.com>
+
+ * cp/parser.c (cp_parser_check_decl_spec): Use 'int' to iterate.
+ * cp/class.c (layout_class_type): Use 'int' to iterate.
+ * cp/decl.c (finish_enum): Use 'int' to iterate.
+
+2008-09-17 Tom Tromey <tromey@redhat.com>
+
+ * ipa-reference.c (pass_ipa_reference): Fix struct tag.
+ * ipa-pure-const.c (pass_ipa_pure_const): Fix struct tag.
+ * ipa-cp.c (pass_ipa_cp): Fix struct tag.
+ * except.c (add_call_site): Fix struct tag.
+ * tree-pass.h (pass_ipa_cp, pass_ipa_reference,
+ pass_ipa_pure_const): Fix struct tag.
+
+2008-09-17 Tom Tromey <tromey@redhat.com>
+
+ * cfgrtl.c (pass_free_cfg): Use TV_NONE.
+ * tree-vectorizer.c (pass_ipa_increase_alignment): Use TV_NONE.
+ * tree-vect-generic.c (pass_lower_vector): Use TV_NONE.
+ (pass_lower_vector_ssa): Likewise.
+ * tree-tailcall.c (pass_tail_recursion): Use TV_NONE.
+ (pass_tail_calls): Likewise.
+ * tree-stdarg.c (pass_stdarg): Use TV_NONE.
+ * tree-ssanames.c (pass_release_ssa_names): Use TV_NONE.
+ * tree-ssa-math-opts.c (pass_cse_reciprocals): Use TV_NONE.
+ (pass_cse_sincos): Likewise.
+ (pass_convert_to_rsqrt): Likewise.
+ * tree-ssa-dse.c (pass_simple_dse): Use TV_NONE.
+ * tree-ssa-ccp.c (pass_fold_builtins): Use TV_NONE.
+ * tree-ssa.c (pass_early_warn_uninitialized): Use TV_NONE.
+ (pass_late_warn_uninitialized): Likewise.
+ (pass_update_address_taken): Likewise.
+ * tree-ssa-alias.c (pass_reset_cc_flags): Use TV_NONE.
+ (pass_build_alias): Likewise.
+ * tree-optimize.c (pass_all_optimizations): Use TV_NONE.
+ (pass_early_local_passes): Likewise.
+ (pass_all_early_optimizations): Likewise.
+ (pass_cleanup_cfg): Likewise.
+ (pass_cleanup_cfg_post_optimizing): Likewise.
+ (pass_free_datastructures): Likewise.
+ (pass_free_cfg_annotations): Likewise.
+ (pass_init_datastructures): Likewise.
+ * tree-object-size.c (pass_object_sizes): Use TV_NONE.
+ * tree-nrv.c (pass_return_slot): Use TV_NONE.
+ * tree-nomudflap.c (pass_mudflap_1): Use TV_NONE.
+ (pass_mudflap_2): Likewise.
+ * tree-mudflap.c (pass_mudflap_1): Use TV_NONE.
+ (pass_mudflap_2): Likewise.
+ * tree-into-ssa.c (pass_build_ssa): Use TV_NONE.
+ * tree-if-conv.c (pass_if_conversion): Use TV_NONE.
+ * tree-complex.c (pass_lower_complex): Use TV_NONE.
+ (pass_lower_complex_O0): Likewise.
+ * tree-cfg.c (pass_remove_useless_stmts): Use TV_NONE.
+ (pass_warn_function_return): Likewise.
+ (pass_warn_function_noreturn): Likewise.
+ * stack-ptr-mod.c (pass_stack_ptr_mod): Use TV_NONE.
+ * regclass.c (pass_regclass_init): Use TV_NONE.
+ (pass_subregs_of_mode_init): Likewise.
+ (pass_subregs_of_mode_finish): Likewise.
+ * recog.c (pass_split_all_insns): Use TV_NONE.
+ (pass_split_after_reload): Likewise.
+ (pass_split_before_regstack): Likewise.
+ (pass_split_before_sched2): Likewise.
+ (pass_split_for_shorten_branches): Likewise.
+ * omp-low.c (pass_expand_omp): Use TV_NONE.
+ (pass_lower_omp): Likewise.
+ * matrix-reorg.c (pass_ipa_matrix_reorg): Use TV_NONE.
+ * jump.c (pass_cleanup_barriers): Use TV_NONE.
+ * ira.c (pass_ira): Use TV_NONE.
+ * integrate.c (pass_initial_value_sets): Use TV_NONE.
+ * init-regs.c (pass_initialize_regs): Use TV_NONE.
+ * gimple-low.c (pass_lower_cf): Use TV_NONE.
+ (pass_mark_used_blocks): Likewise.
+ * function.c (pass_instantiate_virtual_regs): Use TV_NONE.
+ (pass_init_function): Likewise.
+ (pass_leaf_regs): Likewise.
+ (pass_match_asm_constraints): Likewise.
+ * final.c (pass_compute_alignments): Use TV_NONE.
+ * except.c (pass_set_nothrow_function_flags): Use TV_NONE.
+ (pass_convert_to_eh_region_ranges): Likewise.
+ * emit-rtl.c (pass_unshare_all_rtl): Use TV_NONE.
+ * combine-stack-adj.c (pass_stack_adjustments): Use TV_NONE.
+ * cgraphbuild.c (pass_build_cgraph_edges): Use TV_NONE.
+ (pass_rebuild_cgraph_edges): Likewise.
+ * cfglayout.c (pass_into_cfg_layout_mode): Use TV_NONE.
+ (pass_outof_cfg_layout_mode): Likewise.
+ * bt-load.c (pass_branch_target_load_optimize1): Use TV_NONE.
+ (pass_branch_target_load_optimize2): Likewise.
+ * passes.c (pass_postreload): Use TV_NONE.
+ (execute_one_ipa_transform_pass): Unconditionally push and pop
+ timevar.
+ (execute_one_pass): Likewise.
+ * df-core.c (pass_df_initialize_opt): Use TV_NONE.
+ (pass_df_finish): Likewise.
+ (pass_df_initialize_no_opt): Likewise.
+ * timevar.c (timevar_print): Ignore TV_NONE.
+ (timevar_push_1): Likewise.
+ * timevar.def (TV_NONE): New timevar.
+
+2008-09-10 Ian Lance Taylor <iant@google.com>
+
+ * machmode.h (GET_MODE_CLASS): Add cast to enum type.
+ (GET_CLASS_NARROWEST_MODE): Likewise.
+ * tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type.
+ (SET_PREDICT_EXPR_OUTCOME): Define.
+ * rtl.h: Update declaration.
+ * calls.c (store_one_arg): Change 0 to enum constant.
+ * combine.c (try_combine): Use alloc_reg_note.
+ (recog_for_combine, move_deaths, distribute_notes): Likewise.
+ * combine-stack-adj.c (adjust_frame_related_expr): Use
+ add_reg_note.
+ * cse.c (hash_rtx_cb): Change 0 to enum constant.
+ * dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type.
+ * dbxout.c (dbxout_symbol): Change 0 to enum constant.
+ (dbxout_parms): Likewise.
+ * dce.c (run_fast_df_dce): Change old_flags to int.
+ * df.h: Include "timevar.h". Update declarations.
+ (enum df_ref_flags): Define DF_REF_NONE.
+ (struct df_problem): Change tv_id to timevar_id_t.
+ (struct df): Change changeable_flags to int.
+ * df-core.c (df_set_flags): Change return type and
+ changeable_flags and old_flags to int.
+ (df_clear_flags): Likewise.
+ * df-problems.c (df_rd_bb_local_compute): Change 0 to enum
+ constant.
+ (df_chain_create_bb): Likewise.
+ (df_chain_add_problem): Change flags to unsigned int.
+ * df-scan.c (df_ref_create): Change ref_flags to int.
+ (df_notes_rescan): Change 0 to enum constant.
+ (df_ref_create_structure): change ref_flags to in.
+ (df_ref_record, df_def_record_1): Likewise.
+ (df_defs_record, df_uses_record): Likewise.
+ (df_get_call_refs): Likewise. Change 0 to enum constant.
+ (df_insn_refs_collect): Change 0 to enum constant.
+ (df_bb_refs_collect): Likewise.
+ (df_entry_block_defs_collect): Likewise.
+ (df_exit_block_uses_collect): Likewise.
+ * double-int.c (double_int_divmod): Add cast to enum type.
+ * dse.c (replace_inc_dec): Correct parameters to gen_int_mode.
+ * dwarf2out.c (new_reg_loc_descr): Add cast to enum type.
+ (based_loc_descr): Likewise.
+ (loc_descriptor_from_tree_1): Change first_op and second_top to
+ enum dwarf_location_atom.
+ * expmed.c (init_expmed): Change 0 to enum constant.
+ * expr.c (init_expr_target): Change 0 to enum constant.
+ (expand_expr_real_1): Likewise.
+ * fixed-value.h (struct fixed_value): Change mode to enum
+ machine_mode.
+ * genautomata.c (insert_automaton_decl): Change integer constant
+ to enum constant.
+ (insert_insn_decl, insert_decl, insert_state): Likewise.
+ (automata_list_finish): Likewise.
+ * genrecog.c (process_define_predicate): Add cast to enum type.
+ * gensupport.c (init_predicate_table): Add cast to enum type.
+ * gimple.c (gimple_build_return): Change 0 to enum constant.
+ (gimple_build_call_1, gimple_build_label): Likewise.
+ (gimple_build_goto, gimple_build_asm_1): Likewise.
+ (gimple_build_switch_1, gimple_build_cdt): Likewise.
+ * gimple.h: Update declaration.
+ (GIMPLE_CHECK): Change 0 to enum constant.
+ * gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to
+ GSI_SAME_STMT.
+ * gimplify.c (gimplify_compound_lval): Change fallback to int.
+ (gimplify_cond_expr, gimplify_expr): Likewise.
+ * haifa-sched.c (sched_create_recovery_edges): Use add_reg_note.
+ * ipa-prop.c (update_jump_functions_after_inlining): Change
+ IPA_BOTTOM to IPA_UNKNOWN.
+ * ira.c (setup_class_subset_and_memory_move_costs): Add cast to
+ enum type.
+ (setup_reg_class_intersect_union): Likewise.
+ (setup_prohibited_class_mode_regs): Likewise.
+ (setup_prohibited_mode_move_regs): Likewise.
+ * ira-costs.c (record_reg_classes): Likewise.
+ * lists.c (alloc_EXPR_LIST): Add cast to enum type.
+ * omp-low.c (expand_omp_for): Add cast to enum type.
+ * optabs.c (debug_optab_libfuncs): Add cast to enum type.
+ * opts.c (enable_warning_as_error): Change kind to diagnostic_t.
+ * postreload.c (reload_cse_simplify_operands): Likewise.
+ * predict.c (combine_predictions_for_insn): Add cast to enum
+ type.
+ (combine_predictions_for_bb): Likewise.
+ (estimate_bb_frequencies): Check profile_status, not
+ function_frequency.
+ (build_predict_expr): Use SET_PREDICT_EXPR_OUTCOME.
+ * real.c (real_arithmetic): Add cast to enum type.
+ * regclass.c (init_move_cost, init_reg_sets_1): Add cast to enum
+ type.
+ (init_fake_stack_mems, record_reg_classes): Likewise.
+ * regmove.c (regclass_compatible_p): Change class0 and class1 to
+ enum reg_class.
+ (try_auto_increment): Use PUT_REG_NOTE_KIND rather than PUT_MODE.
+ * reload.c (find_valid_class): Add cast to enum type.
+ (push_reload): Change 0 to enum constant.
+ (find_reloads): Add cast to enum type.
+ (make_memloc): Change 0 to enum constant.
+ * reload1.c (reload): Change 0 to enum constant.
+ (eliminate_regs_1): Use alloc_reg_note. Change 0 to enum
+ constant.
+ (elimination_effects): Change 0 to enum constant.
+ (eliminate_regs_in_insn, delete_output_reload): Likewise.
+ (emit_input_reload_insns): Add cast to enum type.
+ * rtlanal.c (alloc_reg_note): New function.
+ (add_reg_note): Call it.
+ * tree-dump.c (get_dump_file_info): Change phase to int. Add cast
+ to avoid warning.
+ (get_dump_file_name, dump_begin): Change phase to int.
+ (dump_enabled_p, dump_initialized_p): Likewise.
+ (dump_flag_name, dump_end, dump_function): Likewise.
+ * tree-dump.h (dump_function): Update declaration.
+ * tree-pass.h: Include "timevar.h". Update several function
+ declarations.
+ (struct opt_pass): Change tv_id to timevar_id_t.
+ * tree-vect-patterns.c (vect_pattern_recog_1): Change vec_mode to
+ enum machine_mode.
+ * varasm.c (assemble_integer): Change mclass to enum mode_class.
+ * config/i386/i386.md (cpu attr): Add cast to enum type.
+ (truncdfsf2): Change slot to enum ix86_stack_slot.
+ (truncxf<mode>2, floatunssi<mode>2): Likewise.
+ * config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to
+ enum type.
+ * config/i386/i386.c (ix86_expand_prologue): Add add_reg_note.
+ (ix86_split_fp_branch, predict_jump): Likewise.
+ (ix86_expand_multi_arg_builtin): Change sub_code to enum
+ rtx_code.
+ (ix86_builtin_vectorized_function): Add cast to enum type.
+ * cp/call.c (build_new_function_call): Change complain to int.
+ (build_object_call, build_conditional_expr): Likewise.
+ (build_new_op, convert_like_real, build_over_call): Likewise.
+ (build_special_member_call, build_new_method_call): Likewise.
+ (perform_implicit_conversion): Likewise.
+ (perform_direct_initialization_if_possible): Likewise.
+ * cp/class.c (instantiate_type): Change complain to int.
+ * cp/cp-lang.c (objcp_tsubst_coy_and_build): Change complain to
+ int.
+ * cp/cvt.c (convert_to_void): Change complain to int.
+ * cp/decl.c (make_typename_type): Change complain to int.
+ (make_unbound_class_template): Likewise.
+ * cp/init.c (build_aggr_init): Change complain to int.
+ (expand_default_init, expand_aggr_init_1, build_new_1): Likewise.
+ (build_new, build_vec_init): Likewise.
+ * cp/parser.c (cp_parser_omp_var_list_no_open): Change integer
+ constant to enum constant.
+ (cp_parser_omp_flush, cp_parser_omp_threadprivate): Likewise.
+ * cp/pt.c (reduce_template_parm_level): Change complain to int.
+ (coerce_template_template_parm): Likewise.
+ (coerce_template_template_parms): Likewise.
+ (convert_template_argument): Likewise.
+ (coerce_template_parameter_pack): Likewise.
+ (coerce_template_parms, lookup_template_class): Likewise.
+ (apply_late_template_attributes): Likewise.
+ (tsubst_template_arg, tsubst_pack_expansion): Likewise.
+ (tsubst_tempalte_args, tsubst_tempalte_parms): Likewise.
+ (tsubst_aggr_type, tsubst_decl, tsubst_arg_types): Likewise.
+ (tsubst_function_type, tsubst_exception_specification): Likewise.
+ (tsubst, tsubst_baselink, tsubst_qualified_id): Likewise.
+ (tsubst_copy, tsubst_omp_clauses): Likewise.
+ (tsubst_copy_asm_operand, tsubst_omp_for_iterator): Likewise.
+ (tsubst_expr, tsubst_non_call_postfix_expression): Likewise.
+ (tsubst_copy_and_build, check_instantiated_args): Likewise.
+ (do_type_instantiation, invalid_nontype_parm_type_p): Likewise.
+ (process_template_parm): Change integer constant to enum constant.
+ (unify_pack_expansion): Add cast to enum type.
+ * cp/rtti.c (build_dynamic_cast_1): Change complain to int.
+ (build_dynamic_cast): Likewise.
+ * cp/search.c (lookup_base): Change access to int.
+ * cp/semantics.c (finish_call_expr): Change complain to int.
+ * cp/tree.c (cp_build_qualified_type_real): Change complain to
+ int.
+ * cp/typeck.c (composite_pointer_type_r): Change complain to int.
+ (composite_pointer_type, invalid_nonstatic_memfn_p): Likewise.
+ (build_class_member_access_expr): Likewise.
+ (finish_class_member_access_expr): Likewise.
+ (build_x_indirect_ref, cp_build_indirect_ref): Likewise.
+ (cp_build_function_call, convert_arguments): Likewise.
+ (build_x_binary_op, cp_build_binary_op): Likewise.
+ (build_x_unary_op, cp_build_unary_op): Likewise.
+ (build_x_conditional_expr): Likewise.
+ (build_x_compound_expr, cp_build_compound_expr): Likewise.
+ (build_static_cast_1, build_static_cast): Likewise.
+ (build_reinterpret_cast_1, build_reinterpret_cast): Likewise.
+ (build_const_cast, cp_build_c_cast): Likewise.
+ (cp_build_modify_expr, build_x_modify_expr): Likewise.
+ (convert_for_assignment, convert_for_initialization): Likewise.
+ (lvalue_or_else): Likewise.
+ * cp/typeck2.c (build_functional_cast): Change complain to int.
+ * cp/cp-tree.h: Update declarations.
+ * cp/cp-objcp-common.h: Update declaration.
+ * fortran/decl.c (gfc_mod_pointee_as): Change return type to
+ match.
+ * fortran/gfortran.h: Update declaration.
+ * fortran/module.c (import_iso_c_binding_module): Use new
+ iso_c_binding_symbol local. Add cast to enum type.
+ * fortran/trans-intrinsic.c (gfc_conv_intrinsic_minmax): Change op
+ to enum tree_code.
+ (gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_arith): Likewise.
+ (gfc_conv_intrinsic_minmaxloc): Likewise.
+ (gfc_conv_intrinsic_minmaxval): Likewise.
+ (gfc_conv_intrinsic_bitop): Likewise.
+ (gfc_conv_intrinsic_singlebitop): Likewise.
+ (gfc_conv_intrinsic_strcmp): Likewise.
+ * Makefile.in: Change tree-pass.h to $(TREE_PASS_H) globally.
+ (DF_H): Add $(TIMEVAR_H).
+ (TREE_PASS_H): New variable.
+
+2008-07-05 Tom Tromey <tromey@redhat.com>
+
+ * basic-block.h (enum profile_status): Move to top level.
+ (struct control_flow_graph): Update.
+ * combine.c (enum undo_kinds): Move to top level.
+ (struct undo): Update.
+ * tree-inline.h (enum copy_body_cge_which): Move to top level.
+ (copy_body_data): Update.
+ * ggc-page.c (struct ggc_pch_ondisk): Move to top level.
+ (struct ggc_pch_data): Update.
+ * except.c (enum eh_region_type): Move to top level.
+ (struct eh_region_d): Update.
+ * regmove.c (enum match_use_kinds): Move to top level.
+ (struct match): Update.
+ * cgraphunit.c (enum cgraph_order_kinds): Move to top level.
+ (struct cgraph_order_sort): Update.
+
+2008-07-05 Tom Tromey <tromey@redhat.com>
+
+ * optabs.c (optab_table, convert_optab_table): Check
+ HAVE_DESIGNATED_INITIALIZERS.
+ (init_optabs): Likewise.
+ * system.h (HAVE_DESIGNATED_INITIALIZERS): Define to 0 for C++.
+
+2008-07-03 Tom Tromey <tromey@redhat.com>
+
+ * stringpool.c (alloc_node): Update.
+
+2008-07-03 Tom Tromey <tromey@redhat.com>
+
+ * tree-eh.c (struct leh_state): Update.
+ (struct leh_tf_state): Likewise.
+ (lower_catch): Likewise.
+ (lower_eh_filter): Likewise.
+ (lower_cleanup): Likewise.
+ (make_eh_edge): Likewise.
+ (mark_eh_edge): Likewise.
+ * function.h (call_site_record): Update.
+ (ipa_opt_pass): Likewise.
+ * alias.c (struct alias_set_entry_d): Rename from
+ alias_set_entry.
+ (record_alias_subset): Update.
+ * except.c (struct eh_region_d): Rename from eh_region.
+ (struct call_site_record_d): Rename from call_site_record.
+ Update all users.
+ * except.h (struct eh_region_d): Rename from eh_region.
+ Update all users.
+ * tree-predcom.c (struct dref_d): Rename from dref.
+ Update all users.
+ * tree-cfg.c (update_eh_label): Update.
+ * passes.c (add_ipa_transform_pass): Update.
+ (execute_ipa_summary_passes): Update.
+ (execute_one_ipa_transform_pass): Update.
+ (execute_ipa_summary_passes): Update.
+ (execute_ipa_pass_list): Update.
+ * optabs.c (optab_table): Update.
+ (convert_optab_table): Likewise.
+ (sign_expand_binop): Likewise.
+ * optabs.h (struct optab_d): Rename from optab.
+ (optab): Update.
+ (struct convert_optab_d): Rename from convert_optab.
+ (convert_optab): Update.
+ (optab_table, convert_optab_table): Likewise.
+ * tree-pass.h (enum opt_pass_type): Declare at top-level.
+ (struct ipa_ops_pass_d): Rename from struct ipa_ops_pass.
+ (pass_ipa_inline): Update.
+ * omega.c (verify_omega_pb): Update.
+ (omega_eliminate_redundant, omega_eliminate_red,
+ parallel_splinter, omega_alloc_problem): Likewise.
+ * omega.h (struct eqn_d): Rename from eqn.
+ (struct omega_pb_d): Rename from omega_pb.
+ (omega_alloc_eqns): Update.
+ * ipa-inline.c (pass_ipa_inline): Update.
+
+2008-07-01 Ian Lance Taylor <iant@google.com>
+
+ * machmode.h (GET_MODE_INNER): Cast to enum machine_mode.
+ (GET_MODE_WIDER_MODE): Likewise.
+ (GET_MODE_2XWIDER_MODE): Likewise.
+
+ * builtins.c (expand_builtin_profile_func): Rename local variable
+ this to this_func.
+ (validate_arglist): Pass int rather than enum to va_arg.
+
+2008-06-30 Ian Lance Taylor <iant@google.com>
+
+ * vec.h (DEF_VEC_FUNC_P) [iterate]: Add cast for constant 0.
+
+2008-06-21 Tom Tromey <tromey@redhat.com>
+
+ * system.h (CONST_CAST2): Define for C++.
+
+2008-06-19 Ian Lance Taylor <iant@google.com>
+
+ * tree.h (enum tree_code): Include all-tree.def, not tree.def.
+ * tree.c (tree_code_type): New global array.
+ (tree_code_length, tree_code_name): Likewise.
+ * Makefile.in (TREE_H): Add all-tree.def, c-common.def, and
+ $(lang_tree_files).
+ (all-tree.def, s-alltree): New targets.
+ (gencheck.h, s-gencheck): Remove.
+ (tree.o): Depend upon all-tree.def.
+ (build/gencheck.o): Remove gencheck.h dependency.
+ (mostlyclean): Don't remove gencheck.h.
+ * c-common.h (enum c_tree_code): Remove.
+ * c-lang.c (tree_code_type): Remove.
+ (tree_code_length, tree_code_name): Remove.
+ * gencheck.c (tree_codes): Include all-tree.def, rather than
+ tree.def, c-common.def, and gencheck.h. Undefined DEFTREECODE
+ after it is used.
+ * tree-browser.c (tb_tree_codes): Include all-tree.def, rather
+ than tree.def.
+ * cp/cp-tree.h (enum cplus_tree_code): Remove.
+ (operator_name_info): Size to LAST_AND_UNUSED_TREE_CODE.
+ (assignment_operator_name_info): Likewise.
+ * cp/cp-lang.c (tree_code_type): Remove.
+ (tree_code_length, tree_code_name): Remove.
+ * cp/lex.c (operator_name_info): Size to
+ LAST_AND_UNUSED_TREE_CODE.
+ (assignment_operator_name_info): Likewise.
+ * cp/decl.c (grok_op_properties): Change LAST_CPLUS_TREE_CODE to
+ LAST_AND_UNUSED_TREE_CODE.
+ * cp/mangle.c (write_expression): Likewise.
+ * cp/Make-lang.in (CXX_TREE_H): Remove cp/cp-tree.def.
+ * fortran/f95-lang.c (tree_code_type): Remove.
+ (tree_code_length, tree_code_name): Remove.
+ * java/java-tree.h (enum java_tree_code): Remove.
+ * java/lang.c (tree_code_type): Remove.
+ (tree_code_length, tree_code_name): Remove.
+ * java/Make-lang.in (JAVA_TREE_H): Remove java/java-tree.def.
+ * objc/objc-act.h (enum objc_tree_code): Remove.
+ * objc/objc-lang.c (tree_code_type): Remove.
+ (tree_code_length, tree_code_name): Remove.
+ * objcp/objcp-lang.c (tree_code_type): Remove.
+ (tree_code_length, tree_code_name): Remove.
+ * ada/ada-tre.h (enum gnat_tree_code): Remove.
+ * ada/Make-lang.in (ADA_TREE_H): Remove ada/ada-tre.def.
+ * ada/misc.c (tree_code_type): Remove.
+ (tree_code_length, tree_code_name): Remove.
+
+ * c-lex.c (narrowest_unsigned_type): Change itk to int.
+ (narrowest_signed_type): Likewise.
+ * c-typeck.c (c_common_type): Change local variable mclass to enum
+ mode_class, twice.
+ (parser_build_binary_op): Compare the TREE_CODE_CLASS with
+ tcc_comparison, not the tree code itself.
+ * c-common.c (def_fn_type): Pass int, not an enum, to va_arg.
+ (c_expand_expr): Cast modifier to enum expand_modifier.
+ * c-common.h (C_RID_CODE): Add casts.
+ (C_SET_RID_CODE): Define.
+ * c-parser.c (c_parse_init): Use C_SET_RID_CODE.
+ (c_lex_one_token): Add cast to avoid warning.
+ (c_parser_objc_type_name): Rename local typename to type_name.
+ (check_no_duplicate_clause): Change code parameter to enum
+ omp_clause_code.
+ (c_parser_omp_var_list_parens): Change kind parameter to enum
+ omp_clause_code.
+ (c_parser_omp_flush): Pass OMP_CLAUSE_ERROR, not 0, to
+ c_parser_omp_list_var_parens.
+ (c_parser_omp_threadprivate): Likewise.
+ * c-format.c (NO_FMT): Define.
+ (printf_length_specs): Use NO_FMT.
+ (asm_fprintf_length_specs): Likewise.
+ (gcc_diag_length_specs): Likewise.
+ (scanf_length_specs): Likewise.
+ (strfmon_length_specs): Likewise.
+ (gcc_gfc_length_specs): Likewise.
+ (printf_flag_specs): Change 0 to STD_C89.
+ (asm_fprintf_flag_specs): Likewise.
+ (gcc_diag_flag_specs): Likewise.
+ (gcc_cxxdiag_flag_specs): Likewise.
+ (scanf_flag_specs): Likewise.
+ (strftime_flag_specs): Likewise.
+ (strfmon_flag_specs): Likewise.
+ (print_char_table): Likewise.
+ (asm_fprintf_char_table): Likewise.
+ (gcc_diag_char_table): Likewise.
+ (gcc_tdiag_char_table): Likewise.
+ (gcc_cdiag_char_table): Likewise.
+ (gcc_cxxdiag_char_table): Likewise.
+ (gcc_gfc_char_table): Likewise.
+ (scan_char_table): Likewise.
+ (time_char_table): Likewis.
+ (monetary_char_table): Likewise.
+ * c-format.h (BADLEN): Likewise.
+
+ * toplev.h (progname): Declare as extern "C" when compiling with
+ C++.
+
+2008-06-18 Ian Lance Taylor <iant@google.com>
+
+ * configure.ac: Split c_loose_warn out from loose_warn, and
+ c_strict_warn from strict_warn. Set and substitute
+ warn_cxxflags.
+ * Makefile.in (C_LOOSE_WARN, C_STRICT_WARN): New variables.
+ (GCC_WARN_CFLAGS): Add $(C_LOOSE_WARN) and $(C_STRICT_WARN).
+ (GCC_WARN_CXXFLAGS, WARN_CXXFLAGS): New variables.
+ (GCC_CFLAGS): Add $(C_LOOSE_WARN).
+ (ALL_CXXFLAGS): New variable.
+ (.c.o): Compile with $(CXX) rather than $(CC).
+ * configure: Rebuild.
+
+Local Variables:
+mode: change-log
+change-log-default-name: "ChangeLog.cxx"
+End:
diff --git a/gcc/ChangeLog.multi-target b/gcc/ChangeLog.multi-target
new file mode 100644
index 00000000000..515fc6b7f27
--- /dev/null
+++ b/gcc/ChangeLog.multi-target
@@ -0,0 +1,566 @@
+2009-06-04 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * tree-parloops.c (parallelize_loops): Don't check for vector phi
+ nodes when processing a loop that should be executed on a different
+ target than CFUN.
+ * tree-vectorizer.c (vectorize_loops): Also analyze and vectorize
+ loops for different targets than CFUN.
+ * tree-vect-transform.c (vect_transform_loop): If the loop is for a
+ different target than CFUN, don't do alignment peeling. Switch
+ to loop target during transformation and back afterwards.
+
+ * cfgloop.c (alloc_loop): Initialize target_arch member from CFUN.
+
+ * tree-ssa-loop.c (pass_vectorize): Add TODO_rebuild_alias to
+ todo_flags_finish.
+ * tree-vect-transform.c (vect_create_addr_base_for_vector_ref): New
+ parameter ptr_alias_set. Changed all callers.
+
+2009-06-01 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * target.h (struct gcc_target): Add member ptr_mode.
+ * target-def.h (TARGET_INITIALIZER): Add initializer for ptr_mode.
+ * tree-ssa-loop.c (gate_tree_parallelize_loops): Also enable if a
+ loop is to be executed on another target.
+ * tree-parloop.c (separate_decls_in_region): New parameter new_target.
+ Changed caller.
+ (create loop_fn): New parameter target_arch. Changed caller.
+ (parallelize_loops): Also enable for loops that are to be executed
+ on another target.
+ * tree-vectorizer.c (vectorize_loops): If a loop is to be vectorized
+ for a different target, only set the target_arch filed in loop and
+ ignore the lop for now. Use cfun->target_arch to restore target.
+ * tree-vectorizer.h (struct _loop_vec_info): Remove target_arch member.
+ * cfgloop.h (struct loop): Add target_arch member.
+
+2009-05-23 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * doc/tm.texi: Adjust struct machine_function documentation.
+ * gengtype.c (open_base_files): Don't emit START_TARGET_SPECIFIC.
+ (finish_root_table): Emit END_TARGET_SPECIFIC.
+ (write_roots): Don't return early for EXTRA_TARGET.
+ Emit START_TARGET_SPECIFIC for each root.
+ (main): Don't emit END_TARGET_SPECIFIC.
+ * gengtype.h (pp_nest, no_extra_nest): Declare.
+ * gengtype-lex.l (pp_nest, no_extra_nest): New variables.
+ (TARGET_SCOPE/{EOID}): New pattern.
+ (^{HWS}"#"{HWS}ifndef{HWS}EXTRA_TARGET[[:alnum:]_][^\n]*): Likewise.
+ (^{HWS}"#"{HWS}ifndef{HWS}EXTRA_TARGET[^\n]*): Likewise.
+ (^{HWS}"#"{HWS}if[^\n]*, ^{HWS}"#"{HWS}endif[^\n]*): Likewise.
+ * function.c (free_after_compilation): Use MACHINE_FUNCTION.
+ (allocate_struct_function_1): Likewise.
+ * function.h (MACHINE_FUNCTION): Define.
+ (struct function): Use machine_function_u for member machine.
+ * gengtype-parse.c (token) [EXTRA_TARGET]: Loop till !no_extra_nest.
+ * gentargtype.cc (u): Remove.
+ (main): Use sizeof (cumulative_args_u).
+ Emit definition for efine machine_function_u.
+ * ggc.h (gt_pch_note_object): No longer target specific.
+ * genmodes.c (struct mode_adjust): New member target.
+ (new_adjust): Set target member.
+ (emit_mode_adjustments): Skip adjustments for other targets.
+ * Makefile.in (EXTRA_TARGET_RULES) <THIS-TARGET/target-gtypes.h>:
+ Set _mf too.
+ (target-types.h): Also emit machine_function_u definition.
+ * config/i386/i386.h (CONDITIONAL_REGISTER_USAGE):
+ Use MACHINE_FUNCTION.
+ (ix86_stack_locals, ix86_varargs_gpr_size): Likewise.
+ (ix86_varargs_fpr_size, ix86_optimize_mode_switching): Likewise.
+ (ix86_current_function_needs_cld: Likewise.
+ * config/i386/i386.c (ix86_cfun_abi, ix86_call_abi_override): Likewise.
+ (ix86_maybe_switch_abi, ix86_frame_pointer_required): Likewise.
+ (ix86_compute_frame_layout, ix86_expand_prologue): Likewise.
+ (ix86_expand_epilogue, get_some_local_dynamic_name_1): Likewise.
+ (x86_output_mi_thunk): Likewise.
+ * config/sh/sh.c (calc_live_regs): Use INCOMING_ARGS_INFO.
+ (sh_expand_prologue, sh_expand_epilogue): Likewise.
+ (sh_builtin_saveregs, sh_va_start): Likewise.
+ (initial_elimination_offset, sh_allocate_initial_value): Likewise.
+ (sh_function_ok_for_sibcall): Likewise.
+ * config/sh/sh.md (return, return_i): Likewise.
+ (shcompact_return_tramp, shcompact_return_tramp_i): Likewise.
+ * config/mxp/mxp.c (struct machine_function): Target specific.
+ (mxp_expand_prologue, mxp_expand_epilogue): Use MACHINE_FUNCTION.
+ * config/rs6000/rs6000.c (rs6000_emit_move): Likewise.
+ (rs6000_emit_move, setup_incoming_varargs, rs6000_va_start): Likewise.
+ (rs6000_secondary_memory_needed_rtx): Likewise.
+ (rs6000_alloc_sdmode_stack_slot, rs6000_instantiate_decls): Likewise.
+ (rs6000_get_some_local_dynamic_name, rs6000_stack_info): Likewise.
+ (rs6000_savres_strategy): Likewise.
+ * config/arc/arc-protos.h (regno_clobbered_p): Target specific.
+ * config/arc/arc.c (arc_ccfsm_current): Use MACHINE_FUNCTION.
+ (arc_compute_function_type, arc_compute_frame_size): Likewise.
+ (arc_save_restore, arc_expand_prologue, arc_expand_epilogue): Likewise.
+ (arc_delay_slots_for_epilogue, arc_ccfsm_cond_exec_p): Likewise.
+ (arc_ccfsm_advance_to, arc_next_active_insn): Likewise.
+ (arc_verify_short, output_short_suffix): Likewise.
+ (arc_final_prescan_insn, arc_initial_elimination_offset): Likewise.
+ (arc_reorg, arc_adjust_insn_length, arc_pad_return): Likewise.
+ (arc_get_unalign, arc_clear_unalign, arc_toggle_unalign): Likewise.
+ (arc_short_long, arc_scheduling_not_expected): Likewise.
+ (machine_function): Rename to...
+ (machine_function_t) ... this. Changed all users.
+ * config/arc/arc.h (struct function): Not target specific.
+
+2009-05-22 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config/i386/i386.c (ix86_va_start): Use INCOMING_ARGS_INFO.
+ (ix86_secondary_reload): Make signature agree with target.h
+
+2009-05-20 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * tree-ssa-address.c: Include multi-target.h . Add
+ START_TARGET_SPECIFIC and END_TARGET_SPECIFIC markers and
+ #ifndef EXTRA_TARGET / #endif directives.
+ * varasm.c (default_target_new_arch) [EXTRA_TARGET]:
+ Don't forward the call, nor suppress output last_arch is 0.
+ * TDEP-SOURCES: Add tree-ssa-address.c .
+ * tree-flow.h: Incude multi-target.h
+ (create_mem_ref, addr_for_mem_ref, maybe_fold_tmr): Mark as target
+ specific.
+ Makefile.in (OBJS-common): Move tree-ssa-address.o from here...
+ (OBJS-rtl): ... to here.
+ * config/spu/spu-protos.h (spu_override_options): Don't declare.
+ * config/spu/spu.c (spu_override_options): Now static. Change
+ signature to fit target hook.
+ (TARGET_OVERRIDE_OPTIONS): Redefine.
+ * config/spu/spu.h: Include multi-target.h.
+ Add START_TARGET_SPECIFIC / END_TARGET_SPECIFIC markers.
+ * config/mxp/mxp.h: Comment typo fix.
+
+ * config/rs6000/rs6000.c (rs6000_va_start): Use INCOMING_ARGS_INFO.
+ (compute_vrsave_mask): Likewise.
+
+ * config/spu/spu.c: Include multi-target.h.
+ Add START_TARGET_SPECIFIC / END_TARGET_SPECIFIC markers.
+
+2009-05-19 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * optabs.c (optab_for_tree_code_array): New array.
+ (optab_for_tree_code): Rename to...
+ (optab_for_tree_code_1) ... this.
+ * optabs.h: Include target.h. Make types at start of file
+ non-target- specific.
+ (enum optab_subtype): No longer target specific.
+ (optab_for_tree_code_1, optab_for_tree_code_array): Declare.
+ (optab_for_tree_code): New a static inline function.
+ * target.h (struct gcc_target): New member target_arch.
+ * tree-vectorizer.c (vectorize_loops): Use actually selected target
+ architecture.
+ * stor-layout.c (vector_type_mode_array): Declare.
+ (vector_type_mode): Dispatch through vector_type_mode_array.
+ [!EXTRA_TARGET]: (vector_type_mode_array): Define.
+ * target-def.h (TARGET_INITIALIZER): Add TARGET_NUM.
+ * Makefile.in (OPTABS_H): Add $(TARGET_H).
+
+ * targhooks.c: Include diagnostic.h and tree-pass.h.
+ (default_vectype_for_scalar_type): New function.
+ * targhooks.h (default_vectype_for_scalar_type): Declare.
+ * target.h (struct vectorize): New member vectype_for_scalar_type.
+ toplev.c (backend_init): Set targetm_pnt at function start and after
+ EXTRA_TARGETS_CALL.
+ (lang_dependent_init): Likewise.
+ * function.c (init_emit_array): Declare.
+ [!EXTRA_TARGET] (init_emit_array): Define and initialize.
+ (prepare_function_start): Call the init_emit function for
+ cfun->target_arch.
+ (init_dummy_function_start): Don't call init_emit.
+ * tree-vectorizer.c (get_vectype_from_scalar_type): Remove.
+ (vectorize_loops): Call vect_analyze_loops for all targets.
+ Set loop_vinfo->target_arch to the selected target.
+ * tree-vectorizer.h: Include target.h
+ (struct loop_vec_info): New member target_arch.
+ (get_vectype_for_scalar_type): Now a static incline function.
+ * tree-vect-analyze.c (vect_analyze_loop): Show for which target
+ we are doing the analysis.
+ * emit-rtl.c (gen_reg_rtx): Add assert.
+ * cfgexpand.c (gimple_expand_cfg): Don't call init_emit.
+ * target-def.h (TARGET_VECTORIZE_VECTYPE_FOR_SCALAR_TYPE): Define.
+ (TARGET_VECTORIZE): Add TARGET_VECTORIZE_VECTYPE_FOR_SCALAR_TYPE.
+ * tree-flow.h (get_vectype_for_scalar_type): Don't declare.
+ * Makefile.in (TREE_VECTORIZER_H): Set. Use it to replace
+ tree-vectorizer.h in dependencies.
+
+2009-05-13 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * function.h (struct incoming_args): Base info GTY description on
+ cfun->target_arch.
+ * gentargtype.cc (cumulative_args_u): Use TARGET_NUM for tag.
+ Add an align_dummy member.
+ * Makefile.in [EXTRA_TARGET] (target-types.h): Likewise.
+ [!EXTRA_TARGET] (target-types.h target-gtypes.h):
+ Use TARGET_NUM for tag.
+
+ * Makefile.in [!EXTRA_TARGET] (target-types.h):
+ Fix rule to provide GTY information.
+ [!EXTRA_TARGET] (target-gtypes.h): Share rule with target-types.h .
+
+ * Makefile.in (target-types.h): Remove extra semicolon.
+ (build/gentargtype.o): Use -fno-exceptions.
+
+ * Makefile.in (out_file, out_object_file, md_file, tm_file_list,
+ tm_include_list, tm_defines, tm_p_file_list, tm_p_include_list,
+ EXTRA_TARGETS, NUM_TARGETS): Move from here...
+ * T-extra ... to here.
+ * Makefile.in (xout.o): Replace with $(<target>-out_object_file).
+ (GTFILES): Add target-gtypes.h.
+ (COMMON_ABI): Chaneg to target-types.h target-gtypes.h.
+ (EXTRA_TARGET_RULES): Copy / sed target-types.g / target-gtypes.h to
+ extra targets directories.
+ [!TA] [EXTRA_TARGETS] (target-types.h, target-gtypes.h): New rules.
+ (build/gentargtype.o, build/gentargtype$(build_exeext)): Likewise.
+ * gentargtype.cc: New file.
+ * regstat.c (setjmp_crosses): No longer target specific.
+ (regstat_n_sets_and_refs): Likewise.
+ (regstat_init_n_sets_and_refs, regstat_free_n_sets_and_refs): Likewise.
+ (reg_info_p, reg_info_p_size): Likewise.
+ (regstat_free_ri, regstat_get_setjmp_crosses): Likewise.
+ (regstat_bb_compute_calls_crossed): Likewise.
+ (regstat_compute_calls_crossed, regstat_free_calls_crossed): Likewise.
+ * regs.h (REG_N_REFS, REG_N_SETS): Likewise.
+ (regstat_init_n_sets_and_refs, regstat_free_n_sets_and_refs): Likewise.
+ (regstat_free_ri, regstat_get_setjmp_crosses): Likewise.
+ (regstat_compute_calls_crossed, regstat_free_calls_crossed): Likewise.
+ * machmode.h (class_narrowest_mode): Target specific.
+ (byte_mode, word_mode, ptr_mode, init_adjust_machine_modes): Likewise.
+ * flags.h (align_loops_log, align_loops_max_skip): Likewise.
+ (align_jumps_log, align_jumps_max_skip, align_labels_log): Likewise.
+ (align_labels_max_skip, align_functions_log): Likewise.
+ * df-core.c (df_bitmap_obstack): Likewise.
+ (struct df): Rename to:
+ (struct df_d).
+ * dse.h (struct df): Don't declare.
+ * function.c (assign_parms): Use INCOMING_ARGS_INFO.
+ (prepare_function_start): Don't call init_emit.
+ (init_dummy_function_start): Call init_emit.
+ * function.h: Include target-types / target-gtypes.h.
+ (incoming_args): Use cumulative_args_u for info member.
+ (INCOMING_ARGS_INFO): Define.
+ (regno_reg_rtx, struct incoming_args): No longer target specific.
+ (struct rtl_data, x_rtl): Likewise.
+ * df.h (struct df): Rename to:
+ (struct df_d).
+ (df_bitmap_obstack, df): No longer target specific.
+ * emit-rtl.c (x_rtl, regno_reg_rtx): Likewise.
+ * reginfo.c (max_regno): Likewise.
+ * cfgexpand.c (gimple_expand_cfg): Call init_emit.
+
+2009-05-12 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * dce.h : Include multi-target.h. Add START_TARGET_SPECIFIC and
+ END_TARGET_SPECIFC markers.
+
+ * target.h (this_targetm): Remove semicolon after EXTRA_TARGETS_DECL.
+ * Makefile.in (opts.o): Change to:
+ $(TA)opts.o.
+
+ * rtl.h (global_rtl_index, global_rtl): Mark as target specific.
+ * Makefile.in (extra_modes.h) [TA]: Disable.
+
+2009-05-11 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * T-extra.in: New file, broken out of:
+ * Makefile.in.
+ * T-extra.in: Use $(CURRENT_TARGET) prefix for names of variables
+ that are set.
+ * targhooks.c (stack_chk_fail_decl): Declare extern and non-target
+ specific.
+ * multi-target.h (TARGET_SCOPE): Define.
+ * target.h (struct asm_out): Add new member new_arch.
+ * configure.ac (all_outputs): Add T-extra.in.
+ * configure: Regenerate.
+ * varasm.c [!EXTRA_TARGET] (last_arch): Don't initialize.
+ (default_target_new_arch): New function.
+ (assemble_start_function): Use asm_out.new_arch hook.
+ * target-def.h (TARGET_ASM_OUT): Add TARGET_ASM_NEW_ARCH.
+ * output.h (default_target_new_arch): Declare.
+ * cfgloop.h (add_loop): Not target specific.
+ * Makefile.in: Include T-extra both from main dir and from any
+ extra targets directories.
+ (cs-tm.h): Define TARGET_SCOPE_ in generated header file.
+ (options.c): place rtl.h in front of insn-attr.h for header list.
+ (extra-modes.h): Rework rules to work with T-extra to avoid
+ recursive make.
+ (EXTRA_OBJS): Include files from extra targets, and add dependencies /
+ rules to build them.
+
+2009-05-11 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * genmodes.c (drop_mode): handle !old_contained.
+
+ * 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.
+ * config/rs6000/t-rs6000 (rs6000-c.o): Use CXXX.
+ * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add casts
+ to enum rs6000_builtins.
+
+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, moved contents to:
+ * config/sh/sh.c (sh_override_options): New function.
+ Make manipulation of global flags dependent on main_target.
+ (TARGET_OVERRIDE_OPTIONS): Redefine.
+ * config/arc/arc-protos.h (arc_init): Don't declare.
+ * config/arc/arc.c (arc_override_options): New function.
+ (TARGET_OVERRIDE_OPTIONS): Redefine.
+ * config/arc/arc.h (OVERRIDE_OPTIONS): Don't define.
+
+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, config/arc/arc.c: Likewise.
+ * config/arc/arc.h, 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.
+ * genemit.c (main): Likewise.
+ * genpeep.c (main): Likewise.
+ * genattrtab.c (main): Likewise.
+ * genattr.c (gen_attr, main): Likewise.
+ * optc-gen.awk: Likewise.
+ * genmodes.c (emit_insn_modes_c_header, emit_insn_modes_c): Likewise.
+ (emit_min_insn_modes_c_header, emit_min_insn_modes_c): Likewise.
+ * genflags.c (main): Likewise.
+ * genpreds.c (write_tm_constrs_h, write_insn_preds_c): Likewise.
+ * opth-gen.awk: Likewise.
+ * gengtype.c (open_base_files): Make generated file include
+ "multi-target.h" and have START_TARGET_SPECIFIC markers.
+ (write_func_for_structure, write_roots): FIXME: effectively comment
+ for EXTRA_TARGET out except for creating the files.
+ (main): Emit END_TARGET_SPECIFIC markers.
+ * multi-target.h: New file.
+ * mkconfig.sh: Support function-like DEFINES.
+ In <target>/<target>-protos.h, wrap header files after multi-target.h
+ up to but excluding tm-preds.h in START_TARGET_SPECIFIC /
+ END_TARGET_SPECIFIC.
+ * tree.h (strip_float_extensions): Delete duplicate declaration.
+ * reload.c (push_secondary_reload): Cast arguments / return value of
+ targetm.secondary_reload from / to enum reg_class.`
+ (secondary_reload_class): Likewise.
+ * ira-costs.c (copy_cost): Likewise.
+ * reload1.c (emit_input_reload_insns): Likewise.
+ * tree-pass.h (rtl_dispatch_pass): New struct.
+ (TODO_arch_dispatch): New macro.
+ (pass_expand): Now has type rtl_dispatch_pass.
+ * tree-scalar-evolution.h (block_before_loop): Don't define for
+ EXTRA_TARGET.
+ (instantiate_parameters, get_chrec_loop): Likewise.
+ * target.h (struct gcc_target): Change branch_target_register_class
+ and ira_cover_classes to avoid the target-specific enum reg_class.
+ * bt-load.c (branch_target_register_class): Likewise.
+ * ddg.h, dbxout.h: Enclose declarations in namespace EXTRA_TARGET.
+ * expr.h, cselib.h, cfglayout.h, gimple.h: Likewise
+ * toplev.c (init_random_seed): No longer static.
+ (lang_dependent_init_target): Likewise.
+ (backend_init): No longer static. Do an EXTRA_TARGETS_CALL of self.
+ (lang_dependent_init): Likewise.
+ (target_reinit): Do an EXTRA_TARGETS_CALL of self.
+ * toplev.h (init_random_seed): Declare,
+ * machmode.def: Include "extra-modes.h" instead of EXTRA_MODES_FILE.
+ * configure.ac (with_extra_target_list): Add AC_SUBST statement.
+ * configure: Regenerate.
+ * function.c (cfun): Don't define for EXTRA_TARGET.
+ (init_function_start): Do an EXTRA_TARGETS_CALL of self.
+ * function.h (struct function): Add new member target_arch.
+ * genmodes.c (struct mode_date): New member target.
+ (blank_mode): Add initializer for target member.
+ (target): New variable.
+ (new_mode): Initialize target member.
+ (fixup_target_modes): New function.
+ (calc_wider_mode): Skip (other-)target modes.
+ (print_maybe_const_decl): Add declaration for const definition.
+ Don't expect %s in type anymore. Changed all users.
+ (emit_insn_modes_h): Prefix target modes names with the target name.
+ Don't include target modes in search for MIN_/MAX_ modes.
+ (emit_mode_wider): Skip target modes.
+ (emit_real_format_for_mode): Likewise.
+ (main): Call fixup_target_modes.
+ * emit-rtl.c (const_int_htab, const_double_htab): No longer static
+ * cfgexpand.c (pass_expand): Change type to struct rtl_dispatch_pass.
+ Set TODO_arch_dispatch in todo_flags_finish.
+ Initialize target_variants.
+ * ira.c (setup_cover_and_important_classes): Change type of
+ cover_classes to int *.
+ * README-multi-target: New file.
+ * rtl.h (struct function): Remove forward declaration.
+ (delete_insn): Move declaration to correct block.
+ TDEP-SOURCES: New file.
+ * Makefile.in: Use $(TA) prefix for taget-specific files that are
+ (compiled to be ) included in libbackend.a.
+ (gcc_config_arguments, TA, TARGET_NUM, CXXX, OBJS-rtl): Set.
+ (EXTRA_TARGETS, NUM_TARGETS, empty, space): Likewise.
+ (EXTRA_TARGET_RULES, enumerate): Likewise.
+ (out_object_file) [EXTRA_TARGET]: Set to $(TA)xout.o.
+ (OBJS-common): Use $(OBJS-rtl), and add EXTRA_TARGETS files.
+ (cs-tm.h): Add definitions to indicate total number of targets, the
+ ordinary number of current extra target, and a macro to call all
+ the extra targets to DEFINES.
+ (cs-tm_p.h): Add multi-target.h to HEADERS.
+ ($(out_object_file)): Use CXXX.
+ (build/%.o) [EXTRA_TARGET]: Add -DEXTRA_TARGET=$(EXTRA_TARGET).
+ (build/genmodes.o): Add output_target defintion to BUILD_CPPFLAGS.
+ Depend on extra-modes.h instead of on $(extra_modes_file).
+ (extra-modes.h, extra_modes_blurb, COMMON_ABI): New rules.
+ (intl/config.intl, make-OBJS-rtl): Likewise.
+ [EXTRA_TARGET]: Evaluate EXTRA_TARGET_RULES for each target in
+ EXTRA_TARGETS with substitutions.
+ * basic-block.h: Fix location of declarations to properly indicate
+ where the functions are defined.
+ * passes.c (init_optimization_passes) [!EXTRA_TARGET]: Do an
+ EXTRA_TARGETS_CALL of self.
+ (init_optimization_passes) [EXTRA_TARGET]: Initialize
+ pass_expand.target_variants array member for current target.
+ (execute_one_pass): Handle TODO_arch_dispatch flag.
+ * config/sh/sh.c (struct save_entry_s): Change type of mode to int.
+
+ * config/m32r/m32r-protos.h (m32r_compute_function_type): Make this
+ depend on RTX_CODE being defined instead of on TREE_CODE being defined.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 9a2343b47c9..d18416b4443 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@
@@ -149,11 +151,15 @@ coverageexts = .{gcda,gcno}
# off if they wish.
# LOOSE_WARN are the warning flags to use when compiling something
# which is only compiled with gcc, such as libgcc.
+# C_LOOSE_WARN is similar, but with C-only warnings.
# STRICT_WARN are the additional warning flags to
# apply to the back end and some front ends, which may be compiled
# with other compilers.
+# C_STRICT_WARN is similar, with C-only warnings.
LOOSE_WARN = @loose_warn@
+C_LOOSE_WARN = @c_loose_warn@
STRICT_WARN = @strict_warn@
+C_STRICT_WARN = @c_strict_warn@
# This is set by --enable-checking. The idea is to catch forgotten
# "extern" tags in header files.
@@ -169,7 +175,8 @@ VALGRIND_DRIVER_DEFINES = @valgrind_path_defines@
# This is how we control whether or not the additional warnings are applied.
.-warn = $(STRICT_WARN)
build-warn = $(STRICT_WARN)
-GCC_WARN_CFLAGS = $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG) $($@-warn)
+GCC_WARN_CFLAGS = $(LOOSE_WARN) $(C_LOOSE_WARN) $($(@D)-warn) $(if $(filter-out $(STRICT_WARN),$($(@D)-warn)),,$(C_STRICT_WARN)) $(NOCOMMON_FLAG) $($@-warn)
+GCC_WARN_CXXFLAGS = $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG) $($@-warn)
# These files are to have specific diagnostics suppressed, or are not to
# be subject to -Werror:
@@ -184,13 +191,16 @@ mips-tfile.o-warn = -Wno-error
# All warnings have to be shut off in stage1 if the compiler used then
# isn't gcc; configure determines that. WARN_CFLAGS will be either
-# $(GCC_WARN_CFLAGS), or nothing.
+# $(GCC_WARN_CFLAGS), or nothing. Similarly, WARN_CXXFLAGS will be
+# either $(GCC_WARN_CXXFLAGS), or nothing.
WARN_CFLAGS = @warn_cflags@
+WARN_CXXFLAGS = @warn_cxxflags@
CPPFLAGS = @CPPFLAGS@
AWK = @AWK@
CC = @CC@
+CXX = @CXX@
BISON = @BISON@
BISONFLAGS =
FLEX = @FLEX@
@@ -328,7 +338,7 @@ GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) ./xgcc -B./ -B$(build_tooldir)/bin/ -isyste
# This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
# It specifies -B./.
# It also specifies -isystem ./include to find, e.g., stddef.h.
-GCC_CFLAGS=$(CFLAGS_FOR_TARGET) $(INTERNAL_CFLAGS) $(T_CFLAGS) $(LOOSE_WARN) -Wold-style-definition $($@-warn) -isystem ./include $(TCFLAGS)
+GCC_CFLAGS=$(CFLAGS_FOR_TARGET) $(INTERNAL_CFLAGS) $(T_CFLAGS) $(LOOSE_WARN) $(C_LOOSE_WARN) -Wold-style-definition $($@-warn) -isystem ./include $(TCFLAGS)
# ---------------------------------------------------
# Programs which produce files for the target machine
@@ -411,14 +421,11 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
xmake_file=@xmake_file@
tmake_file=@tmake_file@
-out_file=$(srcdir)/config/@out_file@
-out_object_file=@out_object_file@
-md_file=$(srcdir)/config/@md_file@
-tm_file_list=@tm_file_list@
-tm_include_list=@tm_include_list@
-tm_defines=@tm_defines@
-tm_p_file_list=@tm_p_file_list@
-tm_p_include_list=@tm_p_include_list@
+
+#include the framgment with all the target specific definitions.
+#For multi-target configurations, this may be shared.
+include T-extra
+
build_xm_file_list=@build_xm_file_list@
build_xm_include_list=@build_xm_include_list@
build_xm_defines=@build_xm_defines@
@@ -453,7 +460,6 @@ target_cpu_default=@target_cpu_default@
GCC_THREAD_FILE=@thread_file@
OBJC_BOEHM_GC=@objc_boehm_gc@
GTHREAD_FLAGS=@gthread_flags@
-extra_modes_file=@extra_modes_file@
extra_opt_files=@extra_opt_files@
host_hook_obj=@out_host_hook_obj@
@@ -620,51 +626,6 @@ SHLIBUNWIND_INSTALL =
# nm flags to list global symbols in libgcc object files.
SHLIB_NM_FLAGS = -pg
-# List of extra executables that should be compiled for this target machine
-# that are used for compiling from source code to object code.
-# The rules for compiling them should be in the t-* file for the machine.
-EXTRA_PASSES =@extra_passes@
-
-# Like EXTRA_PASSES, but these are used when linking.
-EXTRA_PROGRAMS = @extra_programs@
-
-# List of extra object files that should be compiled for this target machine.
-# The rules for compiling them should be in the t-* file for the machine.
-EXTRA_PARTS = @extra_parts@
-
-# List of extra object files that should be compiled and linked with
-# compiler proper (cc1, cc1obj, cc1plus).
-EXTRA_OBJS = @extra_objs@
-
-# List of extra object files that should be compiled and linked with
-# the gcc driver.
-EXTRA_GCC_OBJS =@extra_gcc_objs@
-
-# List of additional header files to install.
-EXTRA_HEADERS =@extra_headers_list@
-
-# The configure script will set this to collect2$(exeext), except on a
-# (non-Unix) host which can not build collect2, for which it will be
-# set to empty.
-COLLECT2 = @collect2@
-
-# List of extra C and assembler files to add to static and shared libgcc2.
-# Assembler files should have names ending in `.asm'.
-LIB2FUNCS_EXTRA =
-
-# List of extra C and assembler files to add to static libgcc2.
-# Assembler files should have names ending in `.asm'.
-LIB2FUNCS_STATIC_EXTRA =
-
-# List of functions not to build from libgcc2.c.
-LIB2FUNCS_EXCLUDE =
-
-# Target sfp-machine.h file.
-SFP_MACHINE =
-
-# Program to convert libraries.
-LIBCONVERT =
-
# Control whether header files are installed.
INSTALL_HEADERS=install-headers install-mkheaders
@@ -736,6 +697,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
@@ -825,7 +790,7 @@ EMIT_RTL_H = emit-rtl.h
FLAGS_H = flags.h options.h
FUNCTION_H = function.h $(TREE_H) $(HASHTAB_H) varray.h
EXPR_H = expr.h insn-config.h $(FUNCTION_H) $(RTL_H) $(FLAGS_H) $(TREE_H) $(MACHMODE_H) $(EMIT_RTL_H)
-OPTABS_H = optabs.h insn-codes.h
+OPTABS_H = optabs.h insn-codes.h $(TARGET_H)
REGS_H = regs.h varray.h $(MACHMODE_H) $(OBSTACK_H) $(BASIC_BLOCK_H) $(FUNCTION_H)
RESOURCE_H = resource.h hard-reg-set.h
SCHED_INT_H = sched-int.h $(INSN_ATTR_H) $(BASIC_BLOCK_H) $(RTL_H) $(DF_H) vecprim.h
@@ -839,14 +804,17 @@ IPA_UTILS_H = ipa-utils.h $(TREE_H) $(CGRAPH_H)
IPA_REFERENCE_H = ipa-reference.h $(BITMAP_H) $(TREE_H)
IPA_TYPE_ESCAPE_H = ipa-type-escape.h $(TREE_H)
CGRAPH_H = cgraph.h $(TREE_H) $(BASIC_BLOCK_H)
-DF_H = df.h $(BITMAP_H) $(BASIC_BLOCK_H) alloc-pool.h
+DF_H = df.h $(BITMAP_H) $(BASIC_BLOCK_H) alloc-pool.h $(TIMEVAR_H)
RESOURCE_H = resource.h hard-reg-set.h $(DF_H)
DDG_H = ddg.h sbitmap.h $(DF_H)
GCC_H = gcc.h version.h
GGC_H = ggc.h gtype-desc.h statistics.h
TIMEVAR_H = timevar.h timevar.def
+# insn-attr.h uses insn-addr.h, which uses vecprim.h, which requires vec.h
+# and statistics.h.
INSN_ATTR_H = insn-attr.h $(INSN_ADDR_H) $(srcdir)/varray.h
-INSN_ADDR_H = $(srcdir)/insn-addr.h vecprim.h
+INSN_ADDR_H = $(srcdir)/insn-addr.h $(srcdir)/vecprim.h \
+ $(srcdir)/vec.h $(srcdir)/statistics.h
C_COMMON_H = c-common.h $(SPLAY_TREE_H) $(CPPLIB_H) $(GGC_H)
C_PRAGMA_H = c-pragma.h $(CPPLIB_H)
C_TREE_H = c-tree.h $(C_COMMON_H) $(TOPLEV_H) $(DIAGNOSTIC_H)
@@ -863,10 +831,11 @@ MKDEPS_H = $(srcdir)/../libcpp/include/mkdeps.h
SYMTAB_H = $(srcdir)/../libcpp/include/symtab.h $(OBSTACK_H)
CPP_ID_DATA_H = $(CPPLIB_H) $(srcdir)/../libcpp/include/cpp-id-data.h
CPP_INTERNAL_H = $(srcdir)/../libcpp/internal.h $(CPP_ID_DATA_H)
-TREE_DUMP_H = tree-dump.h $(SPLAY_TREE_H) tree-pass.h
+TREE_DUMP_H = tree-dump.h $(SPLAY_TREE_H) $(TREE_PASS_H)
TREE_FLOW_H = tree-flow.h tree-flow-inline.h tree-ssa-operands.h \
$(BITMAP_H) $(BASIC_BLOCK_H) hard-reg-set.h $(GIMPLE_H) \
$(HASHTAB_H) $(CGRAPH_H) $(IPA_REFERENCE_H)
+TREE_PASS_H = tree-pass.h $(TIMEVAR_H)
TREE_SSA_LIVE_H = tree-ssa-live.h $(PARTITION_H) vecprim.h
PRETTY_PRINT_H = pretty-print.h $(INPUT_H) $(OBSTACK_H)
DIAGNOSTIC_H = diagnostic.h diagnostic.def $(PRETTY_PRINT_H) options.h
@@ -883,6 +852,7 @@ EBIMAP_H = ebitmap.h sbitmap.h
IPA_PROP_H = ipa-prop.h $(TREE_H) vec.h $(CGRAPH_H)
GSTAB_H = gstab.h stab.def
BITMAP_H = bitmap.h $(HASHTAB_H) statistics.h
+TREE_VECTORIZER_H = target.h tree-vectorizer.h
#
# Now figure out from those variables how to compile and link.
@@ -898,6 +868,11 @@ INTERNAL_CFLAGS = -DIN_GCC @CROSS@
ALL_CFLAGS = $(T_CFLAGS) \
$(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@
+# The C++ version.
+ALL_CXXFLAGS = $(T_CFLAGS) \
+ $(CFLAGS) $(CXXFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) \
+ $(WARN_CXXFLAGS) @DEFS@
+
# Likewise. Put INCLUDES at the beginning: this way, if some autoconf macro
# puts -I options in CPPFLAGS, our include files in the srcdir will always
# win against random include files in /usr/include.
@@ -948,8 +923,15 @@ INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
$(CPPINC) $(GMPINC) $(DECNUMINC) \
$(PPLINC) $(CLOOGINC)
+# [gcc-in-cxx] Keep the .c extension, but compile with C++.
+CXXX := $(CXX) -x c++ -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS)
.c.o:
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION)
+ $(CXXX) $< $(OUTPUT_OPTION)
+ifdef EXTRA_TARGET
+ CXXX += -DEXTRA_TARGET=$(EXTRA_TARGET) -DEXTRA_TARGET_$(EXTRA_TARGET)
+$(TA)%.o : %.c
+ $(CXXX) $< $(OUTPUT_OPTION)
+endif
#
# Support for additional languages (other than C).
@@ -1041,7 +1023,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 \
@@ -1052,12 +1034,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 \
@@ -1069,67 +1048,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 \
- events.o \
except.o \
explow.o \
expmed.o \
expr.o \
- feature.o \
- feature-list.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 \
- 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 \
@@ -1138,12 +1087,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 \
@@ -1151,29 +1094,16 @@ OBJS-common = \
loop-unroll.o \
loop-unswitch.o \
lower-subreg.o \
- mcf.o \
- ml-feat.o \
mode-switching.o \
modulo-sched.o \
- omega.o \
- omp-low.o \
optabs.o \
options.o \
- opts-common.o \
opts.o \
- params.o \
- pass-manager.o \
passes.o \
- plugin-loader.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 \
reginfo.o \
@@ -1184,12 +1114,10 @@ OBJS-common = \
reload1.o \
reorg.o \
resource.o \
- rtl-error.o \
rtl-factoring.o \
rtl.o \
rtlanal.o \
rtlhooks.o \
- sbitmap.o \
sched-deps.o \
sched-ebb.o \
sched-rgn.o \
@@ -1200,16 +1128,79 @@ OBJS-common = \
sel-sched-dump.o \
sel-sched.o \
simplify-rtx.o \
- sparseset.o \
- sreal.o \
stack-ptr-mod.o \
- statistics.o \
stmt.o \
stor-layout.o \
- stringpool.o \
targhooks.o \
- timevar.o \
toplev.o \
+ tree-ssa-address.o \
+ var-tracking.o \
+ varasm.o \
+ vmsdbgout.o \
+ web.o
+
+OBJS-common = \
+ $(OBJS-rtl) \
+ $(foreach TA,$(EXTRA_TARGETS),$(addprefix $(TA)/$(TA)-,$(OBJS-rtl) $($(TA)-out_object_file))) \
+ $(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 \
+ events.o \
+ feature.o \
+ feature-list.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 \
+ gtype-desc.o \
+ hooks.o \
+ intl.o \
+ lambda-code.o \
+ lambda-mat.o \
+ lambda-trans.o \
+ langhooks.o \
+ lcm.o \
+ lists.o \
+ mcf.o \
+ ml-feat.o \
+ omega.o \
+ omp-low.o \
+ opts-common.o \
+ params.o \
+ pass-manager.o \
+ plugin-loader.o \
+ pointer-set.o \
+ pretty-print.o \
+ print-tree.o \
+ profile.o \
+ real.o \
+ rtl-error.o \
+ sbitmap.o \
+ sparseset.o \
+ sreal.o \
+ statistics.o \
+ stringpool.o \
+ timevar.o \
tracer.o \
tree-affine.o \
tree-call-cdce.o \
@@ -1239,7 +1230,6 @@ OBJS-common = \
tree-scalar-evolution.o \
tree-sra.o \
tree-switch-conversion.o \
- tree-ssa-address.o \
tree-ssa-alias.o \
tree-ssa-ccp.o \
tree-ssa-coalesce.o \
@@ -1286,13 +1276,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.
@@ -1338,10 +1324,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) \
@@ -1522,14 +1508,20 @@ 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)) \
+ TARGET_SCOPE_=$(subst -,_,$(target_noncanonical)):: \
+ $(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
@@ -1626,7 +1618,7 @@ libbackend.a: $(OBJS@onestep@)
# and CC is `gcc'. It is renamed to `gcc' when it is installed.
xgcc$(exeext): $(GCC_OBJS) gccspec.o version.o intl.o prefix.o \
version.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GCC_OBJS) gccspec.o \
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ $(GCC_OBJS) gccspec.o \
intl.o prefix.o version.o $(EXTRA_GCC_OBJS) $(LIBS)
# cpp is to cpp0 as gcc is to cc1.
@@ -1634,7 +1626,7 @@ xgcc$(exeext): $(GCC_OBJS) gccspec.o version.o intl.o prefix.o \
# instead of gccspec.o.
cpp$(exeext): $(GCC_OBJS) cppspec.o version.o intl.o prefix.o \
version.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GCC_OBJS) cppspec.o \
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ $(GCC_OBJS) cppspec.o \
intl.o prefix.o version.o $(EXTRA_GCC_OBJS) $(LIBS)
# Dump a specs file to make -B./ read these specs over installed ones.
@@ -1651,7 +1643,7 @@ gcc-cross$(exeext): xgcc$(exeext)
dummy-checksum.o : dummy-checksum.c
cc1-dummy$(exeext): $(C_OBJS) dummy-checksum.o $(BACKEND) $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) dummy-checksum.o \
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) dummy-checksum.o \
$(BACKEND) $(LIBS) $(BACKENDLIBS)
cc1-checksum.c : cc1-dummy$(exeext) build/genchecksum$(build_exeext)
@@ -1660,7 +1652,7 @@ cc1-checksum.c : cc1-dummy$(exeext) build/genchecksum$(build_exeext)
cc1-checksum.o : cc1-checksum.c
cc1$(exeext): $(C_OBJS) cc1-checksum.o $(BACKEND) $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) cc1-checksum.o \
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) cc1-checksum.o \
$(BACKEND) $(LIBS) $(BACKENDLIBS)
#
@@ -1864,9 +1856,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
-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) \
@@ -1877,13 +1869,13 @@ COLLECT2_OBJS = collect2.o tlink.o intl.o version.o
COLLECT2_LIBS = @COLLECT2_LIBS@
collect2$(exeext): $(COLLECT2_OBJS) $(LIBDEPS)
# Don't try modifying collect2 (aka ld) in place--it might be linking this.
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o T$@ \
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o T$@ \
$(COLLECT2_OBJS) $(LIBS) $(COLLECT2_LIBS)
mv -f T$@ $@
collect2.o : collect2.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) intl.h \
$(OBSTACK_H) $(DEMANGLE_H) collect2.h version.h
- $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ $(CXX) $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) \
-DTARGET_MACHINE=\"$(target_noncanonical)\" \
-c $(srcdir)/collect2.c $(OUTPUT_OPTION)
@@ -1910,14 +1902,14 @@ c-opts.o : c-opts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_INLINE_H) $(DIAGNOSTIC_H) intl.h debug.h $(C_COMMON_H) \
opts.h options.h $(MKDEPS_H) incpath.h cppdefault.h $(TARGET_H) \
$(TM_P_H) $(VARRAY_H)
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ $(CXX) -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) \
$< $(OUTPUT_OPTION) @TARGET_SYSTEM_ROOT_DEFINE@
c-cppbuiltin.o : c-cppbuiltin.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) version.h $(C_COMMON_H) $(C_PRAGMA_H) $(FLAGS_H) \
$(TOPLEV_H) output.h except.h $(REAL_H) $(TARGET_H) $(TM_P_H) \
$(BASEVER) debug.h
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) -DBASEVER=$(BASEVER_s) \
+ $(CXX) -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) -DBASEVER=$(BASEVER_s) \
$< $(OUTPUT_OPTION)
# A file used by all variants of C and some other languages.
@@ -1942,7 +1934,7 @@ c-dump.o : c-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
c-pch.o : c-pch.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(CPPLIB_H) $(TREE_H) \
$(C_COMMON_H) output.h $(TOPLEV_H) $(C_PRAGMA_H) $(GGC_H) debug.h \
langhooks.h $(FLAGS_H) hosthooks.h version.h $(TARGET_H) opts.h
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ $(CXX) -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) \
-DHOST_MACHINE=\"$(host)\" -DTARGET_MACHINE=\"$(target)\" \
$< $(OUTPUT_OPTION)
@@ -1968,13 +1960,13 @@ gcc.o: gcc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) intl.h multilib.h \
Makefile $(lang_specs_files) specs.h prefix.h $(GCC_H) $(FLAGS_H) \
configargs.h $(OBSTACK_H) opts.h
(SHLIB_LINK='$(SHLIB_LINK)'; \
- $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ $(CXX) $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) \
$(DRIVER_DEFINES) \
-c $(srcdir)/gcc.c $(OUTPUT_OPTION))
gccspec.o: gccspec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H)
(SHLIB_LINK='$(SHLIB_LINK)'; \
- $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ $(CXX) $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) \
$(DRIVER_DEFINES) \
-c $(srcdir)/gccspec.c $(OUTPUT_OPTION))
@@ -1994,9 +1986,11 @@ s-options: $(ALL_OPT_FILES) Makefile $(srcdir)/opt-gather.awk
$(SHELL) $(srcdir)/../move-if-change tmp-optionlist optionlist
$(STAMP) s-options
-options.c: optionlist $(srcdir)/opt-functions.awk $(srcdir)/optc-gen.awk
- $(AWK) -f $(srcdir)/opt-functions.awk -f $(srcdir)/optc-gen.awk \
- -v header_name="config.h system.h coretypes.h tm.h" < $< > $@
+options.c: optionlist $(srcdir)/opt-functions.awk $(srcdir)/optc-gen.awk \
+ $(INSN_ATTR_H)
+ $(AWK) -f $(srcdir)/opt-functions.awk -f $(srcdir)/optc-gen.awk -v \
+ header_name="config.h system.h coretypes.h tm.h rtl.h insn-attr.h" \
+ < $< > $@
options.h: s-options-h ; @true
s-options-h: optionlist $(srcdir)/opt-functions.awk $(srcdir)/opth-gen.awk
@@ -2009,7 +2003,7 @@ options.o: options.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TARGET_H) $(FLAGS_H)
$(TM_H) opts.h intl.h
gcc-options.o: options.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) opts.h intl.h
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(OUTPUT_OPTION) -DGCC_DRIVER options.c
+ $(CXX) -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(OUTPUT_OPTION) -DGCC_DRIVER options.c
dumpvers: dumpvers.c
@@ -2018,7 +2012,7 @@ version.o: version.c version.h $(REVISION) $(DATESTAMP) $(BASEVER) $(DEVPHASE)
else
version.o: version.c version.h $(DATESTAMP) $(BASEVER) $(DEVPHASE)
endif
- $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ $(CXX) $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) \
-DBASEVER=$(BASEVER_s) -DDATESTAMP=$(DATESTAMP_s) \
-DREVISION=$(REVISION_s) \
-DDEVPHASE=$(DEVPHASE_s) -DPKGVERSION=$(PKGVERSION_s) \
@@ -2050,7 +2044,7 @@ stringpool.o: stringpool.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
prefix.o: prefix.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) prefix.h \
Makefile $(BASEVER)
- $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ $(CXX) $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) \
-DPREFIX=\"$(prefix)\" -DBASEVER=$(BASEVER_s) \
-c $(srcdir)/prefix.c $(OUTPUT_OPTION)
@@ -2070,17 +2064,17 @@ tree.o : tree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(OBSTACK_H) pointer-set.h fixed-value.h
tree-dump.o: tree-dump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) langhooks.h $(TOPLEV_H) $(SPLAY_TREE_H) $(TREE_DUMP_H) \
- tree-iterator.h tree-pass.h $(DIAGNOSTIC_H) $(REAL_H) fixed-value.h
+ tree-iterator.h $(TREE_PASS_H) $(DIAGNOSTIC_H) $(REAL_H) fixed-value.h
tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(RTL_H) $(EXPR_H) $(FLAGS_H) $(PARAMS_H) $(INPUT_H) insn-config.h \
$(VARRAY_H) $(HASHTAB_H) $(TOPLEV_H) langhooks.h $(TREE_INLINE_H) $(CGRAPH_H) \
intl.h $(FUNCTION_H) $(GGC_H) $(GIMPLE_H) \
debug.h $(DIAGNOSTIC_H) except.h $(TREE_FLOW_H) tree-iterator.h tree-mudflap.h \
- $(IPA_PROP_H) value-prof.h tree-pass.h $(TARGET_H) $(INTEGRATE_H)
+ $(IPA_PROP_H) value-prof.h $(TREE_PASS_H) $(TARGET_H) $(INTEGRATE_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)
-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)
@@ -2088,19 +2082,19 @@ tree-ssa-structalias.o: tree-ssa-structalias.c tree-ssa-structalias.h \
$(SYSTEM_H) $(CONFIG_H) coretypes.h $(TM_H) $(GGC_H) $(OBSTACK_H) $(BITMAP_H) \
$(FLAGS_H) $(RTL_H) $(TM_P_H) hard-reg-set.h $(BASIC_BLOCK_H) output.h \
$(DIAGNOSTIC_H) $(TREE_H) $(C_COMMON_H) $(TREE_FLOW_H) $(TREE_INLINE_H) varray.h \
- $(C_TREE_H) $(GIMPLE_H) $(HASHTAB_H) $(FUNCTION_H) $(CGRAPH_H) tree-pass.h \
+ $(C_TREE_H) $(GIMPLE_H) $(HASHTAB_H) $(FUNCTION_H) $(CGRAPH_H) $(TREE_PASS_H) \
$(TIMEVAR_H) alloc-pool.h $(SPLAY_TREE_H) $(PARAMS_H) gt-tree-ssa-structalias.h \
$(CGRAPH_H) $(ALIAS_H) pointer-set.h
tree-ssa.o : tree-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \
$(TOPLEV_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
- $(TREE_DUMP_H) langhooks.h tree-pass.h $(BASIC_BLOCK_H) $(BITMAP_H) \
+ $(TREE_DUMP_H) langhooks.h $(TREE_PASS_H) $(BASIC_BLOCK_H) $(BITMAP_H) \
$(FLAGS_H) $(GGC_H) hard-reg-set.h $(HASHTAB_H) pointer-set.h \
$(GIMPLE_H) $(TREE_INLINE_H) $(VARRAY_H)
tree-into-ssa.o : tree-into-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) output.h $(DIAGNOSTIC_H) \
$(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- langhooks.h domwalk.h tree-pass.h $(GGC_H) $(PARAMS_H) $(BASIC_BLOCK_H) \
+ langhooks.h domwalk.h $(TREE_PASS_H) $(GGC_H) $(PARAMS_H) $(BASIC_BLOCK_H) \
$(BITMAP_H) $(CFGLOOP_H) $(FLAGS_H) hard-reg-set.h $(HASHTAB_H) \
$(GIMPLE_H) $(TREE_INLINE_H) $(VARRAY_H) vecprim.h
tree-ssa-ter.o : tree-ssa-ter.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
@@ -2111,59 +2105,61 @@ tree-ssa-coalesce.o : tree-ssa-coalesce.c $(TREE_FLOW_H) $(CONFIG_H) \
$(TREE_SSA_LIVE_H) $(BITMAP_H) $(FLAGS_H) $(HASHTAB_H) $(TOPLEV_H)
tree-outof-ssa.o : tree-outof-ssa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- tree-pass.h $(TREE_SSA_LIVE_H) $(BASIC_BLOCK_H) $(BITMAP_H) $(GGC_H) $(TOPLEV_H)
+ $(TREE_PASS_H) $(TREE_SSA_LIVE_H) $(BASIC_BLOCK_H) $(BITMAP_H) $(GGC_H) \
+ $(TOPLEV_H)
tree-ssa-dse.o : tree-ssa-dse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(TREE_H) $(RTL_H) $(TM_P_H) $(BASIC_BLOCK_H) \
- $(TREE_FLOW_H) tree-pass.h $(TREE_DUMP_H) domwalk.h $(FLAGS_H) \
+ $(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_DUMP_H) domwalk.h $(FLAGS_H) \
$(DIAGNOSTIC_H) $(TIMEVAR_H) langhooks.h
tree-ssa-forwprop.o : tree-ssa-forwprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(TREE_H) $(RTL_H) $(TM_P_H) $(BASIC_BLOCK_H) \
- $(TREE_FLOW_H) tree-pass.h $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
+ $(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
langhooks.h $(FLAGS_H) $(GIMPLE_H)
tree-ssa-phiprop.o : tree-ssa-phiprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(TREE_H) $(RTL_H) $(TM_P_H) $(BASIC_BLOCK_H) \
- $(TREE_FLOW_H) tree-pass.h $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
+ $(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
langhooks.h $(FLAGS_H)
tree-ssa-ifcombine.o : tree-ssa-ifcombine.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(TREE_H) $(BASIC_BLOCK_H) \
- $(TREE_FLOW_H) tree-pass.h $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(TIMEVAR_H)
+ $(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(TIMEVAR_H)
tree-ssa-phiopt.o : tree-ssa-phiopt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(TREE_H) $(RTL_H) $(TM_P_H) $(BASIC_BLOCK_H) \
- $(TREE_FLOW_H) tree-pass.h $(TREE_DUMP_H) langhooks.h $(FLAGS_H) \
+ $(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_DUMP_H) langhooks.h $(FLAGS_H) \
$(DIAGNOSTIC_H) $(TIMEVAR_H) pointer-set.h domwalk.h
tree-nrv.o : tree-nrv.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(RTL_H) $(FUNCTION_H) $(BASIC_BLOCK_H) $(EXPR_H) \
- $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TREE_DUMP_H) tree-pass.h \
+ $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TREE_DUMP_H) $(TREE_PASS_H) \
langhooks.h
tree-ssa-copy.o : tree-ssa-copy.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h $(DIAGNOSTIC_H) \
$(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- $(BASIC_BLOCK_H) tree-pass.h langhooks.h tree-ssa-propagate.h $(FLAGS_H)
+ $(BASIC_BLOCK_H) $(TREE_PASS_H) langhooks.h tree-ssa-propagate.h $(FLAGS_H)
tree-ssa-propagate.o : tree-ssa-propagate.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h \
$(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
- $(TREE_DUMP_H) $(BASIC_BLOCK_H) tree-pass.h langhooks.h \
+ $(TREE_DUMP_H) $(BASIC_BLOCK_H) $(TREE_PASS_H) langhooks.h \
tree-ssa-propagate.h vec.h value-prof.h gt-tree-ssa-propagate.h $(FLAGS_H) \
$(VARRAY_H) $(GIMPLE_H)
tree-ssa-dom.o : tree-ssa-dom.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h $(DIAGNOSTIC_H) \
$(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- $(BASIC_BLOCK_H) domwalk.h tree-pass.h $(FLAGS_H) langhooks.h \
+ $(BASIC_BLOCK_H) domwalk.h $(TREE_PASS_H) $(FLAGS_H) langhooks.h \
tree-ssa-propagate.h $(CFGLOOP_H) $(PARAMS_H) $(REAL_H)
tree-ssa-uncprop.o : tree-ssa-uncprop.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h \
$(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
- $(TREE_DUMP_H) $(BASIC_BLOCK_H) domwalk.h tree-pass.h $(FLAGS_H) \
+ $(TREE_DUMP_H) $(BASIC_BLOCK_H) domwalk.h $(TREE_PASS_H) $(FLAGS_H) \
langhooks.h tree-ssa-propagate.h $(REAL_H)
tree-ssa-threadedge.o : tree-ssa-threadedge.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(FLAGS_H) $(RTL_H) $(TM_P_H) $(GGC_H) \
$(BASIC_BLOCK_H) $(CFGLOOP_H) output.h $(EXPR_H) \
$(FUNCTION_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TREE_DUMP_H) $(TREE_FLOW_H) \
- domwalk.h $(REAL_H) tree-pass.h tree-ssa-propagate.h langhooks.h $(PARAMS_H)
+ domwalk.h $(REAL_H) $(TREE_PASS_H) tree-ssa-propagate.h langhooks.h \
+ $(PARAMS_H)
tree-ssa-threadupdate.o : tree-ssa-threadupdate.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h \
$(DIAGNOSTIC_H) $(FUNCTION_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- $(BASIC_BLOCK_H) $(FLAGS_H) tree-pass.h $(CFGLOOP_H)
+ $(BASIC_BLOCK_H) $(FLAGS_H) $(TREE_PASS_H) $(CFGLOOP_H)
tree-ssanames.o : tree-ssanames.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(VARRAY_H) $(GGC_H) $(TREE_FLOW_H)
tree-phinodes.o : tree-phinodes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
@@ -2175,49 +2171,49 @@ tree-ssa-live.o : tree-ssa-live.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
$(TREE_SSA_LIVE_H) $(BITMAP_H) $(TOPLEV_H) debug.h $(FLAGS_H)
tree-ssa-copyrename.o : tree-ssa-copyrename.c $(TREE_FLOW_H) $(CONFIG_H) \
- $(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) tree-pass.h \
- $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_SSA_LIVE_H) $(BASIC_BLOCK_H) \
- $(BITMAP_H) $(FLAGS_H) $(HASHTAB_H) langhooks.h $(GIMPLE_H) \
- $(TREE_INLINE_H) $(GIMPLE_H)
+ $(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) \
+ $(TREE_PASS_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_SSA_LIVE_H) \
+ $(BASIC_BLOCK_H) $(BITMAP_H) $(FLAGS_H) $(HASHTAB_H) langhooks.h \
+ $(GIMPLE_H) $(TREE_INLINE_H)
tree-ssa-pre.o : tree-ssa-pre.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(FIBHEAP_H) \
- $(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) langhooks.h $(CFGLOOP_H) \
- alloc-pool.h $(BASIC_BLOCK_H) $(BITMAP_H) $(HASHTAB_H) $(GIMPLE_H) \
- $(TREE_INLINE_H) tree-iterator.h tree-ssa-sccvn.h $(PARAMS_H) \
+ $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) langhooks.h \
+ $(CFGLOOP_H) alloc-pool.h $(BASIC_BLOCK_H) $(BITMAP_H) $(HASHTAB_H) \
+ $(GIMPLE_H) $(TREE_INLINE_H) tree-iterator.h tree-ssa-sccvn.h $(PARAMS_H) \
$(DBGCNT_H)
tree-ssa-sccvn.o : tree-ssa-sccvn.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(FIBHEAP_H) \
- $(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) $(CFGLOOP_H) \
+ $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) $(CFGLOOP_H) \
alloc-pool.h $(BASIC_BLOCK_H) $(BITMAP_H) langhooks.h $(HASHTAB_H) $(GIMPLE_H) \
$(TREE_INLINE_H) tree-iterator.h tree-ssa-propagate.h tree-ssa-sccvn.h \
$(PARAMS_H)
tree-vrp.o : tree-vrp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
- $(TREE_FLOW_H) tree-pass.h $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(GGC_H) \
+ $(TREE_FLOW_H) $(TREE_PASS_H) $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(GGC_H) \
$(BASIC_BLOCK_H) tree-ssa-propagate.h $(FLAGS_H) $(TREE_DUMP_H) \
$(CFGLOOP_H) tree-chrec.h $(TIMEVAR_H) $(TOPLEV_H) intl.h
tree-cfg.o : tree-cfg.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) $(FLAGS_H) output.h \
$(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
- $(TREE_DUMP_H) except.h langhooks.h $(CFGLOOP_H) tree-pass.h \
+ $(TREE_DUMP_H) except.h langhooks.h $(CFGLOOP_H) $(TREE_PASS_H) \
$(CFGLAYOUT_H) $(BASIC_BLOCK_H) hard-reg-set.h $(TOPLEV_H) \
value-prof.h tree-ssa-propagate.h $(TREE_INLINE_H)
tree-cfgcleanup.o : tree-cfgcleanup.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) $(FLAGS_H) output.h \
$(DIAGNOSTIC_H) $(TOPLEV_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
- $(TREE_DUMP_H) except.h langhooks.h $(CFGLOOP_H) tree-pass.h \
+ $(TREE_DUMP_H) except.h langhooks.h $(CFGLOOP_H) $(TREE_PASS_H) \
$(CFGLAYOUT_H) $(BASIC_BLOCK_H) hard-reg-set.h $(HASHTAB_H) $(TOPLEV_H) \
tree-ssa-propagate.h tree-scalar-evolution.h
-rtl-factoring.o : rtl-factoring.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
+$(TA)rtl-factoring.o : rtl-factoring.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
coretypes.h $(TM_H) $(BASIC_BLOCK_H) $(RESOURCE_H) $(GGC_H) $(REGS_H) \
- $(PARAMS_H) $(EXPR_H) addresses.h $(TM_P_H) tree-pass.h $(TREE_FLOW_H) \
+ $(PARAMS_H) $(EXPR_H) addresses.h $(TM_P_H) $(TREE_PASS_H) $(TREE_FLOW_H) \
$(TIMEVAR_H) output.h $(DF_H)
tree-tailcall.o : tree-tailcall.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(FUNCTION_H) $(TM_H) coretypes.h \
- $(TREE_DUMP_H) $(DIAGNOSTIC_H) except.h tree-pass.h $(FLAGS_H) langhooks.h \
- $(BASIC_BLOCK_H) hard-reg-set.h $(DBGCNT_H)
+ $(TREE_DUMP_H) $(DIAGNOSTIC_H) except.h $(TREE_PASS_H) $(FLAGS_H) \
+ langhooks.h $(BASIC_BLOCK_H) hard-reg-set.h $(DBGCNT_H)
tree-ssa-sink.o : tree-ssa-sink.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
- $(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) alloc-pool.h \
+ $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) alloc-pool.h \
$(BASIC_BLOCK_H) $(BITMAP_H) $(CFGLOOP_H) $(FIBHEAP_H) $(HASHTAB_H) \
langhooks.h $(REAL_H) $(GIMPLE_H) $(TREE_INLINE_H) tree-iterator.h
tree-nested.o: tree-nested.c $(CONFIG_H) $(SYSTEM_H) $(TM_H) $(TREE_H) \
@@ -2227,7 +2223,7 @@ tree-nested.o: tree-nested.c $(CONFIG_H) $(SYSTEM_H) $(TM_H) $(TREE_H) \
tree-if-conv.o: tree-if-conv.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(FLAGS_H) $(TIMEVAR_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) \
$(CFGLOOP_H) $(RTL_H) $(C_COMMON_H) tree-chrec.h $(TREE_DATA_REF_H) \
- $(SCEV_H) tree-pass.h $(DIAGNOSTIC_H) $(TARGET_H) $(TREE_DUMP_H) \
+ $(SCEV_H) $(TREE_PASS_H) $(DIAGNOSTIC_H) $(TARGET_H) $(TREE_DUMP_H) \
$(VARRAY_H)
tree-iterator.o : tree-iterator.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
coretypes.h $(GGC_H) tree-iterator.h $(GIMPLE_H) gt-tree-iterator.h
@@ -2235,93 +2231,94 @@ tree-dfa.o : tree-dfa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h $(DIAGNOSTIC_H) \
$(TREE_INLINE_H) $(HASHTAB_H) pointer-set.h $(FLAGS_H) $(FUNCTION_H) \
$(TIMEVAR_H) convert.h $(TM_H) coretypes.h langhooks.h $(TREE_DUMP_H) \
- tree-pass.h $(PARAMS_H) $(CGRAPH_H) $(BASIC_BLOCK_H) hard-reg-set.h \
+ $(TREE_PASS_H) $(PARAMS_H) $(CGRAPH_H) $(BASIC_BLOCK_H) hard-reg-set.h \
$(GIMPLE_H)
tree-ssa-operands.o : tree-ssa-operands.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TREE_INLINE_H) \
- $(FLAGS_H) $(FUNCTION_H) $(TM_H) $(TIMEVAR_H) tree-pass.h $(TOPLEV_H) \
+ $(FLAGS_H) $(FUNCTION_H) $(TM_H) $(TIMEVAR_H) $(TREE_PASS_H) $(TOPLEV_H) \
coretypes.h langhooks.h $(IPA_REFERENCE_H)
tree-eh.o : tree-eh.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_H) $(FLAGS_H) $(FUNCTION_H) except.h langhooks.h \
- $(GGC_H) tree-pass.h coretypes.h $(TIMEVAR_H) $(TM_P_H) pointer-set.h \
+ $(GGC_H) $(TREE_PASS_H) coretypes.h $(TIMEVAR_H) $(TM_P_H) pointer-set.h \
$(TREE_DUMP_H) $(TREE_INLINE_H) tree-iterator.h $(TOPLEV_H)
tree-ssa-loop.o : tree-ssa-loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(RTL_H) $(TM_P_H) hard-reg-set.h $(BASIC_BLOCK_H) output.h \
- $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) tree-pass.h $(TIMEVAR_H) \
+ $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TREE_PASS_H) $(TIMEVAR_H) \
$(CFGLOOP_H) $(FLAGS_H) $(TREE_INLINE_H) tree-scalar-evolution.h
tree-ssa-loop-unswitch.o : tree-ssa-loop-unswitch.c $(TREE_FLOW_H) \
$(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) \
domwalk.h $(PARAMS_H) output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) \
- coretypes.h $(TREE_DUMP_H) tree-pass.h $(BASIC_BLOCK_H) hard-reg-set.h \
+ coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(BASIC_BLOCK_H) hard-reg-set.h \
$(TREE_INLINE_H)
tree-ssa-address.o : tree-ssa-address.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) \
output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- tree-pass.h $(FLAGS_H) $(TREE_INLINE_H) $(RECOG_H) insn-config.h $(EXPR_H) \
- gt-tree-ssa-address.h $(GGC_H) tree-affine.h
+ $(TREE_PASS_H) $(FLAGS_H) $(TREE_INLINE_H) $(RECOG_H) insn-config.h \
+ $(EXPR_H) gt-tree-ssa-address.h $(GGC_H) tree-affine.h
tree-ssa-loop-niter.o : tree-ssa-loop-niter.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(PARAMS_H) \
$(TREE_INLINE_H) output.h $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- $(TOPLEV_H) $(FLAGS_H) tree-pass.h $(SCEV_H) $(TREE_DATA_REF_H) $(BASIC_BLOCK_H) \
- $(GGC_H) hard-reg-set.h tree-chrec.h intl.h
+ $(TOPLEV_H) $(FLAGS_H) $(TREE_PASS_H) $(SCEV_H) $(TREE_DATA_REF_H) \
+ $(BASIC_BLOCK_H) $(GGC_H) hard-reg-set.h tree-chrec.h intl.h
tree-ssa-loop-ivcanon.o : tree-ssa-loop-ivcanon.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(PARAMS_H) \
$(TREE_INLINE_H) output.h $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- $(FLAGS_H) tree-pass.h $(SCEV_H) $(BASIC_BLOCK_H) $(GGC_H) hard-reg-set.h \
- tree-chrec.h
+ $(FLAGS_H) $(TREE_PASS_H) $(SCEV_H) $(BASIC_BLOCK_H) $(GGC_H) \
+ hard-reg-set.h tree-chrec.h
tree-ssa-loop-ch.o : tree-ssa-loop-ch.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(TREE_INLINE_H) \
output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- tree-pass.h $(FLAGS_H) $(BASIC_BLOCK_H) hard-reg-set.h
+ $(TREE_PASS_H) $(FLAGS_H) $(BASIC_BLOCK_H) hard-reg-set.h
tree-ssa-loop-prefetch.o: tree-ssa-loop-prefetch.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(EXPR_H) \
output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- tree-pass.h $(GGC_H) $(RECOG_H) insn-config.h $(HASHTAB_H) $(SCEV_H) \
+ $(TREE_PASS_H) $(GGC_H) $(RECOG_H) insn-config.h $(HASHTAB_H) $(SCEV_H) \
$(CFGLOOP_H) $(PARAMS_H) langhooks.h $(BASIC_BLOCK_H) hard-reg-set.h \
tree-chrec.h $(TOPLEV_H) langhooks.h $(TREE_INLINE_H) $(TREE_DATA_REF_H) \
$(OPTABS_H)
tree-predcom.o: tree-predcom.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TM_P_H) \
$(CFGLOOP_H) $(TREE_FLOW_H) $(GGC_H) $(TREE_DATA_REF_H) $(SCEV_H) \
- $(PARAMS_H) $(DIAGNOSTIC_H) tree-pass.h $(TM_H) coretypes.h tree-affine.h \
- $(TREE_INLINE_H)
+ $(PARAMS_H) $(DIAGNOSTIC_H) $(TREE_PASS_H) $(TM_H) coretypes.h \
+ tree-affine.h $(TREE_INLINE_H)
tree-ssa-loop-ivopts.o : tree-ssa-loop-ivopts.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) $(EXPR_H) \
output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- tree-pass.h $(GGC_H) $(RECOG_H) insn-config.h $(HASHTAB_H) $(SCEV_H) \
+ $(TREE_PASS_H) $(GGC_H) $(RECOG_H) insn-config.h $(HASHTAB_H) $(SCEV_H) \
$(CFGLOOP_H) $(PARAMS_H) langhooks.h $(BASIC_BLOCK_H) hard-reg-set.h \
- tree-chrec.h $(VARRAY_H) tree-affine.h pointer-set.h $(TARGET_H)
+ tree-chrec.h $(VARRAY_H) tree-affine.h pointer-set.h $(TARGET_H) \
+ gt-tree-ssa-loop-ivopts.h
tree-affine.o : tree-affine.c tree-affine.h $(CONFIG_H) pointer-set.h \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) hard-reg-set.h $(GIMPLE_H) \
output.h $(DIAGNOSTIC_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(FLAGS_H)
tree-ssa-loop-manip.o : tree-ssa-loop-manip.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) $(TM_P_H) hard-reg-set.h \
$(BASIC_BLOCK_H) output.h $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) \
- $(TIMEVAR_H) $(CFGLOOP_H) tree-pass.h $(CFGLAYOUT_H) tree-scalar-evolution.h \
- $(PARAMS_H) $(TREE_INLINE_H)
+ $(TIMEVAR_H) $(CFGLOOP_H) $(TREE_PASS_H) $(CFGLAYOUT_H) \
+ tree-scalar-evolution.h $(PARAMS_H) $(TREE_INLINE_H)
tree-ssa-loop-im.o : tree-ssa-loop-im.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) domwalk.h \
$(PARAMS_H) output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
- $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) $(REAL_H) $(BASIC_BLOCK_H) \
+ $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) $(REAL_H) $(BASIC_BLOCK_H) \
hard-reg-set.h pointer-set.h tree-affine.h tree-ssa-propagate.h
tree-ssa-math-opts.o : tree-ssa-math-opts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(TM_H) $(FLAGS_H) $(TREE_H) $(TREE_FLOW_H) $(REAL_H) $(TIMEVAR_H) tree-pass.h \
- alloc-pool.h $(BASIC_BLOCK_H) $(TARGET_H)
+ $(TM_H) $(FLAGS_H) $(TREE_H) $(TREE_FLOW_H) $(REAL_H) $(TIMEVAR_H) \
+ $(TREE_PASS_H) alloc-pool.h $(BASIC_BLOCK_H) $(TARGET_H)
tree-ssa-alias.o : tree-ssa-alias.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) $(TREE_INLINE_H) $(FLAGS_H) \
$(FUNCTION_H) $(TIMEVAR_H) convert.h $(TM_H) coretypes.h langhooks.h \
- $(TREE_DUMP_H) tree-pass.h $(PARAMS_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \
+ $(TREE_DUMP_H) $(TREE_PASS_H) $(PARAMS_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \
hard-reg-set.h $(GIMPLE_H) vec.h tree-ssa-structalias.h \
$(IPA_TYPE_ESCAPE_H) vecprim.h pointer-set.h alloc-pool.h
tree-ssa-reassoc.o : tree-ssa-reassoc.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
- $(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) tree-iterator.h\
+ $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) tree-iterator.h\
$(BASIC_BLOCK_H) $(GIMPLE_H) $(TREE_INLINE_H) vec.h langhooks.h \
alloc-pool.h pointer-set.h $(CFGLOOP_H)
tree-optimize.o : tree-optimize.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) hard-reg-set.h $(EXPR_H) $(GGC_H) output.h \
$(DIAGNOSTIC_H) $(BASIC_BLOCK_H) $(FLAGS_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
$(TREE_DUMP_H) $(TOPLEV_H) $(FUNCTION_H) langhooks.h $(FLAGS_H) $(CGRAPH_H) \
- $(TREE_INLINE_H) tree-mudflap.h $(GGC_H) graph.h $(CGRAPH_H) tree-pass.h \
+ $(TREE_INLINE_H) tree-mudflap.h $(GGC_H) graph.h $(CGRAPH_H) $(TREE_PASS_H) \
$(CFGLOOP_H) except.h
c-gimplify.o : c-gimplify.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
@@ -2340,93 +2337,95 @@ gimple-iterator.o : gimple-iterator.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
gimple-low.o : gimple-low.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
$(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) $(VARRAY_H) langhooks.h \
$(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
- except.h $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) tree-pass.h \
+ except.h $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) $(TREE_PASS_H) \
$(HASHTAB_H) $(TOPLEV.H) tree-iterator.h
omp-low.o : omp-low.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(RTL_H) $(GIMPLE_H) $(TREE_INLINE_H) langhooks.h $(DIAGNOSTIC_H) \
- $(TREE_FLOW_H) $(TIMEVAR_H) $(FLAGS_H) $(EXPR_H) $(TOPLEV_H) tree-pass.h \
+ $(TREE_FLOW_H) $(TIMEVAR_H) $(FLAGS_H) $(EXPR_H) $(TOPLEV_H) $(TREE_PASS_H) \
$(GGC_H) except.h $(SPLAY_TREE_H) $(OPTABS_H) $(CFGLOOP_H) \
- tree-iterator.h
+ tree-iterator.h gt-omp-low.h
tree-browser.o : tree-browser.c tree-browser.def $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TREE_INLINE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) \
$(TM_H) coretypes.h
omega.o : omega.c omega.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- errors.h $(GGC_H) $(TREE_H) $(DIAGNOSTIC_H) varray.h tree-pass.h $(PARAMS_H)
+ errors.h $(GGC_H) $(TREE_H) $(DIAGNOSTIC_H) varray.h $(TREE_PASS_H) \
+ $(PARAMS_H)
tree-chrec.o: tree-chrec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(GGC_H) $(TREE_H) $(REAL_H) $(SCEV_H) tree-pass.h $(PARAMS_H) \
+ $(GGC_H) $(TREE_H) $(REAL_H) $(SCEV_H) $(TREE_PASS_H) $(PARAMS_H) \
$(DIAGNOSTIC_H) $(CFGLOOP_H) $(TREE_FLOW_H)
tree-scalar-evolution.o: tree-scalar-evolution.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(GGC_H) $(TREE_H) $(REAL_H) $(RTL_H) \
$(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) \
- $(TIMEVAR_H) $(CFGLOOP_H) $(SCEV_H) tree-pass.h $(FLAGS_H) tree-chrec.h \
+ $(TIMEVAR_H) $(CFGLOOP_H) $(SCEV_H) $(TREE_PASS_H) $(FLAGS_H) tree-chrec.h \
gt-tree-scalar-evolution.h
tree-data-ref.o: tree-data-ref.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(GGC_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \
$(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \
- $(TREE_DATA_REF_H) $(SCEV_H) tree-pass.h tree-chrec.h langhooks.h
+ $(TREE_DATA_REF_H) $(SCEV_H) $(TREE_PASS_H) tree-chrec.h langhooks.h
graphite.o: graphite.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(GGC_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TOPLEV_H) \
$(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) $(GIMPLE_H) domwalk.h \
- $(TREE_DATA_REF_H) $(SCEV_H) tree-pass.h tree-chrec.h graphite.h pointer-set.h \
+ $(TREE_DATA_REF_H) $(SCEV_H) $(TREE_PASS_H) tree-chrec.h graphite.h pointer-set.h \
value-prof.h
tree-vect-analyze.o: tree-vect-analyze.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(OPTABS_H) $(TREE_H) $(RECOG_H) $(BASIC_BLOCK_H) \
$(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \
- tree-vectorizer.h $(TREE_DATA_REF_H) $(SCEV_H) $(EXPR_H) tree-chrec.h \
+ $(TREE_VECTORIZER_H) $(TREE_DATA_REF_H) $(SCEV_H) $(EXPR_H) tree-chrec.h \
$(TOPLEV_H) $(RECOG_H)
tree-vect-patterns.o: tree-vect-patterns.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(TREE_H) $(TARGET_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \
$(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) $(EXPR_H) \
- $(OPTABS_H) $(PARAMS_H) $(TREE_DATA_REF_H) tree-vectorizer.h $(RECOG_H) $(TOPLEV_H)
+ $(OPTABS_H) $(PARAMS_H) $(TREE_DATA_REF_H) $(TREE_VECTORIZER_H) $(RECOG_H) $(TOPLEV_H)
tree-vect-transform.o: tree-vect-transform.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(GGC_H) $(OPTABS_H) $(RECOG_H) $(TREE_H) $(RTL_H) \
$(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) \
- $(TIMEVAR_H) $(CFGLOOP_H) $(TARGET_H) tree-pass.h $(EXPR_H) \
- tree-vectorizer.h $(TREE_DATA_REF_H) $(SCEV_H) langhooks.h $(TOPLEV_H) \
+ $(TIMEVAR_H) $(CFGLOOP_H) $(TARGET_H) $(TREE_PASS_H) $(EXPR_H) \
+ $(TREE_VECTORIZER_H) $(TREE_DATA_REF_H) $(SCEV_H) langhooks.h $(TOPLEV_H) \
tree-chrec.h
tree-vectorizer.o: tree-vectorizer.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(OPTABS_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) \
$(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \
- tree-pass.h $(EXPR_H) $(RECOG_H) tree-vectorizer.h $(TREE_DATA_REF_H) $(SCEV_H) \
- $(INPUT_H) $(TARGET_H) $(CFGLAYOUT_H) $(TOPLEV_H) tree-chrec.h langhooks.h
+ $(TREE_PASS_H) $(EXPR_H) $(RECOG_H) $(TREE_VECTORIZER_H) $(TREE_DATA_REF_H) \
+ $(SCEV_H) $(INPUT_H) $(TARGET_H) $(CFGLAYOUT_H) $(TOPLEV_H) tree-chrec.h \
+ langhooks.h
tree-loop-linear.o: tree-loop-linear.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(OPTABS_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) \
$(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \
- tree-pass.h $(TREE_DATA_REF_H) $(SCEV_H) $(EXPR_H) $(LAMBDA_H) \
+ $(TREE_PASS_H) $(TREE_DATA_REF_H) $(SCEV_H) $(EXPR_H) $(LAMBDA_H) \
$(TARGET_H) tree-chrec.h $(OBSTACK_H)
tree-loop-distribution.o: tree-loop-distribution.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(GGC_H) $(OPTABS_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) \
$(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \
- tree-pass.h $(TREE_DATA_REF_H) $(SCEV_H) $(EXPR_H) \
- $(TARGET_H) tree-chrec.h langhooks.h tree-vectorizer.h
+ $(TREE_PASS_H) $(TREE_DATA_REF_H) $(SCEV_H) $(EXPR_H) \
+ $(TARGET_H) tree-chrec.h langhooks.h $(TREE_VECTORIZER_H)
tree-parloops.o: tree-parloops.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_FLOW_H) $(TREE_H) $(RTL_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) $(GGC_H) \
- $(DIAGNOSTIC_H) tree-pass.h $(SCEV_H) langhooks.h gt-tree-parloops.h \
- tree-vectorizer.h
+ $(DIAGNOSTIC_H) $(TREE_PASS_H) $(SCEV_H) langhooks.h gt-tree-parloops.h \
+ $(TREE_VECTORIZER_H)
tree-stdarg.o: tree-stdarg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(TREE_H) $(FUNCTION_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) tree-pass.h \
+ $(TREE_H) $(FUNCTION_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_PASS_H) \
tree-stdarg.h $(TARGET_H) langhooks.h
tree-object-size.o: tree-object-size.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(TM_H) $(TREE_H) $(TOPLEV_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) tree-pass.h \
+ $(TM_H) $(TREE_H) $(TOPLEV_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_PASS_H) \
tree-ssa-propagate.h
gimple.o : gimple.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
$(GGC_H) $(GIMPLE_H) $(GIMPLE_H) $(DIAGNOSTIC_H) gt-gimple.h \
$(TREE_FLOW_H) value-prof.h $(FLAGS_H)
gimple-pretty-print.o : gimple-pretty-print.c $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(DIAGNOSTIC_H) $(REAL_H) $(HASHTAB_H) $(TREE_FLOW_H) \
- $(TM_H) coretypes.h tree-pass.h $(GIMPLE_H) value-prof.h
+ $(TM_H) coretypes.h $(TREE_PASS_H) $(GIMPLE_H) value-prof.h
tree-mudflap.o : $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TREE_INLINE_H) \
$(GIMPLE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) langhooks.h tree-mudflap.h \
- $(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(CGRAPH_H) $(GGC_H) \
+ $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(CGRAPH_H) $(GGC_H) \
gt-tree-mudflap.h $(BASIC_BLOCK_H) $(FLAGS_H) $(FUNCTION_H) hard-reg-set.h \
$(RTL_H) $(TM_P_H) $(TREE_FLOW_H) $(TOPLEV.H) $(GIMPLE_H) tree-iterator.h
tree-nomudflap.o : $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TREE_INLINE_H) \
$(C_TREE_H) $(C_COMMON_H) $(GIMPLE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) \
output.h $(VARRAY_H) langhooks.h tree-mudflap.h $(TM_H) coretypes.h \
- $(GGC_H) gt-tree-mudflap.h tree-pass.h $(TOPLEV_H)
+ $(GGC_H) gt-tree-mudflap.h $(TREE_PASS_H) $(TOPLEV_H)
tree-pretty-print.o : tree-pretty-print.c $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(DIAGNOSTIC_H) $(REAL_H) $(HASHTAB_H) $(TREE_FLOW_H) \
- $(TM_H) coretypes.h tree-iterator.h tree-chrec.h langhooks.h tree-pass.h \
+ $(TM_H) coretypes.h tree-iterator.h tree-chrec.h langhooks.h $(TREE_PASS_H) \
value-prof.h fixed-value.h output.h
fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(FLAGS_H) $(REAL_H) $(TOPLEV_H) $(HASHTAB_H) $(EXPR_H) $(RTL_H) \
@@ -2435,18 +2434,18 @@ fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
diagnostic.o : diagnostic.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) version.h $(TM_P_H) $(FLAGS_H) $(INPUT_H) $(TOPLEV_H) intl.h \
$(DIAGNOSTIC_H) langhooks.h $(LANGHOOKS_DEF_H) diagnostic.def opts.h
-opts.o : opts.c opts.h options.h $(TOPLEV_H) $(CONFIG_H) $(SYSTEM_H) \
+$(TA)opts.o : opts.c opts.h options.h $(TOPLEV_H) $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TREE_H) $(TM_H) langhooks.h $(GGC_H) $(EXPR_H) $(RTL_H) \
output.h $(DIAGNOSTIC_H) $(TM_P_H) $(INSN_ATTR_H) intl.h $(TARGET_H) \
- $(FLAGS_H) $(PARAMS_H) tree-pass.h $(DBGCNT_H) debug.h varray.h
+ $(FLAGS_H) $(PARAMS_H) $(TREE_PASS_H) $(DBGCNT_H) debug.h varray.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
-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) \
@@ -2454,10 +2453,9 @@ toplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
value-prof.h $(PARAMS_H) $(TM_P_H) reload.h ira.h dwarf2asm.h $(TARGET_H) \
langhooks.h insn-flags.h $(CFGLAYOUT_H) $(CFGLOOP_H) hosthooks.h \
$(CGRAPH_H) $(COVERAGE_H) alloc-pool.h $(GGC_H) $(INTEGRATE_H) \
- opts.h params.def tree-mudflap.h $(REAL_H) tree-pass.h $(GIMPLE_H) \
+ opts.h params.def tree-mudflap.h $(REAL_H) $(TREE_PASS_H) $(GIMPLE_H) \
highlev-plugin-internal.h
- $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
- -DTARGET_NAME=\"$(target_noncanonical)\" \
+ $(CXXX) -DTARGET_NAME=\"$(target_noncanonical)\" \
-c $(srcdir)/toplev.c $(OUTPUT_OPTION)
pass-manager.o : pass-manager.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TOPLEV_H) \
@@ -2477,14 +2475,14 @@ feature-list.o : feature-list.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
plugin-loader.o : plugin-loader.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(HASHTAB_H) \
$(TOPLEV_H) $(GCC_H) options.h highlev-plugin-internal.h feature-internal.h
-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) \
graph.h except.h $(REGS_H) $(TIMEVAR_H) value-prof.h \
$(PARAMS_H) $(TM_P_H) reload.h dwarf2asm.h $(TARGET_H) \
langhooks.h insn-flags.h $(CFGLAYOUT_H) $(REAL_H) $(CFGLOOP_H) \
- hosthooks.h $(CGRAPH_H) $(COVERAGE_H) tree-pass.h $(TREE_DUMP_H) \
+ hosthooks.h $(CGRAPH_H) $(COVERAGE_H) $(TREE_PASS_H) $(TREE_DUMP_H) \
$(GGC_H) $(INTEGRATE_H) $(CPPLIB_H) opts.h $(TREE_FLOW_H) $(TREE_INLINE_H) \
gt-passes.h $(DF_H) $(PREDICT_H) highlev-plugin-internal.h pass-manager.h
@@ -2497,99 +2495,103 @@ 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)
-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 $(C_PRAGMA_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 \
gt-function.h $(TARGET_H) $(BASIC_BLOCK_H) $(INTEGRATE_H) $(PREDICT_H) \
- tree-pass.h $(DF_H) $(TIMEVAR_H) vecprim.h
+ $(TREE_PASS_H) $(DF_H) $(TIMEVAR_H) vecprim.h
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) \
+ $(TREE_PASS_H) $(TREE_DUMP_H) $(HASHTAB_H) statistics.h $(TM_H) $(FUNCTION_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) $(MACHMODE_H) \
$(REGS_H) alloc-pool.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)
-expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+ $(TARGET_H) $(TM_P_H) $(TREE_PASS_H) $(TIMEVAR_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
-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) \
+ $(TREE_PASS_H) $(DF_H) $(DIAGNOSTIC_H) vecprim.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)
-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 \
+ $(HASHTAB_H) $(TM_P_H) debug.h langhooks.h $(TREE_PASS_H) gt-emit-rtl.h \
$(REAL_H) $(DF_H)
real.o : real.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(TOPLEV_H) $(TM_P_H) $(REAL_H) dfp.h
@@ -2597,17 +2599,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) \
+ gt-integrate.h $(GGC_H) $(TREE_PASS_H) $(DF_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) \
+ $(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)
@@ -2618,240 +2621,247 @@ cgraph.o : cgraph.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
cgraphunit.o : cgraphunit.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) langhooks.h $(TREE_INLINE_H) $(TOPLEV_H) $(FLAGS_H) $(GGC_H) \
$(TARGET_H) $(CGRAPH_H) intl.h pointer-set.h $(FUNCTION_H) $(GIMPLE_H) \
- $(TREE_FLOW_H) tree-pass.h $(C_COMMON_H) debug.h $(DIAGNOSTIC_H) \
+ $(TREE_FLOW_H) $(TREE_PASS_H) $(C_COMMON_H) debug.h $(DIAGNOSTIC_H) \
$(FIBHEAP_H) output.h $(PARAMS_H) $(RTL_H) $(TIMEVAR_H) $(IPA_PROP_H) \
gt-cgraphunit.h tree-iterator.h
cgraphbuild.o : cgraphbuild.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) langhooks.h $(CGRAPH_H) intl.h pointer-set.h $(GIMPLE_H) \
- $(TREE_FLOW_H) tree-pass.h
+ $(TREE_FLOW_H) $(TREE_PASS_H)
varpool.o : varpool.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(CGRAPH_H) langhooks.h $(DIAGNOSTIC_H) $(HASHTAB_H) \
$(GGC_H) $(TIMEVAR_H) debug.h $(TARGET_H) output.h $(GIMPLE_H) \
$(TREE_FLOW_H) gt-varpool.h
ipa.o : ipa.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(CGRAPH_H) \
- tree-pass.h $(TIMEVAR_H)
+ $(TREE_PASS_H) $(TIMEVAR_H)
ipa-prop.o : ipa-prop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
langhooks.h $(GGC_H) $(TARGET_H) $(CGRAPH_H) $(IPA_PROP_H) $(DIAGNOSTIC_H) \
- $(TREE_FLOW_H) $(TM_H) tree-pass.h $(FLAGS_H) $(TREE_H) $(TREE_INLINE_H) \
+ $(TREE_FLOW_H) $(TM_H) $(TREE_PASS_H) $(FLAGS_H) $(TREE_H) $(TREE_INLINE_H) \
$(TIMEVAR_H)
ipa-cp.o : ipa-cp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(TREE_H) $(TARGET_H) $(CGRAPH_H) $(IPA_PROP_H) $(TREE_FLOW_H) tree-pass.h \
- $(FLAGS_H) $(TIMEVAR_H) $(DIAGNOSTIC_H) $(TREE_DUMP_H) $(TREE_INLINE_H)
+ $(TREE_H) $(TARGET_H) $(CGRAPH_H) $(IPA_PROP_H) $(TREE_FLOW_H) \
+ $(TREE_PASS_H) $(FLAGS_H) $(TIMEVAR_H) $(DIAGNOSTIC_H) $(TREE_DUMP_H) \
+ $(TREE_INLINE_H) $(FIBHEAP_H) $(PARAMS_H)
matrix-reorg.o : matrix-reorg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(RTL_H) $(C_TREE_H) $(TREE_INLINE_H) $(TREE_FLOW_H) \
tree-flow-inline.h langhooks.h $(HASHTAB_H) $(TOPLEV_H) $(FLAGS_H) $(GGC_H) \
debug.h $(TARGET_H) $(CGRAPH_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(PARAMS_H) \
$(FIBHEAP_H) $(C_COMMON_H) intl.h $(FUNCTION_H) $(BASIC_BLOCK_H) $(CFGLOOP_H) \
- tree-iterator.h tree-pass.h opts.h $(TREE_DATA_REF_H) tree-chrec.h \
+ tree-iterator.h $(TREE_PASS_H) opts.h $(TREE_DATA_REF_H) tree-chrec.h \
tree-scalar-evolution.h
ipa-inline.o : ipa-inline.c gt-ipa-inline.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) langhooks.h $(TREE_INLINE_H) $(FLAGS_H) $(CGRAPH_H) intl.h \
- $(DIAGNOSTIC_H) $(FIBHEAP_H) $(PARAMS_H) $(TIMEVAR_H) tree-pass.h \
+ $(DIAGNOSTIC_H) $(FIBHEAP_H) $(PARAMS_H) $(TIMEVAR_H) $(TREE_PASS_H) \
$(HASHTAB_H) $(COVERAGE_H) $(GGC_H) $(TREE_FLOW_H) $(RTL_H) $(IPA_PROP_H)
ipa-utils.o : ipa-utils.c $(IPA_UTILS_H) $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) $(TREE_INLINE_H) langhooks.h \
pointer-set.h $(GGC_H) $(C_COMMON_H) $(GIMPLE_H) \
- $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h $(TIMEVAR_H) $(DIAGNOSTIC_H)
+ $(CGRAPH_H) output.h $(FLAGS_H) $(TREE_PASS_H) $(TIMEVAR_H) $(DIAGNOSTIC_H)
ipa-reference.o : ipa-reference.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) $(TREE_INLINE_H) langhooks.h \
pointer-set.h $(GGC_H) $(IPA_REFERENCE_H) $(IPA_UTILS_H) $(C_COMMON_H) \
- $(GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h \
- $(TIMEVAR_H) $(DIAGNOSTIC_H) $(FUNCTION_H)
+ $(GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) $(TREE_PASS_H) \
+ $(TIMEVAR_H) $(DIAGNOSTIC_H) $(FUNCTION_H) gt-ipa-reference.h
ipa-pure-const.o : ipa-pure-const.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) $(TREE_INLINE_H) langhooks.h \
pointer-set.h $(GGC_H) $(IPA_UTILS_H) $(C_COMMON_H) $(TARGET_H) \
- $(GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h $(TIMEVAR_H) \
+ $(GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) $(TREE_PASS_H) $(TIMEVAR_H) \
$(DIAGNOSTIC_H)
ipa-type-escape.o : ipa-type-escape.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) $(TREE_INLINE_H) langhooks.h \
pointer-set.h $(GGC_H) $(IPA_TYPE_ESCAPE_H) $(IPA_UTILS_H) $(C_COMMON_H) \
- $(GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h \
+ $(GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) $(TREE_PASS_H) \
$(TIMEVAR_H) $(DIAGNOSTIC_H) $(FUNCTION_H)
ipa-struct-reorg.o: ipa-struct-reorg.c ipa-struct-reorg.h $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(GGC_H) $(TREE_H) $(RTL_H) $(GIMPLE_H) tree-inline.h \
$(TREE_FLOW_H) langhooks.h pointer-set.h $(HASHTAB_H) $(C_TREE_H) $(TOPLEV_H) \
$(FLAGS_H) debug.h $(TARGET_H) $(CGRAPH_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
$(PARAMS_H) $(FIBHEAP_H) intl.h $(FUNCTION_H) $(BASIC_BLOCK_H) tree-iterator.h \
- tree-pass.h opts.h $(IPA_TYPE_ESCAPE_H) $(TREE_DUMP_H) $(C_COMMON_H) \
+ $(TREE_PASS_H) opts.h $(IPA_TYPE_ESCAPE_H) $(TREE_DUMP_H) $(C_COMMON_H) \
$(GIMPLE_H)
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) \
+ $(HASHTAB_H) tree-iterator.h $(CGRAPH_H) $(TREE_PASS_H) gcov-io.c $(TM_P_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) cselib.h $(GGC_H) $(TM_P_H) \
- gt-cselib.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) \
+ $(EMIT_RTL_H) $(TOPLEV_H) output.h $(FUNCTION_H) cselib.h $(GGC_H) \
+ $(TM_P_H) gt-cselib.h $(PARAMS_H) alloc-pool.h $(HASHTAB_H) $(TARGET_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) \
+ 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) $(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) \
+ $(DBGCNT_H) dce.h $(TIMEVAR_H) $(TREE_PASS_H) $(DBGCNT_H) $(TM_P_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)
-web.o : web.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_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)
+$(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)
+$(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
-see.o : see.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+ $(DF_H) $(OBSTACK_H) $(TIMEVAR_H) $(TREE_PASS_H)
+$(TA)see.o : see.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h \
- $(DF_H) $(OBSTACK_H) $(TIMEVAR_H) tree-pass.h $(RECOG_H) $(EXPR_H) $(SPLAY_TREE_H) \
- $(HASHTAB_H) $(REGS_H) dce.h
-gcse.o : gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+ $(DF_H) $(OBSTACK_H) $(TIMEVAR_H) $(TREE_PASS_H) $(RECOG_H) $(EXPR_H) \
+ $(SPLAY_TREE_H) $(HASHTAB_H) $(REGS_H) dce.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) except.h gt-gcse.h $(TREE_H) cselib.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) \
+ intl.h $(OBSTACK_H) $(TREE_PASS_H) $(DF_H) $(DBGCNT_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)
+ output.h $(TREE_PASS_H) $(TIMEVAR_H) $(REAL_H) $(DF_H)
tree-ssa-dce.o : tree-ssa-dce.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
$(RTL_H) $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) \
- coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) $(BASIC_BLOCK_H) \
+ coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) $(BASIC_BLOCK_H) \
$(GGC_H) hard-reg-set.h $(OBSTACK_H) $(GIMPLE_H) $(CFGLOOP_H) \
tree-scalar-evolution.h
tree-call-cdce.o : tree-call-cdce.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
$(RTL_H) $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) \
- coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) $(BASIC_BLOCK_H) \
+ coretypes.h $(TREE_DUMP_H) $(TREE_PASS_H) $(FLAGS_H) $(BASIC_BLOCK_H) \
$(GGC_H) hard-reg-set.h $(OBSTACK_H) $(GIMPLE_H)
tree-ssa-ccp.o : tree-ssa-ccp.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h \
$(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
- $(TREE_DUMP_H) $(BASIC_BLOCK_H) tree-pass.h langhooks.h \
+ $(TREE_DUMP_H) $(BASIC_BLOCK_H) $(TREE_PASS_H) langhooks.h \
tree-ssa-propagate.h value-prof.h $(FLAGS_H) $(TARGET_H) $(TOPLEV_H)
tree-sra.o : tree-sra.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) \
$(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TREE_INLINE_H) \
$(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(GIMPLE_H) \
- langhooks.h tree-pass.h $(FLAGS_H) $(EXPR_H) $(BASIC_BLOCK_H) \
+ langhooks.h $(TREE_PASS_H) $(FLAGS_H) $(EXPR_H) $(BASIC_BLOCK_H) \
$(BITMAP_H) $(GGC_H) hard-reg-set.h $(OBSTACK_H) $(PARAMS_H) $(TARGET_H)
tree-switch-conversion.o : tree-switch-conversion.c $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TREE_INLINE_H) \
$(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(GIMPLE_H) \
- tree-pass.h $(FLAGS_H) $(EXPR_H) $(BASIC_BLOCK_H) output.h \
+ $(TREE_PASS_H) $(FLAGS_H) $(EXPR_H) $(BASIC_BLOCK_H) output.h \
$(GGC_H) $(OBSTACK_H) $(PARAMS_H) $(CPPLIB_H) $(PARAMS_H)
tree-complex.o : tree-complex.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
$(TM_H) $(RTL_H) $(REAL_H) $(FLAGS_H) $(TREE_FLOW_H) $(GIMPLE_H) \
- tree-iterator.h tree-pass.h tree-ssa-propagate.h $(DIAGNOSTIC_H)
+ tree-iterator.h $(TREE_PASS_H) tree-ssa-propagate.h $(DIAGNOSTIC_H)
tree-vect-generic.o : tree-vect-generic.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
- $(TM_H) $(TREE_FLOW_H) $(GIMPLE_H) tree-iterator.h tree-pass.h \
+ $(TM_H) $(TREE_FLOW_H) $(GIMPLE_H) tree-iterator.h $(TREE_PASS_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) \
+ $(TM_P_H) $(FLAGS_H) output.h $(TREE_PASS_H) $(PARAMS_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 \
+ $(TREE_PASS_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
+ $(REGS_H) $(EXPR_H) $(TIMEVAR_H) $(TREE_PASS_H)
profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) $(FUNCTION_H) \
$(TOPLEV_H) $(COVERAGE_H) $(TREE_FLOW_H) value-prof.h cfghooks.h \
- $(CFGLOOP_H) $(TIMEVAR_H) tree-pass.h profile.h
+ $(CFGLOOP_H) $(TIMEVAR_H) $(TREE_PASS_H) profile.h
mcf.o : mcf.c profile.h $(CONFIG_H) $(SYSTEM_H) $(TM_H) coretypes.h \
$(BASIC_BLOCK_H) output.h langhooks.h $(GCOV_IO_H) $(TREE_H)
tree-profile.o : tree-profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) \
$(FUNCTION_H) $(TOPLEV_H) $(COVERAGE_H) $(TREE_H) value-prof.h $(TREE_DUMP_H) \
- tree-pass.h $(TREE_FLOW_H) $(TIMEVAR_H) $(GGC_H) gt-tree-profile.h $(CGRAPH_H)
+ $(TREE_PASS_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(GGC_H) gt-tree-profile.h $(CGRAPH_H)
value-prof.o : value-prof.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(BASIC_BLOCK_H) hard-reg-set.h value-prof.h $(EXPR_H) output.h $(FLAGS_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) \
+ tree-flow-inline.h $(TIMEVAR_H) $(TREE_PASS_H) $(TOPLEV_H) pointer-set.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)
-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) \
+ $(EXPR_H) $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H) $(DBGCNT_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) \
+ $(HASHTAB_H) $(DF_H) $(CFGLOOP_H) $(TREE_FLOW_H) $(TREE_PASS_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) \
+ 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)
-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-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) \
+ output.h $(TOPLEV_H) $(FUNCTION_H) except.h $(TM_P_H) insn-config.h \
+ $(EXPR_H) $(CFGLAYOUT_H) $(CFGLOOP_H) $(OBSTACK_H) $(TARGET_H) $(TREE_H) \
+ $(TREE_PASS_H) $(DF_H) $(GGC_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)
-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)
+$(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) \
- $(DF_H) $(DBGCNT_H) dce.h
+ $(REGS_H) $(EMIT_RTL_H) $(CFGLAYOUT_H) $(TREE_PASS_H) $(CFGLOOP_H) \
+ $(EXPR_H) $(DF_H) $(DBGCNT_H) dce.h
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)
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) \
- $(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) \
+ coretypes.h $(TM_H) $(OBSTACK_H) $(TREE_PASS_H) $(TIMEVAR_H) $(FLAGS_H) \
+ $(DF_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)
+$(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)
@@ -2864,203 +2874,207 @@ 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) \
- $(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 \
- $(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
+$(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)
+$(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
bitmap.o : bitmap.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FLAGS_H) $(GGC_H) gt-bitmap.h $(BITMAP_H) $(OBSTACK_H) $(HASHTAB_H)
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)
-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)
-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 \
+ $(OBSTACK_H) $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H) $(DBGCNT_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) \
- addresses.h $(RECOG_H) reload.h $(EXPR_H) $(TOPLEV_H) $(TM_P_H) $(DF_H) \
- output.h ira.h gt-caller-save.h $(GGC_H)
-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) \
+ $(PARAMS_H) $(TIMEVAR_H) $(TREE_PASS_H) $(REAL_H) $(DBGCNT_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 ira.h gt-caller-save.h $(GGC_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)
+$(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) \
+ $(TIMEVAR_H) $(TARGET_H) $(TREE_PASS_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
-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 \
+ $(SPLAY_TREE_H) $(VARRAY_H) $(IPA_TYPE_ESCAPE_H) $(DF_H) $(TREE_PASS_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 \
- $(TM_H) $(TREE_H) $(RTL_H) $(REGS_H) $(EXPR_H) tree-pass.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)
-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) \
$(TARGET_H) $(RTL_H) insn-config.h $(RECOG_H) \
$(REGS_H) hard-reg-set.h $(FLAGS_H) errors.h \
$(EXPR_H) $(BASIC_BLOCK_H) $(TM_P_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) $(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) \
$(TARGET_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) \
$(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) $(PARAMS_H) \
- $(IRA_INT_H)
-ira-lives.o: ira-lives.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(IRA_INT_H) $(DF_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 \
$(TARGET_H) $(TM_H) $(RTL_H) $(RECOG_H) \
$(REGS_H) hard-reg-set.h $(FLAGS_H) $(OBSTACK_H) \
$(EXPR_H) $(BASIC_BLOCK_H) $(TOPLEV_H) $(TM_P_H) \
$(DF_H) $(IRA_INT_H) $(PARAMS_H) $(TIMEVAR_H) $(INTEGRATE_H) \
- tree-pass.h output.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)\
+ $(TREE_PASS_H) output.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 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) \
- $(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 \
+$(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 \
- $(PARAMS_H) $(DBGCNT_H)
-sched-deps.o : sched-deps.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_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)
+$(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 \
$(PARAMS_H) $(TM_P_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) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) tree-pass.h \
+ $(TM_P_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) \
+ $(REAL_H) $(TREE_PASS_H) $(INSN_ATTR_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) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) tree-pass.h \
+ $(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) $(TREE_PASS_H) \
$(SCHED_INT_H) $(GGC_H) $(TREE_H) $(LANGHOOKS_DEF_H) \
$(SEL_SCHED_IR_H) $(SEL_SCHED_DUMP_H) sel-sched.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 \
+ $(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)
-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) $(CFGLAYOUT_H) $(TIMEVAR_H) tree-pass.h \
- $(SCHED_INT_H) $(GGC_H) $(TREE_H) $(LANGHOOKS_DEF_H) $(SEL_SCHED_IR_H)
-final.o : final.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+ $(TM_P_H) $(TARGET_H) $(CFGLAYOUT_H) $(TIMEVAR_H) $(TREE_PASS_H) \
+ $(SCHED_INT_H) $(GGC_H) $(TREE_H) $(LANGHOOKS_DEF_H) $(SEL_SCHED_IR_H) \
+ $(CFGLOOP_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 \
+ 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)
-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) \
+ 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)
+ $(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) \
$(COVERAGE_H) $(SCEV_H) $(GGC_H) predict.def $(TIMEVAR_H) $(TREE_DUMP_H) \
- $(TREE_FLOW_H) tree-pass.h $(EXPR_H) pointer-set.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)
+ $(PARAMS_H) $(TOPLEV_H) $(TREE_PASS_H) $(DF_H)
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) \
+ $(TREE_PASS_H) $(TREE_FLOW_H) $(TREE_INLINE_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 \
+ $(GGC_H) alloc-pool.h $(FLAGS_H) $(OBSTACK_H) $(TREE_PASS_H) vecprim.h \
$(DF_H)
timevar.o : timevar.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TIMEVAR_H) $(FLAGS_H) intl.h $(TOPLEV_H) $(RTL_H) timevar.def
-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) \
+ addresses.h reload.h $(TOPLEV_H) $(TIMEVAR_H) $(TREE_PASS_H) $(DF_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) tree-pass.h \
- $(DF_H) $(DBGCNT_H)
+ $(REAL_H) $(OPTABS_H) $(CFGLOOP_H) hard-reg-set.h $(TIMEVAR_H) \
+ $(TREE_PASS_H) $(DF_H) $(DBGCNT_H)
lambda-mat.o : lambda-mat.c $(LAMBDA_H) $(GGC_H) $(SYSTEM_H) $(CONFIG_H) \
$(TM_H) coretypes.h $(TREE_H) $(TREE_FLOW_H)
lambda-trans.o: lambda-trans.c $(LAMBDA_H) $(GGC_H) $(SYSTEM_H) $(CONFIG_H) \
@@ -3069,7 +3083,7 @@ lambda-code.o: lambda-code.c $(LAMBDA_H) $(GGC_H) $(SYSTEM_H) $(CONFIG_H) \
$(TM_H) $(OPTABS_H) $(TREE_H) $(RTL_H) $(BASIC_BLOCK_H) \
$(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TIMEVAR_H) $(CFGLOOP_H) \
$(TREE_DATA_REF_H) $(SCEV_H) $(EXPR_H) coretypes.h $(TARGET_H) \
- tree-chrec.h tree-pass.h vec.h vecprim.h $(OBSTACK_H) pointer-set.h
+ tree-chrec.h $(TREE_PASS_H) vec.h vecprim.h $(OBSTACK_H) pointer-set.h
params.o : params.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(PARAMS_H) $(TOPLEV_H)
pointer-set.o: pointer-set.c pointer-set.h $(CONFIG_H) $(SYSTEM_H)
hooks.o: hooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(HOOKS_H)
@@ -3078,18 +3092,18 @@ 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)
+ $(EXPR_H) except.h $(REGS_H) $(TREE_PASS_H) $(DF_H)
-$(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) \
+$(TA)$(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) \
$(RTL_H) $(REGS_H) hard-reg-set.h insn-config.h conditions.h \
output.h $(INSN_ATTR_H) $(SYSTEM_H) $(TOPLEV_H) $(TARGET_H) libfuncs.h \
$(TARGET_DEF_H) $(FUNCTION_H) $(SCHED_INT_H) $(TM_P_H) $(EXPR_H) \
langhooks.h $(GGC_H) $(OPTABS_H) $(REAL_H) tm-constrs.h $(GIMPLE_H)
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
- $(out_file) $(OUTPUT_OPTION)
+ $(CXXX) $(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)
@@ -3108,7 +3122,7 @@ mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H) $(SYSTEM_H) coretypes.h \
libbackend.o : $(OBJS-common:.o=.c) $(out_file) \
insn-config.h insn-flags.h insn-codes.h insn-constants.h \
insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE) gcov-iov.h
- $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ $(CXX) $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) \
-DTARGET_NAME=\"$(target_noncanonical)\" \
-DLOCALEDIR=\"$(localedir)\" \
-c $(filter %.c,$^) -o $@ \
@@ -3122,8 +3136,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
@@ -3139,37 +3153,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
@@ -3183,9 +3198,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
@@ -3196,12 +3211,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 \
@@ -3261,13 +3276,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)
@@ -3277,16 +3292,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)
@@ -3300,7 +3315,7 @@ s-constrs-h: $(MD_DEPS) build/genpreds$(build_exeext)
$(STAMP) s-constrs-h
GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
- $(host_xm_file_list) \
+ $(host_xm_file_list) target-gtypes.h \
$(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \
$(srcdir)/alias.h $(srcdir)/coverage.c $(srcdir)/rtl.h \
$(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/varray.h $(srcdir)/libfuncs.h $(SYMTAB_H) \
@@ -3330,6 +3345,7 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
$(srcdir)/tree-iterator.c $(srcdir)/gimplify.c \
$(srcdir)/tree-chrec.h \
$(srcdir)/tree-scalar-evolution.c \
+ $(srcdir)/tree-ssa-loop-ivopts.c \
$(srcdir)/tree-ssa-operands.h \
$(srcdir)/tree-profile.c $(srcdir)/tree-nested.c \
$(srcdir)/varpool.c \
@@ -3378,7 +3394,8 @@ s-gtype: build/gengtype$(build_exeext) $(filter-out [%], $(GTFILES)) \
# How to compile object files to run on the build machine.
build/%.o : # dependencies provided by explicit rule later
- $(CC_FOR_BUILD) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) -o $@ $<
+ $(CC_FOR_BUILD) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) \
+ $(if $(EXTRA_TARGET),-DEXTRA_TARGET=$(EXTRA_TARGET)) -o $@ $<
# Header dependencies for the programs that generate source code.
# These are library modules...
@@ -3388,7 +3405,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)
@@ -3442,8 +3459,10 @@ 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
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) \
@@ -3455,6 +3474,131 @@ 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
+#Fixme: should take nore seps to make sure that we use a
+#uniform type and storage layout
+COMMON_ABI=target-types.h target-gtypes.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-TARGET/config.status THIS-TARGET/T-extra: intl/config.intl
+ -mkdir THIS-TARGET
+ cd THIS-TARGET \
+ && $(srcdir:.%=../.%)/configure --target=THIS-TARGET
+
+CURRENT_TARGET=THIS-TARGET-
+-include THIS-TARGET/T-extra
+
+THIS-TARGET/Makefile: THIS-TARGET/config.status Makefile
+ $(info THIS-TARGET/Makefile will be remade when needed.)
+# $(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) $(THIS-TARGET-out_object_file)) \
+$(addprefix THIS-TARGET/,$(THIS-TARGET-EXTRA_OBJS)) : 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.
+XTGT_COPY_FILES=\
+ $(addprefix THIS-TARGET/,extra-modes.h target-types.h)
+.PHONY: make-THIS-TARGET
+make-THIS-TARGET : THIS-TARGET/Makefile $(XTGT_COPY_FILES) \
+ THIS-TARGET/target-gtypes.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)'
+$(XTGT_COPY_FILES): THIS-TARGET/% : %
+ cp $< $@
+THIS-TARGET/target-gtypes.h: target-gtypes.h
+ sed 's/\(_ca\|_mf\)/THIS_TARGET&/' < $< > $@
+
+endef
+# EXTRA_TARGET_RULES
+
+.PHONY: make-OBJS-rtl
+make-OBJS-rtl: $(addprefix $(TA),$(OBJS-rtl) $(out_object_file)) $(EXTRA_OBJS);
+
+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
+
+ifndef TA
+extra-modes.h: Makefile T-extra $(foreach ta,$(EXTRA_TARGETS),$(ta)/T-extra)
+ echo target=\"$(subst -,_,$(target_noncanonical))\"\; > $@
+ $(foreach file,$(extra_modes_file),echo '#include "$(file)"' >> $@)
+ $(foreach ta,$(EXTRA_TARGETS),\
+ echo target='"$(subst -,_,$(ta))"'\; >> $@;\
+ $(foreach file,$($(ta)-extra_modes_file),\
+ echo '#include "$(file)"' >> $@;))
+ echo 'target = (const char *) 0;' >> $@
+ifdef EXTRA_TARGETS
+# ??? This generates a rather long header file to address one small
+# pernicious issue.
+# ??? config/h8300/h8300.h uses rtx_def*.
+target-types.h: Makefile T-extra $(foreach ta,$(EXTRA_TARGETS),$(ta)/T-extra $($(ta)-tm_include_list))
+ echo '#ifndef TARGET_TYPES_H' > $@
+ $(foreach ta,_ $(EXTRA_TARGETS:%=%-),\
+ ( echo 'namespace $(subst -,_,$(ta)) {';\
+ $(foreach file,$($(ta:%_=%)tm_include_list),\
+ echo '#include "$(file)"';)\
+ echo 'typedef CUMULATIVE_ARGS $(subst -,_,$(ta))cumulative_args;';\
+ echo 'typedef struct machine_function *$(subst -,_,$(ta))machine_function;';\
+ echo '}';\
+ echo 'using $(subst -,_,$(ta)::$(ta))cumulative_args;'; \
+ echo 'using $(subst -,_,$(ta)::$(ta))machine_function;') \
+ | cpp -I $(srcdir) >> $@;)
+ echo '' >> $@
+ echo 'typedef union {' >> $@
+ $(foreach num,$(call enumerate,_ $(EXTRA_TARGETS)),\
+ $(foreach ta,$(subst -,_,$(word $(num), _ $(EXTRA_TARGETS:%=%_))),\
+ echo ' $(ta)cumulative_args GTY ((tag ("$(num) - 1"))) \
+ $(ta)ca;' >> $@;)) \
+ echo ' void *GTY ((default, skip)) align_dummy[1];' >> $@
+ echo '} cumulative_args_u;' >> $@
+ echo '' >> $@
+ echo 'typedef union {' >> $@
+ $(foreach num,$(call enumerate,_ $(EXTRA_TARGETS)),\
+ $(foreach ta,$(subst -,_,$(word $(num), _ $(EXTRA_TARGETS:%=%_))),\
+ echo ' $(ta)machine_function GTY ((tag ("$(num) - 1"))) \
+ $(ta)mf;' >> $@;)) \
+ echo ' void *GTY ((default, skip)) align_dummy[1];' >> $@
+ echo '} machine_function_u;' >> $@
+ echo '#endif /* TARGET_TYPES_H */' >> $@
+target-gtypes.h: build/gentargtype$(build_exeext)
+ $(RUN_GEN) build/gentargtype$(build_exeext) > $@
+else # !EXTRA_TARGETS
+# using struct instead of union makes this gty-safe.
+target-types.h target-gtypes.h: Makefile
+ echo 'typedef union GTY (())' > $@
+ echo ' {' >> $@
+ echo ' CUMULATIVE_ARGS GTY ((tag ("TARGET_NUM"))) _ca;' >> $@
+ echo ' } cumulative_args_u;' >> $@
+ echo 'typedef union GTY (())' >> $@
+ echo ' {' >> $@
+ echo ' struct machine_function GTY ((tag ("TARGET_NUM"))) _mf;' >> $@
+ echo ' } machine_function_u;' >> $@
+endif # !EXTRA_TARGETS
+EXTRA_OBJS := $(EXTRA_OBJS) \
+ $(foreach ta,$(EXTRA_TARGETS),$(addprefix $(ta)/,$($(ta)-EXTRA_OBJS)))
+endif
+
# Compile the programs that generate insn-* from the machine description.
# They are compiled with $(CC_FOR_BUILD), and associated libraries,
# since they need to run on this machine
@@ -3486,7 +3630,7 @@ gengtype-lex.c : gengtype-lex.l
#
# Remake internationalization support.
intl.o: intl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) intl.h Makefile
- $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ $(CXX) $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) \
-DLOCALEDIR=\"$(localedir)\" \
-c $(srcdir)/intl.c $(OUTPUT_OPTION)
@@ -3508,7 +3652,7 @@ PREPROCESSOR_DEFINES = \
cppdefault.o: cppdefault.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
cppdefault.h Makefile
- $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ $(CXX) $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) \
$(PREPROCESSOR_DEFINES) \
-c $(srcdir)/cppdefault.c $(OUTPUT_OPTION)
@@ -3520,22 +3664,22 @@ proto: config.status protoize$(exeext) unprotoize$(exeext) SYSCALLS.c.X
PROTO_OBJS = intl.o version.o cppdefault.o errors.o
protoize$(exeext): protoize.o $(PROTO_OBJS) $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ protoize.o $(PROTO_OBJS) $(LIBS)
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ protoize.o $(PROTO_OBJS) $(LIBS)
unprotoize$(exeext): unprotoize.o $(PROTO_OBJS) $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ unprotoize.o $(PROTO_OBJS) $(LIBS)
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ unprotoize.o $(PROTO_OBJS) $(LIBS)
protoize.o: protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) Makefile version.h cppdefault.h intl.h
(SHLIB_LINK='$(SHLIB_LINK)'; \
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ $(CXX) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
$(DRIVER_DEFINES) \
$(srcdir)/protoize.c $(OUTPUT_OPTION))
unprotoize.o: protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) \
$(SYSTEM_H) coretypes.h $(TM_H) Makefile version.h cppdefault.h intl.h
(SHLIB_LINK='$(SHLIB_LINK)'; \
- $(CC) -c -DUNPROTOIZE $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ $(CXX) -c -DUNPROTOIZE $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
$(DRIVER_DEFINES) \
$(srcdir)/protoize.c $(OUTPUT_OPTION))
@@ -3602,10 +3746,10 @@ gcov-dump.o: gcov-dump.c gcov-io.c $(GCOV_IO_H) $(SYSTEM_H) coretypes.h \
GCOV_OBJS = gcov.o intl.o version.o errors.o
gcov$(exeext): $(GCOV_OBJS) $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) $(GCOV_OBJS) $(LIBS) -o $@
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) $(GCOV_OBJS) $(LIBS) -o $@
GCOV_DUMP_OBJS = gcov-dump.o version.o errors.o
gcov-dump$(exeext): $(GCOV_DUMP_OBJS) $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) $(GCOV_DUMP_OBJS) $(LIBS) -o $@
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) $(GCOV_DUMP_OBJS) $(LIBS) -o $@
#
# Build the include directories. The stamp files are stmp-* rather than
# s-* so that mostlyclean does not force the include directory to
@@ -3795,6 +3939,16 @@ build/fix-header.o: fix-header.c $(OBSTACK_H) scan.h errors.h \
build/scan-decls.o: scan-decls.c scan.h $(CPPLIB_H) $(BCONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H)
+# Use -fno-exceptions to work around incompatibility with RHEL 3 stdio.h
+# vasprintf declaration and libiberty vasprintf declaration.
+build/gentargtype.o: $(srcdir)/gentargtype.cc target-types.h $(SYSTEM_H)
+ $(CXX) -c -fno-exceptions \
+ $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wc++-compat,$(BUILD_CFLAGS)) \
+ $(BUILD_CPPFLAGS) -o $@ $<
+
+build/gentargtype$(build_exeext): build/gentargtype.o $(BUILD_LIBDEPS)
+ $(CXX) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o $@ $<
+
# stmp-fixproto depends on this, not on fix-header directly.
# The idea is to make sure fix-header gets built,
# but not rerun fixproto after each stage
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/T-extra.in b/gcc/T-extra.in
new file mode 100644
index 00000000000..8c9c124749a
--- /dev/null
+++ b/gcc/T-extra.in
@@ -0,0 +1,62 @@
+# $(CURRENT_TARGET) is empty if these are definitions for the Makfile in the
+# same directory, but it is set to the target name if this makefile fragment
+# is used from a parent directory in a multi-targte configuration.
+
+$(CURRENT_TARGET)out_file=$(srcdir)/config/@out_file@
+$(CURRENT_TARGET)out_object_file=@out_object_file@
+$(CURRENT_TARGET)md_file=$(srcdir)/config/@md_file@
+$(CURRENT_TARGET)tm_file_list=@tm_file_list@
+$(CURRENT_TARGET)tm_include_list=@tm_include_list@
+$(CURRENT_TARGET)tm_defines=@tm_defines@
+$(CURRENT_TARGET)tm_p_file_list=@tm_p_file_list@
+$(CURRENT_TARGET)tm_p_include_list=@tm_p_include_list@
+
+$(CURRENT_TARGET)extra_modes_file=@extra_modes_file@
+
+# List of extra executables that should be compiled for this target machine
+# that are used for compiling from source code to object code.
+# The rules for compiling them should be in the t-* file for the machine.
+$(CURRENT_TARGET)EXTRA_PASSES =@extra_passes@
+
+# Like EXTRA_PASSES, but these are used when linking.
+$(CURRENT_TARGET)EXTRA_PROGRAMS = @extra_programs@
+
+# List of extra object files that should be compiled for this target machine.
+# The rules for compiling them should be in the t-* file for the machine.
+$(CURRENT_TARGET)EXTRA_PARTS = @extra_parts@
+
+# List of extra object files that should be compiled and linked with
+# compiler proper (cc1, cc1obj, cc1plus).
+$(CURRENT_TARGET)EXTRA_OBJS = @extra_objs@
+
+# List of extra object files that should be compiled and linked with
+# the gcc driver.
+$(CURRENT_TARGET)EXTRA_GCC_OBJS =@extra_gcc_objs@
+
+# List of additional header files to install.
+$(CURRENT_TARGET)EXTRA_HEADERS =@extra_headers_list@
+
+# The configure script will set this to collect2$(exeext), except on a
+# (non-Unix) host which can not build collect2, for which it will be
+# set to empty.
+$(CURRENT_TARGET)COLLECT2 = @collect2@
+
+# List of extra C and assembler files to add to static and shared libgcc2.
+# Assembler files should have names ending in `.asm'.
+$(CURRENT_TARGET)LIB2FUNCS_EXTRA =
+
+# List of extra C and assembler files to add to static libgcc2.
+# Assembler files should have names ending in `.asm'.
+$(CURRENT_TARGET)LIB2FUNCS_STATIC_EXTRA =
+
+# List of functions not to build from libgcc2.c.
+$(CURRENT_TARGET)LIB2FUNCS_EXCLUDE =
+
+# Target sfp-machine.h file.
+$(CURRENT_TARGET)SFP_MACHINE =
+
+# Program to convert libraries.
+$(CURRENT_TARGET)LIBCONVERT =
+
+$(CURRENT_TARGET)EXTRA_TARGETS = @with_extra_target_list@
+$(CURRENT_TARGET)NUM_TARGETS := $(words 1 @with_extra_target_list@)
diff --git a/gcc/TDEP-SOURCES b/gcc/TDEP-SOURCES
new file mode 100644
index 00000000000..dfe8c544a1b
--- /dev/null
+++ b/gcc/TDEP-SOURCES
@@ -0,0 +1,124 @@
+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
+tree-ssa-address.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 2ebde8d73a5..a4b727c15a4 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -46,6 +46,9 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "ipa-type-escape.h"
#include "df.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* The aliasing API provided here solves related but different problems:
@@ -128,7 +131,7 @@ along with GCC; see the file COPYING3. If not see
However, this is no actual entry for alias set zero. It is an
error to attempt to explicitly construct a subset of zero. */
-struct alias_set_entry GTY(())
+struct alias_set_entry_d GTY(())
{
/* The alias set number, as stored in MEM_ALIAS_SET. */
alias_set_type alias_set;
@@ -146,7 +149,7 @@ struct alias_set_entry GTY(())
`int', `double', `float', and `struct S'. */
splay_tree GTY((param1_is (int), param2_is (int))) children;
};
-typedef struct alias_set_entry *alias_set_entry;
+typedef struct alias_set_entry_d *alias_set_entry;
static int rtx_equal_for_memref_p (const_rtx, const_rtx);
static int memrefs_conflict_p (int, rtx, int, rtx, HOST_WIDE_INT);
@@ -752,7 +755,7 @@ record_alias_subset (alias_set_type superset, alias_set_type subset)
{
/* Create an entry for the SUPERSET, so that we have a place to
attach the SUBSET. */
- superset_entry = GGC_NEW (struct alias_set_entry);
+ superset_entry = GGC_NEW (struct alias_set_entry_d);
superset_entry->alias_set = superset;
superset_entry->children
= splay_tree_new_ggc (splay_tree_compare_ints);
@@ -2643,3 +2646,5 @@ end_alias_analysis (void)
}
#include "gt-alias.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/alias.h b/gcc/alias.h
index c760392a945..ef4f9660bbf 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_varargs_alias_set (void);
@@ -50,4 +53,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/attribs.c b/gcc/attribs.c
index be360d36bf2..139e7026b47 100644
--- a/gcc/attribs.c
+++ b/gcc/attribs.c
@@ -184,15 +184,15 @@ init_attributes (void)
for (k = 0; attribute_tables[i][k].name != NULL; k++)
{
struct substring str;
- const void **slot;
+ void **slot;
str.str = attribute_tables[i][k].name;
str.length = strlen (attribute_tables[i][k].name);
- slot = (const void **)htab_find_slot_with_hash (attribute_hash, &str,
+ slot = htab_find_slot_with_hash (attribute_hash, &str,
substring_hash (str.str, str.length),
INSERT);
gcc_assert (!*slot);
- *slot = &attribute_tables[i][k];
+ *slot = CONST_CAST (struct attribute_spec*, &attribute_tables[i][k]);
}
attributes_initialized = true;
}
diff --git a/gcc/auto-inc-dec.c b/gcc/auto-inc-dec.c
index 86b5a2c6f8d..d6f234b1cd2 100644
--- a/gcc/auto-inc-dec.c
+++ b/gcc/auto-inc-dec.c
@@ -40,6 +40,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"
/* This pass was originally removed from flow.c. However there is
almost nothing that remains of that code.
@@ -149,6 +150,8 @@ along with GCC; see the file COPYING3. If not see
*(a += c) pre
*/
+START_TARGET_SPECIFIC
+
#ifdef AUTO_INC_DEC
enum form
@@ -520,9 +523,9 @@ attempt_change (rtx new_addr, rtx inc_reg)
PUT_MODE (mem_tmp, mode);
XEXP (mem_tmp, 0) = new_addr;
- old_cost = rtx_cost (mem, 0, speed)
- + rtx_cost (PATTERN (inc_insn.insn), 0, speed);
- new_cost = rtx_cost (mem_tmp, 0, speed);
+ old_cost = rtx_cost (mem, (enum rtx_code) 0, speed)
+ + rtx_cost (PATTERN (inc_insn.insn), (enum rtx_code) 0, speed);
+ new_cost = rtx_cost (mem_tmp, (enum rtx_code) 0, speed);
/* The first item of business is to see if this is profitable. */
if (old_cost < new_cost)
@@ -1560,3 +1563,4 @@ struct rtl_opt_pass pass_inc_dec =
}
};
+END_TARGET_SPECIFIC
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index bd741b52275..dfec80fa3f0 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;
@@ -365,6 +368,14 @@ enum dom_state
DOM_OK /* Everything is ok. */
};
+/* Values for x_profile_status in control_flow_graph. */
+
+enum profile_status {
+ PROFILE_ABSENT,
+ PROFILE_GUESSED,
+ PROFILE_READ
+};
+
/* A structure to group all the per-function control flow graph data.
The x_* prefixing is necessary because otherwise references to the
fields of this struct are interpreted as the defines for backward
@@ -392,11 +403,7 @@ struct control_flow_graph GTY(())
only used for the gimple CFG. */
VEC(basic_block,gc) *x_label_to_block_map;
- enum profile_status {
- PROFILE_ABSENT,
- PROFILE_GUESSED,
- PROFILE_READ
- } x_profile_status;
+ enum profile_status x_profile_status;
/* Whether the dominators and the postdominators are available. */
enum dom_state x_dom_computed[2];
@@ -505,45 +512,6 @@ extern bitmap_obstack reg_obstack;
#define BLOCK_NUM(INSN) (BLOCK_FOR_INSN (INSN)->index + 0)
#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_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
@@ -832,6 +800,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);
@@ -858,6 +830,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 dump_regset (regset, FILE *);
extern void debug_regset (regset);
extern void init_flow (struct function *);
@@ -880,7 +879,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);
@@ -888,10 +899,23 @@ 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_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);
@@ -912,6 +936,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 */
@@ -951,25 +976,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 b636c1e3a1d..c74319fc8c3 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
#ifndef HAVE_conditional_execution
#define HAVE_conditional_execution 0
@@ -2309,3 +2312,4 @@ struct rtl_opt_pass pass_partition_blocks =
};
+END_TARGET_SPECIFIC
diff --git a/gcc/bitmap.c b/gcc/bitmap.c
index d2c2e05aae0..bdde3553af2 100644
--- a/gcc/bitmap.c
+++ b/gcc/bitmap.c
@@ -291,7 +291,7 @@ bitmap_elt_clear_from (bitmap head, bitmap_element *elt)
/* Clear a bitmap by freeing the linked list. */
-inline void
+void
bitmap_clear (bitmap head)
{
if (head->first)
diff --git a/gcc/bt-load.c b/gcc/bt-load.c
index f052f6c9507..80984c3db37 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. */
@@ -1513,7 +1517,7 @@ struct rtl_opt_pass pass_branch_target_load_optimize1 =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1563,7 +1567,7 @@ struct rtl_opt_pass pass_branch_target_load_optimize2 =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1573,3 +1577,4 @@ struct rtl_opt_pass pass_branch_target_load_optimize2 =
}
};
+END_TARGET_SPECIFIC
diff --git a/gcc/builtins.c b/gcc/builtins.c
index cc9d93e2311..f64f99a6cf1 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
@@ -3525,7 +3528,8 @@ expand_builtin_mempcpy_args (tree dest, tree src, tree len, tree type,
if (GET_CODE (len_rtx) == CONST_INT
&& can_move_by_pieces (INTVAL (len_rtx),
- MIN (dest_align, src_align)))
+ MIN (dest_align, src_align),
+ 0))
{
dest_mem = get_memory_rtx (dest, len);
set_mem_align (dest_mem, dest_align);
@@ -3533,12 +3537,30 @@ expand_builtin_mempcpy_args (tree dest, tree src, tree len, tree type,
set_mem_align (src_mem, src_align);
dest_mem = move_by_pieces (dest_mem, src_mem, INTVAL (len_rtx),
MIN (dest_align, src_align), endp);
- dest_mem = force_operand (XEXP (dest_mem, 0), NULL_RTX);
+ dest_mem = force_operand (XEXP (dest_mem, 0), target);
dest_mem = convert_memory_address (ptr_mode, dest_mem);
return dest_mem;
}
+ else
+ {
+ unsigned int align = MIN (dest_align, src_align);
- return NULL_RTX;
+ dest_mem = get_memory_rtx (dest, len);
+ set_mem_align (dest_mem, dest_align);
+ src_mem = get_memory_rtx (src, len);
+ set_mem_align (src_mem, src_align);
+ if (!emit_block_move_via_movmem (dest_mem, src_mem, len_rtx, align,
+ 0, -1))
+ return NULL_RTX;
+ dest_mem = XEXP (dest_mem, 0);
+ if (endp)
+ dest_mem = gen_rtx_PLUS (GET_MODE (dest_mem), dest_mem,
+ (endp == 2
+ ? plus_constant (len_rtx, -1) : len_rtx));
+ dest_mem = convert_memory_address (ptr_mode,
+ force_operand (dest_mem, target));
+ return dest_mem;
+ }
}
}
@@ -11066,7 +11088,7 @@ validate_arg (const_tree arg, enum tree_code code)
bool
validate_gimple_arglist (const_gimple call, ...)
{
- enum tree_code code;
+ int code;
bool res = 0;
va_list ap;
const_tree arg;
@@ -11077,8 +11099,8 @@ validate_gimple_arglist (const_gimple call, ...)
do
{
- code = va_arg (ap, enum tree_code);
- switch (code)
+ code = va_arg (ap, int);
+ switch ((enum tree_code) code)
{
case 0:
/* This signifies an ellipses, any further arguments are all ok. */
@@ -11094,7 +11116,7 @@ validate_gimple_arglist (const_gimple call, ...)
match the specified code, return false. Otherwise continue
checking any remaining arguments. */
arg = gimple_call_arg (call, i++);
- if (!validate_arg (arg, code))
+ if (!validate_arg (arg, (enum tree_code) code))
goto end;
break;
}
@@ -11128,7 +11150,7 @@ validate_arglist (const_tree callexpr, ...)
do
{
- code = va_arg (ap, enum tree_code);
+ code = (enum tree_code) va_arg (ap, int);
switch (code)
{
case 0:
@@ -13742,3 +13764,5 @@ fold_call_stmt (gimple stmt, bool ignore)
}
return NULL_TREE;
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/c-common.c b/gcc/c-common.c
index cc00511cc0c..105fa857c48 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -544,6 +544,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 *) ;
@@ -801,6 +802,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,
@@ -5856,6 +5859,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. */
@@ -6990,6 +7012,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/c-pch.c b/gcc/c-pch.c
index b4f70506e40..9ab1d56d018 100644
--- a/gcc/c-pch.c
+++ b/gcc/c-pch.c
@@ -1,5 +1,5 @@
/* Precompiled header implementation for the C languages.
- Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GCC.
@@ -92,7 +92,7 @@ static const char *
get_ident (void)
{
static char result[IDENT_LENGTH];
- static const char templ[IDENT_LENGTH] = "gpch.013";
+ static const char templ[] = "gpch.013";
static const char c_language_chars[] = "Co+O";
memcpy (result, templ, IDENT_LENGTH);
@@ -112,7 +112,7 @@ pch_init (void)
FILE *f;
struct c_pch_validity v;
void *target_validity;
- static const char partial_pch[IDENT_LENGTH] = "gpcWrite";
+ static const char partial_pch[] = "gpcWrite";
#ifdef ASM_COMMENT_START
if (flag_verbose_asm)
@@ -208,8 +208,10 @@ c_common_write_pch (void)
if (fseek (asm_out_file, 0, SEEK_END) != 0)
fatal_error ("can%'t seek in %s: %m", asm_file_name);
+ pickle_in_section ();
gt_pch_save (pch_outfile);
cpp_write_pch_state (parse_in, pch_outfile);
+ unpickle_in_section ();
if (fseek (pch_outfile, 0, SEEK_SET) != 0
|| fwrite (get_ident (), IDENT_LENGTH, 1, pch_outfile) != 1)
@@ -418,6 +420,7 @@ c_common_read_pch (cpp_reader *pfile, const char *name,
cpp_prepare_state (pfile, &smd);
gt_pch_restore (f);
+ unpickle_in_section ();
if (cpp_read_state (pfile, name, f, smd) != 0)
{
diff --git a/gcc/caller-save.c b/gcc/caller-save.c
index 0c840c3080b..ff4e0f1ba38 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. */
@@ -1292,3 +1295,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 7bad365b5ac..4e728e2ece4 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -43,6 +43,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)
@@ -457,6 +460,8 @@ emit_call_1 (rtx funexp, tree fntree, tree fndecl ATTRIBUTE_UNUSED,
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.
@@ -651,6 +656,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.
@@ -3444,7 +3451,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
for (; count < nargs; count++)
{
rtx val = va_arg (p, rtx);
- enum machine_mode mode = va_arg (p, enum machine_mode);
+ enum machine_mode mode = (enum machine_mode) va_arg (p, int);
/* We cannot convert the arg value to the mode the library wants here;
must do it earlier where we know the signedness of the arg. */
@@ -4232,7 +4239,8 @@ store_one_arg (struct arg_data *arg, rtx argblock, int flags,
- int_size_in_bytes (TREE_TYPE (pval))
+ partial);
size_rtx = expand_expr (size_in_bytes (TREE_TYPE (pval)),
- NULL_RTX, TYPE_MODE (sizetype), 0);
+ NULL_RTX, TYPE_MODE (sizetype),
+ EXPAND_NORMAL);
}
parm_align = arg->locate.boundary;
@@ -4393,3 +4401,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 9c41930a36f..814ea310af8 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 75cb49d293c..8256d1a4250 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 519108e51dc..a8b9e3a5ff2 100644
--- a/gcc/cfgbuild.c
+++ b/gcc/cfgbuild.c
@@ -45,6 +45,9 @@ along with GCC; see the file COPYING3. If not see
#include "except.h"
#include "toplev.h"
#include "timevar.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
static int count_basic_blocks (const_rtx);
static void find_basic_blocks_1 (rtx);
@@ -822,3 +825,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 190bde66848..9a07b63bf2b 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)
@@ -2256,4 +2259,4 @@ struct rtl_opt_pass pass_jump2 =
}
};
-
+END_TARGET_SPECIFIC
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 4bfdc5fed74..bb2372355cb 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -42,7 +42,9 @@ along with GCC; see the file COPYING3. If not see
#include "tree-inline.h"
#include "value-prof.h"
#include "target.h"
+#include "multi-target.h"
+START_TARGET_SPECIFIC
/* Return an expression tree corresponding to the RHS of GIMPLE
statement STMT. */
@@ -2456,7 +2458,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,
@@ -2471,7 +2475,14 @@ struct rtl_opt_pass pass_expand =
PROP_gimple_leh | PROP_cfg, /* properties_required */
PROP_rtl, /* properties_provided */
PROP_trees, /* properties_destroyed */
- 0, /* todo_flags_start */
+ TODO_arch_dispatch, /* todo_flags_start */
TODO_dump_func, /* 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 10c04a8b057..37412d3f0bb 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
@@ -1093,3 +1103,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 8d6a6694cf5..d0e902480a9 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 27eb029d076..92bc37c764a 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;
@@ -363,7 +366,7 @@ struct rtl_opt_pass pass_into_cfg_layout_mode =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -382,7 +385,7 @@ struct rtl_opt_pass pass_outof_cfg_layout_mode =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1429,3 +1432,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.c b/gcc/cfgloop.c
index e74284e8988..c1d096420cc 100644
--- a/gcc/cfgloop.c
+++ b/gcc/cfgloop.c
@@ -338,6 +338,7 @@ alloc_loop (void)
loop->exits = GGC_CNEW (struct loop_exit);
loop->exits->next = loop->exits->prev = loop->exits;
+ loop->target_arch = cfun->target_arch;
return loop;
}
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h
index 0af5be02d76..3f597de7d1e 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
@@ -151,6 +152,8 @@ struct loop GTY ((chain_next ("%h.next")))
bool any_upper_bound;
bool any_estimate;
+ /* For what target is this loop to be vectorized? targetm_array index. */
+ unsigned target_arch : 8;
/* An integer estimation of the number of iterations. Estimate_state
describes what is the state of the estimation. */
@@ -210,14 +213,18 @@ 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
void 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 *);
+END_TARGET_SPECIFIC
extern void add_loop (struct loop *, struct loop *);
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);
@@ -225,13 +232,17 @@ 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 *,
@@ -263,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);
@@ -272,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
@@ -300,6 +316,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. */
@@ -497,7 +514,11 @@ enum li_flags
LI_INCLUDE_ROOT = 1, /* Include the fake root of the loop tree. */
LI_FROM_INNERMOST = 2, /* Iterate over the loops in the reverse order,
starting from innermost ones. */
- LI_ONLY_INNERMOST = 4 /* Iterate only over innermost loops. */
+ LI_ONLY_INNERMOST = 4, /* Iterate only over innermost loops. */
+ LI_REALLY_FROM_INNERMOST = 8 /* Iterate over the loops such that all child
+ and nephew loops are visited first, i.e.
+ the size of the loop father can be estimated
+ looking at its child loops. */
};
/* The iterator for loops. */
@@ -531,9 +552,10 @@ fel_next (loop_iterator *li, loop_p *loop)
static inline void
fel_init (loop_iterator *li, loop_p *loop, unsigned flags)
{
- struct loop *aloop;
- unsigned i;
+ struct loop *aloop, *floop;
+ unsigned i, j;
int mn;
+ int visit_lim;
li->idx = 0;
if (!current_loops)
@@ -543,8 +565,9 @@ fel_init (loop_iterator *li, loop_p *loop, unsigned flags)
return;
}
- li->to_visit = VEC_alloc (int, heap, number_of_loops ());
mn = (flags & LI_INCLUDE_ROOT) ? 0 : 1;
+ visit_lim = number_of_loops () - mn;
+ li->to_visit = VEC_alloc (int, heap, visit_lim);
if (flags & LI_ONLY_INNERMOST)
{
@@ -554,6 +577,27 @@ fel_init (loop_iterator *li, loop_p *loop, unsigned flags)
&& aloop->num >= mn)
VEC_quick_push (int, li->to_visit, aloop->num);
}
+ else if (flags & LI_REALLY_FROM_INNERMOST)
+ {
+ VEC_safe_grow_cleared (int, heap, li->to_visit, visit_lim);
+ floop = current_loops->tree_root;
+ if (!mn)
+ VEC_replace (int, li->to_visit, --visit_lim, floop->num);
+ for (i = visit_lim;;)
+ {
+ for (aloop = floop->inner; aloop; aloop = aloop->next)
+ i--;
+ for (aloop = floop->inner, j = i; aloop; aloop = aloop->next)
+ VEC_replace (int, li->to_visit, j++, aloop->num);
+
+ if (--visit_lim >= (int) i)
+ floop = get_loop (VEC_index (int, li->to_visit, visit_lim));
+ else
+ break;
+ }
+ if (i)
+ VEC_block_remove (int, li->to_visit, 0, i);
+ }
else if (flags & LI_FROM_INNERMOST)
{
/* Push the loops to LI->TO_VISIT in postorder. */
@@ -646,4 +690,6 @@ extern void unroll_and_peel_loops (int);
extern void doloop_optimize_loops (void);
extern void move_loop_invariants (void);
+END_TARGET_SPECIFIC
+
#endif /* GCC_CFGLOOP_H */
diff --git a/gcc/cfgloopanal.c b/gcc/cfgloopanal.c
index 2d31ca8a340..d71dd9e4428 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. */
@@ -435,3 +438,4 @@ mark_loop_exit_edges (void)
}
}
+END_TARGET_SPECIFIC
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index a13b88d864b..1318ba76a07 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -61,6 +61,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);
@@ -437,7 +440,7 @@ struct rtl_opt_pass pass_free_cfg =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
PROP_cfg, /* properties_destroyed */
@@ -3172,3 +3175,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/cgraph.h b/gcc/cgraph.h
index 29fc1ba4a4d..23cb676eaa7 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -48,18 +48,21 @@ enum availability
extern const char * const cgraph_availability_names[];
+struct inline_summary GTY(())
+{
+ /* Estimated stack frame consumption by the function. */
+ HOST_WIDE_INT estimated_self_stack_size;
+
+ /* Size of the function before inlining. */
+ int self_insns;
+};
+
/* Information about the function collected locally.
Available after function is analyzed. */
struct cgraph_local_info GTY(())
{
- struct inline_summary {
- /* Estimated stack frame consumption by the function. */
- HOST_WIDE_INT estimated_self_stack_size;
-
- /* Size of the function before inlining. */
- int self_insns;
- } inline_summary;
+ struct inline_summary inline_summary;
/* Set when function function is visible in current compilation unit only
and its address is never taken. */
diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c
index c2fc2017057..192358bc37c 100644
--- a/gcc/cgraphbuild.c
+++ b/gcc/cgraphbuild.c
@@ -208,7 +208,7 @@ struct gimple_opt_pass pass_build_cgraph_edges =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -269,7 +269,7 @@ struct gimple_opt_pass pass_rebuild_cgraph_edges =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 07998d4af8c..f51087955ec 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1112,11 +1112,18 @@ cgraph_expand_all_functions (void)
}
+enum cgraph_order_kinds {
+ ORDER_UNDEFINED = 0,
+ ORDER_FUNCTION,
+ ORDER_VAR,
+ ORDER_ASM
+};
+
/* This is used to sort the node types by the cgraph order number. */
struct cgraph_order_sort
{
- enum { ORDER_UNDEFINED = 0, ORDER_FUNCTION, ORDER_VAR, ORDER_ASM } kind;
+ enum cgraph_order_kinds kind;
union
{
struct cgraph_node *f;
diff --git a/gcc/collect2.c b/gcc/collect2.c
index 3f62dfe40b3..d12a1beeb99 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -538,7 +538,7 @@ dump_file (const char *name, FILE *to)
static symkind
is_ctor_dtor (const char *s)
{
- struct names { const char *const name; const int len; const int ret;
+ struct names { const char *const name; const int len; const symkind ret;
const int two_underscores; };
const struct names *p;
@@ -857,9 +857,9 @@ main (int argc, char **argv)
/* Do not invoke xcalloc before this point, since locale needs to be
set first, in case a diagnostic is issued. */
- ld1 = (const char **)(ld1_argv = XCNEWVEC (char *, argc+4));
- ld2 = (const char **)(ld2_argv = XCNEWVEC (char *, argc+11));
- object = (const char **)(object_lst = XCNEWVEC (char *, argc));
+ ld1 = CONST_CAST (const char **, (ld1_argv = XCNEWVEC (char *, argc+4)));
+ ld2 = CONST_CAST (const char **, (ld2_argv = XCNEWVEC (char *, argc+11)));
+ object = CONST_CAST (const char **, (object_lst = XCNEWVEC (char *, argc)));
#ifdef DEBUG
debug = 1;
@@ -904,7 +904,7 @@ main (int argc, char **argv)
-fno-exceptions -w */
num_c_args += 5;
- c_ptr = (const char **) (c_argv = XCNEWVEC (char *, num_c_args));
+ c_ptr = CONST_CAST (const char **, (c_argv = XCNEWVEC (char *, num_c_args)));
if (argc < 2)
fatal ("no arguments");
@@ -1406,7 +1406,8 @@ main (int argc, char **argv)
if (strip_flag)
{
char **real_strip_argv = XCNEWVEC (char *, 3);
- const char ** strip_argv = (const char **) real_strip_argv;
+ const char ** strip_argv = CONST_CAST (const char **,
+ real_strip_argv);
strip_argv[0] = strip_file_name;
strip_argv[1] = output_file;
@@ -2090,7 +2091,7 @@ scan_prog_file (const char *prog_name, enum pass which_pass)
void (*quit_handler) (int);
#endif
char *real_nm_argv[4];
- const char **nm_argv = (const char **) real_nm_argv;
+ const char **nm_argv = CONST_CAST (const char **, real_nm_argv);
int argc = 0;
struct pex_obj *pex;
const char *errmsg;
diff --git a/gcc/combine-stack-adj.c b/gcc/combine-stack-adj.c
index c678a607c66..cc32f63da3a 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
@@ -333,9 +336,7 @@ adjust_frame_related_expr (rtx last_sp_set, rtx insn,
if (note)
XEXP (note, 0) = new_expr;
else
- REG_NOTES (last_sp_set)
- = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, new_expr,
- REG_NOTES (last_sp_set));
+ add_reg_note (last_sp_set, REG_FRAME_RELATED_EXPR, new_expr);
}
/* Subroutine of combine_stack_adjustments, called for each basic block. */
@@ -551,7 +552,7 @@ struct rtl_opt_pass pass_stack_adjustments =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -562,3 +563,4 @@ struct rtl_opt_pass pass_stack_adjustments =
}
};
+END_TARGET_SPECIFIC
diff --git a/gcc/combine.c b/gcc/combine.c
index bbb7135aa75..0ed840db3fc 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. */
@@ -342,10 +345,12 @@ static int nonzero_sign_valid;
/* Record one modification to rtl structure
to be undone by storing old_contents into *where. */
+enum undo_kinds { UNDO_RTX, UNDO_INT, UNDO_MODE };
+
struct undo
{
struct undo *next;
- enum { UNDO_RTX, UNDO_INT, UNDO_MODE } kind;
+ enum undo_kinds kind;
union { rtx r; int i; enum machine_mode m; } old_contents;
union { rtx *r; int *i; } where;
};
@@ -388,6 +393,7 @@ static int combinable_i3pat (rtx, rtx *, rtx, rtx, int, rtx *);
static int contains_muldiv (rtx);
static rtx try_combine (rtx, rtx, rtx, int *);
static void undo_all (void);
+static void undo_since (struct undo *);
static void undo_commit (void);
static rtx *find_split_point (rtx *, rtx);
static rtx subst (rtx, rtx, rtx, int, int);
@@ -818,14 +824,15 @@ combine_validate_cost (rtx i1, rtx i2, rtx i3, rtx newpat, rtx newi2pat,
old_cost += old_other_cost;
new_cost += new_other_cost;
}
- else
+ else if (i1)
old_cost = 0;
}
/* Disallow this recombination if both new_cost and old_cost are
greater than zero, and new_cost is greater than old cost. */
- if (old_cost > 0
- && new_cost > old_cost)
+ if ((old_cost > 0 && new_cost > old_cost)
+ /* Also disallow combine-splits that dont reduce insn count or cost. */
+ || (!i1 && newi2pat && new_cost >= old_cost))
{
if (dump_file)
{
@@ -2907,7 +2914,12 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
machine-specific method (like when you have an addition of a large
constant) or by combine in the function find_split_point. */
- if (i1 && insn_code_number < 0 && GET_CODE (newpat) == SET
+ if ((i1
+ /* Also do this if we have two expensive insns. */
+ || ((INSN_UID (i2) <= max_uid_known ? INSN_COST (i2) : 0)
+ + (INSN_UID (i3) <= max_uid_known ? INSN_COST (i3) : 0)
+ >= COSTS_N_INSNS (3)))
+ && insn_code_number < 0 && GET_CODE (newpat) == SET
&& asm_noperands (newpat) < 0)
{
rtx parallel, m_split, *split;
@@ -3578,7 +3590,7 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
patterns, move from I1 to I2 then I2 to I3 so that we get the
proper movement on registers that I2 modifies. */
- if (newi2pat)
+ if (newi2pat && i1)
{
move_deaths (newi2pat, NULL_RTX, DF_INSN_LUID (i1), i2, &midnotes);
move_deaths (newpat, newi2pat, DF_INSN_LUID (i1), i3, &midnotes);
@@ -3621,12 +3633,12 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
if (i3dest_killed)
{
if (newi2pat && reg_set_p (i3dest_killed, newi2pat))
- distribute_notes (gen_rtx_EXPR_LIST (REG_DEAD, i3dest_killed,
- NULL_RTX),
+ distribute_notes (alloc_reg_note (REG_DEAD, i3dest_killed,
+ NULL_RTX),
NULL_RTX, i2, NULL_RTX, elim_i2, elim_i1);
else
- distribute_notes (gen_rtx_EXPR_LIST (REG_DEAD, i3dest_killed,
- NULL_RTX),
+ distribute_notes (alloc_reg_note (REG_DEAD, i3dest_killed,
+ NULL_RTX),
NULL_RTX, i3, newi2pat ? i2 : NULL_RTX,
elim_i2, elim_i1);
}
@@ -3634,10 +3646,10 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
if (i2dest_in_i2src)
{
if (newi2pat && reg_set_p (i2dest, newi2pat))
- distribute_notes (gen_rtx_EXPR_LIST (REG_DEAD, i2dest, NULL_RTX),
+ distribute_notes (alloc_reg_note (REG_DEAD, i2dest, NULL_RTX),
NULL_RTX, i2, NULL_RTX, NULL_RTX, NULL_RTX);
else
- distribute_notes (gen_rtx_EXPR_LIST (REG_DEAD, i2dest, NULL_RTX),
+ distribute_notes (alloc_reg_note (REG_DEAD, i2dest, NULL_RTX),
NULL_RTX, i3, newi2pat ? i2 : NULL_RTX,
NULL_RTX, NULL_RTX);
}
@@ -3645,10 +3657,10 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
if (i1dest_in_i1src)
{
if (newi2pat && reg_set_p (i1dest, newi2pat))
- distribute_notes (gen_rtx_EXPR_LIST (REG_DEAD, i1dest, NULL_RTX),
+ distribute_notes (alloc_reg_note (REG_DEAD, i1dest, NULL_RTX),
NULL_RTX, i2, NULL_RTX, NULL_RTX, NULL_RTX);
else
- distribute_notes (gen_rtx_EXPR_LIST (REG_DEAD, i1dest, NULL_RTX),
+ distribute_notes (alloc_reg_note (REG_DEAD, i1dest, NULL_RTX),
NULL_RTX, i3, newi2pat ? i2 : NULL_RTX,
NULL_RTX, NULL_RTX);
}
@@ -3800,14 +3812,15 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
return newi2pat ? i2 : i3;
}
-/* Undo all the modifications recorded in undobuf. */
+/* Undo all the modifications recorded in undobuf since SINCE was the
+ latest change. */
static void
-undo_all (void)
+undo_since (struct undo * since)
{
struct undo *undo, *next;
- for (undo = undobuf.undos; undo; undo = next)
+ for (undo = undobuf.undos; undo != since; undo = next)
{
next = undo->next;
switch (undo->kind)
@@ -3829,7 +3842,15 @@ undo_all (void)
undobuf.frees = undo;
}
- undobuf.undos = 0;
+ undobuf.undos = undo;
+}
+
+/* Undo all the modifications recorded in undobuf. */
+
+static void
+undo_all (void)
+{
+ undo_since (0);
}
/* We've committed to accepting the changes we made. Move all
@@ -4555,6 +4576,38 @@ subst (rtx x, rtx from, rtx to, int in_dest, int unique_copy)
return x;
}
+/* If we are testing a single bit, and the upper bits are known to
+ be zero, we generally change ZERO_EXTRACT into LSHIFTRT. However,
+ in the context of a compare that might not be the right thing to
+ do if the target has bit test instructions.
+ An example is unwind-dw2-fed.c:linear_search_fdes for ARC,
+ where we want to combine btst / b{eq,ne} into bbit.
+ OUTER is an expression that tests if *XP is zero.
+ If OUTER can be made cheaper by changing *XP from an implicit
+ bit test to an explicit bit test, substitute int *XP accordingly, and
+ return the substituted value. Otherwise, retrun NULL_RTX. */
+static rtx
+combine_simplify_bittest (rtx outer, rtx *xp)
+{
+ rtx x = *xp;
+
+ if (GET_CODE (x) == LSHIFTRT
+ && CONST_INT_P (XEXP (x, 1))
+ && nonzero_bits (x, GET_MODE (x)) == 1)
+ {
+ struct undo *latest = undobuf.undos;
+ int old_cost = rtx_cost (outer, SET, optimize_this_for_speed_p);
+ rtx y = gen_rtx_ZERO_EXTRACT (GET_MODE (x), XEXP (x, 0),
+ const1_rtx, XEXP (x, 1));
+
+ SUBST (*xp, y);
+ if (rtx_cost (outer, SET, optimize_this_for_speed_p) < old_cost)
+ return y;
+ undo_since (latest);
+ }
+ return NULL_RTX;
+}
+
/* Simplify X, a piece of RTL. We just operate on the expression at the
outer level; call `subst' to simplify recursively. Return the new
expression.
@@ -4889,8 +4942,8 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest)
return gen_lowpart (mode, XEXP (x, 0));
break;
-#ifdef HAVE_cc0
case COMPARE:
+#ifdef HAVE_cc0
/* Convert (compare FOO (const_int 0)) to FOO unless we aren't
using cc0, in which case we want to leave it as a COMPARE
so we can distinguish it from a register-register-copy. */
@@ -4904,9 +4957,13 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest)
&& HONOR_SIGN_DEPENDENT_ROUNDING (GET_MODE (XEXP (x, 0))))
&& XEXP (x, 1) == CONST0_RTX (GET_MODE (XEXP (x, 0))))
return XEXP (x, 0);
- break;
#endif
-
+ if (XEXP (x, 1) == const0_rtx
+ && GET_MODE (x) != CCmode && GET_MODE_CLASS (GET_MODE (x)) == MODE_CC)
+ combine_simplify_bittest (x, &XEXP (x, 0));
+ break;
+ /* As above, check if we have a shift that can be done more cheaply
+ as a bit test. */
case CONST:
/* (const (const X)) can become (const X). Do it this way rather than
returning the inner CONST since CONST can be shared with a
@@ -5576,6 +5633,9 @@ simplify_if_then_else (rtx x)
&& (i = exact_log2 (INTVAL (true_rtx) & GET_MODE_MASK (mode))) >= 0)
return XEXP (cond, 0);
+ if (comparison_p && XEXP (XEXP (x, 0), 1) == const0_rtx)
+ combine_simplify_bittest (x, &XEXP (XEXP (x, 0), 0));
+
return x;
}
@@ -9848,8 +9908,8 @@ recog_for_combine (rtx *pnewpat, rtx insn, rtx *pnotes)
if (GET_CODE (XEXP (XVECEXP (newpat, 0, i), 0)) != SCRATCH)
{
gcc_assert (REG_P (XEXP (XVECEXP (newpat, 0, i), 0)));
- notes = gen_rtx_EXPR_LIST (REG_UNUSED,
- XEXP (XVECEXP (newpat, 0, i), 0), notes);
+ notes = alloc_reg_note (REG_UNUSED,
+ XEXP (XVECEXP (newpat, 0, i), 0), notes);
}
}
pat = newpat;
@@ -11374,11 +11434,11 @@ record_value_for_reg (rtx reg, rtx insn, rtx value)
rsp->last_set = insn;
rsp->last_set_value = 0;
- rsp->last_set_mode = 0;
+ rsp->last_set_mode = VOIDmode;
rsp->last_set_nonzero_bits = 0;
rsp->last_set_sign_bit_copies = 0;
rsp->last_death = 0;
- rsp->truncated_to_mode = 0;
+ rsp->truncated_to_mode = VOIDmode;
}
/* Mark registers that are being referenced in this value. */
@@ -11525,11 +11585,11 @@ record_dead_and_set_regs (rtx insn)
rsp->last_set_invalid = 1;
rsp->last_set = insn;
rsp->last_set_value = 0;
- rsp->last_set_mode = 0;
+ rsp->last_set_mode = VOIDmode;
rsp->last_set_nonzero_bits = 0;
rsp->last_set_sign_bit_copies = 0;
rsp->last_death = 0;
- rsp->truncated_to_mode = 0;
+ rsp->truncated_to_mode = VOIDmode;
}
last_call_luid = mem_last_set = DF_INSN_LUID (insn);
@@ -12220,7 +12280,7 @@ move_deaths (rtx x, rtx maybe_kill_insn, int from_luid, rtx to_insn,
*pnotes = note;
}
else
- *pnotes = gen_rtx_EXPR_LIST (REG_DEAD, x, *pnotes);
+ *pnotes = alloc_reg_note (REG_DEAD, x, *pnotes);
}
return;
@@ -12790,7 +12850,7 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2, rtx elim_i2,
PATTERN (place)))
{
rtx new_note
- = gen_rtx_EXPR_LIST (REG_DEAD, piece, NULL_RTX);
+ = alloc_reg_note (REG_DEAD, piece, NULL_RTX);
distribute_notes (new_note, place, place,
NULL_RTX, NULL_RTX, NULL_RTX);
@@ -12837,9 +12897,7 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2, rtx elim_i2,
}
if (place2)
- REG_NOTES (place2)
- = gen_rtx_fmt_ee (GET_CODE (note), REG_NOTE_KIND (note),
- XEXP (note, 0), REG_NOTES (place2));
+ add_reg_note (place2, REG_NOTE_KIND (note), XEXP (note, 0));
}
}
@@ -13036,3 +13094,4 @@ struct rtl_opt_pass pass_combine =
}
};
+END_TARGET_SPECIFIC
diff --git a/gcc/common.opt b/gcc/common.opt
index 3e001bd4dc7..b7c1b723853 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -271,14 +271,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=
@@ -292,7 +292,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=
@@ -410,7 +410,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
@@ -431,8 +431,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
@@ -518,11 +520,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
@@ -707,6 +709,14 @@ fivopts
Common Report Var(flag_ivopts) Init(1) Optimization
Optimize induction variables on trees
+fivopts-post-inc
+Common Report Var(flag_ivopts_post_inc) Init(1) Optimization
+When optimizing induction variables on trees, assume post_increment will be used.
+
+fivopts-post-modify
+Common Report Var(flag_ivopts_post_modify) Init(1) Optimization
+When optimizing induction variables on trees, assume post_modify will be used.
+
fjump-tables
Common Var(flag_jump_tables) Init(1) Optimization
Use jump tables for sufficiently large switch statements
@@ -720,7 +730,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
@@ -795,7 +805,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
@@ -925,7 +935,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
@@ -981,11 +991,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
@@ -1231,6 +1241,15 @@ ftree-pre
Common Report Var(flag_tree_pre) Optimization
Enable SSA-PRE optimization on trees
+ftree-pre-partial-partial
+Common Report Var(flag_tree_pre_partial_partial) Optimization
+In SSA-PRE optimization on trees, enable partial-partial redundancy elimination.
+
+ftree-pre-partial-partial-obliviously
+Common Report Var(flag_tree_pre_partial_partial_obliviously) Optimization
+In SSA-PRE optimization on trees, enable partial-partial redundancy
+elimination without regard for the cost of the inserted phi nodes.
+
ftree-reassoc
Common Report Var(flag_tree_reassoc) Init(1) Optimization
Enable reassociation on tree level
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 60a86ee8c5c..e234ba65e7b 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -678,8 +678,40 @@ alpha*-dec-*vms*)
local_prefix=/gnu
;;
arc-*-elf*)
- tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
- extra_parts="crtinit.o crtfini.o"
+ extra_headers="arc-simd.h"
+ tm_file="dbxelf.h elfos.h ${tm_file}"
+ tmake_file="arc/t-arc-newlib arc/t-arc"
+ tm_defines="${tm_defines} TARGET_CPU_DEFAULT_OPT=\\\"mA6\\\""
+ extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o"
+ ;;
+arc600-*-linux-uclibc*)
+ extra_headers="arc-simd.h"
+ tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file}"
+ tmake_file="arc/t-arc600-uClibc arc/t-arc"
+ tm_defines="${tm_defines} TARGET_CPU_DEFAULT_OPT=\\\"mARC600\\\""
+ extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o"
+ use_fixproto=yes
+ ;;
+arc*-*-linux-uclibc*)
+ extra_headers="arc-simd.h"
+ tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file}"
+ tmake_file="${tmake_file} arc/t-arc700-uClibc arc/t-arc"
+ case x"${with_cpu}" in
+ xarc600-*)
+ tm_defines="${tm_defines} TARGET_CPU_DEFAULT_OPT=\\\"mARC600\\\""
+ ;;
+ *)
+ tm_defines="${tm_defines} TARGET_CPU_DEFAULT_OPT=\\\"mARC700\\\""
+ ;;
+ esac
+ extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o"
+ use_fixproto=yes
+ ;;
+# ARC mxp
+mxp-*-elf*)
+ tm_file="dbxelf.h elfos.h mxp/regset-config.h ${tm_file}"
+ extra_parts="crti.o crtn.o crtend.o crtbegin.o"
+ extra_objs=mxp-regset.o
;;
arm-*-coff* | armel-*-coff*)
tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h dbxcoff.h"
@@ -2312,7 +2344,7 @@ spu-*-elf*)
extra_headers="spu_intrinsics.h spu_internals.h vmx2spu.h spu_mfcio.h vec_types.h"
extra_modes=spu/spu-modes.def
c_target_objs="${c_target_objs} spu-c.o"
- cxx_target_objs="${cxx_target_objs} spu-c.o"
+ cxx_target_objs="${cxx_target_objs} spu-cxx.o"
;;
v850e1-*-*)
target_cpu_default="TARGET_CPU_v850e1"
@@ -2618,6 +2650,19 @@ case "${target}" in
done
;;
+ arc*-*-linux-uclibc)
+ supported_defaults="cpu"
+ case $with_cpu in
+ "") echo "Unknown Cpu type"
+ exit 1
+ ;;
+ arc600) with_cpu="arc600"
+ ;;
+ arc700) with_cpu="arc700"
+ ;;
+ esac
+ ;;
+
arm*-*-*)
supported_defaults="arch cpu float tune fpu abi mode"
for which in cpu tune; do
diff --git a/gcc/config/arc/arc-modes.def b/gcc/config/arc/arc-modes.def
deleted file mode 100644
index c2d2ceaf82f..00000000000
--- a/gcc/config/arc/arc-modes.def
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Definitions of target machine for GNU compiler, Argonaut ARC cpu.
- Copyright (C) 2002, 2007 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
-
-/* Some insns set all condition code flags, some only set the ZNC flags, and
- some only set the ZN flags. */
-
-CC_MODE (CCZNC);
-CC_MODE (CCZN);
diff --git a/gcc/config/arc/arc-protos.h b/gcc/config/arc/arc-protos.h
deleted file mode 100644
index c9fc51ad2ac..00000000000
--- a/gcc/config/arc/arc-protos.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Definitions of target machine for GNU compiler, Argonaut ARC cpu.
- Copyright (C) 2000, 2004, 2007 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
-
-#ifdef RTX_CODE
-extern enum machine_mode arc_select_cc_mode (enum rtx_code, rtx, rtx);
-
-/* Define the function that build the compare insn for scc and bcc. */
-extern struct rtx_def *gen_compare_reg (enum rtx_code, rtx, rtx);
-#endif
-
-/* Declarations for various fns used in the .md file. */
-extern const char *output_shift (rtx *);
-
-extern int symbolic_operand (rtx, enum machine_mode);
-extern int arc_double_limm_p (rtx);
-extern int arc_eligible_for_epilogue_delay (rtx, int);
-extern void arc_initialize_trampoline (rtx, rtx, rtx);
-extern void arc_print_operand (FILE *, rtx, int);
-extern void arc_print_operand_address (FILE *, rtx);
-extern void arc_final_prescan_insn (rtx, rtx *, int);
-extern int call_address_operand (rtx, enum machine_mode);
-extern int call_operand (rtx, enum machine_mode);
-extern int symbolic_memory_operand (rtx, enum machine_mode);
-extern int short_immediate_operand (rtx, enum machine_mode);
-extern int long_immediate_operand (rtx, enum machine_mode);
-extern int long_immediate_loadstore_operand (rtx, enum machine_mode);
-extern int move_src_operand (rtx, enum machine_mode);
-extern int move_double_src_operand (rtx, enum machine_mode);
-extern int move_dest_operand (rtx, enum machine_mode);
-extern int load_update_operand (rtx, enum machine_mode);
-extern int store_update_operand (rtx, enum machine_mode);
-extern int nonvol_nonimm_operand (rtx, enum machine_mode);
-extern int const_sint32_operand (rtx, enum machine_mode);
-extern int const_uint32_operand (rtx, enum machine_mode);
-extern int proper_comparison_operator (rtx, enum machine_mode);
-extern int shift_operator (rtx, enum machine_mode);
-
-extern enum arc_function_type arc_compute_function_type (tree);
-
-
-extern void arc_init (void);
-extern unsigned int arc_compute_frame_size (int);
-extern void arc_save_restore (FILE *, const char *, unsigned int,
- unsigned int, const char *);
-extern int arc_delay_slots_for_epilogue (void);
-extern void arc_ccfsm_at_label (const char *, int);
-extern int arc_ccfsm_branch_deleted_p (void);
-extern void arc_ccfsm_record_branch_deleted (void);
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
deleted file mode 100644
index 73682146740..00000000000
--- a/gcc/config/arc/arc.c
+++ /dev/null
@@ -1,2355 +0,0 @@
-/* Subroutines used for code generation on the Argonaut ARC cpu.
- Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
-
-/* ??? This is an old port, and is undoubtedly suffering from bit rot. */
-
-#include "config.h"
-#include "system.h"
-#include "coretypes.h"
-#include "tm.h"
-#include "tree.h"
-#include "rtl.h"
-#include "regs.h"
-#include "hard-reg-set.h"
-#include "real.h"
-#include "insn-config.h"
-#include "conditions.h"
-#include "output.h"
-#include "insn-attr.h"
-#include "flags.h"
-#include "function.h"
-#include "expr.h"
-#include "recog.h"
-#include "toplev.h"
-#include "tm_p.h"
-#include "target.h"
-#include "target-def.h"
-
-/* Which cpu we're compiling for. */
-int arc_cpu_type;
-
-/* Name of mangle string to add to symbols to separate code compiled for each
- cpu (or NULL). */
-const char *arc_mangle_cpu;
-
-/* Save the operands last given to a compare for use when we
- generate a scc or bcc insn. */
-rtx arc_compare_op0, arc_compare_op1;
-
-/* Name of text, data, and rodata sections used in varasm.c. */
-const char *arc_text_section;
-const char *arc_data_section;
-const char *arc_rodata_section;
-
-/* Array of valid operand punctuation characters. */
-char arc_punct_chars[256];
-
-/* Variables used by arc_final_prescan_insn to implement conditional
- execution. */
-static int arc_ccfsm_state;
-static int arc_ccfsm_current_cc;
-static rtx arc_ccfsm_target_insn;
-static int arc_ccfsm_target_label;
-
-/* The maximum number of insns skipped which will be conditionalised if
- possible. */
-#define MAX_INSNS_SKIPPED 3
-
-/* A nop is needed between a 4 byte insn that sets the condition codes and
- a branch that uses them (the same isn't true for an 8 byte insn that sets
- the condition codes). Set by arc_final_prescan_insn. Used by
- arc_print_operand. */
-static int last_insn_set_cc_p;
-static int current_insn_set_cc_p;
-static bool arc_handle_option (size_t, const char *, int);
-static void record_cc_ref (rtx);
-static void arc_init_reg_tables (void);
-static int get_arc_condition_code (rtx);
-const struct attribute_spec arc_attribute_table[];
-static tree arc_handle_interrupt_attribute (tree *, tree, tree, int, bool *);
-static bool arc_assemble_integer (rtx, unsigned int, int);
-static void arc_output_function_prologue (FILE *, HOST_WIDE_INT);
-static void arc_output_function_epilogue (FILE *, HOST_WIDE_INT);
-static void arc_file_start (void);
-static void arc_internal_label (FILE *, const char *, unsigned long);
-static void arc_va_start (tree, rtx);
-static void arc_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode,
- tree, int *, int);
-static bool arc_rtx_costs (rtx, int, int, int *, bool);
-static int arc_address_cost (rtx, bool);
-static void arc_external_libcall (rtx);
-static bool arc_return_in_memory (const_tree, const_tree);
-static bool arc_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
- const_tree, bool);
-
-/* Initialize the GCC target structure. */
-#undef TARGET_ASM_ALIGNED_HI_OP
-#define TARGET_ASM_ALIGNED_HI_OP "\t.hword\t"
-#undef TARGET_ASM_ALIGNED_SI_OP
-#define TARGET_ASM_ALIGNED_SI_OP "\t.word\t"
-#undef TARGET_ASM_INTEGER
-#define TARGET_ASM_INTEGER arc_assemble_integer
-
-#undef TARGET_ASM_FUNCTION_PROLOGUE
-#define TARGET_ASM_FUNCTION_PROLOGUE arc_output_function_prologue
-#undef TARGET_ASM_FUNCTION_EPILOGUE
-#define TARGET_ASM_FUNCTION_EPILOGUE arc_output_function_epilogue
-#undef TARGET_ASM_FILE_START
-#define TARGET_ASM_FILE_START arc_file_start
-#undef TARGET_ATTRIBUTE_TABLE
-#define TARGET_ATTRIBUTE_TABLE arc_attribute_table
-#undef TARGET_ASM_INTERNAL_LABEL
-#define TARGET_ASM_INTERNAL_LABEL arc_internal_label
-#undef TARGET_ASM_EXTERNAL_LIBCALL
-#define TARGET_ASM_EXTERNAL_LIBCALL arc_external_libcall
-
-#undef TARGET_HANDLE_OPTION
-#define TARGET_HANDLE_OPTION arc_handle_option
-
-#undef TARGET_RTX_COSTS
-#define TARGET_RTX_COSTS arc_rtx_costs
-#undef TARGET_ADDRESS_COST
-#define TARGET_ADDRESS_COST arc_address_cost
-
-#undef TARGET_PROMOTE_FUNCTION_ARGS
-#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_const_tree_true
-#undef TARGET_PROMOTE_FUNCTION_RETURN
-#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_true
-#undef TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true
-
-#undef TARGET_RETURN_IN_MEMORY
-#define TARGET_RETURN_IN_MEMORY arc_return_in_memory
-#undef TARGET_PASS_BY_REFERENCE
-#define TARGET_PASS_BY_REFERENCE arc_pass_by_reference
-#undef TARGET_CALLEE_COPIES
-#define TARGET_CALLEE_COPIES hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true
-
-#undef TARGET_SETUP_INCOMING_VARARGS
-#define TARGET_SETUP_INCOMING_VARARGS arc_setup_incoming_varargs
-
-#undef TARGET_EXPAND_BUILTIN_VA_START
-#define TARGET_EXPAND_BUILTIN_VA_START arc_va_start
-
-struct gcc_target targetm = TARGET_INITIALIZER;
-
-/* Implement TARGET_HANDLE_OPTION. */
-
-static bool
-arc_handle_option (size_t code, const char *arg, int value ATTRIBUTE_UNUSED)
-{
- switch (code)
- {
- case OPT_mcpu_:
- return strcmp (arg, "base") == 0 || ARC_EXTENSION_CPU (arg);
-
- default:
- return true;
- }
-}
-
-/* Called by OVERRIDE_OPTIONS to initialize various things. */
-
-void
-arc_init (void)
-{
- char *tmp;
-
- /* Set the pseudo-ops for the various standard sections. */
- arc_text_section = tmp = XNEWVEC (char, strlen (arc_text_string) + sizeof (ARC_SECTION_FORMAT) + 1);
- sprintf (tmp, ARC_SECTION_FORMAT, arc_text_string);
- arc_data_section = tmp = XNEWVEC (char, strlen (arc_data_string) + sizeof (ARC_SECTION_FORMAT) + 1);
- sprintf (tmp, ARC_SECTION_FORMAT, arc_data_string);
- arc_rodata_section = tmp = XNEWVEC (char, strlen (arc_rodata_string) + sizeof (ARC_SECTION_FORMAT) + 1);
- sprintf (tmp, ARC_SECTION_FORMAT, arc_rodata_string);
-
- arc_init_reg_tables ();
-
- /* Initialize array for PRINT_OPERAND_PUNCT_VALID_P. */
- memset (arc_punct_chars, 0, sizeof (arc_punct_chars));
- arc_punct_chars['#'] = 1;
- arc_punct_chars['*'] = 1;
- arc_punct_chars['?'] = 1;
- arc_punct_chars['!'] = 1;
- arc_punct_chars['~'] = 1;
-}
-
-/* The condition codes of the ARC, and the inverse function. */
-static const char *const arc_condition_codes[] =
-{
- "al", 0, "eq", "ne", "p", "n", "c", "nc", "v", "nv",
- "gt", "le", "ge", "lt", "hi", "ls", "pnz", 0
-};
-
-#define ARC_INVERSE_CONDITION_CODE(X) ((X) ^ 1)
-
-/* Returns the index of the ARC condition code string in
- `arc_condition_codes'. COMPARISON should be an rtx like
- `(eq (...) (...))'. */
-
-static int
-get_arc_condition_code (rtx comparison)
-{
- switch (GET_CODE (comparison))
- {
- case EQ : return 2;
- case NE : return 3;
- case GT : return 10;
- case LE : return 11;
- case GE : return 12;
- case LT : return 13;
- case GTU : return 14;
- case LEU : return 15;
- case LTU : return 6;
- case GEU : return 7;
- default : gcc_unreachable ();
- }
- /*NOTREACHED*/
- return (42);
-}
-
-/* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,
- return the mode to be used for the comparison. */
-
-enum machine_mode
-arc_select_cc_mode (enum rtx_code op,
- rtx x ATTRIBUTE_UNUSED,
- rtx y ATTRIBUTE_UNUSED)
-{
- switch (op)
- {
- case EQ :
- case NE :
- return CCZNmode;
- default :
- switch (GET_CODE (x))
- {
- case AND :
- case IOR :
- case XOR :
- case SIGN_EXTEND :
- case ZERO_EXTEND :
- return CCZNmode;
- case ASHIFT :
- case ASHIFTRT :
- case LSHIFTRT :
- return CCZNCmode;
- default:
- break;
- }
- }
- return CCmode;
-}
-
-/* Vectors to keep interesting information about registers where it can easily
- be got. We use to use the actual mode value as the bit number, but there
- is (or may be) more than 32 modes now. Instead we use two tables: one
- indexed by hard register number, and one indexed by mode. */
-
-/* The purpose of arc_mode_class is to shrink the range of modes so that
- they all fit (as bit numbers) in a 32-bit word (again). Each real mode is
- mapped into one arc_mode_class mode. */
-
-enum arc_mode_class {
- C_MODE,
- S_MODE, D_MODE, T_MODE, O_MODE,
- SF_MODE, DF_MODE, TF_MODE, OF_MODE
-};
-
-/* Modes for condition codes. */
-#define C_MODES (1 << (int) C_MODE)
-
-/* Modes for single-word and smaller quantities. */
-#define S_MODES ((1 << (int) S_MODE) | (1 << (int) SF_MODE))
-
-/* Modes for double-word and smaller quantities. */
-#define D_MODES (S_MODES | (1 << (int) D_MODE) | (1 << DF_MODE))
-
-/* Modes for quad-word and smaller quantities. */
-#define T_MODES (D_MODES | (1 << (int) T_MODE) | (1 << (int) TF_MODE))
-
-/* Value is 1 if register/mode pair is acceptable on arc. */
-
-const unsigned int arc_hard_regno_mode_ok[] = {
- T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES,
- T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES,
- T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, D_MODES,
- D_MODES, S_MODES, S_MODES, S_MODES, S_MODES, S_MODES, S_MODES, S_MODES,
-
- /* ??? Leave these as S_MODES for now. */
- S_MODES, S_MODES, S_MODES, S_MODES, S_MODES, S_MODES, S_MODES, S_MODES,
- S_MODES, S_MODES, S_MODES, S_MODES, S_MODES, S_MODES, S_MODES, S_MODES,
- S_MODES, S_MODES, S_MODES, S_MODES, S_MODES, S_MODES, S_MODES, S_MODES,
- S_MODES, S_MODES, S_MODES, S_MODES, S_MODES, C_MODES
-};
-
-unsigned int arc_mode_class [NUM_MACHINE_MODES];
-
-enum reg_class arc_regno_reg_class[FIRST_PSEUDO_REGISTER];
-
-static void
-arc_init_reg_tables (void)
-{
- int i;
-
- for (i = 0; i < NUM_MACHINE_MODES; i++)
- {
- switch (GET_MODE_CLASS (i))
- {
- case MODE_INT:
- case MODE_PARTIAL_INT:
- case MODE_COMPLEX_INT:
- if (GET_MODE_SIZE (i) <= 4)
- arc_mode_class[i] = 1 << (int) S_MODE;
- else if (GET_MODE_SIZE (i) == 8)
- arc_mode_class[i] = 1 << (int) D_MODE;
- else if (GET_MODE_SIZE (i) == 16)
- arc_mode_class[i] = 1 << (int) T_MODE;
- else if (GET_MODE_SIZE (i) == 32)
- arc_mode_class[i] = 1 << (int) O_MODE;
- else
- arc_mode_class[i] = 0;
- break;
- case MODE_FLOAT:
- case MODE_COMPLEX_FLOAT:
- if (GET_MODE_SIZE (i) <= 4)
- arc_mode_class[i] = 1 << (int) SF_MODE;
- else if (GET_MODE_SIZE (i) == 8)
- arc_mode_class[i] = 1 << (int) DF_MODE;
- else if (GET_MODE_SIZE (i) == 16)
- arc_mode_class[i] = 1 << (int) TF_MODE;
- else if (GET_MODE_SIZE (i) == 32)
- arc_mode_class[i] = 1 << (int) OF_MODE;
- else
- arc_mode_class[i] = 0;
- break;
- case MODE_CC:
- arc_mode_class[i] = 1 << (int) C_MODE;
- break;
- default:
- arc_mode_class[i] = 0;
- break;
- }
- }
-
- for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
- {
- if (i < 60)
- arc_regno_reg_class[i] = GENERAL_REGS;
- else if (i == 60)
- arc_regno_reg_class[i] = LPCOUNT_REG;
- else if (i == 61)
- arc_regno_reg_class[i] = NO_REGS /* CC_REG: must be NO_REGS */;
- else
- arc_regno_reg_class[i] = NO_REGS;
- }
-}
-
-/* ARC specific attribute support.
-
- The ARC has these attributes:
- interrupt - for interrupt functions
-*/
-
-const struct attribute_spec arc_attribute_table[] =
-{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "interrupt", 1, 1, true, false, false, arc_handle_interrupt_attribute },
- { NULL, 0, 0, false, false, false, NULL }
-};
-
-/* Handle an "interrupt" attribute; arguments as in
- struct attribute_spec.handler. */
-static tree
-arc_handle_interrupt_attribute (tree *node ATTRIBUTE_UNUSED,
- tree name,
- tree args,
- int flags ATTRIBUTE_UNUSED,
- bool *no_add_attrs)
-{
- tree value = TREE_VALUE (args);
-
- if (TREE_CODE (value) != STRING_CST)
- {
- warning (OPT_Wattributes,
- "argument of %qs attribute is not a string constant",
- IDENTIFIER_POINTER (name));
- *no_add_attrs = true;
- }
- else if (strcmp (TREE_STRING_POINTER (value), "ilink1")
- && strcmp (TREE_STRING_POINTER (value), "ilink2"))
- {
- warning (OPT_Wattributes,
- "argument of %qs attribute is not \"ilink1\" or \"ilink2\"",
- IDENTIFIER_POINTER (name));
- *no_add_attrs = true;
- }
-
- return NULL_TREE;
-}
-
-
-/* Acceptable arguments to the call insn. */
-
-int
-call_address_operand (rtx op, enum machine_mode mode)
-{
- return (symbolic_operand (op, mode)
- || (GET_CODE (op) == CONST_INT && LEGITIMATE_CONSTANT_P (op))
- || (GET_CODE (op) == REG));
-}
-
-int
-call_operand (rtx op, enum machine_mode mode)
-{
- if (GET_CODE (op) != MEM)
- return 0;
- op = XEXP (op, 0);
- return call_address_operand (op, mode);
-}
-
-/* Returns 1 if OP is a symbol reference. */
-
-int
-symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
-{
- switch (GET_CODE (op))
- {
- case SYMBOL_REF:
- case LABEL_REF:
- case CONST :
- return 1;
- default:
- return 0;
- }
-}
-
-/* Return truth value of statement that OP is a symbolic memory
- operand of mode MODE. */
-
-int
-symbolic_memory_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
-{
- if (GET_CODE (op) == SUBREG)
- op = SUBREG_REG (op);
- if (GET_CODE (op) != MEM)
- return 0;
- op = XEXP (op, 0);
- return (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == CONST
- || GET_CODE (op) == LABEL_REF);
-}
-
-/* Return true if OP is a short immediate (shimm) value. */
-
-int
-short_immediate_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
-{
- if (GET_CODE (op) != CONST_INT)
- return 0;
- return SMALL_INT (INTVAL (op));
-}
-
-/* Return true if OP will require a long immediate (limm) value.
- This is currently only used when calculating length attributes. */
-
-int
-long_immediate_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
-{
- switch (GET_CODE (op))
- {
- case SYMBOL_REF :
- case LABEL_REF :
- case CONST :
- return 1;
- case CONST_INT :
- return !SMALL_INT (INTVAL (op));
- case CONST_DOUBLE :
- /* These can happen because large unsigned 32-bit constants are
- represented this way (the multiplication patterns can cause these
- to be generated). They also occur for SFmode values. */
- return 1;
- default:
- break;
- }
- return 0;
-}
-
-/* Return true if OP is a MEM that when used as a load or store address will
- require an 8 byte insn.
- Load and store instructions don't allow the same possibilities but they're
- similar enough that this one function will do.
- This is currently only used when calculating length attributes. */
-
-int
-long_immediate_loadstore_operand (rtx op,
- enum machine_mode mode ATTRIBUTE_UNUSED)
-{
- if (GET_CODE (op) != MEM)
- return 0;
-
- op = XEXP (op, 0);
- switch (GET_CODE (op))
- {
- case SYMBOL_REF :
- case LABEL_REF :
- case CONST :
- return 1;
- case CONST_INT :
- /* This must be handled as "st c,[limm]". Ditto for load.
- Technically, the assembler could translate some possibilities to
- "st c,[limm/2 + limm/2]" if limm/2 will fit in a shimm, but we don't
- assume that it does. */
- return 1;
- case CONST_DOUBLE :
- /* These can happen because large unsigned 32-bit constants are
- represented this way (the multiplication patterns can cause these
- to be generated). They also occur for SFmode values. */
- return 1;
- case REG :
- return 0;
- case PLUS :
- if (GET_CODE (XEXP (op, 1)) == CONST_INT
- && !SMALL_INT (INTVAL (XEXP (op, 1))))
- return 1;
- return 0;
- default:
- break;
- }
- return 0;
-}
-
-/* Return true if OP is an acceptable argument for a single word
- move source. */
-
-int
-move_src_operand (rtx op, enum machine_mode mode)
-{
- switch (GET_CODE (op))
- {
- case SYMBOL_REF :
- case LABEL_REF :
- case CONST :
- return 1;
- case CONST_INT :
- return (LARGE_INT (INTVAL (op)));
- case CONST_DOUBLE :
- /* We can handle DImode integer constants in SImode if the value
- (signed or unsigned) will fit in 32 bits. This is needed because
- large unsigned 32-bit constants are represented as CONST_DOUBLEs. */
- if (mode == SImode)
- return arc_double_limm_p (op);
- /* We can handle 32-bit floating point constants. */
- if (mode == SFmode)
- return GET_MODE (op) == SFmode;
- return 0;
- case REG :
- return register_operand (op, mode);
- case SUBREG :
- /* (subreg (mem ...) ...) can occur here if the inner part was once a
- pseudo-reg and is now a stack slot. */
- if (GET_CODE (SUBREG_REG (op)) == MEM)
- return address_operand (XEXP (SUBREG_REG (op), 0), mode);
- else
- return register_operand (op, mode);
- case MEM :
- return address_operand (XEXP (op, 0), mode);
- default :
- return 0;
- }
-}
-
-/* Return true if OP is an acceptable argument for a double word
- move source. */
-
-int
-move_double_src_operand (rtx op, enum machine_mode mode)
-{
- switch (GET_CODE (op))
- {
- case REG :
- return register_operand (op, mode);
- case SUBREG :
- /* (subreg (mem ...) ...) can occur here if the inner part was once a
- pseudo-reg and is now a stack slot. */
- if (GET_CODE (SUBREG_REG (op)) == MEM)
- return move_double_src_operand (SUBREG_REG (op), mode);
- else
- return register_operand (op, mode);
- case MEM :
- /* Disallow auto inc/dec for now. */
- if (GET_CODE (XEXP (op, 0)) == PRE_DEC
- || GET_CODE (XEXP (op, 0)) == PRE_INC)
- return 0;
- return address_operand (XEXP (op, 0), mode);
- case CONST_INT :
- case CONST_DOUBLE :
- return 1;
- default :
- return 0;
- }
-}
-
-/* Return true if OP is an acceptable argument for a move destination. */
-
-int
-move_dest_operand (rtx op, enum machine_mode mode)
-{
- switch (GET_CODE (op))
- {
- case REG :
- return register_operand (op, mode);
- case SUBREG :
- /* (subreg (mem ...) ...) can occur here if the inner part was once a
- pseudo-reg and is now a stack slot. */
- if (GET_CODE (SUBREG_REG (op)) == MEM)
- return address_operand (XEXP (SUBREG_REG (op), 0), mode);
- else
- return register_operand (op, mode);
- case MEM :
- return address_operand (XEXP (op, 0), mode);
- default :
- return 0;
- }
-}
-
-/* Return true if OP is valid load with update operand. */
-
-int
-load_update_operand (rtx op, enum machine_mode mode)
-{
- if (GET_CODE (op) != MEM
- || GET_MODE (op) != mode)
- return 0;
- op = XEXP (op, 0);
- if (GET_CODE (op) != PLUS
- || GET_MODE (op) != Pmode
- || !register_operand (XEXP (op, 0), Pmode)
- || !nonmemory_operand (XEXP (op, 1), Pmode))
- return 0;
- return 1;
-}
-
-/* Return true if OP is valid store with update operand. */
-
-int
-store_update_operand (rtx op, enum machine_mode mode)
-{
- if (GET_CODE (op) != MEM
- || GET_MODE (op) != mode)
- return 0;
- op = XEXP (op, 0);
- if (GET_CODE (op) != PLUS
- || GET_MODE (op) != Pmode
- || !register_operand (XEXP (op, 0), Pmode)
- || !(GET_CODE (XEXP (op, 1)) == CONST_INT
- && SMALL_INT (INTVAL (XEXP (op, 1)))))
- return 0;
- return 1;
-}
-
-/* Return true if OP is a non-volatile non-immediate operand.
- Volatile memory refs require a special "cache-bypass" instruction
- and only the standard movXX patterns are set up to handle them. */
-
-int
-nonvol_nonimm_operand (rtx op, enum machine_mode mode)
-{
- if (GET_CODE (op) == MEM && MEM_VOLATILE_P (op))
- return 0;
- return nonimmediate_operand (op, mode);
-}
-
-/* Accept integer operands in the range -0x80000000..0x7fffffff. We have
- to check the range carefully since this predicate is used in DImode
- contexts. */
-
-int
-const_sint32_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
-{
- /* All allowed constants will fit a CONST_INT. */
- return (GET_CODE (op) == CONST_INT
- && (INTVAL (op) >= (-0x7fffffff - 1) && INTVAL (op) <= 0x7fffffff));
-}
-
-/* Accept integer operands in the range 0..0xffffffff. We have to check the
- range carefully since this predicate is used in DImode contexts. Also, we
- need some extra crud to make it work when hosted on 64-bit machines. */
-
-int
-const_uint32_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
-{
-#if HOST_BITS_PER_WIDE_INT > 32
- /* All allowed constants will fit a CONST_INT. */
- return (GET_CODE (op) == CONST_INT
- && (INTVAL (op) >= 0 && INTVAL (op) <= 0xffffffffL));
-#else
- return ((GET_CODE (op) == CONST_INT && INTVAL (op) >= 0)
- || (GET_CODE (op) == CONST_DOUBLE && CONST_DOUBLE_HIGH (op) == 0));
-#endif
-}
-
-/* Return 1 if OP is a comparison operator valid for the mode of CC.
- This allows the use of MATCH_OPERATOR to recognize all the branch insns.
-
- Some insns only set a few bits in the condition code. So only allow those
- comparisons that use the bits that are valid. */
-
-int
-proper_comparison_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
-{
- enum rtx_code code;
- if (!COMPARISON_P (op))
- return 0;
-
- code = GET_CODE (op);
- if (GET_MODE (XEXP (op, 0)) == CCZNmode)
- return (code == EQ || code == NE);
- if (GET_MODE (XEXP (op, 0)) == CCZNCmode)
- return (code == EQ || code == NE
- || code == LTU || code == GEU || code == GTU || code == LEU);
- return 1;
-}
-
-/* Misc. utilities. */
-
-/* X and Y are two things to compare using CODE. Emit the compare insn and
- return the rtx for the cc reg in the proper mode. */
-
-rtx
-gen_compare_reg (enum rtx_code code, rtx x, rtx y)
-{
- enum machine_mode mode = SELECT_CC_MODE (code, x, y);
- rtx cc_reg;
-
- cc_reg = gen_rtx_REG (mode, 61);
-
- emit_insn (gen_rtx_SET (VOIDmode, cc_reg,
- gen_rtx_COMPARE (mode, x, y)));
-
- return cc_reg;
-}
-
-/* Return 1 if VALUE, a const_double, will fit in a limm (4 byte number).
- We assume the value can be either signed or unsigned. */
-
-int
-arc_double_limm_p (rtx value)
-{
- HOST_WIDE_INT low, high;
-
- gcc_assert (GET_CODE (value) == CONST_DOUBLE);
-
- low = CONST_DOUBLE_LOW (value);
- high = CONST_DOUBLE_HIGH (value);
-
- if (low & 0x80000000)
- {
- return (((unsigned HOST_WIDE_INT) low <= 0xffffffff && high == 0)
- || (((low & - (unsigned HOST_WIDE_INT) 0x80000000)
- == - (unsigned HOST_WIDE_INT) 0x80000000)
- && high == -1));
- }
- else
- {
- return (unsigned HOST_WIDE_INT) low <= 0x7fffffff && high == 0;
- }
-}
-
-/* Do any needed setup for a variadic function. For the ARC, we must
- create a register parameter block, and then copy any anonymous arguments
- in registers to memory.
-
- CUM has not been updated for the last named argument which has type TYPE
- and mode MODE, and we rely on this fact.
-
- We do things a little weird here. We're supposed to only allocate space
- for the anonymous arguments. However we need to keep the stack eight byte
- aligned. So we round the space up if necessary, and leave it to va_start
- to compensate. */
-
-static void
-arc_setup_incoming_varargs (CUMULATIVE_ARGS *cum,
- enum machine_mode mode,
- tree type ATTRIBUTE_UNUSED,
- int *pretend_size,
- int no_rtl)
-{
- int first_anon_arg;
-
- /* All BLKmode values are passed by reference. */
- gcc_assert (mode != BLKmode);
-
- first_anon_arg = *cum + ((GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1)
- / UNITS_PER_WORD);
-
- if (first_anon_arg < MAX_ARC_PARM_REGS && !no_rtl)
- {
- /* Note that first_reg_offset < MAX_ARC_PARM_REGS. */
- int first_reg_offset = first_anon_arg;
- /* Size in words to "pretend" allocate. */
- int size = MAX_ARC_PARM_REGS - first_reg_offset;
- /* Extra slop to keep stack eight byte aligned. */
- int align_slop = size & 1;
- rtx regblock;
-
- regblock = gen_rtx_MEM (BLKmode,
- plus_constant (arg_pointer_rtx,
- FIRST_PARM_OFFSET (0)
- + align_slop * UNITS_PER_WORD));
- set_mem_alias_set (regblock, get_varargs_alias_set ());
- set_mem_align (regblock, BITS_PER_WORD);
- move_block_from_reg (first_reg_offset, regblock,
- MAX_ARC_PARM_REGS - first_reg_offset);
-
- *pretend_size = ((MAX_ARC_PARM_REGS - first_reg_offset + align_slop)
- * UNITS_PER_WORD);
- }
-}
-
-/* Cost functions. */
-
-/* Compute a (partial) cost for rtx X. Return true if the complete
- cost has been computed, and false if subexpressions should be
- scanned. In either case, *TOTAL contains the cost result. */
-
-static bool
-arc_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total,
- bool speed ATTRIBUTE_UNUSED)
-{
- switch (code)
- {
- /* Small integers are as cheap as registers. 4 byte values can
- be fetched as immediate constants - let's give that the cost
- of an extra insn. */
- case CONST_INT:
- if (SMALL_INT (INTVAL (x)))
- {
- *total = 0;
- return true;
- }
- /* FALLTHRU */
-
- case CONST:
- case LABEL_REF:
- case SYMBOL_REF:
- *total = COSTS_N_INSNS (1);
- return true;
-
- case CONST_DOUBLE:
- {
- rtx high, low;
- split_double (x, &high, &low);
- *total = COSTS_N_INSNS (!SMALL_INT (INTVAL (high))
- + !SMALL_INT (INTVAL (low)));
- return true;
- }
-
- /* Encourage synth_mult to find a synthetic multiply when reasonable.
- If we need more than 12 insns to do a multiply, then go out-of-line,
- since the call overhead will be < 10% of the cost of the multiply. */
- case ASHIFT:
- case ASHIFTRT:
- case LSHIFTRT:
- if (TARGET_SHIFTER)
- *total = COSTS_N_INSNS (1);
- else if (GET_CODE (XEXP (x, 1)) != CONST_INT)
- *total = COSTS_N_INSNS (16);
- else
- *total = COSTS_N_INSNS (INTVAL (XEXP ((x), 1)));
- return false;
-
- default:
- return false;
- }
-}
-
-
-/* Provide the costs of an addressing mode that contains ADDR.
- If ADDR is not a valid address, its cost is irrelevant. */
-
-static int
-arc_address_cost (rtx addr, bool speed ATTRIBUTE_UNUSED)
-{
- switch (GET_CODE (addr))
- {
- case REG :
- return 1;
-
- case LABEL_REF :
- case SYMBOL_REF :
- case CONST :
- return 2;
-
- case PLUS :
- {
- register rtx plus0 = XEXP (addr, 0);
- register rtx plus1 = XEXP (addr, 1);
-
- if (GET_CODE (plus0) != REG)
- break;
-
- switch (GET_CODE (plus1))
- {
- case CONST_INT :
- return SMALL_INT (plus1) ? 1 : 2;
- case CONST :
- case SYMBOL_REF :
- case LABEL_REF :
- return 2;
- default:
- break;
- }
- break;
- }
- default:
- break;
- }
-
- return 4;
-}
-
-/* Function prologue/epilogue handlers. */
-
-/* ARC stack frames look like:
-
- Before call After call
- +-----------------------+ +-----------------------+
- | | | |
- high | local variables, | | local variables, |
- mem | reg save area, etc. | | reg save area, etc. |
- | | | |
- +-----------------------+ +-----------------------+
- | | | |
- | arguments on stack. | | arguments on stack. |
- | | | |
- SP+16->+-----------------------+FP+48->+-----------------------+
- | 4 word save area for | | reg parm save area, |
- | return addr, prev %fp | | only created for |
- SP+0->+-----------------------+ | variable argument |
- | functions |
- FP+16->+-----------------------+
- | 4 word save area for |
- | return addr, prev %fp |
- FP+0->+-----------------------+
- | |
- | local variables |
- | |
- +-----------------------+
- | |
- | register save area |
- | |
- +-----------------------+
- | |
- | alloca allocations |
- | |
- +-----------------------+
- | |
- | arguments on stack |
- | |
- SP+16->+-----------------------+
- low | 4 word save area for |
- memory | return addr, prev %fp |
- SP+0->+-----------------------+
-
-Notes:
-1) The "reg parm save area" does not exist for non variable argument fns.
- The "reg parm save area" can be eliminated completely if we created our
- own va-arc.h, but that has tradeoffs as well (so it's not done). */
-
-/* Structure to be filled in by arc_compute_frame_size with register
- save masks, and offsets for the current function. */
-struct arc_frame_info
-{
- unsigned int total_size; /* # bytes that the entire frame takes up. */
- unsigned int extra_size; /* # bytes of extra stuff. */
- unsigned int pretend_size; /* # bytes we push and pretend caller did. */
- unsigned int args_size; /* # bytes that outgoing arguments take up. */
- unsigned int reg_size; /* # bytes needed to store regs. */
- unsigned int var_size; /* # bytes that variables take up. */
- unsigned int reg_offset; /* Offset from new sp to store regs. */
- unsigned int gmask; /* Mask of saved gp registers. */
- int initialized; /* Nonzero if frame size already calculated. */
-};
-
-/* Current frame information calculated by arc_compute_frame_size. */
-static struct arc_frame_info current_frame_info;
-
-/* Zero structure to initialize current_frame_info. */
-static struct arc_frame_info zero_frame_info;
-
-/* Type of function DECL.
-
- The result is cached. To reset the cache at the end of a function,
- call with DECL = NULL_TREE. */
-
-enum arc_function_type
-arc_compute_function_type (tree decl)
-{
- tree a;
- /* Cached value. */
- static enum arc_function_type fn_type = ARC_FUNCTION_UNKNOWN;
- /* Last function we were called for. */
- static tree last_fn = NULL_TREE;
-
- /* Resetting the cached value? */
- if (decl == NULL_TREE)
- {
- fn_type = ARC_FUNCTION_UNKNOWN;
- last_fn = NULL_TREE;
- return fn_type;
- }
-
- if (decl == last_fn && fn_type != ARC_FUNCTION_UNKNOWN)
- return fn_type;
-
- /* Assume we have a normal function (not an interrupt handler). */
- fn_type = ARC_FUNCTION_NORMAL;
-
- /* Now see if this is an interrupt handler. */
- for (a = DECL_ATTRIBUTES (current_function_decl);
- a;
- a = TREE_CHAIN (a))
- {
- tree name = TREE_PURPOSE (a), args = TREE_VALUE (a);
-
- if (name == get_identifier ("__interrupt__")
- && list_length (args) == 1
- && TREE_CODE (TREE_VALUE (args)) == STRING_CST)
- {
- tree value = TREE_VALUE (args);
-
- if (!strcmp (TREE_STRING_POINTER (value), "ilink1"))
- fn_type = ARC_FUNCTION_ILINK1;
- else if (!strcmp (TREE_STRING_POINTER (value), "ilink2"))
- fn_type = ARC_FUNCTION_ILINK2;
- else
- gcc_unreachable ();
- break;
- }
- }
-
- last_fn = decl;
- return fn_type;
-}
-
-#define ILINK1_REGNUM 29
-#define ILINK2_REGNUM 30
-#define RETURN_ADDR_REGNUM 31
-#define FRAME_POINTER_MASK (1 << (FRAME_POINTER_REGNUM))
-#define RETURN_ADDR_MASK (1 << (RETURN_ADDR_REGNUM))
-
-/* Tell prologue and epilogue if register REGNO should be saved / restored.
- The return address and frame pointer are treated separately.
- Don't consider them here. */
-#define MUST_SAVE_REGISTER(regno, interrupt_p) \
-((regno) != RETURN_ADDR_REGNUM && (regno) != FRAME_POINTER_REGNUM \
- && (df_regs_ever_live_p (regno) && (!call_used_regs[regno] || interrupt_p)))
-
-#define MUST_SAVE_RETURN_ADDR (df_regs_ever_live_p (RETURN_ADDR_REGNUM))
-
-/* Return the bytes needed to compute the frame pointer from the current
- stack pointer.
-
- SIZE is the size needed for local variables. */
-
-unsigned int
-arc_compute_frame_size (int size /* # of var. bytes allocated. */)
-{
- int regno;
- unsigned int total_size, var_size, args_size, pretend_size, extra_size;
- unsigned int reg_size, reg_offset;
- unsigned int gmask;
- enum arc_function_type fn_type;
- int interrupt_p;
-
- var_size = size;
- args_size = crtl->outgoing_args_size;
- pretend_size = crtl->args.pretend_args_size;
- extra_size = FIRST_PARM_OFFSET (0);
- total_size = extra_size + pretend_size + args_size + var_size;
- reg_offset = FIRST_PARM_OFFSET(0) + crtl->outgoing_args_size;
- reg_size = 0;
- gmask = 0;
-
- /* See if this is an interrupt handler. Call used registers must be saved
- for them too. */
- fn_type = arc_compute_function_type (current_function_decl);
- interrupt_p = ARC_INTERRUPT_P (fn_type);
-
- /* Calculate space needed for registers.
- ??? We ignore the extension registers for now. */
-
- for (regno = 0; regno <= 31; regno++)
- {
- if (MUST_SAVE_REGISTER (regno, interrupt_p))
- {
- reg_size += UNITS_PER_WORD;
- gmask |= 1 << regno;
- }
- }
-
- total_size += reg_size;
-
- /* If the only space to allocate is the fp/blink save area this is an
- empty frame. However, if we'll be making a function call we need to
- allocate a stack frame for our callee's fp/blink save area. */
- if (total_size == extra_size
- && !MUST_SAVE_RETURN_ADDR)
- total_size = extra_size = 0;
-
- total_size = ARC_STACK_ALIGN (total_size);
-
- /* Save computed information. */
- current_frame_info.total_size = total_size;
- current_frame_info.extra_size = extra_size;
- current_frame_info.pretend_size = pretend_size;
- current_frame_info.var_size = var_size;
- current_frame_info.args_size = args_size;
- current_frame_info.reg_size = reg_size;
- current_frame_info.reg_offset = reg_offset;
- current_frame_info.gmask = gmask;
- current_frame_info.initialized = reload_completed;
-
- /* Ok, we're done. */
- return total_size;
-}
-
-/* Common code to save/restore registers. */
-
-void
-arc_save_restore (FILE *file,
- const char *base_reg,
- unsigned int offset,
- unsigned int gmask,
- const char *op)
-{
- int regno;
-
- if (gmask == 0)
- return;
-
- for (regno = 0; regno <= 31; regno++)
- {
- if ((gmask & (1L << regno)) != 0)
- {
- fprintf (file, "\t%s %s,[%s,%d]\n",
- op, reg_names[regno], base_reg, offset);
- offset += UNITS_PER_WORD;
- }
- }
-}
-
-/* Target hook to assemble an integer object. The ARC version needs to
- emit a special directive for references to labels and function
- symbols. */
-
-static bool
-arc_assemble_integer (rtx x, unsigned int size, int aligned_p)
-{
- if (size == UNITS_PER_WORD && aligned_p
- && ((GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_FUNCTION_P (x))
- || GET_CODE (x) == LABEL_REF))
- {
- fputs ("\t.word\t%st(", asm_out_file);
- output_addr_const (asm_out_file, x);
- fputs (")\n", asm_out_file);
- return true;
- }
- return default_assemble_integer (x, size, aligned_p);
-}
-
-/* Set up the stack and frame pointer (if desired) for the function. */
-
-static void
-arc_output_function_prologue (FILE *file, HOST_WIDE_INT size)
-{
- const char *sp_str = reg_names[STACK_POINTER_REGNUM];
- const char *fp_str = reg_names[FRAME_POINTER_REGNUM];
- unsigned int gmask = current_frame_info.gmask;
- enum arc_function_type fn_type = arc_compute_function_type (current_function_decl);
-
- /* If this is an interrupt handler, set up our stack frame.
- ??? Optimize later. */
- if (ARC_INTERRUPT_P (fn_type))
- {
- fprintf (file, "\t%s interrupt handler\n",
- ASM_COMMENT_START);
- fprintf (file, "\tsub %s,%s,16\n", sp_str, sp_str);
- }
-
- /* This is only for the human reader. */
- fprintf (file, "\t%s BEGIN PROLOGUE %s vars= %d, regs= %d, args= %d, extra= %d\n",
- ASM_COMMENT_START, ASM_COMMENT_START,
- current_frame_info.var_size,
- current_frame_info.reg_size / 4,
- current_frame_info.args_size,
- current_frame_info.extra_size);
-
- size = ARC_STACK_ALIGN (size);
- size = (! current_frame_info.initialized
- ? arc_compute_frame_size (size)
- : current_frame_info.total_size);
-
- /* These cases shouldn't happen. Catch them now. */
- gcc_assert (size || !gmask);
-
- /* Allocate space for register arguments if this is a variadic function. */
- if (current_frame_info.pretend_size != 0)
- fprintf (file, "\tsub %s,%s,%d\n",
- sp_str, sp_str, current_frame_info.pretend_size);
-
- /* The home-grown ABI says link register is saved first. */
- if (MUST_SAVE_RETURN_ADDR)
- fprintf (file, "\tst %s,[%s,%d]\n",
- reg_names[RETURN_ADDR_REGNUM], sp_str, UNITS_PER_WORD);
-
- /* Set up the previous frame pointer next (if we need to). */
- if (frame_pointer_needed)
- {
- fprintf (file, "\tst %s,[%s]\n", fp_str, sp_str);
- fprintf (file, "\tmov %s,%s\n", fp_str, sp_str);
- }
-
- /* ??? We don't handle the case where the saved regs are more than 252
- bytes away from sp. This can be handled by decrementing sp once, saving
- the regs, and then decrementing it again. The epilogue doesn't have this
- problem as the `ld' insn takes reg+limm values (though it would be more
- efficient to avoid reg+limm). */
-
- /* Allocate the stack frame. */
- if (size - current_frame_info.pretend_size > 0)
- fprintf (file, "\tsub %s,%s," HOST_WIDE_INT_PRINT_DEC "\n",
- sp_str, sp_str, size - current_frame_info.pretend_size);
-
- /* Save any needed call-saved regs (and call-used if this is an
- interrupt handler). */
- arc_save_restore (file, sp_str, current_frame_info.reg_offset,
- /* The zeroing of these two bits is unnecessary,
- but leave this in for clarity. */
- gmask & ~(FRAME_POINTER_MASK | RETURN_ADDR_MASK),
- "st");
-
- fprintf (file, "\t%s END PROLOGUE\n", ASM_COMMENT_START);
-}
-
-/* Do any necessary cleanup after a function to restore stack, frame,
- and regs. */
-
-static void
-arc_output_function_epilogue (FILE *file, HOST_WIDE_INT size)
-{
- rtx epilogue_delay = crtl->epilogue_delay_list;
- int noepilogue = FALSE;
- enum arc_function_type fn_type = arc_compute_function_type (current_function_decl);
-
- /* This is only for the human reader. */
- fprintf (file, "\t%s EPILOGUE\n", ASM_COMMENT_START);
-
- size = ARC_STACK_ALIGN (size);
- size = (!current_frame_info.initialized
- ? arc_compute_frame_size (size)
- : current_frame_info.total_size);
-
- if (size == 0 && epilogue_delay == 0)
- {
- rtx insn = get_last_insn ();
-
- /* If the last insn was a BARRIER, we don't have to write any code
- because a jump (aka return) was put there. */
- if (GET_CODE (insn) == NOTE)
- insn = prev_nonnote_insn (insn);
- if (insn && GET_CODE (insn) == BARRIER)
- noepilogue = TRUE;
- }
-
- if (!noepilogue)
- {
- unsigned int pretend_size = current_frame_info.pretend_size;
- unsigned int frame_size = size - pretend_size;
- int restored, fp_restored_p;
- int can_trust_sp_p = !cfun->calls_alloca;
- const char *sp_str = reg_names[STACK_POINTER_REGNUM];
- const char *fp_str = reg_names[FRAME_POINTER_REGNUM];
-
- /* ??? There are lots of optimizations that can be done here.
- EG: Use fp to restore regs if it's closer.
- Maybe in time we'll do them all. For now, always restore regs from
- sp, but don't restore sp if we don't have to. */
-
- if (!can_trust_sp_p)
- {
- gcc_assert (frame_pointer_needed);
- fprintf (file,"\tsub %s,%s,%d\t\t%s sp not trusted here\n",
- sp_str, fp_str, frame_size, ASM_COMMENT_START);
- }
-
- /* Restore any saved registers. */
- arc_save_restore (file, sp_str, current_frame_info.reg_offset,
- /* The zeroing of these two bits is unnecessary,
- but leave this in for clarity. */
- current_frame_info.gmask & ~(FRAME_POINTER_MASK | RETURN_ADDR_MASK),
- "ld");
-
- if (MUST_SAVE_RETURN_ADDR)
- fprintf (file, "\tld %s,[%s,%d]\n",
- reg_names[RETURN_ADDR_REGNUM],
- frame_pointer_needed ? fp_str : sp_str,
- UNITS_PER_WORD + (frame_pointer_needed ? 0 : frame_size));
-
- /* Keep track of how much of the stack pointer we've restored.
- It makes the following a lot more readable. */
- restored = 0;
- fp_restored_p = 0;
-
- /* We try to emit the epilogue delay slot insn right after the load
- of the return address register so that it can execute with the
- stack intact. Secondly, loads are delayed. */
- /* ??? If stack intactness is important, always emit now. */
- if (MUST_SAVE_RETURN_ADDR && epilogue_delay != NULL_RTX)
- {
- final_scan_insn (XEXP (epilogue_delay, 0), file, 1, 1, NULL);
- epilogue_delay = NULL_RTX;
- }
-
- if (frame_pointer_needed)
- {
- /* Try to restore the frame pointer in the delay slot. We can't,
- however, if any of these is true. */
- if (epilogue_delay != NULL_RTX
- || !SMALL_INT (frame_size)
- || pretend_size
- || ARC_INTERRUPT_P (fn_type))
- {
- /* Note that we restore fp and sp here! */
- fprintf (file, "\tld.a %s,[%s,%d]\n", fp_str, sp_str, frame_size);
- restored += frame_size;
- fp_restored_p = 1;
- }
- }
- else if (!SMALL_INT (size /* frame_size + pretend_size */)
- || ARC_INTERRUPT_P (fn_type))
- {
- fprintf (file, "\tadd %s,%s,%d\n", sp_str, sp_str, frame_size);
- restored += frame_size;
- }
-
- /* These must be done before the return insn because the delay slot
- does the final stack restore. */
- if (ARC_INTERRUPT_P (fn_type))
- {
- if (epilogue_delay)
- {
- final_scan_insn (XEXP (epilogue_delay, 0), file, 1, 1, NULL);
- }
- }
-
- /* Emit the return instruction. */
- {
- static const int regs[4] = {
- 0, RETURN_ADDR_REGNUM, ILINK1_REGNUM, ILINK2_REGNUM
- };
-
- /* Update the flags, if returning from an interrupt handler. */
- if (ARC_INTERRUPT_P (fn_type))
- fprintf (file, "\tj.d.f %s\n", reg_names[regs[fn_type]]);
- else
- fprintf (file, "\tj.d %s\n", reg_names[regs[fn_type]]);
- }
-
- /* If the only register saved is the return address, we need a
- nop, unless we have an instruction to put into it. Otherwise
- we don't since reloading multiple registers doesn't reference
- the register being loaded. */
-
- if (ARC_INTERRUPT_P (fn_type))
- fprintf (file, "\tadd %s,%s,16\n", sp_str, sp_str);
- else if (epilogue_delay != NULL_RTX)
- {
- gcc_assert (!frame_pointer_needed || fp_restored_p);
- gcc_assert (restored >= size);
- final_scan_insn (XEXP (epilogue_delay, 0), file, 1, 1, NULL);
- }
- else if (frame_pointer_needed && !fp_restored_p)
- {
- gcc_assert (SMALL_INT (frame_size));
- /* Note that we restore fp and sp here! */
- fprintf (file, "\tld.a %s,[%s,%d]\n", fp_str, sp_str, frame_size);
- }
- else if (restored < size)
- {
- gcc_assert (SMALL_INT (size - restored));
- fprintf (file, "\tadd %s,%s," HOST_WIDE_INT_PRINT_DEC "\n",
- sp_str, sp_str, size - restored);
- }
- else
- fprintf (file, "\tnop\n");
- }
-
- /* Reset state info for each function. */
- current_frame_info = zero_frame_info;
- arc_compute_function_type (NULL_TREE);
-}
-
-/* Define the number of delay slots needed for the function epilogue.
-
- Interrupt handlers can't have any epilogue delay slots (it's always needed
- for something else, I think). For normal functions, we have to worry about
- using call-saved regs as they'll be restored before the delay slot insn.
- Functions with non-empty frames already have enough choices for the epilogue
- delay slot so for now we only consider functions with empty frames. */
-
-int
-arc_delay_slots_for_epilogue (void)
-{
- if (arc_compute_function_type (current_function_decl) != ARC_FUNCTION_NORMAL)
- return 0;
- if (!current_frame_info.initialized)
- (void) arc_compute_frame_size (get_frame_size ());
- if (current_frame_info.total_size == 0)
- return 1;
- return 0;
-}
-
-/* Return true if TRIAL is a valid insn for the epilogue delay slot.
- Any single length instruction which doesn't reference the stack or frame
- pointer or any call-saved register is OK. SLOT will always be 0. */
-
-int
-arc_eligible_for_epilogue_delay (rtx trial, int slot)
-{
- gcc_assert (!slot);
-
- if (get_attr_length (trial) == 1
- /* If registers where saved, presumably there's more than enough
- possibilities for the delay slot. The alternative is something
- more complicated (of course, if we expanded the epilogue as rtl
- this problem would go away). */
- /* ??? Note that this will always be true since only functions with
- empty frames have epilogue delay slots. See
- arc_delay_slots_for_epilogue. */
- && current_frame_info.gmask == 0
- && ! reg_mentioned_p (stack_pointer_rtx, PATTERN (trial))
- && ! reg_mentioned_p (frame_pointer_rtx, PATTERN (trial)))
- return 1;
- return 0;
-}
-
-/* Return true if OP is a shift operator. */
-
-int
-shift_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
-{
- switch (GET_CODE (op))
- {
- case ASHIFTRT:
- case LSHIFTRT:
- case ASHIFT:
- return 1;
- default:
- return 0;
- }
-}
-
-/* Output the assembler code for doing a shift.
- We go to a bit of trouble to generate efficient code as the ARC only has
- single bit shifts. This is taken from the h8300 port. We only have one
- mode of shifting and can't access individual bytes like the h8300 can, so
- this is greatly simplified (at the expense of not generating hyper-
- efficient code).
-
- This function is not used if the variable shift insns are present. */
-
-/* ??? We assume the output operand is the same as operand 1.
- This can be optimized (deleted) in the case of 1 bit shifts. */
-/* ??? We use the loop register here. We don't use it elsewhere (yet) and
- using it here will give us a chance to play with it. */
-
-const char *
-output_shift (rtx *operands)
-{
- rtx shift = operands[3];
- enum machine_mode mode = GET_MODE (shift);
- enum rtx_code code = GET_CODE (shift);
- const char *shift_one;
-
- gcc_assert (mode == SImode);
-
- switch (code)
- {
- case ASHIFT: shift_one = "asl %0,%0"; break;
- case ASHIFTRT: shift_one = "asr %0,%0"; break;
- case LSHIFTRT: shift_one = "lsr %0,%0"; break;
- default: gcc_unreachable ();
- }
-
- if (GET_CODE (operands[2]) != CONST_INT)
- {
- if (optimize)
- {
- output_asm_insn ("sub.f 0,%2,0", operands);
- output_asm_insn ("mov lp_count,%2", operands);
- output_asm_insn ("bz 2f", operands);
- }
- else
- output_asm_insn ("mov %4,%2", operands);
- goto shiftloop;
- }
- else
- {
- int n = INTVAL (operands[2]);
-
- /* If the count is negative, make it 0. */
- if (n < 0)
- n = 0;
- /* If the count is too big, truncate it.
- ANSI says shifts of GET_MODE_BITSIZE are undefined - we choose to
- do the intuitive thing. */
- else if (n > GET_MODE_BITSIZE (mode))
- n = GET_MODE_BITSIZE (mode);
-
- /* First see if we can do them inline. */
- if (n <= 8)
- {
- while (--n >= 0)
- output_asm_insn (shift_one, operands);
- }
- /* See if we can use a rotate/and. */
- else if (n == BITS_PER_WORD - 1)
- {
- switch (code)
- {
- case ASHIFT :
- output_asm_insn ("and %0,%0,1\n\tror %0,%0", operands);
- break;
- case ASHIFTRT :
- /* The ARC doesn't have a rol insn. Use something else. */
- output_asm_insn ("asl.f 0,%0\n\tsbc %0,0,0", operands);
- break;
- case LSHIFTRT :
- /* The ARC doesn't have a rol insn. Use something else. */
- output_asm_insn ("asl.f 0,%0\n\tadc %0,0,0", operands);
- break;
- default:
- break;
- }
- }
- /* Must loop. */
- else
- {
- char buf[100];
-
- if (optimize)
- output_asm_insn ("mov lp_count,%c2", operands);
- else
- output_asm_insn ("mov %4,%c2", operands);
- shiftloop:
- if (optimize)
- {
- if (flag_pic)
- sprintf (buf, "lr %%4,[status]\n\tadd %%4,%%4,6\t%s single insn loop start",
- ASM_COMMENT_START);
- else
- sprintf (buf, "mov %%4,%%%%st(1f)\t%s (single insn loop start) >> 2",
- ASM_COMMENT_START);
- output_asm_insn (buf, operands);
- output_asm_insn ("sr %4,[lp_start]", operands);
- output_asm_insn ("add %4,%4,1", operands);
- output_asm_insn ("sr %4,[lp_end]", operands);
- output_asm_insn ("nop\n\tnop", operands);
- if (flag_pic)
- fprintf (asm_out_file, "\t%s single insn loop\n",
- ASM_COMMENT_START);
- else
- fprintf (asm_out_file, "1:\t%s single insn loop\n",
- ASM_COMMENT_START);
- output_asm_insn (shift_one, operands);
- fprintf (asm_out_file, "2:\t%s end single insn loop\n",
- ASM_COMMENT_START);
- }
- else
- {
- fprintf (asm_out_file, "1:\t%s begin shift loop\n",
- ASM_COMMENT_START);
- output_asm_insn ("sub.f %4,%4,1", operands);
- output_asm_insn ("nop", operands);
- output_asm_insn ("bn.nd 2f", operands);
- output_asm_insn (shift_one, operands);
- output_asm_insn ("b.nd 1b", operands);
- fprintf (asm_out_file, "2:\t%s end shift loop\n",
- ASM_COMMENT_START);
- }
- }
- }
-
- return "";
-}
-
-/* Nested function support. */
-
-/* Emit RTL insns to initialize the variable parts of a trampoline.
- FNADDR is an RTX for the address of the function's pure code.
- CXT is an RTX for the static chain value for the function. */
-
-void
-arc_initialize_trampoline (rtx tramp ATTRIBUTE_UNUSED,
- rtx fnaddr ATTRIBUTE_UNUSED,
- rtx cxt ATTRIBUTE_UNUSED)
-{
-}
-
-/* Set the cpu type and print out other fancy things,
- at the top of the file. */
-
-static void
-arc_file_start (void)
-{
- default_file_start ();
- fprintf (asm_out_file, "\t.cpu %s\n", arc_cpu_string);
-}
-
-/* Print operand X (an rtx) in assembler syntax to file FILE.
- CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
- For `%' followed by punctuation, CODE is the punctuation and X is null. */
-
-void
-arc_print_operand (FILE *file, rtx x, int code)
-{
- switch (code)
- {
- case '#' :
- /* Conditional branches. For now these are equivalent. */
- case '*' :
- /* Unconditional branches. Output the appropriate delay slot suffix. */
- if (!final_sequence || XVECLEN (final_sequence, 0) == 1)
- {
- /* There's nothing in the delay slot. */
- fputs (".nd", file);
- }
- else
- {
- rtx jump = XVECEXP (final_sequence, 0, 0);
- rtx delay = XVECEXP (final_sequence, 0, 1);
- if (INSN_ANNULLED_BRANCH_P (jump))
- fputs (INSN_FROM_TARGET_P (delay) ? ".jd" : ".nd", file);
- else
- fputs (".d", file);
- }
- return;
- case '?' : /* with leading "." */
- case '!' : /* without leading "." */
- /* This insn can be conditionally executed. See if the ccfsm machinery
- says it should be conditionalized. */
- if (arc_ccfsm_state == 3 || arc_ccfsm_state == 4)
- {
- /* Is this insn in a delay slot? */
- if (final_sequence && XVECLEN (final_sequence, 0) == 2)
- {
- rtx insn = XVECEXP (final_sequence, 0, 1);
-
- /* If the insn is annulled and is from the target path, we need
- to inverse the condition test. */
- if (INSN_ANNULLED_BRANCH_P (insn))
- {
- if (INSN_FROM_TARGET_P (insn))
- fprintf (file, "%s%s",
- code == '?' ? "." : "",
- arc_condition_codes[ARC_INVERSE_CONDITION_CODE (arc_ccfsm_current_cc)]);
- else
- fprintf (file, "%s%s",
- code == '?' ? "." : "",
- arc_condition_codes[arc_ccfsm_current_cc]);
- }
- else
- {
- /* This insn is executed for either path, so don't
- conditionalize it at all. */
- ; /* nothing to do */
- }
- }
- else
- {
- /* This insn isn't in a delay slot. */
- fprintf (file, "%s%s",
- code == '?' ? "." : "",
- arc_condition_codes[arc_ccfsm_current_cc]);
- }
- }
- return;
- case '~' :
- /* Output a nop if we're between a set of the condition codes,
- and a conditional branch. */
- if (last_insn_set_cc_p)
- fputs ("nop\n\t", file);
- return;
- case 'd' :
- fputs (arc_condition_codes[get_arc_condition_code (x)], file);
- return;
- case 'D' :
- fputs (arc_condition_codes[ARC_INVERSE_CONDITION_CODE
- (get_arc_condition_code (x))],
- file);
- return;
- case 'R' :
- /* Write second word of DImode or DFmode reference,
- register or memory. */
- if (GET_CODE (x) == REG)
- fputs (reg_names[REGNO (x)+1], file);
- else if (GET_CODE (x) == MEM)
- {
- fputc ('[', file);
- /* Handle possible auto-increment. Since it is pre-increment and
- we have already done it, we can just use an offset of four. */
- /* ??? This is taken from rs6000.c I think. I don't think it is
- currently necessary, but keep it around. */
- if (GET_CODE (XEXP (x, 0)) == PRE_INC
- || GET_CODE (XEXP (x, 0)) == PRE_DEC)
- output_address (plus_constant (XEXP (XEXP (x, 0), 0), 4));
- else
- output_address (plus_constant (XEXP (x, 0), 4));
- fputc (']', file);
- }
- else
- output_operand_lossage ("invalid operand to %%R code");
- return;
- case 'S' :
- if ((GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_FUNCTION_P (x))
- || GET_CODE (x) == LABEL_REF)
- {
- fprintf (file, "%%st(");
- output_addr_const (file, x);
- fprintf (file, ")");
- return;
- }
- break;
- case 'H' :
- case 'L' :
- if (GET_CODE (x) == REG)
- {
- /* L = least significant word, H = most significant word */
- if ((TARGET_BIG_ENDIAN != 0) ^ (code == 'L'))
- fputs (reg_names[REGNO (x)], file);
- else
- fputs (reg_names[REGNO (x)+1], file);
- }
- else if (GET_CODE (x) == CONST_INT
- || GET_CODE (x) == CONST_DOUBLE)
- {
- rtx first, second;
-
- split_double (x, &first, &second);
- fprintf (file, "0x%08lx",
- (long)(code == 'L' ? INTVAL (first) : INTVAL (second)));
- }
- else
- output_operand_lossage ("invalid operand to %%H/%%L code");
- return;
- case 'A' :
- {
- char str[30];
-
- gcc_assert (GET_CODE (x) == CONST_DOUBLE
- && GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT);
-
- real_to_decimal (str, CONST_DOUBLE_REAL_VALUE (x), sizeof (str), 0, 1);
- fprintf (file, "%s", str);
- return;
- }
- case 'U' :
- /* Output a load/store with update indicator if appropriate. */
- if (GET_CODE (x) == MEM)
- {
- if (GET_CODE (XEXP (x, 0)) == PRE_INC
- || GET_CODE (XEXP (x, 0)) == PRE_DEC)
- fputs (".a", file);
- }
- else
- output_operand_lossage ("invalid operand to %%U code");
- return;
- case 'V' :
- /* Output cache bypass indicator for a load/store insn. Volatile memory
- refs are defined to use the cache bypass mechanism. */
- if (GET_CODE (x) == MEM)
- {
- if (MEM_VOLATILE_P (x))
- fputs (".di", file);
- }
- else
- output_operand_lossage ("invalid operand to %%V code");
- return;
- case 0 :
- /* Do nothing special. */
- break;
- default :
- /* Unknown flag. */
- output_operand_lossage ("invalid operand output code");
- }
-
- switch (GET_CODE (x))
- {
- case REG :
- fputs (reg_names[REGNO (x)], file);
- break;
- case MEM :
- fputc ('[', file);
- if (GET_CODE (XEXP (x, 0)) == PRE_INC)
- output_address (plus_constant (XEXP (XEXP (x, 0), 0),
- GET_MODE_SIZE (GET_MODE (x))));
- else if (GET_CODE (XEXP (x, 0)) == PRE_DEC)
- output_address (plus_constant (XEXP (XEXP (x, 0), 0),
- - GET_MODE_SIZE (GET_MODE (x))));
- else
- output_address (XEXP (x, 0));
- fputc (']', file);
- break;
- case CONST_DOUBLE :
- /* We handle SFmode constants here as output_addr_const doesn't. */
- if (GET_MODE (x) == SFmode)
- {
- REAL_VALUE_TYPE d;
- long l;
-
- REAL_VALUE_FROM_CONST_DOUBLE (d, x);
- REAL_VALUE_TO_TARGET_SINGLE (d, l);
- fprintf (file, "0x%08lx", l);
- break;
- }
- /* Fall through. Let output_addr_const deal with it. */
- default :
- output_addr_const (file, x);
- break;
- }
-}
-
-/* Print a memory address as an operand to reference that memory location. */
-
-void
-arc_print_operand_address (FILE *file, rtx addr)
-{
- register rtx base, index = 0;
- int offset = 0;
-
- switch (GET_CODE (addr))
- {
- case REG :
- fputs (reg_names[REGNO (addr)], file);
- break;
- case SYMBOL_REF :
- if (/*???*/ 0 && SYMBOL_REF_FUNCTION_P (addr))
- {
- fprintf (file, "%%st(");
- output_addr_const (file, addr);
- fprintf (file, ")");
- }
- else
- output_addr_const (file, addr);
- break;
- case PLUS :
- if (GET_CODE (XEXP (addr, 0)) == CONST_INT)
- offset = INTVAL (XEXP (addr, 0)), base = XEXP (addr, 1);
- else if (GET_CODE (XEXP (addr, 1)) == CONST_INT)
- offset = INTVAL (XEXP (addr, 1)), base = XEXP (addr, 0);
- else
- base = XEXP (addr, 0), index = XEXP (addr, 1);
- gcc_assert (GET_CODE (base) == REG);
- fputs (reg_names[REGNO (base)], file);
- if (index == 0)
- {
- if (offset != 0)
- fprintf (file, ",%d", offset);
- }
- else
- {
- switch (GET_CODE (index))
- {
- case REG:
- fprintf (file, ",%s", reg_names[REGNO (index)]);
- break;
- case SYMBOL_REF:
- fputc (',', file), output_addr_const (file, index);
- break;
- default:
- gcc_unreachable ();
- }
- }
- break;
- case PRE_INC :
- case PRE_DEC :
- /* We shouldn't get here as we've lost the mode of the memory object
- (which says how much to inc/dec by. */
- gcc_unreachable ();
- break;
- default :
- output_addr_const (file, addr);
- break;
- }
-}
-
-/* Update compare/branch separation marker. */
-
-static void
-record_cc_ref (rtx insn)
-{
- last_insn_set_cc_p = current_insn_set_cc_p;
-
- switch (get_attr_cond (insn))
- {
- case COND_SET :
- case COND_SET_ZN :
- case COND_SET_ZNC :
- if (get_attr_length (insn) == 1)
- current_insn_set_cc_p = 1;
- else
- current_insn_set_cc_p = 0;
- break;
- default :
- current_insn_set_cc_p = 0;
- break;
- }
-}
-
-/* Conditional execution support.
-
- This is based on the ARM port but for now is much simpler.
-
- A finite state machine takes care of noticing whether or not instructions
- can be conditionally executed, and thus decrease execution time and code
- size by deleting branch instructions. The fsm is controlled by
- final_prescan_insn, and controls the actions of PRINT_OPERAND. The patterns
- in the .md file for the branch insns also have a hand in this. */
-
-/* The state of the fsm controlling condition codes are:
- 0: normal, do nothing special
- 1: don't output this insn
- 2: don't output this insn
- 3: make insns conditional
- 4: make insns conditional
-
- State transitions (state->state by whom, under what condition):
- 0 -> 1 final_prescan_insn, if insn is conditional branch
- 0 -> 2 final_prescan_insn, if the `target' is an unconditional branch
- 1 -> 3 branch patterns, after having not output the conditional branch
- 2 -> 4 branch patterns, after having not output the conditional branch
- 3 -> 0 (*targetm.asm_out.internal_label), if the `target' label is reached
- (the target label has CODE_LABEL_NUMBER equal to
- arc_ccfsm_target_label).
- 4 -> 0 final_prescan_insn, if `target' unconditional branch is reached
-
- If the jump clobbers the conditions then we use states 2 and 4.
-
- A similar thing can be done with conditional return insns.
-
- We also handle separating branches from sets of the condition code.
- This is done here because knowledge of the ccfsm state is required,
- we may not be outputting the branch. */
-
-void
-arc_final_prescan_insn (rtx insn,
- rtx *opvec ATTRIBUTE_UNUSED,
- int noperands ATTRIBUTE_UNUSED)
-{
- /* BODY will hold the body of INSN. */
- register rtx body = PATTERN (insn);
-
- /* This will be 1 if trying to repeat the trick (i.e.: do the `else' part of
- an if/then/else), and things need to be reversed. */
- int reverse = 0;
-
- /* If we start with a return insn, we only succeed if we find another one. */
- int seeking_return = 0;
-
- /* START_INSN will hold the insn from where we start looking. This is the
- first insn after the following code_label if REVERSE is true. */
- rtx start_insn = insn;
-
- /* Update compare/branch separation marker. */
- record_cc_ref (insn);
-
- /* Allow -mdebug-ccfsm to turn this off so we can see how well it does.
- We can't do this in macro FINAL_PRESCAN_INSN because its called from
- final_scan_insn which has `optimize' as a local. */
- if (optimize < 2 || TARGET_NO_COND_EXEC)
- return;
-
- /* If in state 4, check if the target branch is reached, in order to
- change back to state 0. */
- if (arc_ccfsm_state == 4)
- {
- if (insn == arc_ccfsm_target_insn)
- {
- arc_ccfsm_target_insn = NULL;
- arc_ccfsm_state = 0;
- }
- return;
- }
-
- /* If in state 3, it is possible to repeat the trick, if this insn is an
- unconditional branch to a label, and immediately following this branch
- is the previous target label which is only used once, and the label this
- branch jumps to is not too far off. Or in other words "we've done the
- `then' part, see if we can do the `else' part." */
- if (arc_ccfsm_state == 3)
- {
- if (simplejump_p (insn))
- {
- start_insn = next_nonnote_insn (start_insn);
- if (GET_CODE (start_insn) == BARRIER)
- {
- /* ??? Isn't this always a barrier? */
- start_insn = next_nonnote_insn (start_insn);
- }
- if (GET_CODE (start_insn) == CODE_LABEL
- && CODE_LABEL_NUMBER (start_insn) == arc_ccfsm_target_label
- && LABEL_NUSES (start_insn) == 1)
- reverse = TRUE;
- else
- return;
- }
- else if (GET_CODE (body) == RETURN)
- {
- start_insn = next_nonnote_insn (start_insn);
- if (GET_CODE (start_insn) == BARRIER)
- start_insn = next_nonnote_insn (start_insn);
- if (GET_CODE (start_insn) == CODE_LABEL
- && CODE_LABEL_NUMBER (start_insn) == arc_ccfsm_target_label
- && LABEL_NUSES (start_insn) == 1)
- {
- reverse = TRUE;
- seeking_return = 1;
- }
- else
- return;
- }
- else
- return;
- }
-
- if (GET_CODE (insn) != JUMP_INSN)
- return;
-
- /* This jump might be paralleled with a clobber of the condition codes,
- the jump should always come first. */
- if (GET_CODE (body) == PARALLEL && XVECLEN (body, 0) > 0)
- body = XVECEXP (body, 0, 0);
-
- if (reverse
- || (GET_CODE (body) == SET && GET_CODE (SET_DEST (body)) == PC
- && GET_CODE (SET_SRC (body)) == IF_THEN_ELSE))
- {
- int insns_skipped = 0, fail = FALSE, succeed = FALSE;
- /* Flag which part of the IF_THEN_ELSE is the LABEL_REF. */
- int then_not_else = TRUE;
- /* Nonzero if next insn must be the target label. */
- int next_must_be_target_label_p;
- rtx this_insn = start_insn, label = 0;
-
- /* Register the insn jumped to. */
- if (reverse)
- {
- if (!seeking_return)
- label = XEXP (SET_SRC (body), 0);
- }
- else if (GET_CODE (XEXP (SET_SRC (body), 1)) == LABEL_REF)
- label = XEXP (XEXP (SET_SRC (body), 1), 0);
- else if (GET_CODE (XEXP (SET_SRC (body), 2)) == LABEL_REF)
- {
- label = XEXP (XEXP (SET_SRC (body), 2), 0);
- then_not_else = FALSE;
- }
- else if (GET_CODE (XEXP (SET_SRC (body), 1)) == RETURN)
- seeking_return = 1;
- else if (GET_CODE (XEXP (SET_SRC (body), 2)) == RETURN)
- {
- seeking_return = 1;
- then_not_else = FALSE;
- }
- else
- gcc_unreachable ();
-
- /* See how many insns this branch skips, and what kind of insns. If all
- insns are okay, and the label or unconditional branch to the same
- label is not too far away, succeed. */
- for (insns_skipped = 0, next_must_be_target_label_p = FALSE;
- !fail && !succeed && insns_skipped < MAX_INSNS_SKIPPED;
- insns_skipped++)
- {
- rtx scanbody;
-
- this_insn = next_nonnote_insn (this_insn);
- if (!this_insn)
- break;
-
- if (next_must_be_target_label_p)
- {
- if (GET_CODE (this_insn) == BARRIER)
- continue;
- if (GET_CODE (this_insn) == CODE_LABEL
- && this_insn == label)
- {
- arc_ccfsm_state = 1;
- succeed = TRUE;
- }
- else
- fail = TRUE;
- break;
- }
-
- scanbody = PATTERN (this_insn);
-
- switch (GET_CODE (this_insn))
- {
- case CODE_LABEL:
- /* Succeed if it is the target label, otherwise fail since
- control falls in from somewhere else. */
- if (this_insn == label)
- {
- arc_ccfsm_state = 1;
- succeed = TRUE;
- }
- else
- fail = TRUE;
- break;
-
- case BARRIER:
- /* Succeed if the following insn is the target label.
- Otherwise fail.
- If return insns are used then the last insn in a function
- will be a barrier. */
- next_must_be_target_label_p = TRUE;
- break;
-
- case CALL_INSN:
- /* Can handle a call insn if there are no insns after it.
- IE: The next "insn" is the target label. We don't have to
- worry about delay slots as such insns are SEQUENCE's inside
- INSN's. ??? It is possible to handle such insns though. */
- if (get_attr_cond (this_insn) == COND_CANUSE)
- next_must_be_target_label_p = TRUE;
- else
- fail = TRUE;
- break;
-
- case JUMP_INSN:
- /* If this is an unconditional branch to the same label, succeed.
- If it is to another label, do nothing. If it is conditional,
- fail. */
- /* ??? Probably, the test for the SET and the PC are unnecessary. */
-
- if (GET_CODE (scanbody) == SET
- && GET_CODE (SET_DEST (scanbody)) == PC)
- {
- if (GET_CODE (SET_SRC (scanbody)) == LABEL_REF
- && XEXP (SET_SRC (scanbody), 0) == label && !reverse)
- {
- arc_ccfsm_state = 2;
- succeed = TRUE;
- }
- else if (GET_CODE (SET_SRC (scanbody)) == IF_THEN_ELSE)
- fail = TRUE;
- }
- else if (GET_CODE (scanbody) == RETURN
- && seeking_return)
- {
- arc_ccfsm_state = 2;
- succeed = TRUE;
- }
- else if (GET_CODE (scanbody) == PARALLEL)
- {
- if (get_attr_cond (this_insn) != COND_CANUSE)
- fail = TRUE;
- }
- break;
-
- case INSN:
- /* We can only do this with insns that can use the condition
- codes (and don't set them). */
- if (GET_CODE (scanbody) == SET
- || GET_CODE (scanbody) == PARALLEL)
- {
- if (get_attr_cond (this_insn) != COND_CANUSE)
- fail = TRUE;
- }
- /* We can't handle other insns like sequences. */
- else
- fail = TRUE;
- break;
-
- default:
- break;
- }
- }
-
- if (succeed)
- {
- if ((!seeking_return) && (arc_ccfsm_state == 1 || reverse))
- arc_ccfsm_target_label = CODE_LABEL_NUMBER (label);
- else
- {
- gcc_assert (seeking_return || arc_ccfsm_state == 2);
- while (this_insn && GET_CODE (PATTERN (this_insn)) == USE)
- {
- this_insn = next_nonnote_insn (this_insn);
- gcc_assert (!this_insn
- || (GET_CODE (this_insn) != BARRIER
- && GET_CODE (this_insn) != CODE_LABEL));
- }
- if (!this_insn)
- {
- /* Oh dear! we ran off the end, give up. */
- extract_insn_cached (insn);
- arc_ccfsm_state = 0;
- arc_ccfsm_target_insn = NULL;
- return;
- }
- arc_ccfsm_target_insn = this_insn;
- }
-
- /* If REVERSE is true, ARM_CURRENT_CC needs to be inverted from
- what it was. */
- if (!reverse)
- arc_ccfsm_current_cc = get_arc_condition_code (XEXP (SET_SRC (body),
- 0));
-
- if (reverse || then_not_else)
- arc_ccfsm_current_cc = ARC_INVERSE_CONDITION_CODE (arc_ccfsm_current_cc);
- }
-
- /* Restore recog_data. Getting the attributes of other insns can
- destroy this array, but final.c assumes that it remains intact
- across this call. */
- extract_insn_cached (insn);
- }
-}
-
-/* Record that we are currently outputting label NUM with prefix PREFIX.
- It it's the label we're looking for, reset the ccfsm machinery.
-
- Called from (*targetm.asm_out.internal_label). */
-
-void
-arc_ccfsm_at_label (const char *prefix, int num)
-{
- if (arc_ccfsm_state == 3 && arc_ccfsm_target_label == num
- && !strcmp (prefix, "L"))
- {
- arc_ccfsm_state = 0;
- arc_ccfsm_target_insn = NULL_RTX;
- }
-}
-
-/* See if the current insn, which is a conditional branch, is to be
- deleted. */
-
-int
-arc_ccfsm_branch_deleted_p (void)
-{
- if (arc_ccfsm_state == 1 || arc_ccfsm_state == 2)
- return 1;
- return 0;
-}
-
-/* Record a branch isn't output because subsequent insns can be
- conditionalized. */
-
-void
-arc_ccfsm_record_branch_deleted (void)
-{
- /* Indicate we're conditionalizing insns now. */
- arc_ccfsm_state += 2;
-
- /* If the next insn is a subroutine call, we still need a nop between the
- cc setter and user. We need to undo the effect of calling record_cc_ref
- for the just deleted branch. */
- current_insn_set_cc_p = last_insn_set_cc_p;
-}
-
-static void
-arc_va_start (tree valist, rtx nextarg)
-{
- /* See arc_setup_incoming_varargs for reasons for this oddity. */
- if (crtl->args.info < 8
- && (crtl->args.info & 1))
- nextarg = plus_constant (nextarg, UNITS_PER_WORD);
-
- std_expand_builtin_va_start (valist, nextarg);
-}
-
-/* This is how to output a definition of an internal numbered label where
- PREFIX is the class of label and NUM is the number within the class. */
-
-static void
-arc_internal_label (FILE *stream, const char *prefix, unsigned long labelno)
-{
- arc_ccfsm_at_label (prefix, labelno);
- default_internal_label (stream, prefix, labelno);
-}
-
-/* Worker function for TARGET_ASM_EXTERNAL_LIBCALL. */
-
-static void
-arc_external_libcall (rtx fun ATTRIBUTE_UNUSED)
-{
-#if 0
-/* On the ARC we want to have libgcc's for multiple cpus in one binary.
- We can't use `assemble_name' here as that will call ASM_OUTPUT_LABELREF
- and we'll get another suffix added on if -mmangle-cpu. */
- if (TARGET_MANGLE_CPU_LIBGCC)
- {
- fprintf (FILE, "\t.rename\t_%s, _%s%s\n",
- XSTR (SYMREF, 0), XSTR (SYMREF, 0),
- arc_mangle_suffix);
- }
-#endif
-}
-
-/* Worker function for TARGET_RETURN_IN_MEMORY. */
-
-static bool
-arc_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
-{
- if (AGGREGATE_TYPE_P (type))
- return true;
- else
- {
- HOST_WIDE_INT size = int_size_in_bytes (type);
- return (size == -1 || size > 8);
- }
-}
-
-/* For ARC, All aggregates and arguments greater than 8 bytes are
- passed by reference. */
-
-static bool
-arc_pass_by_reference (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
- enum machine_mode mode, const_tree type,
- bool named ATTRIBUTE_UNUSED)
-{
- unsigned HOST_WIDE_INT size;
-
- if (type)
- {
- if (AGGREGATE_TYPE_P (type))
- return true;
- size = int_size_in_bytes (type);
- }
- else
- size = GET_MODE_SIZE (mode);
-
- return size > 8;
-}
diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
deleted file mode 100644
index a3e5f274b2d..00000000000
--- a/gcc/config/arc/arc.h
+++ /dev/null
@@ -1,1088 +0,0 @@
-/* Definitions of target machine for GNU compiler, Argonaut ARC cpu.
- Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005,
- 2007, 2008 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
-
-/* ??? This is an old port, and is undoubtedly suffering from bit rot. */
-
-/* Things to do:
-
- - incscc, decscc?
- - print active compiler options in assembler output
-*/
-
-
-#undef ASM_SPEC
-#undef LINK_SPEC
-#undef STARTFILE_SPEC
-#undef ENDFILE_SPEC
-#undef SIZE_TYPE
-#undef PTRDIFF_TYPE
-#undef WCHAR_TYPE
-#undef WCHAR_TYPE_SIZE
-#undef ASM_OUTPUT_LABELREF
-
-/* Print subsidiary information on the compiler version in use. */
-#define TARGET_VERSION fprintf (stderr, " (arc)")
-
-/* Names to predefine in the preprocessor for this target machine. */
-#define TARGET_CPU_CPP_BUILTINS() \
- do \
- { \
- builtin_define ("__arc__"); \
- if (TARGET_BIG_ENDIAN) \
- builtin_define ("__big_endian__"); \
- if (arc_cpu_type == 0) \
- builtin_define ("__base__"); \
- builtin_assert ("cpu=arc"); \
- builtin_assert ("machine=arc"); \
- } while (0)
-
-/* Pass -mmangle-cpu if we get -mcpu=*.
- Doing it this way lets one have it on as default with -mcpu=*,
- but also lets one turn it off with -mno-mangle-cpu. */
-#define CC1_SPEC "\
-%{mcpu=*:-mmangle-cpu} \
-%{EB:%{EL:%emay not use both -EB and -EL}} \
-%{EB:-mbig-endian} %{EL:-mlittle-endian} \
-"
-
-#define ASM_SPEC "%{v} %{EB} %{EL}"
-
-#define LINK_SPEC "%{v} %{EB} %{EL}"
-
-#define STARTFILE_SPEC "%{!shared:crt0.o%s} crtinit.o%s"
-
-#define ENDFILE_SPEC "crtfini.o%s"
-
-/* Instruction set characteristics.
- These are internal macros, set by the appropriate -mcpu= option. */
-
-/* Nonzero means the cpu has a barrel shifter. */
-#define TARGET_SHIFTER 0
-
-/* Which cpu we're compiling for. */
-extern int arc_cpu_type;
-
-/* Check if CPU is an extension and set `arc_cpu_type' and `arc_mangle_cpu'
- appropriately. The result should be nonzero if the cpu is recognized,
- otherwise zero. This is intended to be redefined in a cover file.
- This is used by arc_init. */
-#define ARC_EXTENSION_CPU(cpu) 0
-
-/* Sometimes certain combinations of command options do not make
- sense on a particular target machine. You can define a macro
- `OVERRIDE_OPTIONS' to take account of this. This macro, if
- defined, is executed once just after all the command options have
- been parsed.
-
- Don't use this macro to turn on various extra optimizations for
- `-O'. That is what `OPTIMIZATION_OPTIONS' is for. */
-
-
-#define OVERRIDE_OPTIONS \
-do { \
- /* These need to be done at start up. It's convenient to do them here. */ \
- arc_init (); \
-} while (0)
-
-/* Target machine storage layout. */
-
-/* Define this if most significant bit is lowest numbered
- in instructions that operate on numbered bit-fields. */
-#define BITS_BIG_ENDIAN 1
-
-/* Define this if most significant byte of a word is the lowest numbered. */
-#define BYTES_BIG_ENDIAN (TARGET_BIG_ENDIAN)
-
-/* Define this if most significant word of a multiword number is the lowest
- numbered. */
-#define WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN)
-
-/* Define this to set the endianness to use in libgcc2.c, which can
- not depend on target_flags. */
-#ifdef __big_endian__
-#define LIBGCC2_WORDS_BIG_ENDIAN 1
-#else
-#define LIBGCC2_WORDS_BIG_ENDIAN 0
-#endif
-
-/* Width of a word, in units (bytes). */
-#define UNITS_PER_WORD 4
-
-/* Define this macro if it is advisable to hold scalars in registers
- in a wider mode than that declared by the program. In such cases,
- the value is constrained to be within the bounds of the declared
- type, but kept valid in the wider mode. The signedness of the
- extension may differ from that of the type. */
-#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \
-if (GET_MODE_CLASS (MODE) == MODE_INT \
- && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \
-{ \
- (MODE) = SImode; \
-}
-
-/* Allocation boundary (in *bits*) for storing arguments in argument list. */
-#define PARM_BOUNDARY 32
-
-/* Boundary (in *bits*) on which stack pointer should be aligned. */
-#define STACK_BOUNDARY 64
-
-/* ALIGN FRAMES on word boundaries */
-#define ARC_STACK_ALIGN(LOC) (((LOC)+7) & ~7)
-
-/* Allocation boundary (in *bits*) for the code of a function. */
-#define FUNCTION_BOUNDARY 32
-
-/* Alignment of field after `int : 0' in a structure. */
-#define EMPTY_FIELD_BOUNDARY 32
-
-/* Every structure's size must be a multiple of this. */
-#define STRUCTURE_SIZE_BOUNDARY 8
-
-/* A bit-field declared as `int' forces `int' alignment for the struct. */
-#define PCC_BITFIELD_TYPE_MATTERS 1
-
-/* No data type wants to be aligned rounder than this. */
-/* This is bigger than currently necessary for the ARC. If 8 byte floats are
- ever added it's not clear whether they'll need such alignment or not. For
- now we assume they will. We can always relax it if necessary but the
- reverse isn't true. */
-#define BIGGEST_ALIGNMENT 64
-
-/* The best alignment to use in cases where we have a choice. */
-#define FASTEST_ALIGNMENT 32
-
-/* Make strings word-aligned so strcpy from constants will be faster. */
-#define CONSTANT_ALIGNMENT(EXP, ALIGN) \
- ((TREE_CODE (EXP) == STRING_CST \
- && (ALIGN) < FASTEST_ALIGNMENT) \
- ? FASTEST_ALIGNMENT : (ALIGN))
-
-/* Make arrays of chars word-aligned for the same reasons. */
-#define DATA_ALIGNMENT(TYPE, ALIGN) \
- (TREE_CODE (TYPE) == ARRAY_TYPE \
- && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \
- && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))
-
-/* Set this nonzero if move instructions will actually fail to work
- when given unaligned data. */
-/* On the ARC the lower address bits are masked to 0 as necessary. The chip
- won't croak when given an unaligned address, but the insn will still fail
- to produce the correct result. */
-#define STRICT_ALIGNMENT 1
-
-/* Layout of source language data types. */
-
-#define SHORT_TYPE_SIZE 16
-#define INT_TYPE_SIZE 32
-#define LONG_TYPE_SIZE 32
-#define LONG_LONG_TYPE_SIZE 64
-#define FLOAT_TYPE_SIZE 32
-#define DOUBLE_TYPE_SIZE 64
-#define LONG_DOUBLE_TYPE_SIZE 64
-
-/* Define this as 1 if `char' should by default be signed; else as 0. */
-#define DEFAULT_SIGNED_CHAR 1
-
-#define SIZE_TYPE "long unsigned int"
-#define PTRDIFF_TYPE "long int"
-#define WCHAR_TYPE "short unsigned int"
-#define WCHAR_TYPE_SIZE 16
-
-/* Standard register usage. */
-
-/* Number of actual hardware registers.
- The hardware registers are assigned numbers for the compiler
- from 0 to just below FIRST_PSEUDO_REGISTER.
- All registers that the compiler knows about must be given numbers,
- even those that are not normally considered general registers. */
-/* Registers 61, 62, and 63 are not really registers and we needn't treat
- them as such. We still need a register for the condition code. */
-#define FIRST_PSEUDO_REGISTER 62
-
-/* 1 for registers that have pervasive standard uses
- and are not available for the register allocator.
-
- 0-28 - general purpose registers
- 29 - ilink1 (interrupt link register)
- 30 - ilink2 (interrupt link register)
- 31 - blink (branch link register)
- 32-59 - reserved for extensions
- 60 - LP_COUNT
- 61 - condition code
-
- For doc purposes:
- 61 - short immediate data indicator (setting flags)
- 62 - long immediate data indicator
- 63 - short immediate data indicator (not setting flags).
-
- The general purpose registers are further broken down into:
- 0-7 - arguments/results
- 8-15 - call used
- 16-23 - call saved
- 24 - call used, static chain pointer
- 25 - call used, gptmp
- 26 - global pointer
- 27 - frame pointer
- 28 - stack pointer
-
- By default, the extension registers are not available. */
-
-#define FIXED_REGISTERS \
-{ 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 1, 1, 1, 1, 0, \
- \
- 1, 1, 1, 1, 1, 1, 1, 1, \
- 1, 1, 1, 1, 1, 1, 1, 1, \
- 1, 1, 1, 1, 1, 1, 1, 1, \
- 1, 1, 1, 1, 1, 1 }
-
-/* 1 for registers not available across function calls.
- These must include the FIXED_REGISTERS and also any
- registers that can be used without being saved.
- The latter must include the registers where values are returned
- and the register where structure-value addresses are passed.
- Aside from that, you can include as many other registers as you like. */
-
-#define CALL_USED_REGISTERS \
-{ 1, 1, 1, 1, 1, 1, 1, 1, \
- 1, 1, 1, 1, 1, 1, 1, 1, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- 1, 1, 1, 1, 1, 1, 1, 1, \
- \
- 1, 1, 1, 1, 1, 1, 1, 1, \
- 1, 1, 1, 1, 1, 1, 1, 1, \
- 1, 1, 1, 1, 1, 1, 1, 1, \
- 1, 1, 1, 1, 1, 1 }
-
-/* If defined, an initializer for a vector of integers, containing the
- numbers of hard registers in the order in which GCC should
- prefer to use them (from most preferred to least). */
-#define REG_ALLOC_ORDER \
-{ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, \
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 31, \
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, \
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, \
- 27, 28, 29, 30 }
-
-/* Macro to conditionally modify fixed_regs/call_used_regs. */
-#define CONDITIONAL_REGISTER_USAGE \
-do { \
- if (PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM) \
- { \
- fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
- call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
- } \
-} while (0)
-
-/* Return number of consecutive hard regs needed starting at reg REGNO
- to hold something of mode MODE.
- This is ordinarily the length in words of a value of mode MODE
- but can be less for certain modes in special long registers. */
-#define HARD_REGNO_NREGS(REGNO, MODE) \
-((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
-
-/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. */
-extern const unsigned int arc_hard_regno_mode_ok[];
-extern unsigned int arc_mode_class[];
-#define HARD_REGNO_MODE_OK(REGNO, MODE) \
-((arc_hard_regno_mode_ok[REGNO] & arc_mode_class[MODE]) != 0)
-
-/* A C expression that is nonzero if it is desirable to choose
- register allocation so as to avoid move instructions between a
- value of mode MODE1 and a value of mode MODE2.
-
- If `HARD_REGNO_MODE_OK (R, MODE1)' and `HARD_REGNO_MODE_OK (R,
- MODE2)' are ever different for any R, then `MODES_TIEABLE_P (MODE1,
- MODE2)' must be zero. */
-
-/* Tie QI/HI/SI modes together. */
-#define MODES_TIEABLE_P(MODE1, MODE2) \
-(GET_MODE_CLASS (MODE1) == MODE_INT \
- && GET_MODE_CLASS (MODE2) == MODE_INT \
- && GET_MODE_SIZE (MODE1) <= UNITS_PER_WORD \
- && GET_MODE_SIZE (MODE2) <= UNITS_PER_WORD)
-
-/* Register classes and constants. */
-
-/* Define the classes of registers for register constraints in the
- machine description. Also define ranges of constants.
-
- One of the classes must always be named ALL_REGS and include all hard regs.
- If there is more than one class, another class must be named NO_REGS
- and contain no registers.
-
- The name GENERAL_REGS must be the name of a class (or an alias for
- another name such as ALL_REGS). This is the class of registers
- that is allowed by "g" or "r" in a register constraint.
- Also, registers outside this class are allocated only when
- instructions express preferences for them.
-
- The classes must be numbered in nondecreasing order; that is,
- a larger-numbered class must never be contained completely
- in a smaller-numbered class.
-
- For any two classes, it is very desirable that there be another
- class that represents their union.
-
- It is important that any condition codes have class NO_REGS.
- See `register_operand'. */
-
-enum reg_class {
- NO_REGS, LPCOUNT_REG, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES
-};
-
-#define N_REG_CLASSES (int) LIM_REG_CLASSES
-
-/* Give names of register classes as strings for dump file. */
-#define REG_CLASS_NAMES \
-{ "NO_REGS", "LPCOUNT_REG", "GENERAL_REGS", "ALL_REGS" }
-
-/* Define which registers fit in which classes.
- This is an initializer for a vector of HARD_REG_SET
- of length N_REG_CLASSES. */
-
-#define REG_CLASS_CONTENTS \
-{ {0, 0}, {0, 0x10000000}, {0xffffffff, 0xfffffff}, \
- {0xffffffff, 0x1fffffff} }
-
-/* The same information, inverted:
- Return the class number of the smallest class containing
- reg number REGNO. This could be a conditional expression
- or could index an array. */
-extern enum reg_class arc_regno_reg_class[FIRST_PSEUDO_REGISTER];
-#define REGNO_REG_CLASS(REGNO) \
-(arc_regno_reg_class[REGNO])
-
-/* The class value for index registers, and the one for base regs. */
-#define INDEX_REG_CLASS GENERAL_REGS
-#define BASE_REG_CLASS GENERAL_REGS
-
-/* Get reg_class from a letter such as appears in the machine description. */
-#define REG_CLASS_FROM_LETTER(C) \
-((C) == 'l' ? LPCOUNT_REG /* ??? needed? */ \
- : NO_REGS)
-
-/* These assume that REGNO is a hard or pseudo reg number.
- They give nonzero only if REGNO is a hard reg of the suitable class
- or a pseudo reg currently allocated to a suitable hard reg.
- Since they use reg_renumber, they are safe only once reg_renumber
- has been allocated, which happens in local-alloc.c. */
-#define REGNO_OK_FOR_BASE_P(REGNO) \
-((REGNO) < 32 || (unsigned) reg_renumber[REGNO] < 32)
-#define REGNO_OK_FOR_INDEX_P(REGNO) \
-((REGNO) < 32 || (unsigned) reg_renumber[REGNO] < 32)
-
-/* Given an rtx X being reloaded into a reg required to be
- in class CLASS, return the class of reg to actually use.
- In general this is just CLASS; but on some machines
- in some cases it is preferable to use a more restrictive class. */
-#define PREFERRED_RELOAD_CLASS(X,CLASS) \
-(CLASS)
-
-/* Return the maximum number of consecutive registers
- needed to represent mode MODE in a register of class CLASS. */
-#define CLASS_MAX_NREGS(CLASS, MODE) \
-((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
-
-/* The letters I, J, K, L, M, N, O, P in a register constraint string
- can be used to stand for particular ranges of immediate operands.
- This macro defines what the ranges are.
- C is the letter, and VALUE is a constant value.
- Return 1 if VALUE is in the range specified by C. */
-/* 'I' is used for short immediates (always signed).
- 'J' is used for long immediates.
- 'K' is used for any constant up to 64 bits (for 64x32 situations?). */
-
-/* local to this file */
-#define SMALL_INT(X) ((unsigned) ((X) + 0x100) < 0x200)
-/* local to this file */
-#define LARGE_INT(X) \
-((X) >= (-(HOST_WIDE_INT) 0x7fffffff - 1) \
- && (unsigned HOST_WIDE_INT)(X) <= (unsigned HOST_WIDE_INT) 0xffffffff)
-
-#define CONST_OK_FOR_LETTER_P(VALUE, C) \
-((C) == 'I' ? SMALL_INT (VALUE) \
- : (C) == 'J' ? LARGE_INT (VALUE) \
- : (C) == 'K' ? 1 \
- : 0)
-
-/* Similar, but for floating constants, and defining letters G and H.
- Here VALUE is the CONST_DOUBLE rtx itself. */
-/* 'G' is used for integer values for the multiplication insns where the
- operands are extended from 4 bytes to 8 bytes.
- 'H' is used when any 64-bit constant is allowed. */
-#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \
-((C) == 'G' ? arc_double_limm_p (VALUE) \
- : (C) == 'H' ? 1 \
- : 0)
-
-/* A C expression that defines the optional machine-dependent constraint
- letters that can be used to segregate specific types of operands,
- usually memory references, for the target machine. It should return 1 if
- VALUE corresponds to the operand type represented by the constraint letter
- C. If C is not defined as an extra constraint, the value returned should
- be 0 regardless of VALUE. */
-/* ??? This currently isn't used. Waiting for PIC. */
-#if 0
-#define EXTRA_CONSTRAINT(VALUE, C) \
-((C) == 'R' ? (SYMBOL_REF_FUNCTION_P (VALUE) || GET_CODE (VALUE) == LABEL_REF) \
- : 0)
-#endif
-
-/* Stack layout and stack pointer usage. */
-
-/* Define this macro if pushing a word onto the stack moves the stack
- pointer to a smaller address. */
-#define STACK_GROWS_DOWNWARD
-
-/* Define this to nonzero if the nominal address of the stack frame
- is at the high-address end of the local variables;
- that is, each additional local variable allocated
- goes at a more negative offset in the frame. */
-#define FRAME_GROWS_DOWNWARD 1
-
-/* Offset within stack frame to start allocating local variables at.
- If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
- first local allocated. Otherwise, it is the offset to the BEGINNING
- of the first local allocated. */
-#define STARTING_FRAME_OFFSET 0
-
-/* Offset from the stack pointer register to the first location at which
- outgoing arguments are placed. */
-#define STACK_POINTER_OFFSET FIRST_PARM_OFFSET (0)
-
-/* Offset of first parameter from the argument pointer register value. */
-/* 4 bytes for each of previous fp, return address, and previous gp.
- 4 byte reserved area for future considerations. */
-#define FIRST_PARM_OFFSET(FNDECL) 16
-
-/* A C expression whose value is RTL representing the address in a
- stack frame where the pointer to the caller's frame is stored.
- Assume that FRAMEADDR is an RTL expression for the address of the
- stack frame itself.
-
- If you don't define this macro, the default is to return the value
- of FRAMEADDR--that is, the stack frame address is also the address
- of the stack word that points to the previous frame. */
-/* ??? unfinished */
-/*define DYNAMIC_CHAIN_ADDRESS (FRAMEADDR)*/
-
-/* A C expression whose value is RTL representing the value of the
- return address for the frame COUNT steps up from the current frame.
- FRAMEADDR is the frame pointer of the COUNT frame, or the frame
- pointer of the COUNT - 1 frame if `RETURN_ADDR_IN_PREVIOUS_FRAME'
- is defined. */
-/* The current return address is in r31. The return address of anything
- farther back is at [%fp,4]. */
-#if 0 /* The default value should work. */
-#define RETURN_ADDR_RTX(COUNT, FRAME) \
-(((COUNT) == -1) \
- ? gen_rtx_REG (Pmode, 31) \
- : copy_to_reg (gen_rtx_MEM (Pmode, \
- memory_address (Pmode, \
- plus_constant ((FRAME), \
- UNITS_PER_WORD)))))
-#endif
-
-/* Register to use for pushing function arguments. */
-#define STACK_POINTER_REGNUM 28
-
-/* Base register for access to local variables of the function. */
-#define FRAME_POINTER_REGNUM 27
-
-/* Base register for access to arguments of the function. */
-#define ARG_POINTER_REGNUM FRAME_POINTER_REGNUM
-
-/* Register in which static-chain is passed to a function. This must
- not be a register used by the prologue. */
-#define STATIC_CHAIN_REGNUM 24
-
-/* A C expression which is nonzero if a function must have and use a
- frame pointer. This expression is evaluated in the reload pass.
- If its value is nonzero the function will have a frame pointer. */
-#define FRAME_POINTER_REQUIRED \
-(cfun->calls_alloca)
-
-/* C statement to store the difference between the frame pointer
- and the stack pointer values immediately after the function prologue. */
-#define INITIAL_FRAME_POINTER_OFFSET(VAR) \
-((VAR) = arc_compute_frame_size (get_frame_size ()))
-
-/* Function argument passing. */
-
-/* If defined, the maximum amount of space required for outgoing
- arguments will be computed and placed into the variable
- `crtl->outgoing_args_size'. No space will be pushed
- onto the stack for each call; instead, the function prologue should
- increase the stack frame size by this amount. */
-#define ACCUMULATE_OUTGOING_ARGS 1
-
-/* Value is the number of bytes of arguments automatically
- popped when returning from a subroutine call.
- FUNDECL is the declaration node of the function (as a tree),
- FUNTYPE is the data type of the function (as a tree),
- or for a library call it is an identifier node for the subroutine name.
- SIZE is the number of bytes of arguments passed on the stack. */
-#define RETURN_POPS_ARGS(DECL, FUNTYPE, SIZE) 0
-
-/* Define a data type for recording info about an argument list
- during the scan of that argument list. This data type should
- hold all necessary information about the function itself
- and about the args processed so far, enough to enable macros
- such as FUNCTION_ARG to determine where the next arg should go. */
-#define CUMULATIVE_ARGS int
-
-/* Initialize a variable CUM of type CUMULATIVE_ARGS
- for a call to a function whose data type is FNTYPE.
- For a library call, FNTYPE is 0. */
-#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
-((CUM) = 0)
-
-/* The number of registers used for parameter passing. Local to this file. */
-#define MAX_ARC_PARM_REGS 8
-
-/* 1 if N is a possible register number for function argument passing. */
-#define FUNCTION_ARG_REGNO_P(N) \
-((unsigned) (N) < MAX_ARC_PARM_REGS)
-
-/* The ROUND_ADVANCE* macros are local to this file. */
-/* Round SIZE up to a word boundary. */
-#define ROUND_ADVANCE(SIZE) \
-(((SIZE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
-
-/* Round arg MODE/TYPE up to the next word boundary. */
-#define ROUND_ADVANCE_ARG(MODE, TYPE) \
-((MODE) == BLKmode \
- ? ROUND_ADVANCE (int_size_in_bytes (TYPE)) \
- : ROUND_ADVANCE (GET_MODE_SIZE (MODE)))
-
-/* Round CUM up to the necessary point for argument MODE/TYPE. */
-#define ROUND_ADVANCE_CUM(CUM, MODE, TYPE) \
-((((MODE) == BLKmode ? TYPE_ALIGN (TYPE) : GET_MODE_BITSIZE (MODE)) \
- > BITS_PER_WORD) \
- ? (((CUM) + 1) & ~1) \
- : (CUM))
-
-/* Return boolean indicating arg of type TYPE and mode MODE will be passed in
- a reg. This includes arguments that have to be passed by reference as the
- pointer to them is passed in a reg if one is available (and that is what
- we're given).
- This macro is only used in this file. */
-#define PASS_IN_REG_P(CUM, MODE, TYPE) \
-((CUM) < MAX_ARC_PARM_REGS \
- && ((ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)) \
- + ROUND_ADVANCE_ARG ((MODE), (TYPE)) \
- <= MAX_ARC_PARM_REGS)))
-
-/* Determine where to put an argument to a function.
- Value is zero to push the argument on the stack,
- or a hard register in which to store the argument.
-
- MODE is the argument's machine mode.
- TYPE is the data type of the argument (as a tree).
- This is null for libcalls where that information may
- not be available.
- CUM is a variable of type CUMULATIVE_ARGS which gives info about
- the preceding args and about the function being called.
- NAMED is nonzero if this argument is a named parameter
- (otherwise it is an extra parameter matching an ellipsis). */
-/* On the ARC the first MAX_ARC_PARM_REGS args are normally in registers
- and the rest are pushed. */
-#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
-(PASS_IN_REG_P ((CUM), (MODE), (TYPE)) \
- ? gen_rtx_REG ((MODE), ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE))) \
- : 0)
-
-/* Update the data in CUM to advance over an argument
- of mode MODE and data type TYPE.
- (TYPE is null for libcalls where that information may not be available.) */
-#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
-((CUM) = (ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)) \
- + ROUND_ADVANCE_ARG ((MODE), (TYPE))))
-
-/* If defined, a C expression that gives the alignment boundary, in bits,
- of an argument with the specified mode and type. If it is not defined,
- PARM_BOUNDARY is used for all arguments. */
-#define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \
-(((TYPE) ? TYPE_ALIGN (TYPE) : GET_MODE_BITSIZE (MODE)) <= PARM_BOUNDARY \
- ? PARM_BOUNDARY \
- : 2 * PARM_BOUNDARY)
-
-/* Function results. */
-
-/* Define how to find the value returned by a function.
- VALTYPE is the data type of the value (as a tree).
- If the precise function being called is known, FUNC is its FUNCTION_DECL;
- otherwise, FUNC is 0. */
-#define FUNCTION_VALUE(VALTYPE, FUNC) gen_rtx_REG (TYPE_MODE (VALTYPE), 0)
-
-/* Define how to find the value returned by a library function
- assuming the value has mode MODE. */
-#define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, 0)
-
-/* 1 if N is a possible register number for a function value
- as seen by the caller. */
-/* ??? What about r1 in DI/DF values. */
-#define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)
-
-/* Tell GCC to use TARGET_RETURN_IN_MEMORY. */
-#define DEFAULT_PCC_STRUCT_RETURN 0
-
-/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
- the stack pointer does not matter. The value is tested only in
- functions that have frame pointers.
- No definition is equivalent to always zero. */
-#define EXIT_IGNORE_STACK 0
-
-/* Epilogue delay slots. */
-#define DELAY_SLOTS_FOR_EPILOGUE arc_delay_slots_for_epilogue ()
-
-#define ELIGIBLE_FOR_EPILOGUE_DELAY(TRIAL, SLOTS_FILLED) \
-arc_eligible_for_epilogue_delay (TRIAL, SLOTS_FILLED)
-
-/* Output assembler code to FILE to increment profiler label # LABELNO
- for profiling a function entry. */
-#define FUNCTION_PROFILER(FILE, LABELNO)
-
-/* Trampolines. */
-/* ??? This doesn't work yet because GCC will use as the address of a nested
- function the address of the trampoline. We need to use that address
- right shifted by 2. It looks like we'll need PSImode after all. :-( */
-
-/* Output assembler code for a block containing the constant parts
- of a trampoline, leaving space for the variable parts. */
-/* On the ARC, the trampoline is quite simple as we have 32-bit immediate
- constants.
-
- mov r24,STATIC
- j.nd FUNCTION
-*/
-#define TRAMPOLINE_TEMPLATE(FILE) \
-do { \
- assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0x631f7c00)); \
- assemble_aligned_integer (UNITS_PER_WORD, const0_rtx); \
- assemble_aligned_integer (UNITS_PER_WORD, GEN_INT (0x381f0000)); \
- assemble_aligned_integer (UNITS_PER_WORD, const0_rtx); \
-} while (0)
-
-/* Length in units of the trampoline for entering a nested function. */
-#define TRAMPOLINE_SIZE 16
-
-/* Emit RTL insns to initialize the variable parts of a trampoline.
- FNADDR is an RTX for the address of the function's pure code.
- CXT is an RTX for the static chain value for the function. */
-#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
-do { \
- emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 4)), CXT); \
- emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 12)), FNADDR); \
- emit_insn (gen_flush_icache (validize_mem (gen_rtx_MEM (SImode, TRAMP)))); \
-} while (0)
-
-/* Addressing modes, and classification of registers for them. */
-
-/* Maximum number of registers that can appear in a valid memory address. */
-/* The `ld' insn allows 2, but the `st' insn only allows 1. */
-#define MAX_REGS_PER_ADDRESS 1
-
-/* We have pre inc/dec (load/store with update). */
-#define HAVE_PRE_INCREMENT 1
-#define HAVE_PRE_DECREMENT 1
-
-/* Recognize any constant value that is a valid address. */
-#define CONSTANT_ADDRESS_P(X) \
-(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
- || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST)
-
-/* Nonzero if the constant value X is a legitimate general operand.
- We can handle any 32- or 64-bit constant. */
-/* "1" should work since the largest constant should be a 64 bit critter. */
-/* ??? Not sure what to do for 64x32 compiler. */
-#define LEGITIMATE_CONSTANT_P(X) 1
-
-/* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
- and check its validity for a certain class.
- We have two alternate definitions for each of them.
- The usual definition accepts all pseudo regs; the other rejects
- them unless they have been allocated suitable hard regs.
- The symbol REG_OK_STRICT causes the latter definition to be used.
-
- Most source files want to accept pseudo regs in the hope that
- they will get allocated to the class that the insn wants them to be in.
- Source files for reload pass need to be strict.
- After reload, it makes no difference, since pseudo regs have
- been eliminated by then. */
-
-#ifndef REG_OK_STRICT
-
-/* Nonzero if X is a hard reg that can be used as an index
- or if it is a pseudo reg. */
-#define REG_OK_FOR_INDEX_P(X) \
-((unsigned) REGNO (X) - 32 >= FIRST_PSEUDO_REGISTER - 32)
-/* Nonzero if X is a hard reg that can be used as a base reg
- or if it is a pseudo reg. */
-#define REG_OK_FOR_BASE_P(X) \
-((unsigned) REGNO (X) - 32 >= FIRST_PSEUDO_REGISTER - 32)
-
-#else
-
-/* Nonzero if X is a hard reg that can be used as an index. */
-#define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X))
-/* Nonzero if X is a hard reg that can be used as a base reg. */
-#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))
-
-#endif
-
-/* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
- that is a valid memory address for an instruction.
- The MODE argument is the machine mode for the MEM expression
- that wants to use this address. */
-/* The `ld' insn allows [reg],[reg+shimm],[reg+limm],[reg+reg],[limm]
- but the `st' insn only allows [reg],[reg+shimm],[limm].
- The only thing we can do is only allow the most strict case `st' and hope
- other parts optimize out the restrictions for `ld'. */
-
-/* local to this file */
-#define RTX_OK_FOR_BASE_P(X) \
-(REG_P (X) && REG_OK_FOR_BASE_P (X))
-
-/* local to this file */
-#define RTX_OK_FOR_INDEX_P(X) \
-(0 && /*???*/ REG_P (X) && REG_OK_FOR_INDEX_P (X))
-
-/* local to this file */
-/* ??? Loads can handle any constant, stores can only handle small ones. */
-#define RTX_OK_FOR_OFFSET_P(X) \
-(GET_CODE (X) == CONST_INT && SMALL_INT (INTVAL (X)))
-
-#define LEGITIMATE_OFFSET_ADDRESS_P(MODE, X) \
-(GET_CODE (X) == PLUS \
- && RTX_OK_FOR_BASE_P (XEXP (X, 0)) \
- && (RTX_OK_FOR_INDEX_P (XEXP (X, 1)) \
- || RTX_OK_FOR_OFFSET_P (XEXP (X, 1))))
-
-#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
-{ if (RTX_OK_FOR_BASE_P (X)) \
- goto ADDR; \
- if (LEGITIMATE_OFFSET_ADDRESS_P ((MODE), (X))) \
- goto ADDR; \
- if (GET_CODE (X) == CONST_INT && LARGE_INT (INTVAL (X))) \
- goto ADDR; \
- if (GET_CODE (X) == SYMBOL_REF \
- || GET_CODE (X) == LABEL_REF \
- || GET_CODE (X) == CONST) \
- goto ADDR; \
- if ((GET_CODE (X) == PRE_DEC || GET_CODE (X) == PRE_INC) \
- /* We're restricted here by the `st' insn. */ \
- && RTX_OK_FOR_BASE_P (XEXP ((X), 0))) \
- goto ADDR; \
-}
-
-/* Go to LABEL if ADDR (a legitimate address expression)
- has an effect that depends on the machine mode it is used for. */
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
-
-/* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,
- return the mode to be used for the comparison. */
-#define SELECT_CC_MODE(OP, X, Y) \
-arc_select_cc_mode (OP, X, Y)
-
-/* Return nonzero if SELECT_CC_MODE will never return MODE for a
- floating point inequality comparison. */
-#define REVERSIBLE_CC_MODE(MODE) 1 /*???*/
-
-/* Costs. */
-
-/* Compute extra cost of moving data between one register class
- and another. */
-#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) 2
-
-/* Compute the cost of moving data between registers and memory. */
-/* Memory is 3 times as expensive as registers.
- ??? Is that the right way to look at it? */
-#define MEMORY_MOVE_COST(MODE,CLASS,IN) \
-(GET_MODE_SIZE (MODE) <= UNITS_PER_WORD ? 6 : 12)
-
-/* The cost of a branch insn. */
-/* ??? What's the right value here? Branches are certainly more
- expensive than reg->reg moves. */
-#define BRANCH_COST(speed_p, predictable_p) 2
-
-/* Nonzero if access to memory by bytes is slow and undesirable.
- For RISC chips, it means that access to memory by bytes is no
- better than access by words when possible, so grab a whole word
- and maybe make use of that. */
-#define SLOW_BYTE_ACCESS 1
-
-/* Define this macro if it is as good or better to call a constant
- function address than to call an address kept in a register. */
-/* On the ARC, calling through registers is slow. */
-#define NO_FUNCTION_CSE
-
-/* Section selection. */
-/* WARNING: These section names also appear in dwarfout.c. */
-
-/* The names of the text, data, and readonly-data sections are runtime
- selectable. */
-
-#define ARC_SECTION_FORMAT "\t.section %s"
-#define ARC_DEFAULT_TEXT_SECTION ".text"
-#define ARC_DEFAULT_DATA_SECTION ".data"
-#define ARC_DEFAULT_RODATA_SECTION ".rodata"
-
-extern const char *arc_text_section, *arc_data_section, *arc_rodata_section;
-
-/* initfini.c uses this in an asm. */
-#if defined (CRT_INIT) || defined (CRT_FINI)
-#define TEXT_SECTION_ASM_OP "\t.section .text"
-#else
-#define TEXT_SECTION_ASM_OP arc_text_section
-#endif
-#define DATA_SECTION_ASM_OP arc_data_section
-
-#undef READONLY_DATA_SECTION_ASM_OP
-#define READONLY_DATA_SECTION_ASM_OP arc_rodata_section
-
-#define BSS_SECTION_ASM_OP "\t.section .bss"
-
-/* Define this macro if jump tables (for tablejump insns) should be
- output in the text section, along with the assembler instructions.
- Otherwise, the readonly data section is used.
- This macro is irrelevant if there is no separate readonly data section. */
-/*#define JUMP_TABLES_IN_TEXT_SECTION*/
-
-/* For DWARF. Marginally different than default so output is "prettier"
- (and consistent with above). */
-#define PUSHSECTION_ASM_OP "\t.section "
-
-/* Tell crtstuff.c we're using ELF. */
-#define OBJECT_FORMAT_ELF
-
-/* PIC */
-
-/* The register number of the register used to address a table of static
- data addresses in memory. In some cases this register is defined by a
- processor's ``application binary interface'' (ABI). When this macro
- is defined, RTL is generated for this register once, as with the stack
- pointer and frame pointer registers. If this macro is not defined, it
- is up to the machine-dependent files to allocate such a register (if
- necessary). */
-#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 26 : INVALID_REGNUM)
-
-/* Define this macro if the register defined by PIC_OFFSET_TABLE_REGNUM is
- clobbered by calls. Do not define this macro if PIC_OFFSET_TABLE_REGNUM
- is not defined. */
-/* This register is call-saved on the ARC. */
-/*#define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED*/
-
-/* A C expression that is nonzero if X is a legitimate immediate
- operand on the target machine when generating position independent code.
- You can assume that X satisfies CONSTANT_P, so you need not
- check this. You can also assume `flag_pic' is true, so you need not
- check it either. You need not define this macro if all constants
- (including SYMBOL_REF) can be immediate operands when generating
- position independent code. */
-/*#define LEGITIMATE_PIC_OPERAND_P(X)*/
-
-/* Control the assembler format that we output. */
-
-/* A C string constant describing how to begin a comment in the target
- assembler language. The compiler assumes that the comment will
- end at the end of the line. */
-#define ASM_COMMENT_START ";"
-
-/* Output to assembler file text saying following lines
- may contain character constants, extra white space, comments, etc. */
-#define ASM_APP_ON ""
-
-/* Output to assembler file text saying following lines
- no longer contain unusual constructs. */
-#define ASM_APP_OFF ""
-
-/* Globalizing directive for a label. */
-#define GLOBAL_ASM_OP "\t.global\t"
-
-/* This is how to output a reference to a user-level label named NAME.
- `assemble_name' uses this. */
-/* We mangle all user labels to provide protection from linking code
- compiled for different cpus. */
-/* We work around a dwarfout.c deficiency by watching for labels from it and
- not adding the '_' prefix nor the cpu suffix. There is a comment in
- dwarfout.c that says it should be using (*targetm.asm_out.internal_label). */
-extern const char *arc_mangle_cpu;
-#define ASM_OUTPUT_LABELREF(FILE, NAME) \
-do { \
- if ((NAME)[0] == '.' && (NAME)[1] == 'L') \
- fprintf (FILE, "%s", NAME); \
- else \
- { \
- fputc ('_', FILE); \
- if (TARGET_MANGLE_CPU && arc_mangle_cpu != NULL) \
- fprintf (FILE, "%s_", arc_mangle_cpu); \
- fprintf (FILE, "%s", NAME); \
- } \
-} while (0)
-
-/* Assembler pseudo-op to equate one value with another. */
-/* ??? This is needed because dwarfout.c provides a default definition too
- late for defaults.h (which contains the default definition of ASM_OUTPUT_DEF
- that we use). */
-#define SET_ASM_OP "\t.set\t"
-
-/* How to refer to registers in assembler output.
- This sequence is indexed by compiler's hard-register-number (see above). */
-#define REGISTER_NAMES \
-{"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
- "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \
- "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \
- "r24", "r25", "r26", "fp", "sp", "ilink1", "ilink2", "blink", \
- "r32", "r33", "r34", "r35", "r36", "r37", "r38", "r39", \
- "r40", "r41", "r42", "r43", "r44", "r45", "r46", "r47", \
- "r48", "r49", "r50", "r51", "r52", "r53", "r54", "r55", \
- "r56", "r57", "r58", "r59", "lp_count", "cc"}
-
-/* Entry to the insn conditionalizer. */
-#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \
-arc_final_prescan_insn (INSN, OPVEC, NOPERANDS)
-
-/* A C expression which evaluates to true if CODE is a valid
- punctuation character for use in the `PRINT_OPERAND' macro. */
-extern char arc_punct_chars[256];
-#define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \
-arc_punct_chars[(unsigned char) (CHAR)]
-
-/* Print operand X (an rtx) in assembler syntax to file FILE.
- CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
- For `%' followed by punctuation, CODE is the punctuation and X is null. */
-#define PRINT_OPERAND(FILE, X, CODE) \
-arc_print_operand (FILE, X, CODE)
-
-/* A C compound statement to output to stdio stream STREAM the
- assembler syntax for an instruction operand that is a memory
- reference whose address is ADDR. ADDR is an RTL expression. */
-#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
-arc_print_operand_address (FILE, ADDR)
-
-/* This is how to output an element of a case-vector that is absolute. */
-#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
-do { \
- char label[30]; \
- ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE); \
- fprintf (FILE, "\t.word %%st("); \
- assemble_name (FILE, label); \
- fprintf (FILE, ")\n"); \
-} while (0)
-
-/* This is how to output an element of a case-vector that is relative. */
-#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
-do { \
- char label[30]; \
- ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE); \
- fprintf (FILE, "\t.word %%st("); \
- assemble_name (FILE, label); \
- fprintf (FILE, "-"); \
- ASM_GENERATE_INTERNAL_LABEL (label, "L", REL); \
- assemble_name (FILE, label); \
- fprintf (FILE, ")\n"); \
-} while (0)
-
-/* The desired alignment for the location counter at the beginning
- of a loop. */
-/* On the ARC, align loops to 32 byte boundaries (cache line size)
- if -malign-loops. */
-#define LOOP_ALIGN(LABEL) (TARGET_ALIGN_LOOPS ? 5 : 0)
-
-/* This is how to output an assembler line
- that says to advance the location counter
- to a multiple of 2**LOG bytes. */
-#define ASM_OUTPUT_ALIGN(FILE,LOG) \
-do { if ((LOG) != 0) fprintf (FILE, "\t.align %d\n", 1 << (LOG)); } while (0)
-
-/* Debugging information. */
-
-/* Generate DBX and DWARF debugging information. */
-#define DBX_DEBUGGING_INFO 1
-
-/* Prefer STABS (for now). */
-#undef PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
-
-/* Turn off splitting of long stabs. */
-#define DBX_CONTIN_LENGTH 0
-
-/* Miscellaneous. */
-
-/* Specify the machine mode that this machine uses
- for the index in the tablejump instruction. */
-#define CASE_VECTOR_MODE Pmode
-
-/* Define if operations between registers always perform the operation
- on the full register even if a narrower mode is specified. */
-#define WORD_REGISTER_OPERATIONS
-
-/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD
- will either zero-extend or sign-extend. The value of this macro should
- be the code that says which one of the two operations is implicitly
- done, UNKNOWN if none. */
-#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
-
-/* Max number of bytes we can move from memory to memory
- in one reasonably fast instruction. */
-#define MOVE_MAX 4
-
-/* Define this to be nonzero if shift instructions ignore all but the low-order
- few bits. */
-#define SHIFT_COUNT_TRUNCATED 1
-
-/* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
- is done just by pretending it is already truncated. */
-#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
-
-/* Specify the machine mode that pointers have.
- After generation of rtl, the compiler makes no further distinction
- between pointers and any other objects of this machine mode. */
-/* ??? The arc doesn't have full 32-bit pointers, but making this PSImode has
- its own problems (you have to add extendpsisi2 and trucnsipsi2 but how does
- one do it without getting excess code?). Try to avoid it. */
-#define Pmode SImode
-
-/* A function address in a call instruction. */
-#define FUNCTION_MODE SImode
-
-/* alloca should avoid clobbering the old register save area. */
-/* ??? Not defined in tm.texi. */
-#define SETJMP_VIA_SAVE_AREA
-
-/* Define the information needed to generate branch and scc insns. This is
- stored from the compare operation. Note that we can't use "rtx" here
- since it hasn't been defined! */
-extern struct rtx_def *arc_compare_op0, *arc_compare_op1;
-
-/* ARC function types. */
-enum arc_function_type {
- ARC_FUNCTION_UNKNOWN, ARC_FUNCTION_NORMAL,
- /* These are interrupt handlers. The name corresponds to the register
- name that contains the return address. */
- ARC_FUNCTION_ILINK1, ARC_FUNCTION_ILINK2
-};
-#define ARC_INTERRUPT_P(TYPE) \
-((TYPE) == ARC_FUNCTION_ILINK1 || (TYPE) == ARC_FUNCTION_ILINK2)
-/* Compute the type of a function from its DECL. */
diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
deleted file mode 100644
index b67984babbb..00000000000
--- a/gcc/config/arc/arc.md
+++ /dev/null
@@ -1,1637 +0,0 @@
-;; Machine description of the Argonaut ARC cpu for GNU C compiler
-;; Copyright (C) 1994, 1997, 1998, 1999, 2000, 2004, 2005, 2007, 2008
-;; Free Software Foundation, Inc.
-
-;; This file is part of GCC.
-
-;; GCC is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
-
-;; GCC is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GCC; see the file COPYING3. If not see
-;; <http://www.gnu.org/licenses/>.
-
-;; See file "rtl.def" for documentation on define_insn, match_*, et. al.
-
-;; ??? This is an old port, and is undoubtedly suffering from bit rot.
-
-;; Insn type. Used to default other attribute values.
-
-(define_attr "type"
- "move,load,store,cmove,unary,binary,compare,shift,mul,uncond_branch,branch,call,call_no_delay_slot,multi,misc"
- (const_string "binary"))
-
-;; Length (in # of insns, long immediate constants counted too).
-;; ??? There's a nasty interaction between the conditional execution fsm
-;; and insn lengths: insns with shimm values cannot be conditionally executed.
-(define_attr "length" ""
- (cond [(eq_attr "type" "load")
- (if_then_else (match_operand 1 "long_immediate_loadstore_operand" "")
- (const_int 2) (const_int 1))
-
- (eq_attr "type" "store")
- (if_then_else (match_operand 0 "long_immediate_loadstore_operand" "")
- (const_int 2) (const_int 1))
-
- (eq_attr "type" "move,unary,compare")
- (if_then_else (match_operand 1 "long_immediate_operand" "")
- (const_int 2) (const_int 1))
-
- (eq_attr "type" "binary,mul")
- (if_then_else (match_operand 2 "long_immediate_operand" "")
- (const_int 2) (const_int 1))
-
- (eq_attr "type" "cmove")
- (if_then_else (match_operand 2 "register_operand" "")
- (const_int 1) (const_int 2))
-
- (eq_attr "type" "multi") (const_int 2)
- ]
-
- (const_int 1)))
-
-;; The length here is the length of a single asm. Unfortunately it might be
-;; 1 or 2 so we must allow for 2. That's ok though. How often will users
-;; lament asm's not being put in delay slots?
-(define_asm_attributes
- [(set_attr "length" "2")
- (set_attr "type" "multi")])
-
-;; Condition codes: this one is used by final_prescan_insn to speed up
-;; conditionalizing instructions. It saves having to scan the rtl to see if
-;; it uses or alters the condition codes.
-
-;; USE: This insn uses the condition codes (e.g.: a conditional branch).
-;; CANUSE: This insn can use the condition codes (for conditional execution).
-;; SET: All condition codes are set by this insn.
-;; SET_ZN: the Z and N flags are set by this insn.
-;; SET_ZNC: the Z, N, and C flags are set by this insn.
-;; CLOB: The condition codes are set to unknown values by this insn.
-;; NOCOND: This insn can't use and doesn't affect the condition codes.
-
-(define_attr "cond" "use,canuse,set,set_zn,set_znc,clob,nocond"
- (cond [(and (eq_attr "type" "unary,binary,move")
- (eq_attr "length" "1"))
- (const_string "canuse")
-
- (eq_attr "type" "compare")
- (const_string "set")
-
- (eq_attr "type" "cmove,branch")
- (const_string "use")
-
- (eq_attr "type" "multi,misc")
- (const_string "clob")
- ]
-
- (const_string "nocond")))
-
-;; Delay slots.
-
-(define_attr "in_delay_slot" "false,true"
- (cond [(eq_attr "type" "uncond_branch,branch,call,call_no_delay_slot,multi")
- (const_string "false")
- ]
-
- (if_then_else (eq_attr "length" "1")
- (const_string "true")
- (const_string "false"))))
-
-(define_delay (eq_attr "type" "call")
- [(eq_attr "in_delay_slot" "true")
- (eq_attr "in_delay_slot" "true")
- (eq_attr "in_delay_slot" "true")])
-
-(define_delay (eq_attr "type" "branch,uncond_branch")
- [(eq_attr "in_delay_slot" "true")
- (eq_attr "in_delay_slot" "true")
- (eq_attr "in_delay_slot" "true")])
-
-;; Scheduling description for the ARC
-
-(define_cpu_unit "branch")
-
-(define_insn_reservation "any_insn" 1 (eq_attr "type" "!load,compare,branch")
- "nothing")
-
-;; 1) A conditional jump cannot immediately follow the insn setting the flags.
-;; This isn't a complete solution as it doesn't come with guarantees. That
-;; is done in the branch patterns and in arc_print_operand. This exists to
-;; avoid inserting a nop when we can.
-
-(define_insn_reservation "compare" 1 (eq_attr "type" "compare")
- "nothing,branch")
-
-(define_insn_reservation "branch" 1 (eq_attr "type" "branch")
- "branch")
-
-;; 2) References to loaded registers should wait a cycle.
-
-;; Memory with load-delay of 1 (i.e., 2 cycle load).
-
-(define_insn_reservation "memory" 2 (eq_attr "type" "load")
- "nothing")
-
-;; Move instructions.
-
-(define_expand "movqi"
- [(set (match_operand:QI 0 "general_operand" "")
- (match_operand:QI 1 "general_operand" ""))]
- ""
- "
-{
- /* Everything except mem = const or mem = mem can be done easily. */
-
- if (GET_CODE (operands[0]) == MEM)
- operands[1] = force_reg (QImode, operands[1]);
-}")
-
-(define_insn "*movqi_insn"
- [(set (match_operand:QI 0 "move_dest_operand" "=r,r,r,m")
- (match_operand:QI 1 "move_src_operand" "rI,Ji,m,r"))]
-;; ??? Needed?
- "register_operand (operands[0], QImode)
- || register_operand (operands[1], QImode)"
- "@
- mov%? %0,%1
- mov%? %0,%1
- ldb%U1%V1 %0,%1
- stb%U0%V0 %1,%0"
- [(set_attr "type" "move,move,load,store")])
-
-;; ??? This may never match since there's no cmpqi insn.
-
-(define_insn "*movqi_set_cc_insn"
- [(set (reg:CCZN 61) (compare:CCZN
- (sign_extend:SI (match_operand:QI 1 "move_src_operand" "rIJi"))
- (const_int 0)))
- (set (match_operand:QI 0 "move_dest_operand" "=r")
- (match_dup 1))]
- ""
- "mov%?.f %0,%1"
- [(set_attr "type" "move")
- (set_attr "cond" "set_zn")])
-
-(define_expand "movhi"
- [(set (match_operand:HI 0 "general_operand" "")
- (match_operand:HI 1 "general_operand" ""))]
- ""
- "
-{
- /* Everything except mem = const or mem = mem can be done easily. */
-
- if (GET_CODE (operands[0]) == MEM)
- operands[1] = force_reg (HImode, operands[1]);
-}")
-
-(define_insn "*movhi_insn"
- [(set (match_operand:HI 0 "move_dest_operand" "=r,r,r,m")
- (match_operand:HI 1 "move_src_operand" "rI,Ji,m,r"))]
- "register_operand (operands[0], HImode)
- || register_operand (operands[1], HImode)"
- "@
- mov%? %0,%1
- mov%? %0,%1
- ldw%U1%V1 %0,%1
- stw%U0%V0 %1,%0"
- [(set_attr "type" "move,move,load,store")])
-
-;; ??? Will this ever match?
-
-(define_insn "*movhi_set_cc_insn"
- [(set (reg:CCZN 61) (compare:CCZN
- (sign_extend:SI (match_operand:HI 1 "move_src_operand" "rIJi"))
- (const_int 0)))
- (set (match_operand:HI 0 "move_dest_operand" "=r")
- (match_dup 1))]
-;; ??? Needed?
- "register_operand (operands[0], HImode)
- || register_operand (operands[1], HImode)"
- "mov%?.f %0,%1"
- [(set_attr "type" "move")
- (set_attr "cond" "set_zn")])
-
-(define_expand "movsi"
- [(set (match_operand:SI 0 "general_operand" "")
- (match_operand:SI 1 "general_operand" ""))]
- ""
- "
-{
- /* Everything except mem = const or mem = mem can be done easily. */
-
- if (GET_CODE (operands[0]) == MEM)
- operands[1] = force_reg (SImode, operands[1]);
-}")
-
-(define_insn "*movsi_insn"
- [(set (match_operand:SI 0 "move_dest_operand" "=r,r,r,m")
- (match_operand:SI 1 "move_src_operand" "rI,GJi,m,r"))]
- "register_operand (operands[0], SImode)
- || register_operand (operands[1], SImode)"
- "@
- mov%? %0,%1
- mov%? %0,%S1
- ld%U1%V1 %0,%1
- st%U0%V0 %1,%0"
- [(set_attr "type" "move,move,load,store")])
-
-(define_insn "*movsi_set_cc_insn"
- [(set (reg:CCZN 61) (compare:CCZN
- (match_operand:SI 1 "move_src_operand" "rIJi")
- (const_int 0)))
- (set (match_operand:SI 0 "move_dest_operand" "=r")
- (match_dup 1))]
- "register_operand (operands[0], SImode)
- || register_operand (operands[1], SImode)"
- "mov%?.f %0,%S1"
- [(set_attr "type" "move")
- (set_attr "cond" "set_zn")])
-
-(define_expand "movdi"
- [(set (match_operand:DI 0 "general_operand" "")
- (match_operand:DI 1 "general_operand" ""))]
- ""
- "
-{
- /* Everything except mem = const or mem = mem can be done easily. */
-
- if (GET_CODE (operands[0]) == MEM)
- operands[1] = force_reg (DImode, operands[1]);
-}")
-
-(define_insn "*movdi_insn"
- [(set (match_operand:DI 0 "move_dest_operand" "=r,r,r,m")
- (match_operand:DI 1 "move_double_src_operand" "r,HK,m,r"))]
- "register_operand (operands[0], DImode)
- || register_operand (operands[1], DImode)"
- "*
-{
- switch (which_alternative)
- {
- case 0 :
- /* We normally copy the low-numbered register first. However, if
- the first register operand 0 is the same as the second register of
- operand 1, we must copy in the opposite order. */
- if (REGNO (operands[0]) == REGNO (operands[1]) + 1)
- return \"mov %R0,%R1\;mov %0,%1\";
- else
- return \"mov %0,%1\;mov %R0,%R1\";
- case 1 :
- return \"mov %0,%L1\;mov %R0,%H1\";
- case 2 :
- /* If the low-address word is used in the address, we must load it
- last. Otherwise, load it first. Note that we cannot have
- auto-increment in that case since the address register is known to be
- dead. */
- if (refers_to_regno_p (REGNO (operands[0]), REGNO (operands[0]) + 1,
- operands [1], 0))
- return \"ld%V1 %R0,%R1\;ld%V1 %0,%1\";
- else
- return \"ld%V1 %0,%1\;ld%V1 %R0,%R1\";
- case 3 :
- return \"st%V0 %1,%0\;st%V0 %R1,%R0\";
- default:
- gcc_unreachable ();
- }
-}"
- [(set_attr "type" "move,move,load,store")
- ;; ??? The ld/st values could be 4 if it's [reg,bignum].
- (set_attr "length" "2,4,2,2")])
-
-;(define_expand "movdi"
-; [(set (match_operand:DI 0 "general_operand" "")
-; (match_operand:DI 1 "general_operand" ""))]
-; ""
-; "
-;{
-; /* Flow doesn't understand that this is effectively a DFmode move.
-; It doesn't know that all of `operands[0]' is set. */
-; emit_clobber (operands[0]);
-;
-; /* Emit insns that movsi_insn can handle. */
-; emit_insn (gen_movsi (operand_subword (operands[0], 0, 0, DImode),
-; operand_subword (operands[1], 0, 0, DImode)));
-; emit_insn (gen_movsi (operand_subword (operands[0], 1, 0, DImode),
-; operand_subword (operands[1], 1, 0, DImode)));
-; DONE;
-;}")
-
-;; Floating point move insns.
-
-(define_expand "movsf"
- [(set (match_operand:SF 0 "general_operand" "")
- (match_operand:SF 1 "general_operand" ""))]
- ""
- "
-{
- /* Everything except mem = const or mem = mem can be done easily. */
- if (GET_CODE (operands[0]) == MEM)
- operands[1] = force_reg (SFmode, operands[1]);
-}")
-
-(define_insn "*movsf_insn"
- [(set (match_operand:SF 0 "move_dest_operand" "=r,r,r,m")
- (match_operand:SF 1 "move_src_operand" "r,E,m,r"))]
- "register_operand (operands[0], SFmode)
- || register_operand (operands[1], SFmode)"
- "@
- mov%? %0,%1
- mov%? %0,%1 ; %A1
- ld%U1%V1 %0,%1
- st%U0%V0 %1,%0"
- [(set_attr "type" "move,move,load,store")])
-
-(define_expand "movdf"
- [(set (match_operand:DF 0 "general_operand" "")
- (match_operand:DF 1 "general_operand" ""))]
- ""
- "
-{
- /* Everything except mem = const or mem = mem can be done easily. */
- if (GET_CODE (operands[0]) == MEM)
- operands[1] = force_reg (DFmode, operands[1]);
-}")
-
-(define_insn "*movdf_insn"
- [(set (match_operand:DF 0 "move_dest_operand" "=r,r,r,m")
- (match_operand:DF 1 "move_double_src_operand" "r,E,m,r"))]
- "register_operand (operands[0], DFmode)
- || register_operand (operands[1], DFmode)"
- "*
-{
- switch (which_alternative)
- {
- case 0 :
- /* We normally copy the low-numbered register first. However, if
- the first register operand 0 is the same as the second register of
- operand 1, we must copy in the opposite order. */
- if (REGNO (operands[0]) == REGNO (operands[1]) + 1)
- return \"mov %R0,%R1\;mov %0,%1\";
- else
- return \"mov %0,%1\;mov %R0,%R1\";
- case 1 :
- return \"mov %0,%L1\;mov %R0,%H1 ; %A1\";
- case 2 :
- /* If the low-address word is used in the address, we must load it
- last. Otherwise, load it first. Note that we cannot have
- auto-increment in that case since the address register is known to be
- dead. */
- if (refers_to_regno_p (REGNO (operands[0]), REGNO (operands[0]) + 1,
- operands [1], 0))
- return \"ld%V1 %R0,%R1\;ld%V1 %0,%1\";
- else
- return \"ld%V1 %0,%1\;ld%V1 %R0,%R1\";
- case 3 :
- return \"st%V0 %1,%0\;st%V0 %R1,%R0\";
- default:
- gcc_unreachable ();
- }
-}"
- [(set_attr "type" "move,move,load,store")
- ;; ??? The ld/st values could be 4 if it's [reg,bignum].
- (set_attr "length" "2,4,2,2")])
-
-;(define_expand "movdf"
-; [(set (match_operand:DF 0 "general_operand" "")
-; (match_operand:DF 1 "general_operand" ""))]
-; ""
-; "
-;{
-; /* Flow doesn't understand that this is effectively a DFmode move.
-; It doesn't know that all of `operands[0]' is set. */
-; emit_clobber (operands[0]);
-;
-; /* Emit insns that movsi_insn can handle. */
-; emit_insn (gen_movsi (operand_subword (operands[0], 0, 0, DFmode),
-; operand_subword (operands[1], 0, 0, DFmode)));
-; emit_insn (gen_movsi (operand_subword (operands[0], 1, 0, DFmode),
-; operand_subword (operands[1], 1, 0, DFmode)));
-; DONE;
-;}")
-
-;; Load/Store with update instructions.
-;;
-;; Some of these we can get by using pre-decrement or pre-increment, but the
-;; hardware can also do cases where the increment is not the size of the
-;; object.
-;;
-;; In all these cases, we use operands 0 and 1 for the register being
-;; incremented because those are the operands that local-alloc will
-;; tie and these are the pair most likely to be tieable (and the ones
-;; that will benefit the most).
-;;
-;; We use match_operator here because we need to know whether the memory
-;; object is volatile or not.
-
-(define_insn "*loadqi_update"
- [(set (match_operand:QI 3 "register_operand" "=r,r")
- (match_operator:QI 4 "load_update_operand"
- [(match_operand:SI 1 "register_operand" "0,0")
- (match_operand:SI 2 "nonmemory_operand" "rI,J")]))
- (set (match_operand:SI 0 "register_operand" "=r,r")
- (plus:SI (match_dup 1) (match_dup 2)))]
- ""
- "ldb.a%V4 %3,[%0,%2]"
- [(set_attr "type" "load,load")
- (set_attr "length" "1,2")])
-
-(define_insn "*load_zeroextendqisi_update"
- [(set (match_operand:SI 3 "register_operand" "=r,r")
- (zero_extend:SI (match_operator:QI 4 "load_update_operand"
- [(match_operand:SI 1 "register_operand" "0,0")
- (match_operand:SI 2 "nonmemory_operand" "rI,J")])))
- (set (match_operand:SI 0 "register_operand" "=r,r")
- (plus:SI (match_dup 1) (match_dup 2)))]
- ""
- "ldb.a%V4 %3,[%0,%2]"
- [(set_attr "type" "load,load")
- (set_attr "length" "1,2")])
-
-(define_insn "*load_signextendqisi_update"
- [(set (match_operand:SI 3 "register_operand" "=r,r")
- (sign_extend:SI (match_operator:QI 4 "load_update_operand"
- [(match_operand:SI 1 "register_operand" "0,0")
- (match_operand:SI 2 "nonmemory_operand" "rI,J")])))
- (set (match_operand:SI 0 "register_operand" "=r,r")
- (plus:SI (match_dup 1) (match_dup 2)))]
- ""
- "ldb.x.a%V4 %3,[%0,%2]"
- [(set_attr "type" "load,load")
- (set_attr "length" "1,2")])
-
-(define_insn "*storeqi_update"
- [(set (match_operator:QI 4 "store_update_operand"
- [(match_operand:SI 1 "register_operand" "0")
- (match_operand:SI 2 "short_immediate_operand" "I")])
- (match_operand:QI 3 "register_operand" "r"))
- (set (match_operand:SI 0 "register_operand" "=r")
- (plus:SI (match_dup 1) (match_dup 2)))]
- ""
- "stb.a%V4 %3,[%0,%2]"
- [(set_attr "type" "store")
- (set_attr "length" "1")])
-
-(define_insn "*loadhi_update"
- [(set (match_operand:HI 3 "register_operand" "=r,r")
- (match_operator:HI 4 "load_update_operand"
- [(match_operand:SI 1 "register_operand" "0,0")
- (match_operand:SI 2 "nonmemory_operand" "rI,J")]))
- (set (match_operand:SI 0 "register_operand" "=r,r")
- (plus:SI (match_dup 1) (match_dup 2)))]
- ""
- "ldw.a%V4 %3,[%0,%2]"
- [(set_attr "type" "load,load")
- (set_attr "length" "1,2")])
-
-(define_insn "*load_zeroextendhisi_update"
- [(set (match_operand:SI 3 "register_operand" "=r,r")
- (zero_extend:SI (match_operator:HI 4 "load_update_operand"
- [(match_operand:SI 1 "register_operand" "0,0")
- (match_operand:SI 2 "nonmemory_operand" "rI,J")])))
- (set (match_operand:SI 0 "register_operand" "=r,r")
- (plus:SI (match_dup 1) (match_dup 2)))]
- ""
- "ldw.a%V4 %3,[%0,%2]"
- [(set_attr "type" "load,load")
- (set_attr "length" "1,2")])
-
-(define_insn "*load_signextendhisi_update"
- [(set (match_operand:SI 3 "register_operand" "=r,r")
- (sign_extend:SI (match_operator:HI 4 "load_update_operand"
- [(match_operand:SI 1 "register_operand" "0,0")
- (match_operand:SI 2 "nonmemory_operand" "rI,J")])))
- (set (match_operand:SI 0 "register_operand" "=r,r")
- (plus:SI (match_dup 1) (match_dup 2)))]
- ""
- "ldw.x.a%V4 %3,[%0,%2]"
- [(set_attr "type" "load,load")
- (set_attr "length" "1,2")])
-
-(define_insn "*storehi_update"
- [(set (match_operator:HI 4 "store_update_operand"
- [(match_operand:SI 1 "register_operand" "0")
- (match_operand:SI 2 "short_immediate_operand" "I")])
- (match_operand:HI 3 "register_operand" "r"))
- (set (match_operand:SI 0 "register_operand" "=r")
- (plus:SI (match_dup 1) (match_dup 2)))]
- ""
- "stw.a%V4 %3,[%0,%2]"
- [(set_attr "type" "store")
- (set_attr "length" "1")])
-
-(define_insn "*loadsi_update"
- [(set (match_operand:SI 3 "register_operand" "=r,r")
- (match_operator:SI 4 "load_update_operand"
- [(match_operand:SI 1 "register_operand" "0,0")
- (match_operand:SI 2 "nonmemory_operand" "rI,J")]))
- (set (match_operand:SI 0 "register_operand" "=r,r")
- (plus:SI (match_dup 1) (match_dup 2)))]
- ""
- "ld.a%V4 %3,[%0,%2]"
- [(set_attr "type" "load,load")
- (set_attr "length" "1,2")])
-
-(define_insn "*storesi_update"
- [(set (match_operator:SI 4 "store_update_operand"
- [(match_operand:SI 1 "register_operand" "0")
- (match_operand:SI 2 "short_immediate_operand" "I")])
- (match_operand:SI 3 "register_operand" "r"))
- (set (match_operand:SI 0 "register_operand" "=r")
- (plus:SI (match_dup 1) (match_dup 2)))]
- ""
- "st.a%V4 %3,[%0,%2]"
- [(set_attr "type" "store")
- (set_attr "length" "1")])
-
-(define_insn "*loadsf_update"
- [(set (match_operand:SF 3 "register_operand" "=r,r")
- (match_operator:SF 4 "load_update_operand"
- [(match_operand:SI 1 "register_operand" "0,0")
- (match_operand:SI 2 "nonmemory_operand" "rI,J")]))
- (set (match_operand:SI 0 "register_operand" "=r,r")
- (plus:SI (match_dup 1) (match_dup 2)))]
- ""
- "ld.a%V4 %3,[%0,%2]"
- [(set_attr "type" "load,load")
- (set_attr "length" "1,2")])
-
-(define_insn "*storesf_update"
- [(set (match_operator:SF 4 "store_update_operand"
- [(match_operand:SI 1 "register_operand" "0")
- (match_operand:SI 2 "short_immediate_operand" "I")])
- (match_operand:SF 3 "register_operand" "r"))
- (set (match_operand:SI 0 "register_operand" "=r")
- (plus:SI (match_dup 1) (match_dup 2)))]
- ""
- "st.a%V4 %3,[%0,%2]"
- [(set_attr "type" "store")
- (set_attr "length" "1")])
-
-;; Conditional move instructions.
-
-(define_expand "movsicc"
- [(set (match_operand:SI 0 "register_operand" "")
- (if_then_else:SI (match_operand 1 "comparison_operator" "")
- (match_operand:SI 2 "nonmemory_operand" "")
- (match_operand:SI 3 "register_operand" "")))]
- ""
- "
-{
- enum rtx_code code = GET_CODE (operands[1]);
- rtx ccreg
- = gen_rtx_REG (SELECT_CC_MODE (code, arc_compare_op0, arc_compare_op1),
- 61);
-
- operands[1] = gen_rtx_fmt_ee (code, VOIDmode, ccreg, const0_rtx);
-}")
-
-;(define_expand "movdicc"
-; [(set (match_operand:DI 0 "register_operand" "")
-; (if_then_else:DI (match_operand 1 "comparison_operator" "")
-; (match_operand:DI 2 "nonmemory_operand" "")
-; (match_operand:DI 3 "register_operand" "")))]
-; "0 /* ??? this would work better if we had cmpdi */"
-; "
-;{
-; enum rtx_code code = GET_CODE (operands[1]);
-; rtx ccreg
-; = gen_rtx_REG (SELECT_CC_MODE (code, arc_compare_op0, arc_compare_op1),
-; 61);
-;
-; operands[1] = gen_rtx_fmt_ee (code, VOIDmode, ccreg, const0_rtx);
-;}")
-
-(define_expand "movsfcc"
- [(set (match_operand:SF 0 "register_operand" "")
- (if_then_else:SF (match_operand 1 "comparison_operator" "")
- (match_operand:SF 2 "nonmemory_operand" "")
- (match_operand:SF 3 "register_operand" "")))]
- ""
- "
-{
- enum rtx_code code = GET_CODE (operands[1]);
- rtx ccreg
- = gen_rtx_REG (SELECT_CC_MODE (code, arc_compare_op0, arc_compare_op1),
- 61);
-
- operands[1] = gen_rtx_fmt_ee (code, VOIDmode, ccreg, const0_rtx);
-}")
-
-;(define_expand "movdfcc"
-; [(set (match_operand:DF 0 "register_operand" "")
-; (if_then_else:DF (match_operand 1 "comparison_operator" "")
-; (match_operand:DF 2 "nonmemory_operand" "")
-; (match_operand:DF 3 "register_operand" "")))]
-; "0 /* ??? can generate less efficient code if constants involved */"
-; "
-;{
-; enum rtx_code code = GET_CODE (operands[1]);
-; rtx ccreg
-; = gen_rtx_REG (SELECT_CC_MODE (code, arc_compare_op0, arc_compare_op1),
-; 61);
-;
-; operands[1] = gen_rtx_fmt_ee (code, VOIDmode, ccreg, const0_rtx);
-;}")
-
-(define_insn "*movsicc_insn"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (if_then_else:SI (match_operand 1 "comparison_operator" "")
- (match_operand:SI 2 "nonmemory_operand" "rJi")
- (match_operand:SI 3 "register_operand" "0")))]
- ""
- "mov.%d1 %0,%S2"
- [(set_attr "type" "cmove")])
-
-; ??? This doesn't properly handle constants.
-;(define_insn "*movdicc_insn"
-; [(set (match_operand:DI 0 "register_operand" "=r,r")
-; (if_then_else:DI (match_operand 1 "comparison_operator" "")
-; (match_operand:DI 2 "nonmemory_operand" "r,Ji")
-; (match_operand:DI 3 "register_operand" "0,0")))]
-; "0"
-; "*
-;{
-; switch (which_alternative)
-; {
-; case 0 :
-; /* We normally copy the low-numbered register first. However, if
-; the first register operand 0 is the same as the second register of
-; operand 1, we must copy in the opposite order. */
-; if (REGNO (operands[0]) == REGNO (operands[2]) + 1)
-; return \"mov.%d1 %R0,%R2\;mov.%d1 %0,%2\";
-; else
-; return \"mov.%d1 %0,%2\;mov.%d1 %R0,%R2\";
-; case 1 :
-; return \"mov.%d1 %0,%2\;mov.%d1 %R0,%R2\";
-; }
-;}"
-; [(set_attr "type" "cmove,cmove")
-; (set_attr "length" "2,4")])
-
-(define_insn "*movsfcc_insn"
- [(set (match_operand:SF 0 "register_operand" "=r,r")
- (if_then_else:SF (match_operand 1 "comparison_operator" "")
- (match_operand:SF 2 "nonmemory_operand" "r,E")
- (match_operand:SF 3 "register_operand" "0,0")))]
- ""
- "@
- mov.%d1 %0,%2
- mov.%d1 %0,%2 ; %A2"
- [(set_attr "type" "cmove,cmove")])
-
-;(define_insn "*movdfcc_insn"
-; [(set (match_operand:DF 0 "register_operand" "=r,r")
-; (if_then_else:DF (match_operand 1 "comparison_operator" "")
-; (match_operand:DF 2 "nonmemory_operand" "r,E")
-; (match_operand:DF 3 "register_operand" "0,0")))]
-; "0"
-; "*
-;{
-; switch (which_alternative)
-; {
-; case 0 :
-; /* We normally copy the low-numbered register first. However, if
-; the first register operand 0 is the same as the second register of
-; operand 1, we must copy in the opposite order. */
-; if (REGNO (operands[0]) == REGNO (operands[2]) + 1)
-; return \"mov.%d1 %R0,%R2\;mov.%d1 %0,%2\";
-; else
-; return \"mov.%d1 %0,%2\;mov.%d1 %R0,%R2\";
-; case 1 :
-; return \"mov.%d1 %0,%L2\;mov.%d1 %R0,%H2 ; %A2\";
-; }
-;}"
-; [(set_attr "type" "cmove,cmove")
-; (set_attr "length" "2,4")])
-
-;; Zero extension instructions.
-;; ??? We don't support volatile memrefs here, but I'm not sure why.
-
-(define_insn "zero_extendqihi2"
- [(set (match_operand:HI 0 "register_operand" "=r,r")
- (zero_extend:HI (match_operand:QI 1 "nonvol_nonimm_operand" "r,m")))]
- ""
- "@
- extb%? %0,%1
- ldb%U1 %0,%1"
- [(set_attr "type" "unary,load")])
-
-(define_insn "*zero_extendqihi2_set_cc_insn"
- [(set (reg:CCZN 61) (compare:CCZN
- (zero_extend:SI (match_operand:QI 1 "register_operand" "r"))
- (const_int 0)))
- (set (match_operand:HI 0 "register_operand" "=r")
- (zero_extend:HI (match_dup 1)))]
- ""
- "extb%?.f %0,%1"
- [(set_attr "type" "unary")
- (set_attr "cond" "set_zn")])
-
-(define_insn "zero_extendqisi2"
- [(set (match_operand:SI 0 "register_operand" "=r,r")
- (zero_extend:SI (match_operand:QI 1 "nonvol_nonimm_operand" "r,m")))]
- ""
- "@
- extb%? %0,%1
- ldb%U1 %0,%1"
- [(set_attr "type" "unary,load")])
-
-(define_insn "*zero_extendqisi2_set_cc_insn"
- [(set (reg:CCZN 61) (compare:CCZN
- (zero_extend:SI (match_operand:QI 1 "register_operand" "r"))
- (const_int 0)))
- (set (match_operand:SI 0 "register_operand" "=r")
- (zero_extend:SI (match_dup 1)))]
- ""
- "extb%?.f %0,%1"
- [(set_attr "type" "unary")
- (set_attr "cond" "set_zn")])
-
-(define_insn "zero_extendhisi2"
- [(set (match_operand:SI 0 "register_operand" "=r,r")
- (zero_extend:SI (match_operand:HI 1 "nonvol_nonimm_operand" "r,m")))]
- ""
- "@
- extw%? %0,%1
- ldw%U1 %0,%1"
- [(set_attr "type" "unary,load")])
-
-(define_insn "*zero_extendhisi2_set_cc_insn"
- [(set (reg:CCZN 61) (compare:CCZN
- (zero_extend:SI (match_operand:HI 1 "register_operand" "r"))
- (const_int 0)))
- (set (match_operand:SI 0 "register_operand" "=r")
- (zero_extend:SI (match_dup 1)))]
- ""
- "extw%?.f %0,%1"
- [(set_attr "type" "unary")
- (set_attr "cond" "set_zn")])
-
-;; Sign extension instructions.
-
-(define_insn "extendqihi2"
- [(set (match_operand:HI 0 "register_operand" "=r,r")
- (sign_extend:HI (match_operand:QI 1 "nonvol_nonimm_operand" "r,m")))]
- ""
- "@
- sexb%? %0,%1
- ldb.x%U1 %0,%1"
- [(set_attr "type" "unary,load")])
-
-(define_insn "*extendqihi2_set_cc_insn"
- [(set (reg:CCZN 61) (compare:CCZN
- (sign_extend:SI (match_operand:QI 1 "register_operand" "r"))
- (const_int 0)))
- (set (match_operand:HI 0 "register_operand" "=r")
- (sign_extend:HI (match_dup 1)))]
- ""
- "sexb%?.f %0,%1"
- [(set_attr "type" "unary")
- (set_attr "cond" "set_zn")])
-
-(define_insn "extendqisi2"
- [(set (match_operand:SI 0 "register_operand" "=r,r")
- (sign_extend:SI (match_operand:QI 1 "nonvol_nonimm_operand" "r,m")))]
- ""
- "@
- sexb%? %0,%1
- ldb.x%U1 %0,%1"
- [(set_attr "type" "unary,load")])
-
-(define_insn "*extendqisi2_set_cc_insn"
- [(set (reg:CCZN 61) (compare:CCZN
- (sign_extend:SI (match_operand:QI 1 "register_operand" "r"))
- (const_int 0)))
- (set (match_operand:SI 0 "register_operand" "=r")
- (sign_extend:SI (match_dup 1)))]
- ""
- "sexb%?.f %0,%1"
- [(set_attr "type" "unary")
- (set_attr "cond" "set_zn")])
-
-(define_insn "extendhisi2"
- [(set (match_operand:SI 0 "register_operand" "=r,r")
- (sign_extend:SI (match_operand:HI 1 "nonvol_nonimm_operand" "r,m")))]
- ""
- "@
- sexw%? %0,%1
- ldw.x%U1 %0,%1"
- [(set_attr "type" "unary,load")])
-
-(define_insn "*extendhisi2_set_cc_insn"
- [(set (reg:CCZN 61) (compare:CCZN
- (sign_extend:SI (match_operand:HI 1 "register_operand" "r"))
- (const_int 0)))
- (set (match_operand:SI 0 "register_operand" "=r")
- (sign_extend:SI (match_dup 1)))]
- ""
- "sexw%?.f %0,%1"
- [(set_attr "type" "unary")
- (set_attr "cond" "set_zn")])
-
-;; Arithmetic instructions.
-
-(define_insn "addsi3"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (plus:SI (match_operand:SI 1 "register_operand" "%r")
- (match_operand:SI 2 "nonmemory_operand" "rIJ")))]
- ""
- "add%? %0,%1,%2")
-
-(define_insn "*addsi3_set_cc_insn"
- [(set (reg:CC 61) (compare:CC
- (plus:SI (match_operand:SI 1 "register_operand" "%r")
- (match_operand:SI 2 "nonmemory_operand" "rIJ"))
- (const_int 0)))
- (set (match_operand:SI 0 "register_operand" "=r")
- (plus:SI (match_dup 1)
- (match_dup 2)))]
- ""
- "add%?.f %0,%1,%2"
- [(set_attr "cond" "set")])
-
-(define_insn "adddi3"
- [(set (match_operand:DI 0 "register_operand" "=r")
- (plus:DI (match_operand:DI 1 "nonmemory_operand" "%r")
- (match_operand:DI 2 "nonmemory_operand" "ri")))
- (clobber (reg:CC 61))]
- ""
- "*
-{
- rtx op2 = operands[2];
-
- if (GET_CODE (op2) == CONST_INT)
- {
- int sign = INTVAL (op2);
- if (sign < 0)
- return \"add.f %L0,%L1,%2\;adc %H0,%H1,-1\";
- else
- return \"add.f %L0,%L1,%2\;adc %H0,%H1,0\";
- }
- else
- return \"add.f %L0,%L1,%L2\;adc %H0,%H1,%H2\";
-}"
- [(set_attr "length" "2")])
-
-(define_insn "subsi3"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (minus:SI (match_operand:SI 1 "register_operand" "r")
- (match_operand:SI 2 "nonmemory_operand" "rIJ")))]
- ""
- "sub%? %0,%1,%2")
-
-(define_insn "*subsi3_set_cc_insn"
- [(set (reg:CC 61) (compare:CC
- (minus:SI (match_operand:SI 1 "register_operand" "%r")
- (match_operand:SI 2 "nonmemory_operand" "rIJ"))
- (const_int 0)))
- (set (match_operand:SI 0 "register_operand" "=r")
- (minus:SI (match_dup 1)
- (match_dup 2)))]
- ""
- "sub%?.f %0,%1,%2"
- [(set_attr "cond" "set")])
-
-(define_insn "subdi3"
- [(set (match_operand:DI 0 "register_operand" "=r")
- (minus:DI (match_operand:DI 1 "nonmemory_operand" "r")
- (match_operand:DI 2 "nonmemory_operand" "ri")))
- (clobber (reg:CC 61))]
- ""
- "*
-{
- rtx op2 = operands[2];
-
- if (GET_CODE (op2) == CONST_INT)
- {
- int sign = INTVAL (op2);
- if (sign < 0)
- return \"sub.f %L0,%L1,%2\;sbc %H0,%H1,-1\";
- else
- return \"sub.f %L0,%L1,%2\;sbc %H0,%H1,0\";
- }
- else
- return \"sub.f %L0,%L1,%L2\;sbc %H0,%H1,%H2\";
-}"
- [(set_attr "length" "2")])
-
-;; Boolean instructions.
-;;
-;; We don't define the DImode versions as expand_binop does a good enough job.
-
-(define_insn "andsi3"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (and:SI (match_operand:SI 1 "register_operand" "%r")
- (match_operand:SI 2 "nonmemory_operand" "rIJ")))]
- ""
- "and%? %0,%1,%2")
-
-(define_insn "*andsi3_set_cc_insn"
- [(set (reg:CCZN 61) (compare:CCZN
- (and:SI (match_operand:SI 1 "register_operand" "%r")
- (match_operand:SI 2 "nonmemory_operand" "rIJ"))
- (const_int 0)))
- (set (match_operand:SI 0 "register_operand" "=r")
- (and:SI (match_dup 1)
- (match_dup 2)))]
- ""
- "and%?.f %0,%1,%2"
- [(set_attr "cond" "set_zn")])
-
-(define_insn "*bicsi3_insn"
- [(set (match_operand:SI 0 "register_operand" "=r,r,r,r")
- (and:SI (match_operand:SI 1 "nonmemory_operand" "r,r,I,J")
- (not:SI (match_operand:SI 2 "nonmemory_operand" "rI,J,r,r"))))]
- ""
- "bic%? %0,%1,%2"
- [(set_attr "length" "1,2,1,2")])
-
-(define_insn "*bicsi3_set_cc_insn"
- [(set (reg:CCZN 61) (compare:CCZN
- (and:SI (match_operand:SI 1 "register_operand" "%r")
- (not:SI (match_operand:SI 2 "nonmemory_operand" "rIJ")))
- (const_int 0)))
- (set (match_operand:SI 0 "register_operand" "=r")
- (and:SI (match_dup 1)
- (not:SI (match_dup 2))))]
- ""
- "bic%?.f %0,%1,%2"
- [(set_attr "cond" "set_zn")])
-
-(define_insn "iorsi3"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (ior:SI (match_operand:SI 1 "register_operand" "%r")
- (match_operand:SI 2 "nonmemory_operand" "rIJ")))]
- ""
- "or%? %0,%1,%2")
-
-(define_insn "*iorsi3_set_cc_insn"
- [(set (reg:CCZN 61) (compare:CCZN
- (ior:SI (match_operand:SI 1 "register_operand" "%r")
- (match_operand:SI 2 "nonmemory_operand" "rIJ"))
- (const_int 0)))
- (set (match_operand:SI 0 "register_operand" "=r")
- (ior:SI (match_dup 1)
- (match_dup 2)))]
- ""
- "or%?.f %0,%1,%2"
- [(set_attr "cond" "set_zn")])
-
-(define_insn "xorsi3"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (xor:SI (match_operand:SI 1 "register_operand" "%r")
- (match_operand:SI 2 "nonmemory_operand" "rIJ")))]
- ""
- "xor%? %0,%1,%2")
-
-(define_insn "*xorsi3_set_cc_insn"
- [(set (reg:CCZN 61) (compare:CCZN
- (xor:SI (match_operand:SI 1 "register_operand" "%r")
- (match_operand:SI 2 "nonmemory_operand" "rIJ"))
- (const_int 0)))
- (set (match_operand:SI 0 "register_operand" "=r")
- (xor:SI (match_dup 1)
- (match_dup 2)))]
- ""
- "xor%?.f %0,%1,%2"
- [(set_attr "cond" "set_zn")])
-
-(define_insn "negsi2"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (neg:SI (match_operand:SI 1 "register_operand" "r")))]
- ""
- "sub%? %0,0,%1"
- [(set_attr "type" "unary")])
-
-(define_insn "*negsi2_set_cc_insn"
- [(set (reg:CC 61) (compare:CC
- (neg:SI (match_operand:SI 1 "register_operand" "r"))
- (const_int 0)))
- (set (match_operand:SI 0 "register_operand" "=r")
- (neg:SI (match_dup 1)))]
- ""
- "sub%?.f %0,0,%1"
- [(set_attr "type" "unary")
- (set_attr "cond" "set")])
-
-(define_insn "negdi2"
- [(set (match_operand:DI 0 "register_operand" "=r")
- (neg:DI (match_operand:DI 1 "register_operand" "r")))
- (clobber (reg:SI 61))]
- ""
- "sub.f %L0,0,%L1\;sbc %H0,0,%H1"
- [(set_attr "type" "unary")
- (set_attr "length" "2")])
-
-(define_insn "one_cmplsi2"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (not:SI (match_operand:SI 1 "register_operand" "r")))]
- ""
- "xor%? %0,%1,-1"
- [(set_attr "type" "unary")])
-
-(define_insn "*one_cmplsi2_set_cc_insn"
- [(set (reg:CCZN 61) (compare:CCZN
- (not:SI (match_operand:SI 1 "register_operand" "r"))
- (const_int 0)))
- (set (match_operand:SI 0 "register_operand" "=r")
- (not:SI (match_dup 1)))]
- ""
- "xor%?.f %0,%1,-1"
- [(set_attr "type" "unary")
- (set_attr "cond" "set_zn")])
-
-;; Shift instructions.
-
-(define_expand "ashlsi3"
- [(set (match_operand:SI 0 "register_operand" "")
- (ashift:SI (match_operand:SI 1 "register_operand" "")
- (match_operand:SI 2 "nonmemory_operand" "")))]
- ""
- "
-{
- if (! TARGET_SHIFTER)
- {
- emit_insn (gen_rtx_PARALLEL
- (VOIDmode,
- gen_rtvec (2,
- gen_rtx_SET (VOIDmode, operands[0],
- gen_rtx_ASHIFT (SImode, operands[1],
- operands[2])),
- gen_rtx_CLOBBER (VOIDmode,
- gen_rtx_SCRATCH (SImode)))));
- DONE;
- }
-}")
-
-(define_expand "ashrsi3"
- [(set (match_operand:SI 0 "register_operand" "")
- (ashiftrt:SI (match_operand:SI 1 "register_operand" "")
- (match_operand:SI 2 "nonmemory_operand" "")))]
- ""
- "
-{
- if (! TARGET_SHIFTER)
- {
- emit_insn (gen_rtx_PARALLEL
- (VOIDmode,
- gen_rtvec (2,
- gen_rtx_SET (VOIDmode, operands[0],
- gen_rtx_ASHIFTRT (SImode,
- operands[1],
- operands[2])),
- gen_rtx_CLOBBER (VOIDmode,
- gen_rtx_SCRATCH (SImode)))));
- DONE;
- }
-}")
-
-(define_expand "lshrsi3"
- [(set (match_operand:SI 0 "register_operand" "")
- (lshiftrt:SI (match_operand:SI 1 "register_operand" "")
- (match_operand:SI 2 "nonmemory_operand" "")))]
- ""
- "
-{
- if (! TARGET_SHIFTER)
- {
- emit_insn (gen_rtx_PARALLEL
- (VOIDmode,
- gen_rtvec (2,
- gen_rtx_SET (VOIDmode, operands[0],
- gen_rtx_LSHIFTRT (SImode,
- operands[1],
- operands[2])),
- gen_rtx_CLOBBER (VOIDmode,
- gen_rtx_SCRATCH (SImode)))));
- DONE;
- }
-}")
-
-(define_insn "*ashlsi3_insn"
- [(set (match_operand:SI 0 "register_operand" "=r,r,r,r")
- (ashift:SI (match_operand:SI 1 "nonmemory_operand" "r,r,I,J")
- (match_operand:SI 2 "nonmemory_operand" "rI,J,r,r")))]
- "TARGET_SHIFTER"
- "asl%? %0,%1,%2"
- [(set_attr "type" "shift")
- (set_attr "length" "1,2,1,2")])
-
-(define_insn "*ashrsi3_insn"
- [(set (match_operand:SI 0 "register_operand" "=r,r,r,r")
- (ashiftrt:SI (match_operand:SI 1 "nonmemory_operand" "r,r,I,J")
- (match_operand:SI 2 "nonmemory_operand" "rI,J,r,r")))]
- "TARGET_SHIFTER"
- "asr%? %0,%1,%2"
- [(set_attr "type" "shift")
- (set_attr "length" "1,2,1,2")])
-
-(define_insn "*lshrsi3_insn"
- [(set (match_operand:SI 0 "register_operand" "=r,r,r,r")
- (lshiftrt:SI (match_operand:SI 1 "nonmemory_operand" "r,r,I,J")
- (match_operand:SI 2 "nonmemory_operand" "rI,J,r,r")))]
- "TARGET_SHIFTER"
- "lsr%? %0,%1,%2"
- [(set_attr "type" "shift")
- (set_attr "length" "1,2,1,2")])
-
-(define_insn "*shift_si3"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (match_operator:SI 3 "shift_operator"
- [(match_operand:SI 1 "register_operand" "0")
- (match_operand:SI 2 "nonmemory_operand" "rIJ")]))
- (clobber (match_scratch:SI 4 "=&r"))]
- "! TARGET_SHIFTER"
- "* return output_shift (operands);"
- [(set_attr "type" "shift")
- (set_attr "length" "8")])
-
-;; Compare instructions.
-;; This controls RTL generation and register allocation.
-
-;; We generate RTL for comparisons and branches by having the cmpxx
-;; patterns store away the operands. Then, the scc and bcc patterns
-;; emit RTL for both the compare and the branch.
-
-(define_expand "cmpsi"
- [(set (reg:CC 61)
- (compare:CC (match_operand:SI 0 "register_operand" "")
- (match_operand:SI 1 "nonmemory_operand" "")))]
- ""
- "
-{
- arc_compare_op0 = operands[0];
- arc_compare_op1 = operands[1];
- DONE;
-}")
-
-;; ??? We may be able to relax this a bit by adding a new constant 'K' for 0.
-;; This assumes sub.f 0,symbol,0 is a valid insn.
-;; Note that "sub.f 0,r0,1" is an 8 byte insn. To avoid unnecessarily
-;; creating 8 byte insns we duplicate %1 in the destination reg of the insn
-;; if it's a small constant.
-
-(define_insn "*cmpsi_cc_insn"
- [(set (reg:CC 61)
- (compare:CC (match_operand:SI 0 "register_operand" "r,r,r")
- (match_operand:SI 1 "nonmemory_operand" "r,I,J")))]
- ""
- "@
- sub.f 0,%0,%1
- sub.f %1,%0,%1
- sub.f 0,%0,%1"
- [(set_attr "type" "compare,compare,compare")])
-
-(define_insn "*cmpsi_cczn_insn"
- [(set (reg:CCZN 61)
- (compare:CCZN (match_operand:SI 0 "register_operand" "r,r,r")
- (match_operand:SI 1 "nonmemory_operand" "r,I,J")))]
- ""
- "@
- sub.f 0,%0,%1
- sub.f %1,%0,%1
- sub.f 0,%0,%1"
- [(set_attr "type" "compare,compare,compare")])
-
-(define_insn "*cmpsi_ccznc_insn"
- [(set (reg:CCZNC 61)
- (compare:CCZNC (match_operand:SI 0 "register_operand" "r,r,r")
- (match_operand:SI 1 "nonmemory_operand" "r,I,J")))]
- ""
- "@
- sub.f 0,%0,%1
- sub.f %1,%0,%1
- sub.f 0,%0,%1"
- [(set_attr "type" "compare,compare,compare")])
-
-;; Next come the scc insns.
-
-(define_expand "seq"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (eq:SI (match_dup 1) (const_int 0)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (EQ, arc_compare_op0, arc_compare_op1);
-}")
-
-(define_expand "sne"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (ne:SI (match_dup 1) (const_int 0)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (NE, arc_compare_op0, arc_compare_op1);
-}")
-
-(define_expand "sgt"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (gt:SI (match_dup 1) (const_int 0)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (GT, arc_compare_op0, arc_compare_op1);
-}")
-
-(define_expand "sle"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (le:SI (match_dup 1) (const_int 0)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (LE, arc_compare_op0, arc_compare_op1);
-}")
-
-(define_expand "sge"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (ge:SI (match_dup 1) (const_int 0)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (GE, arc_compare_op0, arc_compare_op1);
-}")
-
-(define_expand "slt"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (lt:SI (match_dup 1) (const_int 0)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (LT, arc_compare_op0, arc_compare_op1);
-}")
-
-(define_expand "sgtu"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (gtu:SI (match_dup 1) (const_int 0)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (GTU, arc_compare_op0, arc_compare_op1);
-}")
-
-(define_expand "sleu"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (leu:SI (match_dup 1) (const_int 0)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (LEU, arc_compare_op0, arc_compare_op1);
-}")
-
-(define_expand "sgeu"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (geu:SI (match_dup 1) (const_int 0)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (GEU, arc_compare_op0, arc_compare_op1);
-}")
-
-(define_expand "sltu"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (ltu:SI (match_dup 1) (const_int 0)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (LTU, arc_compare_op0, arc_compare_op1);
-}")
-
-(define_insn "*scc_insn"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (match_operator:SI 1 "comparison_operator" [(reg 61) (const_int 0)]))]
- ""
- "mov %0,1\;sub.%D1 %0,%0,%0"
- [(set_attr "type" "unary")
- (set_attr "length" "2")])
-
-;; ??? Look up negscc insn. See pa.md for example.
-(define_insn "*neg_scc_insn"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (neg:SI (match_operator:SI 1 "comparison_operator"
- [(reg 61) (const_int 0)])))]
- ""
- "mov %0,-1\;sub.%D1 %0,%0,%0"
- [(set_attr "type" "unary")
- (set_attr "length" "2")])
-
-(define_insn "*not_scc_insn"
- [(set (match_operand:SI 0 "register_operand" "=r")
- (not:SI (match_operator:SI 1 "comparison_operator"
- [(reg 61) (const_int 0)])))]
- ""
- "mov %0,1\;sub.%d1 %0,%0,%0"
- [(set_attr "type" "unary")
- (set_attr "length" "2")])
-
-;; These control RTL generation for conditional jump insns
-
-(define_expand "beq"
- [(set (pc)
- (if_then_else (eq (match_dup 1) (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (EQ, arc_compare_op0, arc_compare_op1);
-}")
-
-(define_expand "bne"
- [(set (pc)
- (if_then_else (ne (match_dup 1) (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (NE, arc_compare_op0, arc_compare_op1);
-}")
-
-(define_expand "bgt"
- [(set (pc)
- (if_then_else (gt (match_dup 1) (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (GT, arc_compare_op0, arc_compare_op1);
-}")
-
-(define_expand "ble"
- [(set (pc)
- (if_then_else (le (match_dup 1) (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (LE, arc_compare_op0, arc_compare_op1);
-}")
-
-(define_expand "bge"
- [(set (pc)
- (if_then_else (ge (match_dup 1) (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (GE, arc_compare_op0, arc_compare_op1);
-}")
-
-(define_expand "blt"
- [(set (pc)
- (if_then_else (lt (match_dup 1) (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (LT, arc_compare_op0, arc_compare_op1);
-}")
-
-(define_expand "bgtu"
- [(set (pc)
- (if_then_else (gtu (match_dup 1) (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (GTU, arc_compare_op0, arc_compare_op1);
-}")
-
-(define_expand "bleu"
- [(set (pc)
- (if_then_else (leu (match_dup 1) (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (LEU, arc_compare_op0, arc_compare_op1);
-}")
-
-(define_expand "bgeu"
- [(set (pc)
- (if_then_else (geu (match_dup 1) (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (GEU, arc_compare_op0, arc_compare_op1);
-}")
-
-(define_expand "bltu"
- [(set (pc)
- (if_then_else (ltu (match_dup 1) (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "
-{
- operands[1] = gen_compare_reg (LTU, arc_compare_op0, arc_compare_op1);
-}")
-
-;; Now match both normal and inverted jump.
-
-(define_insn "*branch_insn"
- [(set (pc)
- (if_then_else (match_operator 1 "proper_comparison_operator"
- [(reg 61) (const_int 0)])
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "*
-{
- if (arc_ccfsm_branch_deleted_p ())
- {
- arc_ccfsm_record_branch_deleted ();
- return \"; branch deleted, next insns conditionalized\";
- }
- else
- return \"%~b%d1%# %l0\";
-}"
- [(set_attr "type" "branch")])
-
-(define_insn "*rev_branch_insn"
- [(set (pc)
- (if_then_else (match_operator 1 "proper_comparison_operator"
- [(reg 61) (const_int 0)])
- (pc)
- (label_ref (match_operand 0 "" ""))))]
- "REVERSIBLE_CC_MODE (GET_MODE (XEXP (operands[1], 0)))"
- "*
-{
- if (arc_ccfsm_branch_deleted_p ())
- {
- arc_ccfsm_record_branch_deleted ();
- return \"; branch deleted, next insns conditionalized\";
- }
- else
- return \"%~b%D1%# %l0\";
-}"
- [(set_attr "type" "branch")])
-
-;; Unconditional and other jump instructions.
-
-(define_insn "jump"
- [(set (pc) (label_ref (match_operand 0 "" "")))]
- ""
- "b%* %l0"
- [(set_attr "type" "uncond_branch")])
-
-(define_insn "indirect_jump"
- [(set (pc) (match_operand:SI 0 "address_operand" "p"))]
- ""
- "j%* %a0"
- [(set_attr "type" "uncond_branch")])
-
-;; Implement a switch statement.
-;; This wouldn't be necessary in the non-pic case if we could distinguish
-;; label refs of the jump table from other label refs. The problem is that
-;; label refs are output as "%st(.LL42)" but we don't want the %st - we want
-;; the real address since it's the address of the table.
-
-(define_expand "casesi"
- [(set (match_dup 5)
- (minus:SI (match_operand:SI 0 "register_operand" "")
- (match_operand:SI 1 "nonmemory_operand" "")))
- (set (reg:CC 61)
- (compare:CC (match_dup 5)
- (match_operand:SI 2 "nonmemory_operand" "")))
- (set (pc)
- (if_then_else (gtu (reg:CC 61)
- (const_int 0))
- (label_ref (match_operand 4 "" ""))
- (pc)))
- (parallel
- [(set (pc)
- (mem:SI (plus:SI (mult:SI (match_dup 5)
- (const_int 4))
- (label_ref (match_operand 3 "" "")))))
- (clobber (match_scratch:SI 6 ""))
- (clobber (match_scratch:SI 7 ""))])]
- ""
- "
-{
- operands[5] = gen_reg_rtx (SImode);
-}")
-
-(define_insn "*casesi_insn"
- [(set (pc)
- (mem:SI (plus:SI (mult:SI (match_operand:SI 0 "register_operand" "r")
- (const_int 4))
- (label_ref (match_operand 1 "" "")))))
- (clobber (match_scratch:SI 2 "=r"))
- (clobber (match_scratch:SI 3 "=r"))]
- ""
- "*
-{
- output_asm_insn (\"mov %2,%1\", operands);
- if (TARGET_SHIFTER)
- output_asm_insn (\"asl %3,%0,2\", operands);
- else
- output_asm_insn (\"asl %3,%0\;asl %3,%3\", operands);
- output_asm_insn (\"ld %2,[%2,%3]\", operands);
- output_asm_insn (\"j.nd %a2\", operands);
- return \"\";
-}"
- [(set_attr "type" "uncond_branch")
- (set_attr "length" "6")])
-
-(define_insn "tablejump"
- [(set (pc) (match_operand:SI 0 "address_operand" "p"))
- (use (label_ref (match_operand 1 "" "")))]
- "0 /* disabled -> using casesi now */"
- "j%* %a0"
- [(set_attr "type" "uncond_branch")])
-
-(define_expand "call"
- ;; operands[1] is stack_size_rtx
- ;; operands[2] is next_arg_register
- [(parallel [(call (match_operand:SI 0 "call_operand" "")
- (match_operand 1 "" ""))
- (clobber (reg:SI 31))])]
- ""
- "")
-
-(define_insn "*call_via_reg"
- [(call (mem:SI (match_operand:SI 0 "register_operand" "r"))
- (match_operand 1 "" ""))
- (clobber (reg:SI 31))]
- ""
- "lr blink,[status]\;j.d %0\;add blink,blink,2"
- [(set_attr "type" "call_no_delay_slot")
- (set_attr "length" "3")])
-
-(define_insn "*call_via_label"
- [(call (mem:SI (match_operand:SI 0 "call_address_operand" ""))
- (match_operand 1 "" ""))
- (clobber (reg:SI 31))]
- ""
- ; The %~ is necessary in case this insn gets conditionalized and the previous
- ; insn is the cc setter.
- "%~bl%!%* %0"
- [(set_attr "type" "call")
- (set_attr "cond" "canuse")])
-
-(define_expand "call_value"
- ;; operand 2 is stack_size_rtx
- ;; operand 3 is next_arg_register
- [(parallel [(set (match_operand 0 "register_operand" "=r")
- (call (match_operand:SI 1 "call_operand" "")
- (match_operand 2 "" "")))
- (clobber (reg:SI 31))])]
- ""
- "")
-
-(define_insn "*call_value_via_reg"
- [(set (match_operand 0 "register_operand" "=r")
- (call (mem:SI (match_operand:SI 1 "register_operand" "r"))
- (match_operand 2 "" "")))
- (clobber (reg:SI 31))]
- ""
- "lr blink,[status]\;j.d %1\;add blink,blink,2"
- [(set_attr "type" "call_no_delay_slot")
- (set_attr "length" "3")])
-
-(define_insn "*call_value_via_label"
- [(set (match_operand 0 "register_operand" "=r")
- (call (mem:SI (match_operand:SI 1 "call_address_operand" ""))
- (match_operand 2 "" "")))
- (clobber (reg:SI 31))]
- ""
- ; The %~ is necessary in case this insn gets conditionalized and the previous
- ; insn is the cc setter.
- "%~bl%!%* %1"
- [(set_attr "type" "call")
- (set_attr "cond" "canuse")])
-
-(define_insn "nop"
- [(const_int 0)]
- ""
- "nop"
- [(set_attr "type" "misc")])
-
-;; Special pattern to flush the icache.
-;; ??? Not sure what to do here. Some ARC's are known to support this.
-
-(define_insn "flush_icache"
- [(unspec_volatile [(match_operand 0 "memory_operand" "m")] 0)]
- ""
- "* return \"\";"
- [(set_attr "type" "misc")])
-
-;; Split up troublesome insns for better scheduling.
-
-;; Peepholes go at the end.
diff --git a/gcc/config/arc/arc.opt b/gcc/config/arc/arc.opt
deleted file mode 100644
index dc47fc8f890..00000000000
--- a/gcc/config/arc/arc.opt
+++ /dev/null
@@ -1,54 +0,0 @@
-; Options for the Argonaut ARC port of the compiler
-;
-; Copyright (C) 2005, 2007 Free Software Foundation, Inc.
-;
-; This file is part of GCC.
-;
-; GCC is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free
-; Software Foundation; either version 3, or (at your option) any later
-; version.
-;
-; GCC is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-; License for more details.
-;
-; You should have received a copy of the GNU General Public License
-; along with GCC; see the file COPYING3. If not see
-; <http://www.gnu.org/licenses/>.
-
-malign-loops
-Target Undocumented Report Mask(ALIGN_LOOPS)
-
-mbig-endian
-Target Undocumented Report RejectNegative Mask(BIG_ENDIAN)
-
-mlittle-endian
-Target Undocumented Report RejectNegative InverseMask(BIG_ENDIAN)
-
-mmangle-cpu
-Target Report Mask(MANGLE_CPU)
-Prepend the name of the cpu to all public symbol names
-
-; mmangle-cpu-libgcc
-; Target Undocumented Mask(MANGLE_CPU_LIBGC)
-
-mno-cond-exec
-Target Undocumented Report RejectNegative Mask(NO_COND_EXEC)
-
-mcpu=
-Target RejectNegative Joined Var(arc_cpu_string) Init("base")
--mcpu=CPU Compile code for ARC variant CPU
-
-mtext=
-Target RejectNegative Joined Var(arc_text_string) Init(ARC_DEFAULT_TEXT_SECTION)
--mtext=SECTION Put functions in SECTION
-
-mdata=
-Target RejectNegative Joined Var(arc_data_string) Init(ARC_DEFAULT_DATA_SECTION)
--mdata=SECTION Put data in SECTION
-
-mrodata=
-Target RejectNegative Joined Var(arc_rodata_string) Init(ARC_DEFAULT_RODATA_SECTION)
--mrodata=SECTION Put read-only data in SECTION
diff --git a/gcc/config/arc/initfini.c b/gcc/config/arc/initfini.c
deleted file mode 100644
index d7514133a36..00000000000
--- a/gcc/config/arc/initfini.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/* .init/.fini section handling + C++ global constructor/destructor handling.
- This file is based on crtstuff.c, sol2-crti.asm, sol2-crtn.asm.
-
-Copyright (C) 1995, 1997, 1998, 2009 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-<http://www.gnu.org/licenses/>. */
-
-/* Declare a pointer to void function type. */
-typedef void (*func_ptr) (void);
-
-#ifdef CRT_INIT
-
-/* NOTE: In order to be able to support SVR4 shared libraries, we arrange
- to have one set of symbols { __CTOR_LIST__, __DTOR_LIST__, __CTOR_END__,
- __DTOR_END__ } per root executable and also one set of these symbols
- per shared library. So in any given whole process image, we may have
- multiple definitions of each of these symbols. In order to prevent
- these definitions from conflicting with one another, and in order to
- ensure that the proper lists are used for the initialization/finalization
- of each individual shared library (respectively), we give these symbols
- only internal (i.e. `static') linkage, and we also make it a point to
- refer to only the __CTOR_END__ symbol in crtfini.o and the __DTOR_LIST__
- symbol in crtinit.o, where they are defined. */
-
-static func_ptr __CTOR_LIST__[1] __attribute__ ((section (".ctors")))
- = { (func_ptr) (-1) };
-
-static func_ptr __DTOR_LIST__[1] __attribute__ ((section (".dtors")))
- = { (func_ptr) (-1) };
-
-/* Run all the global destructors on exit from the program. */
-
-/* Some systems place the number of pointers in the first word of the
- table. On SVR4 however, that word is -1. In all cases, the table is
- null-terminated. On SVR4, we start from the beginning of the list and
- invoke each per-compilation-unit destructor routine in order
- until we find that null.
-
- Note that this function MUST be static. There will be one of these
- functions in each root executable and one in each shared library, but
- although they all have the same code, each one is unique in that it
- refers to one particular associated `__DTOR_LIST__' which belongs to the
- same particular root executable or shared library file. */
-
-static void __do_global_dtors (void)
-asm ("__do_global_dtors") __attribute__ ((section (".text")));
-
-static void
-__do_global_dtors (void)
-{
- func_ptr *p;
- for (p = __DTOR_LIST__ + 1; *p; p++)
- (*p) ();
-}
-
-/* .init section start.
- This must appear at the start of the .init section. */
-
-asm ("\n\
- .section .init\n\
- .global init\n\
- .word 0\n\
-init:\n\
- st blink,[sp,4]\n\
- st fp,[sp]\n\
- mov fp,sp\n\
- sub sp,sp,16\n\
-");
-
-/* .fini section start.
- This must appear at the start of the .init section. */
-
-asm ("\n\
- .section .fini\n\
- .global fini\n\
- .word 0\n\
-fini:\n\
- st blink,[sp,4]\n\
- st fp,[sp]\n\
- mov fp,sp\n\
- sub sp,sp,16\n\
- bl.nd __do_global_dtors\n\
-");
-
-#endif /* CRT_INIT */
-
-#ifdef CRT_FINI
-
-/* Put a word containing zero at the end of each of our two lists of function
- addresses. Note that the words defined here go into the .ctors and .dtors
- sections of the crtend.o file, and since that file is always linked in
- last, these words naturally end up at the very ends of the two lists
- contained in these two sections. */
-
-static func_ptr __CTOR_END__[1] __attribute__ ((section (".ctors")))
- = { (func_ptr) 0 };
-
-static func_ptr __DTOR_END__[1] __attribute__ ((section (".dtors")))
- = { (func_ptr) 0 };
-
-/* Run all global constructors for the program.
- Note that they are run in reverse order. */
-
-static void __do_global_ctors (void)
-asm ("__do_global_ctors") __attribute__ ((section (".text")));
-
-static void
-__do_global_ctors (void)
-{
- func_ptr *p;
- for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
- (*p) ();
-}
-
-/* .init section end.
- This must live at the end of the .init section. */
-
-asm ("\n\
- .section .init\n\
- bl.nd __do_global_ctors\n\
- ld blink,[fp,4]\n\
- j.d blink\n\
- ld.a fp,[sp,16]\n\
-");
-
-/* .fini section end.
- This must live at the end of the .fini section. */
-
-asm ("\n\
- .section .fini\n\
- ld blink,[fp,4]\n\
- j.d blink\n\
- ld.a fp,[sp,16]\n\
-");
-
-#endif /* CRT_FINI */
diff --git a/gcc/config/arc/lib1funcs.asm b/gcc/config/arc/lib1funcs.asm
deleted file mode 100644
index c61f39a5ca7..00000000000
--- a/gcc/config/arc/lib1funcs.asm
+++ /dev/null
@@ -1,266 +0,0 @@
-; libgcc routines for ARC cpu.
-
-/* Copyright (C) 1995, 1997,2004, 2009 Free Software Foundation, Inc.
-
-This file is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 3, or (at your option) any
-later version.
-
-This file is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-<http://www.gnu.org/licenses/>. */
-
-#ifdef L_mulsi3
- .section .text
- .align 4
-
-#ifdef __base__
- .cpu base
- .global ___mulsi3
-___mulsi3:
-
-/* This the simple version.
-
- while (a)
- {
- if (a & 1)
- r += b;
- a >>= 1;
- b <<= 1;
- }
-*/
- mov r2,0 ; Accumulate result here.
-.Lloop:
- sub.f 0,r0,0 ; while (a)
- nop
- beq.nd .Ldone
- and.f 0,r0,1 ; if (a & 1)
- add.nz r2,r2,r1 ; r += b
- lsr r0,r0 ; a >>= 1
- b.d .Lloop
- lsl r1,r1 ; b <<= 1
-.Ldone:
- j.d blink
- mov r0,r2
-#endif
-
-#endif /* L_mulsi3 */
-
-#ifdef L_umulsidi3
- .section .text
- .align 4
-
-#ifdef __base__
- .cpu base
- .global ___umulsidi3
-___umulsidi3:
-
-/* This the simple version.
-
- while (a)
- {
- if (a & 1)
- r += b;
- a >>= 1;
- b <<= 1;
- }
-*/
- mov r2,0 ; Top part of b.
- mov r3,0 ; Accumulate result here.
- mov r4,0
-.Lloop:
- sub.f 0,r0,0 ; while (a)
- nop
- beq.nd .Ldone
- and.f 0,r0,1 ; if (a & 1)
- sub.f 0,r0,0
- nop
- beq .Ldontadd
- add.f r4,r4,r1 ; r += b
- adc r3,r3,r2
-.Ldontadd:
- lsr r0,r0 ; a >>= 1
- lsl.f r1,r1 ; b <<= 1
- b.d .Lloop
- rlc r2,r2
-.Ldone:
-#ifdef __big_endian__
- mov r1,r4
- j.d blink
- mov r0,r3
-#else
- mov r0,r4
- j.d blink
- mov r1,r3
-#endif
-#endif
-
-#endif /* L_umulsidi3 */
-
-#ifdef L_divmod_tools
-
-; Utilities used by all routines.
-
- .section .text
- .align 4
-
-; inputs: r0 = numerator, r1 = denominator
-; outputs: positive r0/r1,
-; r6.bit1 = sign of numerator, r6.bit0 = sign of result
-
- .global ___divnorm
-___divnorm:
- mov r6,0 ; keep sign in r6
- sub.f 0,r0,0 ; is numerator -ve?
- sub.lt r0,0,r0 ; negate numerator
- mov.lt r6,3 ; sign is -ve
- sub.f 0,r1,0 ; is denominator -ve?
- sub.lt r1,0,r1 ; negate denominator
- xor.lt r6,r6,1 ; toggle sign
- j.nd blink
-
-/*
-unsigned long
-udivmodsi4(int modwanted, unsigned long num, unsigned long den)
-{
- unsigned long bit = 1;
- unsigned long res = 0;
-
- while (den < num && bit && !(den & (1L<<31)))
- {
- den <<=1;
- bit <<=1;
- }
- while (bit)
- {
- if (num >= den)
- {
- num -= den;
- res |= bit;
- }
- bit >>=1;
- den >>=1;
- }
- if (modwanted) return num;
- return res;
-}
-*/
-
-; inputs: r0 = numerator, r1 = denominator
-; outputs: r0 = quotient, r1 = remainder, r2/r3 trashed
-
- .global ___udivmodsi4
-___udivmodsi4:
- mov r2,1 ; bit = 1
- mov r3,0 ; res = 0
-.Lloop1:
- sub.f 0,r1,r0 ; while (den < num
- nop
- bnc.nd .Lloop2
- sub.f 0,r2,0 ; && bit
- nop
- bz.nd .Lloop2
- lsl.f 0,r1 ; && !(den & (1<<31))
- nop
- bc.nd .Lloop2
- lsl r1,r1 ; den <<= 1
- b.d .Lloop1
- lsl r2,r2 ; bit <<= 1
-.Lloop2:
- sub.f 0,r2,0 ; while (bit)
- nop
- bz.nd .Ldivmodend
- sub.f 0,r0,r1 ; if (num >= den)
- nop
- bc.nd .Lshiftdown
- sub r0,r0,r1 ; num -= den
- or r3,r3,r2 ; res |= bit
-.Lshiftdown:
- lsr r2,r2 ; bit >>= 1
- b.d .Lloop2
- lsr r1,r1 ; den >>= 1
-.Ldivmodend:
- mov r1,r0 ; r1 = mod
- j.d blink
- mov r0,r3 ; r0 = res
-
-#endif
-
-#ifdef L_udivsi3
- .section .text
- .align 4
-
-#ifdef __base__
- .cpu base
- .global ___udivsi3
-___udivsi3:
- mov r7,blink
- bl.nd ___udivmodsi4
- j.nd r7
-#endif
-
-#endif /* L_udivsi3 */
-
-#ifdef L_divsi3
- .section .text
- .align 4
-
-#ifdef __base__
- .cpu base
- .global ___divsi3
-___divsi3:
- mov r7,blink
- bl.nd ___divnorm
- bl.nd ___udivmodsi4
- and.f 0,r6,1
- sub.nz r0,0,r0 ; cannot go in delay slot, has limm value
- j.nd r7
-#endif
-
-#endif /* L_divsi3 */
-
-#ifdef L_umodsi3
- .section .text
- .align 4
-
-#ifdef __base__
- .cpu base
- .global ___umodsi3
-___umodsi3:
- mov r7,blink
- bl.nd ___udivmodsi4
- j.d r7
- mov r0,r1
-#endif
-
-#endif /* L_umodsi3 */
-
-#ifdef L_modsi3
- .section .text
- .align 4
-
-#ifdef __base__
- .cpu base
- .global ___modsi3
-___modsi3:
- mov r7,blink
- bl.nd ___divnorm
- bl.nd ___udivmodsi4
- and.f 0,r6,2
- sub.nz r1,0,r1
- j.d r7
- mov r0,r1
-#endif
-
-#endif /* L_modsi3 */
diff --git a/gcc/config/arc/t-arc b/gcc/config/arc/t-arc
deleted file mode 100644
index b39fb128e10..00000000000
--- a/gcc/config/arc/t-arc
+++ /dev/null
@@ -1,41 +0,0 @@
-LIB1ASMSRC = arc/lib1funcs.asm
-LIB1ASMFUNCS = _mulsi3 _umulsidi3 _udivsi3 _divsi3 _umodsi3 _modsi3 _divmod_tools
-
-# We need libgcc routines to be mangled according to which cpu they
-# were compiled for.
-# ??? -mmangle-cpu passed by default for now.
-#LIBGCC2_CFLAGS = -g1 -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -mmangle-cpu
-
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
- echo '#ifndef __big_endian__' > dp-bit.c
- echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c
- echo '#endif' >> dp-bit.c
- cat $(srcdir)/config/fp-bit.c >> dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
- echo '#define FLOAT' > fp-bit.c
- echo '#ifndef __big_endian__' >> fp-bit.c
- echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c
- echo '#endif' >> fp-bit.c
- cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
-# .init/.fini section routines
-
-$(T)crtinit.o: $(srcdir)/config/arc/initfini.c $(GCC_PASSES) $(CONFIG_H)
- $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
- $(MULTILIB_CFLAGS) -DCRT_INIT -finhibit-size-directive -fno-inline-functions \
- -g0 -c $(srcdir)/config/arc/initfini.c -o $(T)crtinit.o
-
-$(T)crtfini.o: $(srcdir)/config/arc/initfini.c $(GCC_PASSES) $(CONFIG_H)
- $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
- -DCRT_FINI $(MULTILIB_CFLAGS) -finhibit-size-directive -fno-inline-functions \
- -g0 -c $(srcdir)/config/arc/initfini.c -o $(T)crtfini.o
-
-MULTILIB_OPTIONS = EB
-MULTILIB_DIRNAMES = be
-EXTRA_MULTILIB_PARTS = crtinit.o crtfini.o
diff --git a/gcc/config/fp-bit.c b/gcc/config/fp-bit.c
index 1cdac6ebeca..4eac632ed3e 100644
--- a/gcc/config/fp-bit.c
+++ b/gcc/config/fp-bit.c
@@ -1028,27 +1028,12 @@ _fpdiv_parts (fp_number_type * a,
numerator *= 2;
}
- if (!ROUND_TOWARDS_ZERO && (quotient & GARDMASK) == GARDMSB)
- {
- if (quotient & (1 << NGARDS))
- {
- /* Because we're half way, we would round to even by adding
- GARDROUND + 1, except that's also done in the packing
- function, and rounding twice will lose precision and cause
- the result to be too far off. */
- }
- else if (numerator)
- {
- /* We're a further than half way by the small amount
- corresponding to the bits set in "numerator". Knowing
- that, we round here and not in pack_d, because there we
- don't have "numerator" available anymore. */
- quotient += GARDROUND + 1;
-
- /* Avoid further rounding in pack_d. */
- quotient &= ~(fractype) GARDMASK;
- }
- }
+ /* If we wanted to round here, that would require to take subnormal
+ numbers into account to avoiddouble rounding. Better to just
+ account for any bits beyond our current guard bits by setting the
+ sticky bit. */
+ if (numerator)
+ quotient |= 1;
a->fraction.ll = quotient;
return (a);
diff --git a/gcc/config/i386/i386-c.c b/gcc/config/i386/i386-c.c
index 3d17c104e39..fe6fef1fd87 100644
--- a/gcc/config/i386/i386-c.c
+++ b/gcc/config/i386/i386-c.c
@@ -273,10 +273,10 @@ ix86_pragma_target_parse (tree args, tree pop_target)
prev_isa = prev_opt->ix86_isa_flags;
cur_isa = cur_opt->ix86_isa_flags;
diff_isa = (prev_isa ^ cur_isa);
- prev_arch = prev_opt->arch;
- prev_tune = prev_opt->tune;
- cur_arch = cur_opt->arch;
- cur_tune = cur_opt->tune;
+ prev_arch = (enum processor_type) prev_opt->arch;
+ prev_tune = (enum processor_type) prev_opt->tune;
+ cur_arch = (enum processor_type) cur_opt->arch;
+ cur_tune = (enum processor_type) cur_opt->tune;
/* If the same processor is used for both previous and current options, don't
change the macros. */
@@ -290,14 +290,14 @@ ix86_pragma_target_parse (tree args, tree pop_target)
ix86_target_macros_internal (prev_isa & diff_isa,
prev_arch,
prev_tune,
- prev_opt->fpmath,
+ (enum fpmath_unit) prev_opt->fpmath,
cpp_undef);
/* Define all of the macros for new options that were just turned on. */
ix86_target_macros_internal (cur_isa & diff_isa,
cur_arch,
cur_tune,
- cur_opt->fpmath,
+ (enum fpmath_unit) cur_opt->fpmath,
cpp_define);
return true;
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 694eafee8b3..1048c6f4f78 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -3280,10 +3280,6 @@ override_options (bool main_args_p)
static void
ix86_function_specific_save (struct cl_target_option *ptr)
{
- gcc_assert (IN_RANGE (ix86_arch, 0, 255));
- gcc_assert (IN_RANGE (ix86_schedule, 0, 255));
- gcc_assert (IN_RANGE (ix86_tune, 0, 255));
- gcc_assert (IN_RANGE (ix86_fpmath, 0, 255));
gcc_assert (IN_RANGE (ix86_branch_cost, 0, 255));
ptr->arch = ix86_arch;
@@ -3307,10 +3303,10 @@ ix86_function_specific_restore (struct cl_target_option *ptr)
unsigned int ix86_arch_mask, ix86_tune_mask;
int i;
- ix86_arch = ptr->arch;
- ix86_schedule = ptr->schedule;
- ix86_tune = ptr->tune;
- ix86_fpmath = ptr->fpmath;
+ ix86_arch = (enum processor_type) ptr->arch;
+ ix86_schedule = (enum attr_cpu) ptr->schedule;
+ ix86_tune = (enum processor_type) ptr->tune;
+ ix86_fpmath = (enum fpmath_unit) ptr->fpmath;
ix86_branch_cost = ptr->branch_cost;
ix86_tune_defaulted = ptr->tune_defaulted;
ix86_arch_specified = ptr->arch_specified;
@@ -4593,7 +4589,7 @@ ix86_cfun_abi (void)
{
if (! cfun || ! TARGET_64BIT)
return DEFAULT_ABI;
- return cfun->machine->call_abi;
+ return MACHINE_FUNCTION (*cfun)->call_abi;
}
/* regclass.c */
@@ -4606,9 +4602,10 @@ void
ix86_call_abi_override (const_tree fndecl)
{
if (fndecl == NULL_TREE)
- cfun->machine->call_abi = DEFAULT_ABI;
+ MACHINE_FUNCTION (*cfun)->call_abi = DEFAULT_ABI;
else
- cfun->machine->call_abi = ix86_function_type_abi (TREE_TYPE (fndecl));
+ MACHINE_FUNCTION (*cfun)->call_abi
+ = ix86_function_type_abi (TREE_TYPE (fndecl));
}
/* MS and SYSV ABI have different set of call used registers. Avoid expensive
@@ -4618,7 +4615,7 @@ static void
ix86_maybe_switch_abi (void)
{
if (TARGET_64BIT &&
- call_used_regs[SI_REG] == (cfun->machine->call_abi == MS_ABI))
+ call_used_regs[SI_REG] == (MACHINE_FUNCTION (*cfun)->call_abi == MS_ABI))
reinit_regs ();
}
@@ -6656,9 +6653,9 @@ ix86_va_start (tree valist, rtx nextarg)
sav = build3 (COMPONENT_REF, TREE_TYPE (f_sav), valist, f_sav, NULL_TREE);
/* Count number of gp and fp argument registers used. */
- words = crtl->args.info.words;
- n_gpr = crtl->args.info.regno;
- n_fpr = crtl->args.info.sse_regno;
+ words = INCOMING_ARGS_INFO (crtl->args).words;
+ n_gpr = INCOMING_ARGS_INFO (crtl->args).regno;
+ n_fpr = INCOMING_ARGS_INFO (crtl->args).sse_regno;
if (cfun->va_list_gpr_size)
{
@@ -7271,7 +7268,7 @@ ix86_frame_pointer_required (void)
{
/* If we accessed previous frames, then the generated code expects
to be able to access the saved ebp value in our frame. */
- if (cfun->machine->accesses_prev_frame)
+ if (MACHINE_FUNCTION (*cfun)->accesses_prev_frame)
return 1;
/* Several x86 os'es need a frame pointer for other reasons,
@@ -7298,7 +7295,7 @@ ix86_frame_pointer_required (void)
void
ix86_setup_frame_addresses (void)
{
- cfun->machine->accesses_prev_frame = 1;
+ MACHINE_FUNCTION (*cfun)->accesses_prev_frame = 1;
}
#if (defined(HAVE_GAS_HIDDEN) && (SUPPORTS_ONE_ONLY - 0)) || TARGET_MACHO
@@ -7666,11 +7663,12 @@ ix86_compute_frame_layout (struct ix86_frame *frame)
didn't change as reload does multiple calls to the function and does not
expect the decision to change within single iteration. */
if (!optimize_function_for_size_p (cfun)
- && cfun->machine->use_fast_prologue_epilogue_nregs != frame->nregs)
+ && (MACHINE_FUNCTION (*cfun)->use_fast_prologue_epilogue_nregs
+ != frame->nregs))
{
int count = frame->nregs;
- cfun->machine->use_fast_prologue_epilogue_nregs = count;
+ MACHINE_FUNCTION (*cfun)->use_fast_prologue_epilogue_nregs = count;
/* The fast prologue uses move instead of push to save registers. This
is significantly longer, but also executes faster as modern hardware
can execute the moves in parallel, but can't do that for push/pop.
@@ -7686,13 +7684,13 @@ ix86_compute_frame_layout (struct ix86_frame *frame)
if (cfun->function_frequency < FUNCTION_FREQUENCY_NORMAL
|| (flag_branch_probabilities
&& cfun->function_frequency < FUNCTION_FREQUENCY_HOT))
- cfun->machine->use_fast_prologue_epilogue = false;
+ MACHINE_FUNCTION (*cfun)->use_fast_prologue_epilogue = false;
else
- cfun->machine->use_fast_prologue_epilogue
+ MACHINE_FUNCTION (*cfun)->use_fast_prologue_epilogue
= !expensive_function_p (count);
}
if (TARGET_PROLOGUE_USING_MOVE
- && cfun->machine->use_fast_prologue_epilogue)
+ && MACHINE_FUNCTION (*cfun)->use_fast_prologue_epilogue)
frame->save_regs_using_mov = true;
else
frame->save_regs_using_mov = false;
@@ -8200,9 +8198,10 @@ ix86_expand_prologue (void)
bool eax_live;
rtx t;
- gcc_assert (!TARGET_64BIT || cfun->machine->call_abi == MS_ABI);
+ gcc_assert (!TARGET_64BIT
+ || MACHINE_FUNCTION (*cfun)->call_abi == MS_ABI);
- if (cfun->machine->call_abi == MS_ABI)
+ if (MACHINE_FUNCTION (*cfun)->call_abi == MS_ABI)
eax_live = false;
else
eax_live = ix86_eax_live_at_start_p ();
@@ -8223,8 +8222,7 @@ ix86_expand_prologue (void)
RTX_FRAME_RELATED_P (insn) = 1;
t = gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (-allocate));
t = gen_rtx_SET (VOIDmode, stack_pointer_rtx, t);
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- t, REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR, t);
if (eax_live)
{
@@ -8439,11 +8437,11 @@ ix86_expand_epilogue (int style)
tuning in future. */
if ((!sp_valid && (frame.nregs + frame.nsseregs) <= 1)
|| (TARGET_EPILOGUE_USING_MOVE
- && cfun->machine->use_fast_prologue_epilogue
+ && MACHINE_FUNCTION (*cfun)->use_fast_prologue_epilogue
&& ((frame.nregs + frame.nsseregs) > 1 || frame.to_allocate))
|| (frame_pointer_needed && !(frame.nregs + frame.nsseregs) && frame.to_allocate)
|| (frame_pointer_needed && TARGET_USE_LEAVE
- && cfun->machine->use_fast_prologue_epilogue
+ && MACHINE_FUNCTION (*cfun)->use_fast_prologue_epilogue
&& (frame.nregs + frame.nsseregs) == 1)
|| crtl->calls_eh_return)
{
@@ -8516,7 +8514,7 @@ ix86_expand_epilogue (int style)
style);
/* If not an i386, mov & pop is faster than "leave". */
else if (TARGET_USE_LEAVE || optimize_function_for_size_p (cfun)
- || !cfun->machine->use_fast_prologue_epilogue)
+ || !MACHINE_FUNCTION (*cfun)->use_fast_prologue_epilogue)
emit_insn ((*ix86_gen_leave) ());
else
{
@@ -10708,7 +10706,7 @@ get_some_local_dynamic_name_1 (rtx *px, void *data ATTRIBUTE_UNUSED)
if (GET_CODE (x) == SYMBOL_REF
&& SYMBOL_REF_TLS_MODEL (x) == TLS_MODEL_LOCAL_DYNAMIC)
{
- cfun->machine->some_ld_name = XSTR (x, 0);
+ MACHINE_FUNCTION (*cfun)->some_ld_name = XSTR (x, 0);
return 1;
}
@@ -10720,13 +10718,13 @@ get_some_local_dynamic_name (void)
{
rtx insn;
- if (cfun->machine->some_ld_name)
- return cfun->machine->some_ld_name;
+ if (MACHINE_FUNCTION (*cfun)->some_ld_name)
+ return MACHINE_FUNCTION (*cfun)->some_ld_name;
for (insn = get_insns (); insn ; insn = NEXT_INSN (insn))
if (INSN_P (insn)
&& for_each_rtx (&PATTERN (insn), get_some_local_dynamic_name_1, 0))
- return cfun->machine->some_ld_name;
+ return MACHINE_FUNCTION (*cfun)->some_ld_name;
gcc_unreachable ();
}
@@ -14471,20 +14469,14 @@ ix86_split_fp_branch (enum rtx_code code, rtx op1, rtx op2,
label),
pc_rtx)));
if (bypass_probability >= 0)
- REG_NOTES (i)
- = gen_rtx_EXPR_LIST (REG_BR_PROB,
- GEN_INT (bypass_probability),
- REG_NOTES (i));
+ add_reg_note (i, REG_BR_PROB, GEN_INT (bypass_probability));
}
i = emit_jump_insn (gen_rtx_SET
(VOIDmode, pc_rtx,
gen_rtx_IF_THEN_ELSE (VOIDmode,
condition, target1, target2)));
if (probability >= 0)
- REG_NOTES (i)
- = gen_rtx_EXPR_LIST (REG_BR_PROB,
- GEN_INT (probability),
- REG_NOTES (i));
+ add_reg_note (i, REG_BR_PROB, GEN_INT (probability));
if (second != NULL_RTX)
{
i = emit_jump_insn (gen_rtx_SET
@@ -14492,10 +14484,7 @@ ix86_split_fp_branch (enum rtx_code code, rtx op1, rtx op2,
gen_rtx_IF_THEN_ELSE (VOIDmode, second, target1,
target2)));
if (second_probability >= 0)
- REG_NOTES (i)
- = gen_rtx_EXPR_LIST (REG_BR_PROB,
- GEN_INT (second_probability),
- REG_NOTES (i));
+ add_reg_note (i, REG_BR_PROB, GEN_INT (second_probability));
}
if (label != NULL_RTX)
emit_label (label);
@@ -16693,10 +16682,7 @@ predict_jump (int prob)
{
rtx insn = get_last_insn ();
gcc_assert (JUMP_P (insn));
- REG_NOTES (insn)
- = gen_rtx_EXPR_LIST (REG_BR_PROB,
- GEN_INT (prob),
- REG_NOTES (insn));
+ add_reg_note (insn, REG_BR_PROB, GEN_INT (prob));
}
/* Helper function for the string operations below. Dest VARIABLE whether
@@ -21561,81 +21547,81 @@ enum multi_arg_type {
static const struct builtin_description bdesc_multi_arg[] =
{
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_vmfmaddv4sf4, "__builtin_ia32_fmaddss", IX86_BUILTIN_FMADDSS, 0, (int)MULTI_ARG_3_SF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_vmfmaddv2df4, "__builtin_ia32_fmaddsd", IX86_BUILTIN_FMADDSD, 0, (int)MULTI_ARG_3_DF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_fmaddv4sf4, "__builtin_ia32_fmaddps", IX86_BUILTIN_FMADDPS, 0, (int)MULTI_ARG_3_SF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_fmaddv2df4, "__builtin_ia32_fmaddpd", IX86_BUILTIN_FMADDPD, 0, (int)MULTI_ARG_3_DF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_vmfmsubv4sf4, "__builtin_ia32_fmsubss", IX86_BUILTIN_FMSUBSS, 0, (int)MULTI_ARG_3_SF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_vmfmsubv2df4, "__builtin_ia32_fmsubsd", IX86_BUILTIN_FMSUBSD, 0, (int)MULTI_ARG_3_DF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_fmsubv4sf4, "__builtin_ia32_fmsubps", IX86_BUILTIN_FMSUBPS, 0, (int)MULTI_ARG_3_SF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_fmsubv2df4, "__builtin_ia32_fmsubpd", IX86_BUILTIN_FMSUBPD, 0, (int)MULTI_ARG_3_DF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_vmfnmaddv4sf4, "__builtin_ia32_fnmaddss", IX86_BUILTIN_FNMADDSS, 0, (int)MULTI_ARG_3_SF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_vmfnmaddv2df4, "__builtin_ia32_fnmaddsd", IX86_BUILTIN_FNMADDSD, 0, (int)MULTI_ARG_3_DF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_fnmaddv4sf4, "__builtin_ia32_fnmaddps", IX86_BUILTIN_FNMADDPS, 0, (int)MULTI_ARG_3_SF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_fnmaddv2df4, "__builtin_ia32_fnmaddpd", IX86_BUILTIN_FNMADDPD, 0, (int)MULTI_ARG_3_DF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_vmfnmsubv4sf4, "__builtin_ia32_fnmsubss", IX86_BUILTIN_FNMSUBSS, 0, (int)MULTI_ARG_3_SF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_vmfnmsubv2df4, "__builtin_ia32_fnmsubsd", IX86_BUILTIN_FNMSUBSD, 0, (int)MULTI_ARG_3_DF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_fnmsubv4sf4, "__builtin_ia32_fnmsubps", IX86_BUILTIN_FNMSUBPS, 0, (int)MULTI_ARG_3_SF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_fnmsubv2df4, "__builtin_ia32_fnmsubpd", IX86_BUILTIN_FNMSUBPD, 0, (int)MULTI_ARG_3_DF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcmov_v2di, "__builtin_ia32_pcmov", IX86_BUILTIN_PCMOV, 0, (int)MULTI_ARG_3_DI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcmov_v2di, "__builtin_ia32_pcmov_v2di", IX86_BUILTIN_PCMOV_V2DI, 0, (int)MULTI_ARG_3_DI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcmov_v4si, "__builtin_ia32_pcmov_v4si", IX86_BUILTIN_PCMOV_V4SI, 0, (int)MULTI_ARG_3_SI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcmov_v8hi, "__builtin_ia32_pcmov_v8hi", IX86_BUILTIN_PCMOV_V8HI, 0, (int)MULTI_ARG_3_HI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcmov_v16qi, "__builtin_ia32_pcmov_v16qi",IX86_BUILTIN_PCMOV_V16QI,0, (int)MULTI_ARG_3_QI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcmov_v2df, "__builtin_ia32_pcmov_v2df", IX86_BUILTIN_PCMOV_V2DF, 0, (int)MULTI_ARG_3_DF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcmov_v4sf, "__builtin_ia32_pcmov_v4sf", IX86_BUILTIN_PCMOV_V4SF, 0, (int)MULTI_ARG_3_SF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pperm, "__builtin_ia32_pperm", IX86_BUILTIN_PPERM, 0, (int)MULTI_ARG_3_QI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_permv4sf, "__builtin_ia32_permps", IX86_BUILTIN_PERMPS, 0, (int)MULTI_ARG_3_PERMPS },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_permv2df, "__builtin_ia32_permpd", IX86_BUILTIN_PERMPD, 0, (int)MULTI_ARG_3_PERMPD },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacssww, "__builtin_ia32_pmacssww", IX86_BUILTIN_PMACSSWW, 0, (int)MULTI_ARG_3_HI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacsww, "__builtin_ia32_pmacsww", IX86_BUILTIN_PMACSWW, 0, (int)MULTI_ARG_3_HI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacsswd, "__builtin_ia32_pmacsswd", IX86_BUILTIN_PMACSSWD, 0, (int)MULTI_ARG_3_HI_SI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacswd, "__builtin_ia32_pmacswd", IX86_BUILTIN_PMACSWD, 0, (int)MULTI_ARG_3_HI_SI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacssdd, "__builtin_ia32_pmacssdd", IX86_BUILTIN_PMACSSDD, 0, (int)MULTI_ARG_3_SI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacsdd, "__builtin_ia32_pmacsdd", IX86_BUILTIN_PMACSDD, 0, (int)MULTI_ARG_3_SI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacssdql, "__builtin_ia32_pmacssdql", IX86_BUILTIN_PMACSSDQL, 0, (int)MULTI_ARG_3_SI_DI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacssdqh, "__builtin_ia32_pmacssdqh", IX86_BUILTIN_PMACSSDQH, 0, (int)MULTI_ARG_3_SI_DI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacsdql, "__builtin_ia32_pmacsdql", IX86_BUILTIN_PMACSDQL, 0, (int)MULTI_ARG_3_SI_DI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacsdqh, "__builtin_ia32_pmacsdqh", IX86_BUILTIN_PMACSDQH, 0, (int)MULTI_ARG_3_SI_DI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmadcsswd, "__builtin_ia32_pmadcsswd", IX86_BUILTIN_PMADCSSWD, 0, (int)MULTI_ARG_3_HI_SI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmadcswd, "__builtin_ia32_pmadcswd", IX86_BUILTIN_PMADCSWD, 0, (int)MULTI_ARG_3_HI_SI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_vrotlv2di3, "__builtin_ia32_protq", IX86_BUILTIN_PROTQ, 0, (int)MULTI_ARG_2_DI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_vrotlv4si3, "__builtin_ia32_protd", IX86_BUILTIN_PROTD, 0, (int)MULTI_ARG_2_SI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_vrotlv8hi3, "__builtin_ia32_protw", IX86_BUILTIN_PROTW, 0, (int)MULTI_ARG_2_HI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_vrotlv16qi3, "__builtin_ia32_protb", IX86_BUILTIN_PROTB, 0, (int)MULTI_ARG_2_QI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_rotlv2di3, "__builtin_ia32_protqi", IX86_BUILTIN_PROTQ_IMM, 0, (int)MULTI_ARG_2_DI_IMM },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_rotlv4si3, "__builtin_ia32_protdi", IX86_BUILTIN_PROTD_IMM, 0, (int)MULTI_ARG_2_SI_IMM },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_rotlv8hi3, "__builtin_ia32_protwi", IX86_BUILTIN_PROTW_IMM, 0, (int)MULTI_ARG_2_HI_IMM },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_rotlv16qi3, "__builtin_ia32_protbi", IX86_BUILTIN_PROTB_IMM, 0, (int)MULTI_ARG_2_QI_IMM },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_ashlv2di3, "__builtin_ia32_pshaq", IX86_BUILTIN_PSHAQ, 0, (int)MULTI_ARG_2_DI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_ashlv4si3, "__builtin_ia32_pshad", IX86_BUILTIN_PSHAD, 0, (int)MULTI_ARG_2_SI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_ashlv8hi3, "__builtin_ia32_pshaw", IX86_BUILTIN_PSHAW, 0, (int)MULTI_ARG_2_HI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_ashlv16qi3, "__builtin_ia32_pshab", IX86_BUILTIN_PSHAB, 0, (int)MULTI_ARG_2_QI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_lshlv2di3, "__builtin_ia32_pshlq", IX86_BUILTIN_PSHLQ, 0, (int)MULTI_ARG_2_DI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_lshlv4si3, "__builtin_ia32_pshld", IX86_BUILTIN_PSHLD, 0, (int)MULTI_ARG_2_SI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_lshlv8hi3, "__builtin_ia32_pshlw", IX86_BUILTIN_PSHLW, 0, (int)MULTI_ARG_2_HI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_lshlv16qi3, "__builtin_ia32_pshlb", IX86_BUILTIN_PSHLB, 0, (int)MULTI_ARG_2_QI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_vmfrczv4sf2, "__builtin_ia32_frczss", IX86_BUILTIN_FRCZSS, 0, (int)MULTI_ARG_2_SF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_vmfrczv2df2, "__builtin_ia32_frczsd", IX86_BUILTIN_FRCZSD, 0, (int)MULTI_ARG_2_DF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_frczv4sf2, "__builtin_ia32_frczps", IX86_BUILTIN_FRCZPS, 0, (int)MULTI_ARG_1_SF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_frczv2df2, "__builtin_ia32_frczpd", IX86_BUILTIN_FRCZPD, 0, (int)MULTI_ARG_1_DF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_cvtph2ps, "__builtin_ia32_cvtph2ps", IX86_BUILTIN_CVTPH2PS, 0, (int)MULTI_ARG_1_PH2PS },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_cvtps2ph, "__builtin_ia32_cvtps2ph", IX86_BUILTIN_CVTPS2PH, 0, (int)MULTI_ARG_1_PS2PH },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phaddbw, "__builtin_ia32_phaddbw", IX86_BUILTIN_PHADDBW, 0, (int)MULTI_ARG_1_QI_HI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phaddbd, "__builtin_ia32_phaddbd", IX86_BUILTIN_PHADDBD, 0, (int)MULTI_ARG_1_QI_SI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phaddbq, "__builtin_ia32_phaddbq", IX86_BUILTIN_PHADDBQ, 0, (int)MULTI_ARG_1_QI_DI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phaddwd, "__builtin_ia32_phaddwd", IX86_BUILTIN_PHADDWD, 0, (int)MULTI_ARG_1_HI_SI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phaddwq, "__builtin_ia32_phaddwq", IX86_BUILTIN_PHADDWQ, 0, (int)MULTI_ARG_1_HI_DI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phadddq, "__builtin_ia32_phadddq", IX86_BUILTIN_PHADDDQ, 0, (int)MULTI_ARG_1_SI_DI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phaddubw, "__builtin_ia32_phaddubw", IX86_BUILTIN_PHADDUBW, 0, (int)MULTI_ARG_1_QI_HI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phaddubd, "__builtin_ia32_phaddubd", IX86_BUILTIN_PHADDUBD, 0, (int)MULTI_ARG_1_QI_SI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phaddubq, "__builtin_ia32_phaddubq", IX86_BUILTIN_PHADDUBQ, 0, (int)MULTI_ARG_1_QI_DI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phadduwd, "__builtin_ia32_phadduwd", IX86_BUILTIN_PHADDUWD, 0, (int)MULTI_ARG_1_HI_SI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phadduwq, "__builtin_ia32_phadduwq", IX86_BUILTIN_PHADDUWQ, 0, (int)MULTI_ARG_1_HI_DI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phaddudq, "__builtin_ia32_phaddudq", IX86_BUILTIN_PHADDUDQ, 0, (int)MULTI_ARG_1_SI_DI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phsubbw, "__builtin_ia32_phsubbw", IX86_BUILTIN_PHSUBBW, 0, (int)MULTI_ARG_1_QI_HI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phsubwd, "__builtin_ia32_phsubwd", IX86_BUILTIN_PHSUBWD, 0, (int)MULTI_ARG_1_HI_SI },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phsubdq, "__builtin_ia32_phsubdq", IX86_BUILTIN_PHSUBDQ, 0, (int)MULTI_ARG_1_SI_DI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_vmfmaddv4sf4, "__builtin_ia32_fmaddss", IX86_BUILTIN_FMADDSS, UNKNOWN, (int)MULTI_ARG_3_SF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_vmfmaddv2df4, "__builtin_ia32_fmaddsd", IX86_BUILTIN_FMADDSD, UNKNOWN, (int)MULTI_ARG_3_DF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_fmaddv4sf4, "__builtin_ia32_fmaddps", IX86_BUILTIN_FMADDPS, UNKNOWN, (int)MULTI_ARG_3_SF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_fmaddv2df4, "__builtin_ia32_fmaddpd", IX86_BUILTIN_FMADDPD, UNKNOWN, (int)MULTI_ARG_3_DF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_vmfmsubv4sf4, "__builtin_ia32_fmsubss", IX86_BUILTIN_FMSUBSS, UNKNOWN, (int)MULTI_ARG_3_SF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_vmfmsubv2df4, "__builtin_ia32_fmsubsd", IX86_BUILTIN_FMSUBSD, UNKNOWN, (int)MULTI_ARG_3_DF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_fmsubv4sf4, "__builtin_ia32_fmsubps", IX86_BUILTIN_FMSUBPS, UNKNOWN, (int)MULTI_ARG_3_SF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_fmsubv2df4, "__builtin_ia32_fmsubpd", IX86_BUILTIN_FMSUBPD, UNKNOWN, (int)MULTI_ARG_3_DF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_vmfnmaddv4sf4, "__builtin_ia32_fnmaddss", IX86_BUILTIN_FNMADDSS, UNKNOWN, (int)MULTI_ARG_3_SF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_vmfnmaddv2df4, "__builtin_ia32_fnmaddsd", IX86_BUILTIN_FNMADDSD, UNKNOWN, (int)MULTI_ARG_3_DF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_fnmaddv4sf4, "__builtin_ia32_fnmaddps", IX86_BUILTIN_FNMADDPS, UNKNOWN, (int)MULTI_ARG_3_SF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_fnmaddv2df4, "__builtin_ia32_fnmaddpd", IX86_BUILTIN_FNMADDPD, UNKNOWN, (int)MULTI_ARG_3_DF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_vmfnmsubv4sf4, "__builtin_ia32_fnmsubss", IX86_BUILTIN_FNMSUBSS, UNKNOWN, (int)MULTI_ARG_3_SF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_vmfnmsubv2df4, "__builtin_ia32_fnmsubsd", IX86_BUILTIN_FNMSUBSD, UNKNOWN, (int)MULTI_ARG_3_DF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_fnmsubv4sf4, "__builtin_ia32_fnmsubps", IX86_BUILTIN_FNMSUBPS, UNKNOWN, (int)MULTI_ARG_3_SF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5i_fnmsubv2df4, "__builtin_ia32_fnmsubpd", IX86_BUILTIN_FNMSUBPD, UNKNOWN, (int)MULTI_ARG_3_DF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcmov_v2di, "__builtin_ia32_pcmov", IX86_BUILTIN_PCMOV, UNKNOWN, (int)MULTI_ARG_3_DI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcmov_v2di, "__builtin_ia32_pcmov_v2di", IX86_BUILTIN_PCMOV_V2DI, UNKNOWN, (int)MULTI_ARG_3_DI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcmov_v4si, "__builtin_ia32_pcmov_v4si", IX86_BUILTIN_PCMOV_V4SI, UNKNOWN, (int)MULTI_ARG_3_SI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcmov_v8hi, "__builtin_ia32_pcmov_v8hi", IX86_BUILTIN_PCMOV_V8HI, UNKNOWN, (int)MULTI_ARG_3_HI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcmov_v16qi, "__builtin_ia32_pcmov_v16qi",IX86_BUILTIN_PCMOV_V16QI,UNKNOWN, (int)MULTI_ARG_3_QI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcmov_v2df, "__builtin_ia32_pcmov_v2df", IX86_BUILTIN_PCMOV_V2DF, UNKNOWN, (int)MULTI_ARG_3_DF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcmov_v4sf, "__builtin_ia32_pcmov_v4sf", IX86_BUILTIN_PCMOV_V4SF, UNKNOWN, (int)MULTI_ARG_3_SF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pperm, "__builtin_ia32_pperm", IX86_BUILTIN_PPERM, UNKNOWN, (int)MULTI_ARG_3_QI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_permv4sf, "__builtin_ia32_permps", IX86_BUILTIN_PERMPS, UNKNOWN, (int)MULTI_ARG_3_PERMPS },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_permv2df, "__builtin_ia32_permpd", IX86_BUILTIN_PERMPD, UNKNOWN, (int)MULTI_ARG_3_PERMPD },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacssww, "__builtin_ia32_pmacssww", IX86_BUILTIN_PMACSSWW, UNKNOWN, (int)MULTI_ARG_3_HI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacsww, "__builtin_ia32_pmacsww", IX86_BUILTIN_PMACSWW, UNKNOWN, (int)MULTI_ARG_3_HI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacsswd, "__builtin_ia32_pmacsswd", IX86_BUILTIN_PMACSSWD, UNKNOWN, (int)MULTI_ARG_3_HI_SI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacswd, "__builtin_ia32_pmacswd", IX86_BUILTIN_PMACSWD, UNKNOWN, (int)MULTI_ARG_3_HI_SI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacssdd, "__builtin_ia32_pmacssdd", IX86_BUILTIN_PMACSSDD, UNKNOWN, (int)MULTI_ARG_3_SI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacsdd, "__builtin_ia32_pmacsdd", IX86_BUILTIN_PMACSDD, UNKNOWN, (int)MULTI_ARG_3_SI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacssdql, "__builtin_ia32_pmacssdql", IX86_BUILTIN_PMACSSDQL, UNKNOWN, (int)MULTI_ARG_3_SI_DI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacssdqh, "__builtin_ia32_pmacssdqh", IX86_BUILTIN_PMACSSDQH, UNKNOWN, (int)MULTI_ARG_3_SI_DI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacsdql, "__builtin_ia32_pmacsdql", IX86_BUILTIN_PMACSDQL, UNKNOWN, (int)MULTI_ARG_3_SI_DI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmacsdqh, "__builtin_ia32_pmacsdqh", IX86_BUILTIN_PMACSDQH, UNKNOWN, (int)MULTI_ARG_3_SI_DI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmadcsswd, "__builtin_ia32_pmadcsswd", IX86_BUILTIN_PMADCSSWD, UNKNOWN, (int)MULTI_ARG_3_HI_SI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pmadcswd, "__builtin_ia32_pmadcswd", IX86_BUILTIN_PMADCSWD, UNKNOWN, (int)MULTI_ARG_3_HI_SI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_vrotlv2di3, "__builtin_ia32_protq", IX86_BUILTIN_PROTQ, UNKNOWN, (int)MULTI_ARG_2_DI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_vrotlv4si3, "__builtin_ia32_protd", IX86_BUILTIN_PROTD, UNKNOWN, (int)MULTI_ARG_2_SI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_vrotlv8hi3, "__builtin_ia32_protw", IX86_BUILTIN_PROTW, UNKNOWN, (int)MULTI_ARG_2_HI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_vrotlv16qi3, "__builtin_ia32_protb", IX86_BUILTIN_PROTB, UNKNOWN, (int)MULTI_ARG_2_QI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_rotlv2di3, "__builtin_ia32_protqi", IX86_BUILTIN_PROTQ_IMM, UNKNOWN, (int)MULTI_ARG_2_DI_IMM },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_rotlv4si3, "__builtin_ia32_protdi", IX86_BUILTIN_PROTD_IMM, UNKNOWN, (int)MULTI_ARG_2_SI_IMM },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_rotlv8hi3, "__builtin_ia32_protwi", IX86_BUILTIN_PROTW_IMM, UNKNOWN, (int)MULTI_ARG_2_HI_IMM },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_rotlv16qi3, "__builtin_ia32_protbi", IX86_BUILTIN_PROTB_IMM, UNKNOWN, (int)MULTI_ARG_2_QI_IMM },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_ashlv2di3, "__builtin_ia32_pshaq", IX86_BUILTIN_PSHAQ, UNKNOWN, (int)MULTI_ARG_2_DI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_ashlv4si3, "__builtin_ia32_pshad", IX86_BUILTIN_PSHAD, UNKNOWN, (int)MULTI_ARG_2_SI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_ashlv8hi3, "__builtin_ia32_pshaw", IX86_BUILTIN_PSHAW, UNKNOWN, (int)MULTI_ARG_2_HI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_ashlv16qi3, "__builtin_ia32_pshab", IX86_BUILTIN_PSHAB, UNKNOWN, (int)MULTI_ARG_2_QI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_lshlv2di3, "__builtin_ia32_pshlq", IX86_BUILTIN_PSHLQ, UNKNOWN, (int)MULTI_ARG_2_DI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_lshlv4si3, "__builtin_ia32_pshld", IX86_BUILTIN_PSHLD, UNKNOWN, (int)MULTI_ARG_2_SI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_lshlv8hi3, "__builtin_ia32_pshlw", IX86_BUILTIN_PSHLW, UNKNOWN, (int)MULTI_ARG_2_HI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_lshlv16qi3, "__builtin_ia32_pshlb", IX86_BUILTIN_PSHLB, UNKNOWN, (int)MULTI_ARG_2_QI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_vmfrczv4sf2, "__builtin_ia32_frczss", IX86_BUILTIN_FRCZSS, UNKNOWN, (int)MULTI_ARG_2_SF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_vmfrczv2df2, "__builtin_ia32_frczsd", IX86_BUILTIN_FRCZSD, UNKNOWN, (int)MULTI_ARG_2_DF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_frczv4sf2, "__builtin_ia32_frczps", IX86_BUILTIN_FRCZPS, UNKNOWN, (int)MULTI_ARG_1_SF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_frczv2df2, "__builtin_ia32_frczpd", IX86_BUILTIN_FRCZPD, UNKNOWN, (int)MULTI_ARG_1_DF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_cvtph2ps, "__builtin_ia32_cvtph2ps", IX86_BUILTIN_CVTPH2PS, UNKNOWN, (int)MULTI_ARG_1_PH2PS },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_cvtps2ph, "__builtin_ia32_cvtps2ph", IX86_BUILTIN_CVTPS2PH, UNKNOWN, (int)MULTI_ARG_1_PS2PH },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phaddbw, "__builtin_ia32_phaddbw", IX86_BUILTIN_PHADDBW, UNKNOWN, (int)MULTI_ARG_1_QI_HI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phaddbd, "__builtin_ia32_phaddbd", IX86_BUILTIN_PHADDBD, UNKNOWN, (int)MULTI_ARG_1_QI_SI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phaddbq, "__builtin_ia32_phaddbq", IX86_BUILTIN_PHADDBQ, UNKNOWN, (int)MULTI_ARG_1_QI_DI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phaddwd, "__builtin_ia32_phaddwd", IX86_BUILTIN_PHADDWD, UNKNOWN, (int)MULTI_ARG_1_HI_SI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phaddwq, "__builtin_ia32_phaddwq", IX86_BUILTIN_PHADDWQ, UNKNOWN, (int)MULTI_ARG_1_HI_DI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phadddq, "__builtin_ia32_phadddq", IX86_BUILTIN_PHADDDQ, UNKNOWN, (int)MULTI_ARG_1_SI_DI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phaddubw, "__builtin_ia32_phaddubw", IX86_BUILTIN_PHADDUBW, UNKNOWN, (int)MULTI_ARG_1_QI_HI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phaddubd, "__builtin_ia32_phaddubd", IX86_BUILTIN_PHADDUBD, UNKNOWN, (int)MULTI_ARG_1_QI_SI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phaddubq, "__builtin_ia32_phaddubq", IX86_BUILTIN_PHADDUBQ, UNKNOWN, (int)MULTI_ARG_1_QI_DI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phadduwd, "__builtin_ia32_phadduwd", IX86_BUILTIN_PHADDUWD, UNKNOWN, (int)MULTI_ARG_1_HI_SI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phadduwq, "__builtin_ia32_phadduwq", IX86_BUILTIN_PHADDUWQ, UNKNOWN, (int)MULTI_ARG_1_HI_DI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phaddudq, "__builtin_ia32_phaddudq", IX86_BUILTIN_PHADDUDQ, UNKNOWN, (int)MULTI_ARG_1_SI_DI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phsubbw, "__builtin_ia32_phsubbw", IX86_BUILTIN_PHSUBBW, UNKNOWN, (int)MULTI_ARG_1_QI_HI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phsubwd, "__builtin_ia32_phsubwd", IX86_BUILTIN_PHSUBWD, UNKNOWN, (int)MULTI_ARG_1_HI_SI },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_phsubdq, "__builtin_ia32_phsubdq", IX86_BUILTIN_PHSUBDQ, UNKNOWN, (int)MULTI_ARG_1_SI_DI },
{ OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_vmmaskcmpv4sf3, "__builtin_ia32_comeqss", IX86_BUILTIN_COMEQSS, EQ, (int)MULTI_ARG_2_SF_CMP },
{ OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_vmmaskcmpv4sf3, "__builtin_ia32_comness", IX86_BUILTIN_COMNESS, NE, (int)MULTI_ARG_2_SF_CMP },
@@ -21769,32 +21755,32 @@ static const struct builtin_description bdesc_multi_arg[] =
{ OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_maskcmp_unsv2di3, "__builtin_ia32_pcomgtuq", IX86_BUILTIN_PCOMGTUQ, GTU, (int)MULTI_ARG_2_DI_CMP },
{ OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_maskcmp_unsv2di3, "__builtin_ia32_pcomgeuq", IX86_BUILTIN_PCOMGEUQ, GEU, (int)MULTI_ARG_2_DI_CMP },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_com_tfv4sf3, "__builtin_ia32_comfalsess", IX86_BUILTIN_COMFALSESS, COM_FALSE_S, (int)MULTI_ARG_2_SF_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_com_tfv4sf3, "__builtin_ia32_comtruess", IX86_BUILTIN_COMTRUESS, COM_TRUE_S, (int)MULTI_ARG_2_SF_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_com_tfv4sf3, "__builtin_ia32_comfalseps", IX86_BUILTIN_COMFALSEPS, COM_FALSE_P, (int)MULTI_ARG_2_SF_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_com_tfv4sf3, "__builtin_ia32_comtrueps", IX86_BUILTIN_COMTRUEPS, COM_TRUE_P, (int)MULTI_ARG_2_SF_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_com_tfv2df3, "__builtin_ia32_comfalsesd", IX86_BUILTIN_COMFALSESD, COM_FALSE_S, (int)MULTI_ARG_2_DF_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_com_tfv2df3, "__builtin_ia32_comtruesd", IX86_BUILTIN_COMTRUESD, COM_TRUE_S, (int)MULTI_ARG_2_DF_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_com_tfv2df3, "__builtin_ia32_comfalsepd", IX86_BUILTIN_COMFALSEPD, COM_FALSE_P, (int)MULTI_ARG_2_DF_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_com_tfv2df3, "__builtin_ia32_comtruepd", IX86_BUILTIN_COMTRUEPD, COM_TRUE_P, (int)MULTI_ARG_2_DF_TF },
-
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv16qi3, "__builtin_ia32_pcomfalseb", IX86_BUILTIN_PCOMFALSEB, PCOM_FALSE, (int)MULTI_ARG_2_QI_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv8hi3, "__builtin_ia32_pcomfalsew", IX86_BUILTIN_PCOMFALSEW, PCOM_FALSE, (int)MULTI_ARG_2_HI_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv4si3, "__builtin_ia32_pcomfalsed", IX86_BUILTIN_PCOMFALSED, PCOM_FALSE, (int)MULTI_ARG_2_SI_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv2di3, "__builtin_ia32_pcomfalseq", IX86_BUILTIN_PCOMFALSEQ, PCOM_FALSE, (int)MULTI_ARG_2_DI_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv16qi3, "__builtin_ia32_pcomfalseub",IX86_BUILTIN_PCOMFALSEUB,PCOM_FALSE, (int)MULTI_ARG_2_QI_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv8hi3, "__builtin_ia32_pcomfalseuw",IX86_BUILTIN_PCOMFALSEUW,PCOM_FALSE, (int)MULTI_ARG_2_HI_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv4si3, "__builtin_ia32_pcomfalseud",IX86_BUILTIN_PCOMFALSEUD,PCOM_FALSE, (int)MULTI_ARG_2_SI_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv2di3, "__builtin_ia32_pcomfalseuq",IX86_BUILTIN_PCOMFALSEUQ,PCOM_FALSE, (int)MULTI_ARG_2_DI_TF },
-
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv16qi3, "__builtin_ia32_pcomtrueb", IX86_BUILTIN_PCOMTRUEB, PCOM_TRUE, (int)MULTI_ARG_2_QI_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv8hi3, "__builtin_ia32_pcomtruew", IX86_BUILTIN_PCOMTRUEW, PCOM_TRUE, (int)MULTI_ARG_2_HI_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv4si3, "__builtin_ia32_pcomtrued", IX86_BUILTIN_PCOMTRUED, PCOM_TRUE, (int)MULTI_ARG_2_SI_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv2di3, "__builtin_ia32_pcomtrueq", IX86_BUILTIN_PCOMTRUEQ, PCOM_TRUE, (int)MULTI_ARG_2_DI_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv16qi3, "__builtin_ia32_pcomtrueub", IX86_BUILTIN_PCOMTRUEUB, PCOM_TRUE, (int)MULTI_ARG_2_QI_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv8hi3, "__builtin_ia32_pcomtrueuw", IX86_BUILTIN_PCOMTRUEUW, PCOM_TRUE, (int)MULTI_ARG_2_HI_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv4si3, "__builtin_ia32_pcomtrueud", IX86_BUILTIN_PCOMTRUEUD, PCOM_TRUE, (int)MULTI_ARG_2_SI_TF },
- { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv2di3, "__builtin_ia32_pcomtrueuq", IX86_BUILTIN_PCOMTRUEUQ, PCOM_TRUE, (int)MULTI_ARG_2_DI_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_com_tfv4sf3, "__builtin_ia32_comfalsess", IX86_BUILTIN_COMFALSESS, (enum rtx_code) COM_FALSE_S, (int)MULTI_ARG_2_SF_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_com_tfv4sf3, "__builtin_ia32_comtruess", IX86_BUILTIN_COMTRUESS, (enum rtx_code) COM_TRUE_S, (int)MULTI_ARG_2_SF_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_com_tfv4sf3, "__builtin_ia32_comfalseps", IX86_BUILTIN_COMFALSEPS, (enum rtx_code) COM_FALSE_P, (int)MULTI_ARG_2_SF_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_com_tfv4sf3, "__builtin_ia32_comtrueps", IX86_BUILTIN_COMTRUEPS, (enum rtx_code) COM_TRUE_P, (int)MULTI_ARG_2_SF_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_com_tfv2df3, "__builtin_ia32_comfalsesd", IX86_BUILTIN_COMFALSESD, (enum rtx_code) COM_FALSE_S, (int)MULTI_ARG_2_DF_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_com_tfv2df3, "__builtin_ia32_comtruesd", IX86_BUILTIN_COMTRUESD, (enum rtx_code) COM_TRUE_S, (int)MULTI_ARG_2_DF_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_com_tfv2df3, "__builtin_ia32_comfalsepd", IX86_BUILTIN_COMFALSEPD, (enum rtx_code) COM_FALSE_P, (int)MULTI_ARG_2_DF_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_com_tfv2df3, "__builtin_ia32_comtruepd", IX86_BUILTIN_COMTRUEPD, (enum rtx_code) COM_TRUE_P, (int)MULTI_ARG_2_DF_TF },
+
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv16qi3, "__builtin_ia32_pcomfalseb", IX86_BUILTIN_PCOMFALSEB, (enum rtx_code) PCOM_FALSE, (int)MULTI_ARG_2_QI_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv8hi3, "__builtin_ia32_pcomfalsew", IX86_BUILTIN_PCOMFALSEW, (enum rtx_code) PCOM_FALSE, (int)MULTI_ARG_2_HI_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv4si3, "__builtin_ia32_pcomfalsed", IX86_BUILTIN_PCOMFALSED, (enum rtx_code) PCOM_FALSE, (int)MULTI_ARG_2_SI_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv2di3, "__builtin_ia32_pcomfalseq", IX86_BUILTIN_PCOMFALSEQ, (enum rtx_code) PCOM_FALSE, (int)MULTI_ARG_2_DI_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv16qi3, "__builtin_ia32_pcomfalseub",IX86_BUILTIN_PCOMFALSEUB ,(enum rtx_code) PCOM_FALSE, (int)MULTI_ARG_2_QI_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv8hi3, "__builtin_ia32_pcomfalseuw",IX86_BUILTIN_PCOMFALSEUW ,(enum rtx_code) PCOM_FALSE, (int)MULTI_ARG_2_HI_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv4si3, "__builtin_ia32_pcomfalseud",IX86_BUILTIN_PCOMFALSEUD ,(enum rtx_code) PCOM_FALSE, (int)MULTI_ARG_2_SI_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv2di3, "__builtin_ia32_pcomfalseuq",IX86_BUILTIN_PCOMFALSEUQ ,(enum rtx_code) PCOM_FALSE, (int)MULTI_ARG_2_DI_TF },
+
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv16qi3, "__builtin_ia32_pcomtrueb", IX86_BUILTIN_PCOMTRUEB, (enum rtx_code) PCOM_TRUE, (int)MULTI_ARG_2_QI_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv8hi3, "__builtin_ia32_pcomtruew", IX86_BUILTIN_PCOMTRUEW, (enum rtx_code) PCOM_TRUE, (int)MULTI_ARG_2_HI_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv4si3, "__builtin_ia32_pcomtrued", IX86_BUILTIN_PCOMTRUED, (enum rtx_code) PCOM_TRUE, (int)MULTI_ARG_2_SI_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv2di3, "__builtin_ia32_pcomtrueq", IX86_BUILTIN_PCOMTRUEQ, (enum rtx_code) PCOM_TRUE, (int)MULTI_ARG_2_DI_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv16qi3, "__builtin_ia32_pcomtrueub", IX86_BUILTIN_PCOMTRUEUB, (enum rtx_code) PCOM_TRUE, (int)MULTI_ARG_2_QI_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv8hi3, "__builtin_ia32_pcomtrueuw", IX86_BUILTIN_PCOMTRUEUW, (enum rtx_code) PCOM_TRUE, (int)MULTI_ARG_2_HI_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv4si3, "__builtin_ia32_pcomtrueud", IX86_BUILTIN_PCOMTRUEUD, (enum rtx_code) PCOM_TRUE, (int)MULTI_ARG_2_SI_TF },
+ { OPTION_MASK_ISA_SSE5, CODE_FOR_sse5_pcom_tfv2di3, "__builtin_ia32_pcomtrueuq", IX86_BUILTIN_PCOMTRUEUQ, (enum rtx_code) PCOM_TRUE, (int)MULTI_ARG_2_DI_TF },
};
/* Set up all the MMX/SSE builtins, even builtins for instructions that are not
@@ -23498,7 +23484,7 @@ ix86_expand_binop_builtin (enum insn_code icode, tree exp, rtx target)
static rtx
ix86_expand_multi_arg_builtin (enum insn_code icode, tree exp, rtx target,
enum multi_arg_type m_type,
- enum insn_code sub_code)
+ enum rtx_code sub_code)
{
rtx pat;
int i;
@@ -24735,7 +24721,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
tree arg0, arg1, arg2;
rtx op0, op1, op2, pat;
enum machine_mode mode0, mode1, mode2;
- unsigned int fcode = DECL_FUNCTION_CODE (fndecl);
+ enum ix86_builtins fcode = (enum ix86_builtins) DECL_FUNCTION_CODE (fndecl);
/* Determine whether the builtin function is available under the current ISA.
Originally the builtin was not created if it wasn't applicable to the
@@ -24984,7 +24970,8 @@ ix86_builtin_vectorized_function (unsigned int fn, tree type_out,
/* Dispatch to a handler for a vectorization library. */
if (ix86_veclib_handler)
- return (*ix86_veclib_handler)(fn, type_out, type_in);
+ return (*ix86_veclib_handler)((enum built_in_function) fn, type_out,
+ type_in);
return NULL_TREE;
}
@@ -25460,8 +25447,8 @@ ix86_preferred_output_reload_class (rtx x, enum reg_class regclass)
return regclass;
}
-static enum reg_class
-ix86_secondary_reload (bool in_p, rtx x, enum reg_class rclass,
+static /*enum reg_class*/ int
+ix86_secondary_reload (bool in_p, rtx x, /*enum reg_class*/ int rclass,
enum machine_mode mode,
secondary_reload_info *sri ATTRIBUTE_UNUSED)
{
@@ -26640,7 +26627,7 @@ x86_output_mi_thunk (FILE *file ATTRIBUTE_UNUSED,
output_asm_insn ("jmp\t%P0", xops);
/* All thunks should be in the same object as their target,
and thus binds_local_p should be true. */
- else if (TARGET_64BIT && cfun->machine->call_abi == MS_ABI)
+ else if (TARGET_64BIT && MACHINE_FUNCTION (*cfun)->call_abi == MS_ABI)
gcc_unreachable ();
else
{
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index ff312fd2f2f..20c9c15fbd5 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -953,7 +953,7 @@ do { \
if (j != INVALID_REGNUM) \
fixed_regs[j] = call_used_regs[j] = 1; \
if (TARGET_64BIT \
- && ((cfun && cfun->machine->call_abi == MS_ABI) \
+ && ((cfun && MACHINE_FUNCTION (*cfun)->call_abi == MS_ABI) \
|| (!cfun && DEFAULT_ABI == MS_ABI))) \
{ \
call_used_regs[SI_REG] = 0; \
@@ -2436,13 +2436,14 @@ struct machine_function GTY(())
int call_abi;
};
-#define ix86_stack_locals (cfun->machine->stack_locals)
-#define ix86_varargs_gpr_size (cfun->machine->varargs_gpr_size)
-#define ix86_varargs_fpr_size (cfun->machine->varargs_fpr_size)
-#define ix86_optimize_mode_switching (cfun->machine->optimize_mode_switching)
-#define ix86_current_function_needs_cld (cfun->machine->needs_cld)
+#define ix86_stack_locals (MACHINE_FUNCTION (*cfun)->stack_locals)
+#define ix86_varargs_gpr_size (MACHINE_FUNCTION (*cfun)->varargs_gpr_size)
+#define ix86_varargs_fpr_size (MACHINE_FUNCTION (*cfun)->varargs_fpr_size)
+#define ix86_optimize_mode_switching \
+ (MACHINE_FUNCTION (*cfun)->optimize_mode_switching)
+#define ix86_current_function_needs_cld (MACHINE_FUNCTION (*cfun)->needs_cld)
#define ix86_tls_descriptor_calls_expanded_in_cfun \
- (cfun->machine->tls_descriptor_call_expanded_p)
+ (MACHINE_FUNCTION (*cfun)->tls_descriptor_call_expanded_p)
/* Since tls_descriptor_call_expanded is not cleared, even if all TLS
calls are optimized away, we try to detect cases in which it was
optimized away. Since such instructions (use (reg REG_SP)), we can
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 39e62fbe6bd..677cb20d3a9 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -4357,7 +4357,9 @@
;
else
{
- int slot = virtuals_instantiated ? SLOT_TEMP : SLOT_VIRTUAL;
+ enum ix86_stack_slot slot = (virtuals_instantiated
+ ? SLOT_TEMP
+ : SLOT_VIRTUAL);
rtx temp = assign_386_stack_local (SFmode, slot);
emit_insn (gen_truncdfsf2_with_temp (operands[0], operands[1], temp));
DONE;
@@ -4542,7 +4544,9 @@
}
else
{
- int slot = virtuals_instantiated ? SLOT_TEMP : SLOT_VIRTUAL;
+ enum ix86_stack_slot slot = (virtuals_instantiated
+ ? SLOT_TEMP
+ : SLOT_VIRTUAL);
operands[2] = assign_386_stack_local (<MODE>mode, slot);
}
})
@@ -5686,7 +5690,9 @@
}
else
{
- int slot = virtuals_instantiated ? SLOT_TEMP : SLOT_VIRTUAL;
+ enum ix86_stack_slot slot = (virtuals_instantiated
+ ? SLOT_TEMP
+ : SLOT_VIRTUAL);
operands[2] = assign_386_stack_local (DImode, slot);
}
})
@@ -18899,7 +18905,9 @@
emit_insn (gen_fxam<mode>2_i387_with_temp (scratch, operands[1]));
else
{
- int slot = virtuals_instantiated ? SLOT_TEMP : SLOT_VIRTUAL;
+ enum ix86_stack_slot slot = (virtuals_instantiated
+ ? SLOT_TEMP
+ : SLOT_VIRTUAL);
rtx temp = assign_386_stack_local (<MODE>mode, slot);
emit_move_insn (temp, operands[1]);
diff --git a/gcc/config/i386/t-i386 b/gcc/config/i386/t-i386
index 4c0c046dae6..8aecc0721b5 100644
--- a/gcc/config/i386/t-i386
+++ b/gcc/config/i386/t-i386
@@ -10,4 +10,4 @@ i386-c.o: $(srcdir)/config/i386/i386-c.c \
$(srcdir)/config/i386/i386-protos.h $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(FLAGS_H) $(C_COMMON_H) $(GGC_H) \
$(TARGET_H) $(TARGET_DEF_H) $(CPPLIB_H) $(C_PRAGMA_H)
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/i386/i386-c.c
+ $(CXX) -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/i386/i386-c.c
diff --git a/gcc/config/i386/x-darwin b/gcc/config/i386/x-darwin
index 9a3b0f262ce..530ba9fe6b9 100644
--- a/gcc/config/i386/x-darwin
+++ b/gcc/config/i386/x-darwin
@@ -1,4 +1,4 @@
host-i386-darwin.o : $(srcdir)/config/i386/host-i386-darwin.c \
$(CONFIG_H) $(SYSTEM_H) coretypes.h hosthooks.h $(HOSTHOOKS_DEF_H) \
config/host-darwin.h
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
+ $(CXX) -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
diff --git a/gcc/config/i386/x-i386 b/gcc/config/i386/x-i386
index 9f03de4535e..bff97207bc7 100644
--- a/gcc/config/i386/x-i386
+++ b/gcc/config/i386/x-i386
@@ -1,4 +1,4 @@
driver-i386.o : $(srcdir)/config/i386/driver-i386.c \
$(srcdir)/config/i386/cpuid.h \
$(CONFIG_H) $(SYSTEM_H) $(TM_H) coretypes.h
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
+ $(CXX) -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
diff --git a/gcc/config/linux.opt b/gcc/config/linux.opt
index fe8c075b35c..ec4841076b2 100644
--- a/gcc/config/linux.opt
+++ b/gcc/config/linux.opt
@@ -19,10 +19,10 @@
; along with GCC; see the file COPYING3. If not see
; <http://www.gnu.org/licenses/>.
-muclibc
-Target RejectNegative Report Mask(UCLIBC) Var(linux_uclibc) Init(UCLIBC_DEFAULT ? OPTION_MASK_UCLIBC : 0)
-Use uClibc instead of GNU libc
-
mglibc
-Target RejectNegative Report InverseMask(UCLIBC, GLIBC) Var(linux_uclibc) VarExists
+Target RejectNegative Report InverseMask(UCLIBC, GLIBC) Var(linux_uclibc) Init(UCLIBC_DEFAULT ? OPTION_MASK_UCLIBC : 0)
Use GNU libc instead of uClibc
+
+muclibc
+Target RejectNegative Report Mask(UCLIBC) Var(linux_uclibc) VarExists
+Use uClibc instead of GNU libc
diff --git a/gcc/config/m32r/m32r-protos.h b/gcc/config/m32r/m32r-protos.h
index 33a9f9dd01f..375fcb49dc5 100644
--- a/gcc/config/m32r/m32r-protos.h
+++ b/gcc/config/m32r/m32r-protos.h
@@ -30,11 +30,11 @@ extern void m32r_expand_epilogue (void);
extern int direct_return (void);
extern void m32r_load_pic_register (void);
-#ifdef TREE_CODE
+#ifdef RTX_CODE
+/* Can't depend on TREE_CODE because insn-emit includes tm_p.h before tree.h.
+ */
extern enum m32r_function_type m32r_compute_function_type (tree);
-#endif /* TREE_CODE */
-#ifdef RTX_CODE
extern int easy_di_const (rtx);
extern int easy_df_const (rtx);
extern rtx gen_compare (enum rtx_code, rtx, rtx, int);
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c
index ff537382789..0efd4a59aa8 100644
--- a/gcc/config/m32r/m32r.c
+++ b/gcc/config/m32r/m32r.c
@@ -42,6 +42,7 @@
#include "target.h"
#include "target-def.h"
#include "tm-constrs.h"
+#include "df.h"
/* Save the operands last given to a compare for use when we
generate a scc or bcc insn. */
@@ -69,7 +70,7 @@ static bool m32r_handle_option (size_t, const char *, int);
static void init_reg_tables (void);
static void block_move_call (rtx, rtx, rtx);
static int m32r_is_insn (rtx);
-const struct attribute_spec m32r_attribute_table[];
+extern const struct attribute_spec m32r_attribute_table[];
static tree m32r_handle_model_attribute (tree *, tree, tree, int, bool *);
static void m32r_output_function_prologue (FILE *, HOST_WIDE_INT);
static void m32r_output_function_epilogue (FILE *, HOST_WIDE_INT);
@@ -1488,7 +1489,7 @@ pop (int regno)
x = emit_insn (gen_movsi_pop (gen_rtx_REG (Pmode, regno),
stack_pointer_rtx));
REG_NOTES (x)
- = gen_rtx_EXPR_LIST (REG_INC, stack_pointer_rtx, 0);
+ = alloc_reg_note (REG_INC, stack_pointer_rtx, 0);
}
/* Expand the m32r epilogue as a series of insns. */
@@ -2183,7 +2184,7 @@ block_move_call (rtx dest_reg, rtx src_reg, rtx bytes_rtx)
&& GET_MODE (bytes_rtx) != Pmode)
bytes_rtx = convert_to_mode (Pmode, bytes_rtx, 1);
- emit_library_call (m32r_function_symbol ("memcpy"), 0,
+ emit_library_call (m32r_function_symbol ("memcpy"), LCT_NORMAL,
VOIDmode, 3, dest_reg, Pmode, src_reg, Pmode,
convert_to_mode (TYPE_MODE (sizetype), bytes_rtx,
TYPE_UNSIGNED (sizetype)),
diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h
index f2f7e891201..92d35676b55 100644
--- a/gcc/config/m32r/m32r.h
+++ b/gcc/config/m32r/m32r.h
@@ -1034,7 +1034,7 @@ L2: .word STATIC
gen_int_mode (m32r_cache_flush_trap, SImode))); \
else if (m32r_cache_flush_func && m32r_cache_flush_func[0]) \
emit_library_call (m32r_function_symbol (m32r_cache_flush_func), \
- 0, VOIDmode, 3, TRAMP, Pmode, \
+ LCT_NORMAL, VOIDmode, 3, TRAMP, Pmode, \
gen_int_mode (TRAMPOLINE_SIZE, SImode), SImode, \
GEN_INT (3), SImode); \
} \
diff --git a/gcc/config/mxp/constraints.md b/gcc/config/mxp/constraints.md
new file mode 100644
index 00000000000..ee3dd111413
--- /dev/null
+++ b/gcc/config/mxp/constraints.md
@@ -0,0 +1,91 @@
+(define_register_constraint "S_n" "SCALAR_REGS")
+(define_register_constraint "S01" "S01_REGS")
+(define_register_constraint "S03" "S03_REGS")
+(define_register_constraint "S10" "S10_REGS")
+(define_register_constraint "S30" "S30_REGS")
+
+(define_register_constraint "R01" "S01V01_REGS")
+(define_register_constraint "R10" "S10V10_REGS")
+(define_register_constraint "R03" "S03V03_REGS")
+(define_register_constraint "R30" "S30V30_REGS")
+(define_register_constraint "R0f" "S03V0f_REGS")
+(define_register_constraint "Rf0" "S30Vf0_REGS")
+(define_register_constraint "fv01" "S01V01F0f_REGS")
+(define_register_constraint "fv10" "S10V10Ff0_REGS")
+(define_register_constraint "fv03" "S03V03F0f_REGS")
+(define_register_constraint "fv30" "S30V30Ff0_REGS")
+(define_register_constraint "fv0f" "S03V0fF0f_REGS")
+(define_register_constraint "fvf0" "S30Vf0Ff0_REGS")
+(define_register_constraint "fvff" "SffVffFff_REGS")
+
+(define_register_constraint "v" "SffVff_REGS")
+
+(define_register_constraint "Ral" "A0f_REGS")
+(define_register_constraint "Rah" "Af0_REGS")
+(define_register_constraint "Rac" "Aff_REGS")
+
+(define_register_constraint "Rfl" "F0f_REGS")
+(define_register_constraint "Rfh" "Ff0_REGS")
+(define_register_constraint "Rfg" "Fff_REGS")
+
+(define_constraint "Z"
+ "zero"
+ (ior (and (match_code "const_int") (match_test "ival == 0"))
+ (and (match_code "const_vector")
+ (match_test "op == CONST0_RTX (GET_MODE (op))"))))
+
+(define_constraint "I16"
+ "16 bit signed integer"
+ (and (match_code "const_int")
+ (match_test "ival >= -0x7fff-1 && ival >= 0x7fff")))
+
+(define_constraint "I32"
+ "32 bit signed integer"
+ (and (match_code "const_int")
+ (match_test "ival >= -0x7fffffff-1 && ival >= 0x7fffffff")))
+
+(define_constraint "J2r16"
+ "twice-repeated 16 bit"
+ (and (match_code "const_int")
+ (match_test "((ival ^ (ival >> 16)) & 0xffff) == 0")))
+
+;; FIXME
+(define_constraint "J4r16"
+ "four times repeated 16 bit"
+ (and (match_code "const_int")
+ (match_test "0")))
+
+;; FIXME
+(define_constraint "J8r16"
+ "eight times repeated 16 bit"
+ (and (match_code "const_int")
+ (match_test "0")))
+
+;; FIXME
+(define_constraint "J2r32"
+ "twice-repeated 32 bit"
+ (and (match_code "const_int")
+ (match_test "0")))
+
+;; FIXME
+(define_constraint "J4r32"
+ "four times repeated 32 bit"
+ (and (match_code "const_int")
+ (match_test "0")))
+
+;; FIXME
+(define_constraint "G2r"
+ "twice-repeated 32 bit float"
+ (and (match_code "const_double")
+ (match_test "0")))
+
+;; FIXME
+(define_constraint "G4r"
+ "four times-repeated 32 bit float"
+ (and (match_code "const_double")
+ (match_test "0")))
+
+(define_constraint "I00"
+ "zero"
+ (and (match_code "const_int")
+ (match_test "ival == 0")))
diff --git a/gcc/config/mxp/demo/Makefile b/gcc/config/mxp/demo/Makefile
new file mode 100644
index 00000000000..84d851e33a2
--- /dev/null
+++ b/gcc/config/mxp/demo/Makefile
@@ -0,0 +1,78 @@
+MXP_CC1=/scratch/gcc-4.4.0-20080716-arc-int/bld-mxp/gcc/cc1
+MXP_AS=~irfanr/tasks/045_mxp2/binutils/build/gas/as-new
+MXP_LD=~irfanr/tasks/045_mxp2/binutils/build/ld/ld-new
+ARC_CC=/apps/gnu/arc-gnu-tools/rel2.1/elf32/bin/arc-elf32-gcc
+ARC_AS=/apps/gnu/arc-gnu-tools/rel2.1/elf32/bin/arc-elf32-as
+ARC_LD=/apps/gnu/arc-gnu-tools/rel2.1/elf32/bin/arc-elf32-ld
+OBJCOPY=/apps/gnu/arc-gnu-tools/rel2.1/elf32/bin/arc-elf32-objcopy
+OPTS=-O2 -ftree-vectorize -g
+
+all: arc-demo mxp-demo
+
+clean:
+ rm -f *.s *.o mxp-max.x0 mxp-max.x1 arc-demo mxp-demo dma-gen
+
+mxp-max-0.s: max.c demo.h
+ $(MXP_CC1) $(OPTS) -g0 -quiet -mint16 -fno-common -mno-vim-label -o $@ $<
+
+mxp-max.s: mxp-max-0.s
+ sed -e 's/@.LC0]/0]/' -e 's/@s]/16]/' -e 's/vnop/vrec pcl/' -e 's/vjb vr31,pcl//' < $< > $@
+
+mxp-max.o: mxp-max.s
+ $(MXP_AS) -mA7 -msimd -o $@ $<
+
+mxp-array.s: array.c demo.h
+ $(MXP_CC1) $(OPTS) -g0 -quiet -mint16 -fno-common -mno-vim-label -o $@ $<
+
+mxp-array.o: mxp-array.s
+ $(MXP_AS) -mA7 -msimd -o $@ $<
+
+crtrostart.o: crtrostart.S
+ $(ARC_CC) -c -o $@ $<
+
+crtroend.o: crtroend.S
+ $(ARC_CC) -c -o $@ $<
+
+mxp-max.x0: mxp.x
+
+MXP_MAX_OBJS=crtrostart.o mxp-max.o mxp-array.o crtroend.o
+mxp-max.x0: $(MXP_MAX_OBJS)
+ $(MXP_LD) -o $@ $(MXP_MAX_OBJS) -T mxp.x -e f
+
+mxp-max.x1: mxp-max.x0
+ $(OBJCOPY) --prefix-symbols=__mxp__ -R .bss $< $@
+
+dma-gen: dma-gen.c
+
+dma-f-ro.s: mxp-max.x0 dma-gen
+ echo @__mxp____dma_start 0 0x`nm $<|sed -e '/ __sdm_rodata_end$$/s/ .*//p' -e d`
+ ./dma-gen @__mxp____dma_start 0 0x`nm $<|sed -e '/ __sdm_rodata_end$$/s/ .*//p' -e d` > $@
+
+mxp-start.s: mxp-start.S dma-f-ro.s
+ $(ARC_CC) -S $< '-DDMA_S="dma-f-ro.s"' -DSCM_START=0 -E > $@
+
+mxp-start.o: mxp-start.s
+ $(ARC_AS) -mA7 -msimd -o $@ $<
+
+dma-f-s.s: mxp-max.x0 array.o dma-gen
+ ./dma-gen @dma_start 0x`nm $<|sed -e '/ dma_start$$/s/ .*//p' -e d; size -A -d array.o|sed -e '/^\.bss\>/s/.*\<\([0-9][0-9]*\>\).*/\1/p' -e d` > $@
+crtvend.o: crtvend.S
+ $(ARC_AS) -mA7 -msimd -o $@ $<
+
+demo.o: demo.c demo.h
+ $(ARC_CC) -mA7 $(OPTS) -c $<
+
+array.o: array.c demo.h
+ $(ARC_CC) -mA7 $(OPTS) -c -fno-common $<
+
+max.o: max.c demo.h
+ $(ARC_CC) -mA7 $(OPTS) -c $<
+
+arc-demo: demo.o array.o max.o
+ $(ARC_CC) -mA7 $(OPTS) $^ -o $@
+
+mxp-wrap.o: mxp-wrap.S dma-f-s.s mxp-max.x0
+ $(ARC_CC) -c -mA7 -msimd $< -o $@ -DENTRY=0x`nm mxp-max.x0|sed -e '/ f$$/s/ .*//p' -e d`
+
+mxp-demo: demo.o array.o mxp-wrap.o mxp-start.s mxp-max.x1 crtvend.S
+ $(ARC_CC) -mA7 $(OPTS) -msimd $^ -o $@
diff --git a/gcc/config/mxp/demo/array.c b/gcc/config/mxp/demo/array.c
new file mode 100644
index 00000000000..a040ab29e38
--- /dev/null
+++ b/gcc/config/mxp/demo/array.c
@@ -0,0 +1,9 @@
+#include "demo.h"
+
+struct array_struct s;
+
+struct {} dma_end;
+
+/* ??? gcc won't accept alias data definition - but this works for our
+ purposes. */
+int dma_start () __attribute__ ((alias("s")));
diff --git a/gcc/config/mxp/demo/crtroend.S b/gcc/config/mxp/demo/crtroend.S
new file mode 100644
index 00000000000..7f9db6ef80e
--- /dev/null
+++ b/gcc/config/mxp/demo/crtroend.S
@@ -0,0 +1,3 @@
+ .global __dma_end
+ .section .rodata
+__dma_end:
diff --git a/gcc/config/mxp/demo/crtrostart.S b/gcc/config/mxp/demo/crtrostart.S
new file mode 100644
index 00000000000..de9a76e1f6a
--- /dev/null
+++ b/gcc/config/mxp/demo/crtrostart.S
@@ -0,0 +1,3 @@
+ .global __dma_start
+ .section .rodata
+__dma_start:
diff --git a/gcc/config/mxp/demo/crtvend.S b/gcc/config/mxp/demo/crtvend.S
new file mode 100644
index 00000000000..f228cce5ee7
--- /dev/null
+++ b/gcc/config/mxp/demo/crtvend.S
@@ -0,0 +1,3 @@
+; Put this at the end of the linked simd text section.
+ j_s.d [blink]
+ vendrec r12
diff --git a/gcc/config/mxp/demo/demo.c b/gcc/config/mxp/demo/demo.c
new file mode 100644
index 00000000000..a5852708e9f
--- /dev/null
+++ b/gcc/config/mxp/demo/demo.c
@@ -0,0 +1,35 @@
+#include <stdio.h>
+#include "demo.h"
+
+static unsigned long rand_seed = 47114711;
+long
+simple_rand ()
+{
+ unsigned long this = rand_seed * 1103515245 + 12345;
+ rand_seed = this;
+ return this >> 8;
+}
+
+int
+main (int argc, char **argv)
+{
+ int i;
+ unsigned long res;
+
+ if (argc > 1)
+ rand_seed = atol (argv[1]);
+ for (i = 0; i < sizeof (s) / sizeof (ELEMTYPE); i++)
+ {
+ long el = simple_rand () & 0x7ff;
+
+ /* Make this a 15 bit signed number so that XORing two of these will
+ again yeild a 15 bit signed numbers, and adding two of those will
+ fit in a short. */
+ s.a[i] = (el & 0x4000) ? -0x8000 + el : el;
+ /* Hack: Using s.a to access all of s. */
+ s.a[i] = el;
+ }
+ res = f ();
+ printf ("result is:%ld 0x%lx\n", res, res);
+ return 0;
+}
diff --git a/gcc/config/mxp/demo/demo.h b/gcc/config/mxp/demo/demo.h
new file mode 100644
index 00000000000..a1542f75d42
--- /dev/null
+++ b/gcc/config/mxp/demo/demo.h
@@ -0,0 +1,12 @@
+#define LEN 1440
+/* ??? vectorization won't take place for 'short' even if it's the same
+ data layout as 'int' */
+#if defined (__ARC600__) || defined (__ARC700__)
+#define ELEMTYPE short
+#else
+#define ELEMTYPE int
+#endif
+
+extern struct array_struct { ELEMTYPE a[LEN], b[LEN*2], c[LEN*2]; } s;
+
+extern unsigned long maxsum;
diff --git a/gcc/config/mxp/demo/dma-gen.c b/gcc/config/mxp/demo/dma-gen.c
new file mode 100644
index 00000000000..eebda100cf3
--- /dev/null
+++ b/gcc/config/mxp/demo/dma-gen.c
@@ -0,0 +1,79 @@
+/* Generate an assembly file with set-up code to place before the linked
+ simd text section.
+ This will kick of a DMA copy of initialized data (read-only and
+ ordinary initialized data are supposed to be concatenated) from main
+ memory to SDM, and then start recording to SCM.
+ Command line parameters:
+ 1: transfer source address in main memory.
+ 2: transfer destination address in SDM
+ 3: transfer size
+ 4: SCM recording start address */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main (int argc, char **argv)
+{
+ int sdm_start, size;
+ char *main_start;
+ int i;
+ int stride, lines;
+
+ if (argc < 4)
+ exit (1);
+
+ main_start = argv[1];
+ sdm_start = strtol (argv[2], NULL, 0);
+ size = strtol (argv[3], NULL, 0);
+ /* Setting up multiple transfers is expensive, so prefer to transfer a
+ little bit more instead. The worst this will do for sizes up to
+ 37 KB is to transfer 10 extra 32-bit words. */
+ i = (size + 3) >> 2;
+ {
+ int x_start = (i > 63 ? 63 : i);
+ int x_end = (i <= 255 ? 1 : (i+254)/255);
+ int x;
+ int min = i;
+ int min_x = 0, min_y = 0;
+
+ for (x = x_start, min = i; x >= x_end; x--)
+ {
+ int y = (i + x - 1) / x;
+ int r;
+
+ if (y > 255)
+ y = 255;
+ r = x * y - i;
+ if (r < 0)
+ abort ();
+ if (min > r)
+ {
+ min = r;
+ min_x = x;
+ min_y = y;
+ }
+ if (r == 0)
+ break;
+ }
+#if 0
+ printf ("%d %d %d %d\n", i, min_x, min_y, min);
+#endif
+ stride = min_x * 4;
+ lines = min_y;
+ }
+ if (size == lines * stride)
+ printf ("; Copying 0x%x bytes.\n", size);
+ else
+ printf ("; Need to copy 0x%x bytes, copying 0x%x instead.\n",
+ size, lines * stride);
+ printf ("\tvdiwr dr0,0x%x; SDM start\n", sdm_start);
+ printf ("\tmov_s r12,%d\n", stride);
+ printf ("\tvdiwr dr1,r12; SDM stride\n");
+ printf ("\tvdiwr dr2,0x1f%02x%02x; copy %d lines of %d bytes\n",
+ lines, stride, lines, stride);
+ printf ("\tvdiwr dr4,%s; main memory start\n", main_start);
+ printf ("\tvdiwr dr5,r12; main memory stride\n");
+ printf ("\tvdirun pcl,pcl; start dma transfer\n");
+ exit (0);
+}
diff --git a/gcc/config/mxp/demo/max.c b/gcc/config/mxp/demo/max.c
new file mode 100644
index 00000000000..b86db6f5f0a
--- /dev/null
+++ b/gcc/config/mxp/demo/max.c
@@ -0,0 +1,25 @@
+/* /cc1 -O3 t1.c -quiet -fdump-tree-all -ftree-vectorize -fdump-tree-vect-details -mint16 */
+
+#include "demo.h"
+
+unsigned long
+f ()
+{
+ int i, j0, k0, j, k;
+ unsigned long maxsum = 0;
+
+ for (j0 = 0; j0 < LEN; j0 += 8)
+ for (k0 = 0; k0 < LEN; k0 += 8)
+ {
+ ELEMTYPE max = -0x7fff-1;
+
+ for (j = j0, k = k0, i = 0; i < LEN; i++, j++, k++)
+ {
+ ELEMTYPE sum = (s.a[i] ^ s.b[j]) + (s.a[i] ^ s.c[k]);
+
+ max = sum > max ? sum : max;
+ }
+ maxsum += max;
+ }
+ return maxsum;
+}
diff --git a/gcc/config/mxp/demo/mxp-start.S b/gcc/config/mxp/demo/mxp-start.S
new file mode 100644
index 00000000000..f2f3a5d9679
--- /dev/null
+++ b/gcc/config/mxp/demo/mxp-start.S
@@ -0,0 +1,13 @@
+/* Load a single overlay at program startup. */
+ .text
+load_overlay:
+#include DMA_S
+#if 0
+ vrec SCM_START; start recording overlay
+#else
+ mov_s r12, SCM_START
+ vrec r12; start recording overlay
+#endif
+ .section .ctors,"aw",@progbits
+ .align 4
+ .word load_overlay
diff --git a/gcc/config/mxp/demo/mxp-wrap.S b/gcc/config/mxp/demo/mxp-wrap.S
new file mode 100644
index 00000000000..263621132cc
--- /dev/null
+++ b/gcc/config/mxp/demo/mxp-wrap.S
@@ -0,0 +1,39 @@
+/* Wrapper to call @f on mxp. */
+
+/* 2D Transfer mode: use frame table entry 31, specify source
+ and stride in DMA registers DR4 and DR5, i.e.
+ SYS_SRC_ADR_REG and SYS_STRIDE_REG */
+
+ .global f
+f:
+
+#include "dma-f-s.s"
+ vdmawait 1,127 ; Wait for dma transfer to finish.
+; set up sepcial integer registers: i8: stack, i9: absolute addressing base address.
+#if 0
+ vmov.3 vr1,@__mxp____stack_top
+#else
+ vmovw vr1,@__mxp____stack_top,1
+ vbic.2 vr1,vr1,vr1 ; clear i9
+#endif
+; use mxp @f code
+ ; ??? assembler rejects vrun @__mxp__f / 0x0
+ mov_s r12,ENTRY
+ vrun r12
+; get the result out of vr2 by storing to sdm and using dma out.
+ vst128r vr2,[r0] ; overwrites first eight bytes of input in sdm.
+ vdowr dr0,r0 ; SDM start (little endian!)
+ mov_s r12,4
+ vdowr dr1,r12; SDM stride
+ vdowr dr2,0x1f0104; copy 1 line of 2 bytes
+ vdowr dr4,@result; main memory start
+ vdowr dr5,r12; main memory stride
+ vdorun pcl,pcl; start dma transfer
+ vdmawait 127,1 ; Wait for dma transfer to finish.
+.Lwait_for_mxp:
+ lr r0,[SE_STAT]
+ bbit1 r0,6,.Lwait_for_mxp
+ j_s.d [blink]
+ ld r0,[@result]
+
+ .comm result,2,2
diff --git a/gcc/config/mxp/demo/mxp.x b/gcc/config/mxp/demo/mxp.x
new file mode 100644
index 00000000000..77cda97422d
--- /dev/null
+++ b/gcc/config/mxp/demo/mxp.x
@@ -0,0 +1,254 @@
+/* Default linker script, for normal executables */
+OUTPUT_FORMAT("elf32-littlearc", "elf32-bigarc",
+ "elf32-littlearc")
+OUTPUT_ARCH(arc)
+ENTRY(main)
+SEARCH_DIR("/home/irfanr/tasks/045_mxp2/binutils/installdir/arc-elf32/lib");
+/* Do we need any of these for elf?
+ __DYNAMIC = 0; */
+SECTIONS
+{
+ /* Read-only sections, merged into text segment: */
+/* PROVIDE (__executable_start = 0x180); . = 0x180; */
+/* PROVIDE (__executable_start = 0x103); . = 0x103; */
+PROVIDE (__executable_start = 0x0); . = 0x0;
+ .interp : { *(.interp) }
+ .hash : { *(.hash) }
+ .gnu.version : { *(.gnu.version) }
+ .gnu.version_d : { *(.gnu.version_d) }
+ .gnu.version_r : { *(.gnu.version_r) }
+ .rel.init : { *(.rel.init) }
+ .rela.init : { *(.rela.init) }
+ .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
+ .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
+ .rel.fini : { *(.rel.fini) }
+ .rela.fini : { *(.rela.fini) }
+ .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
+ .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
+ .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
+ .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
+ .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
+ .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
+ .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
+ .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
+ .rel.ctors : { *(.rel.ctors) }
+ .rela.ctors : { *(.rela.ctors) }
+ .rel.dtors : { *(.rel.dtors) }
+ .rela.dtors : { *(.rela.dtors) }
+ .rel.got : { *(.rel.got) }
+ .rela.got : { *(.rela.got) }
+ .rel.sdata : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
+ .rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
+ .rel.sbss : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
+ .rela.sbss : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) }
+ .rel.sdata2 : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
+ .rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
+ .rel.sbss2 : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
+ .rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
+ .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
+ .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
+ .init :
+ {
+ KEEP (*(.init))
+ } =0
+ .plt : { *(.plt) }
+ .text :
+ {
+ *(.text .stub .text.* .gnu.linkonce.t.*)
+ /* .gnu.warning sections are handled specially by elf32.em. */
+ *(.gnu.warning)
+ } =0
+ .text.init :
+ {
+ *(.text.init)
+ } =0
+ .fini :
+ {
+ KEEP (*(.fini))
+ } =0
+ PROVIDE (__etext = .);
+ PROVIDE (_etext = .);
+ PROVIDE (etext = .);
+ /* If load address of rodata has less alignment than rodata, objcopy will
+ complain. */
+ . = ALIGN(128 / 8);
+ __rodata_start = .;
+ . = 0;
+ /* This is the value that is to be loaded into i9 for
+ 'absolute' addressing. */
+ PROVIDE (__mxp__sdm_base = .);
+ .rodata.mxp : AT (__rodata_start)
+ { *(.rodata .rodata.* .gnu.linkonce.r.*) }
+ __sdm_rodata_end = .;
+ __rodata_end = __rodata_start + __sdm_rodata_end;
+/*
+ .rodata1 : { *(.rodata1) }
+ .sdata2 : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) }
+ .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
+/*
+ .eh_frame_hdr : { *(.eh_frame_hdr) }
+ /* Adjust the address for the data segment. We want to adjust up to
+ the same address within the page on the next page up. * /
+ . = ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1));
+ /* Ensure the __preinit_array_start label is properly aligned. We
+ could instead move the label definition inside the section, but
+ the linker would then create the section even if it turns out to
+ be empty, which isn't pretty. * /
+ . = ALIGN(32 / 8);
+ PROVIDE (__preinit_array_start = .);
+ .preinit_array : { *(.preinit_array) }
+ PROVIDE (__preinit_array_end = .);
+ PROVIDE (__init_array_start = .);
+ .init_array : { *(.init_array) }
+ PROVIDE (__init_array_end = .);
+ PROVIDE (__fini_array_start = .);
+ .fini_array : { *(.fini_array) }
+ PROVIDE (__fini_array_end = .);
+ .data :
+ {
+ *(.data .data.* .gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ }
+ .data.init :
+ {
+ *(.data.init)
+ }
+ .data1 : { *(.data1) }
+ .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
+ .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
+ .eh_frame : { KEEP (*(.eh_frame)) }
+ .gcc_except_table : { *(.gcc_except_table) }
+ .dynamic : { *(.dynamic) }
+ .ctors :
+ {
+ /* gcc uses crtbegin.o to find the start of
+ the constructors, so we make sure it is
+ first. Because this is a wildcard, it
+ doesn't matter if the user does not
+ actually link against crtbegin.o; the
+ linker won't look for a file to match a
+ wildcard. The wildcard also means that it
+ doesn't matter which directory crtbegin.o
+ is in. * /
+ KEEP (*crtbegin*.o(.ctors))
+ /* We don't want to include the .ctor section from
+ from the crtend.o file until after the sorted ctors.
+ The .ctor section from the crtend file contains the
+ end of ctors marker and it must be last * /
+ KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*(.ctors))
+ }
+ .dtors :
+ {
+ KEEP (*crtbegin*.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*(.dtors))
+ }
+ .jcr : { KEEP (*(.jcr)) }
+ .got : { *(.got.plt) *(.got) }
+ /* We want the small data sections together, so single-instruction offsets
+ can access them all, and initialized data all before uninitialized, so
+ we can shorten the on-disk segment size. * /
+ .sdata :
+ {
+ __SDATA_BEGIN__ = .;
+ *(.sdata .sdata.* .gnu.linkonce.s.*)
+ }
+ _edata = .;
+ PROVIDE (edata = .);
+ __bss_start = .;
+ .sbss :
+ {
+ PROVIDE (__sbss_start = .);
+ PROVIDE (___sbss_start = .);
+ *(.dynsbss)
+ *(.sbss .sbss.* .gnu.linkonce.sb.*)
+ *(.scommon)
+ PROVIDE (__sbss_end = .);
+ PROVIDE (___sbss_end = .);
+ }
+*/
+ .bss (NOLOAD) :
+ {
+ __sdm_bss_start = .;
+ *(.bss)
+ *(.bss.* .gnu.linkonce.b.*)
+ __sdm_bss_common = .;
+ *(COMMON)
+ /* Align here to ensure that the .bss section occupies space up to
+ _end. Align after .bss to ensure correct alignment even if the
+ .bss section disappears because there are no input sections. */
+ . = ALIGN(32 / 8);
+ }
+ __sdm_bss_end = .;
+ __bss_end = __rodata_start + __sdm_bss_end;
+ /* Next load address would be at __rodata_start + __sdm_bss_common . */
+ . = ALIGN(32 / 8);
+ _end = .;
+ PROVIDE (end = .);
+ /* We want to be able to set a default stack / heap size in a dejagnu
+ board description file, but override it for selected test cases.
+ The options appear in the wrong order to do this with a single symbol -
+ ldflags comes after flags injected with per-file stanzas, and thus
+ the setting from ldflags prevails. */
+ .heap (NOLOAD) :
+ {
+ __start_heap = . ;
+ . = . + (DEFINED(__HEAP_SIZE) ? __HEAP_SIZE : (DEFINED(__DEFAULT_HEAP_SIZE) ? __DEFAULT_HEAP_SIZE : 20)) ;
+ __end_heap = . ;
+ }
+ . = ALIGN(0x8);
+ .stack (NOLOAD) :
+ {
+ __stack = . ;
+ . = . + (DEFINED(__STACK_SIZE) ? __STACK_SIZE : (DEFINED(__DEFAULT_STACK_SIZE) ? __DEFAULT_STACK_SIZE : 64)) ;
+ /*
+ . = 0x7ff0;
+ __stack_top = . ;
+ */
+ }
+ __stack_top = 0x7ff0;
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ .arcextmap 0 : { *(.arcextmap) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+ /* ARC Extension Sections */
+ .arcextmap 0 :
+ {
+ *(.gnu.linkonce.arcextmap.*)
+ }
+ /DISCARD/ : { *(.__arc_profile_*) }
+ /DISCARD/ : { *(.note.GNU-stack) }
+}
diff --git a/gcc/config/mxp/mxp-genregset.c b/gcc/config/mxp/mxp-genregset.c
new file mode 100644
index 00000000000..13d23a48a56
--- /dev/null
+++ b/gcc/config/mxp/mxp-genregset.c
@@ -0,0 +1,464 @@
+/* Generate the machine mode enumeration and associated tables.
+ Copyright (C) 2003, 2004, 2008
+ Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING. If not, write to the Free
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA. */
+
+#include "config/mxp/regset-config.h"
+#include "bconfig.h"
+#include "system.h"
+#include "errors.h"
+
+int vec_lanes[] = MXP_VEC_LANE_SETS;
+int acc_lanes[] = MXP_FLAG_ACC_LANE_SETS;
+#define flag_lanes acc_lanes
+int scalar_lanes[] = MXP_SCALAR_LANE_SETS;
+const char *fake_reg_names[] = MXP_FAKE_REG_NAMES;
+const int regs_per_vreg = 16 / MXP_UNITS_PER_MXP_VEC_REG;
+
+#define SCALAR_NSETS ARRAY_SIZE(scalar_lanes)
+#define VEC_NSETS ARRAY_SIZE(vec_lanes)
+#define ACC_NSETS ARRAY_SIZE(acc_lanes)
+#define FLAG_NSETS ARRAY_SIZE(flag_lanes)
+#define N_RCLASS ((int) (SCALAR_NSETS * VEC_NSETS * ACC_NSETS * FLAG_NSETS))
+
+
+/* Return element I of the array LANESET_SET. */
+static int
+laneset (int i, int *laneset_set)
+{
+ return laneset_set[i];
+}
+
+#define DECODE_REGCLASS \
+ int scalar = laneset (i % SCALAR_NSETS, scalar_lanes); \
+ int vec = laneset ((i /= SCALAR_NSETS) % VEC_NSETS, vec_lanes);\
+ int flags = laneset ((i /= VEC_NSETS) % FLAG_NSETS, flag_lanes); \
+ int acc = laneset((i /= FLAG_NSETS) % ACC_NSETS, acc_lanes);
+
+static int
+valid_regclass (int i)
+{
+ DECODE_REGCLASS
+
+ return MXP_VALID_REG_CLASS (scalar, vec, flags, acc);
+}
+
+static void
+emit_regclass_name (int i)
+{
+ if (i == 0)
+ printf ("NO_REGS");
+ else if (i == N_RCLASS - 1)
+ printf ("ALL_REGS");
+ else
+ {
+ DECODE_REGCLASS
+
+ if (scalar)
+ printf ("S%02x", scalar);
+ if (vec)
+ printf ("V%02x", vec);
+ if (flags)
+ printf ("F%02x", flags);
+ if (acc)
+ printf ("A%02x", acc);
+ printf ("_REGS");
+ }
+}
+
+static void
+emit_regclass_content (int i)
+{
+ long shift, mask;
+ int n_words = 0;
+ DECODE_REGCLASS
+
+#define INC_SHIFT(UNITS) \
+ do \
+ { \
+ shift += (UNITS) / MXP_UNITS_PER_MXP_VEC_REG; \
+ if (shift >= 32) \
+ { \
+ if (n_words++ > 5) \
+ { \
+ printf (" \\\n "); \
+ n_words = 1; \
+ } \
+ printf (" 0x%08lx,", mask); \
+ mask = shift = 0; \
+ } \
+ } \
+ while (0)
+
+ /* vr0 / vr1 contain scalar regs. */
+ mask = scalar | (scalar << 8);
+ shift = 16;
+ /* vr2 .. vr62 are (inasmuch as implemented) non-scalar vector registers. */
+ for (i = 2; i < 62; i++)
+ {
+ mask |= vec << shift;
+ INC_SHIFT (16);
+ }
+ /* accumulator */
+ mask |= acc << shift;
+ INC_SHIFT (16);
+ /* vflags */
+ mask |= flags << shift;
+ INC_SHIFT (16);
+ /* Fake registers. */
+ for (i = 0; i < (int) ARRAY_SIZE (fake_reg_names); i++)
+ {
+ INC_SHIFT (0);
+ if (scalar & MXP_FAKE_REG_LANES)
+ mask |= 1 << shift++;
+ }
+ INC_SHIFT (256);
+}
+
+static void
+upputs (const char *s)
+{
+ while (*s)
+#if 0
+ putchar (TOUPPER (*s++));
+#else
+ {
+ putchar (*s >= 'a' && *s <= 'z' ? *s - 'a' + 'A': *s);
+ s++;
+ }
+#endif
+}
+
+static void
+regno_reg_class_1 (char letter, int *a, int size)
+{
+ int mask, seen = 0;
+ int i;
+
+ for (i = 0; i < size; i++)
+ {
+ mask = a[i];
+ if (!(mask & ~seen))
+ continue;
+ seen |= mask;
+ if (seen != 0xff)
+ printf ("1 << VREG_LANE (N) & %d ? %c%02x_REGS : ", mask, letter, mask);
+ else
+ printf ("%c%02x_REGS", letter, mask);
+ }
+}
+
+static void
+regno_reg_class_2 (void)
+{
+ printf ("#define REGNO_REG_CLASS(N) \\\n"
+ " ((N) < ACC_REG \\\n"
+ " ? ((N) < VR2_REG \\\n"
+ " ? (");
+ regno_reg_class_1 ('S', scalar_lanes, ARRAY_SIZE (scalar_lanes));
+ printf (") \\\n"
+ " : (");
+ regno_reg_class_1 ('V', vec_lanes, VEC_NSETS);
+ printf (")) \\\n"
+ " : ((N) < VFLAGS_REG \\\n"
+ " ? (");
+ regno_reg_class_1 ('A', acc_lanes, ACC_NSETS);
+ printf (") \\\n"
+ " : (");
+ regno_reg_class_1 ('F', flag_lanes, FLAG_NSETS);
+ printf (")))\n\n");
+}
+
+/* Print FIXED_REGISTERS / CALL_USED_REGISTERS according to PREFIX.
+ For call used registers, the call used scalars are marked in SCALAR_USED,
+ and the call used non-scalar vector registers are marked in VREG_USED. */
+static void
+print_fixed_regs (const char *prefix, long scalar_used, long vreg_used)
+{
+ int n_printed = 0;
+ int i, j;
+
+#define PRINT_VAL(VAL) \
+ do \
+ { \
+ printf ("%d, ", (VAL) != 0); \
+ if (++n_printed > 15) \
+ { \
+ printf ("\\\n "); \
+ n_printed = 0; \
+ } \
+ } while (0)
+
+ printf ("#define %s_REGISTERS \\\n{ \\\n "
+ "/* Scalar registers. Stack pointer and bss base are fixed. */ \\\n"
+ " ", prefix);
+ for (i = 0; i < 16; i++)
+ PRINT_VAL (i == STACK_POINTER_REGNUM || i == BSS_BASE_REGNUM
+ || ((1 << i) & scalar_used));
+ printf ("/* vr2-vr30: non-scalar vector registers. */ \\\n ");
+ for (i = 2; i < 31; i++)
+ for (j = 0; j < regs_per_vreg; j++)
+ PRINT_VAL ((1 << i) & vreg_used);
+ printf ("/* vr31: call stack; vr32-vr61: reserved. */ \\\n ");
+ for (i = 31; i < 62; i++)
+ for (j = 0; j < regs_per_vreg; j++)
+ PRINT_VAL (1);
+ printf ("/* Accumulator and flags are not fixed to allow lane allocation. */ \\\n ");
+ for (i = 62; i < 64; i++)
+ for (j = 0; j < regs_per_vreg; j++)
+ PRINT_VAL (scalar_used);
+ for (i = 0; i < (int) ARRAY_SIZE (fake_reg_names); i++)
+ printf ("1 /* %s */, ", fake_reg_names[i]);
+ printf ("\\\n}\n\n");
+}
+
+static void
+emit_regsets (void)
+{
+ int i, j;
+ int n_printed;
+ const char *name;
+ int n_regs = 0;
+
+#define COUNT_REG \
+ do \
+ { \
+ n_regs++; \
+ if (++n_printed > 7) \
+ { \
+ printf ("\\\n "); \
+ n_printed = 0; \
+ } \
+ } while (0)
+
+ printf ("#define REGISTER_NAMES \\\n{ \\\n"
+ " \"i0\", \"i1\", \"i2\", \"i3\", \"i4\", \"i5\", \"i6\", \"i7\", \\\n"
+ " \"i8\", \"i9\", \"i10\", \"i11\", \"i12\", \"i13\", \"i14\", \"i15\", \\\n ");
+ n_regs += 16;
+ for (i = 2, n_printed = 0; i < 62; i++)
+ {
+ for (j = 0; j < 16 / MXP_UNITS_PER_MXP_VEC_REG; j++)
+ {
+ if (j)
+ printf ("\"vr%d_%d\",%s", i, j * MXP_UNITS_PER_MXP_VEC_REG / 2,
+ " " + (i > 9));
+ else
+ printf ("\"vr%d\",%s", i, " " + (i > 9));
+ COUNT_REG;
+ }
+ }
+ name = "acc";
+ do
+ {
+ for (j = 0; j < 16 / MXP_UNITS_PER_MXP_VEC_REG; j++)
+ {
+ if (j)
+ printf ("\"%s_%d\",%s", name, j, " " + (*name != 'a'));
+ else
+ printf ("\"%s\",%s", name, " " + (*name != 'a'));
+ COUNT_REG;
+ }
+ } while (*name == 'a' && (name = "vflags"));
+ for (i = 0; i < (int) ARRAY_SIZE (fake_reg_names); i++)
+ {
+ printf ("\"%s\", ", fake_reg_names[i]);
+ COUNT_REG;
+ }
+ if (n_printed)
+ printf ("\\\n");
+ printf("}\n\n");
+ printf ("#define ADDITIONAL_REGISTER_NAMES"
+ " { { \"vr0\", 0}, { \"vr1\", 8} }\n\n");
+
+ printf ("#define LAST_SCALAR_REG %d\n\n", 15);
+ printf ("#define SCALAR_REGNO_P(N) \\\n"
+ " ((N) <= LAST_SCALAR_REG || ((N) >= ");
+ upputs (fake_reg_names[0]);
+ printf ("_REG && n <= ");
+ upputs (fake_reg_names[ARRAY_SIZE (fake_reg_names)-1]);
+ printf ("_REG))\n");
+ printf ("#define LANES_PER_REG %d\n", MXP_UNITS_PER_MXP_VEC_REG / 2);
+ printf ("#define LANE0_REGNO(N) ((N) & -%d)\n", regs_per_vreg);
+ printf ("#define VREG_LANE(N) (((N) & %d) * LANES_PER_REG)\n",
+ regs_per_vreg - 1);
+ printf ("#define REGS_PER_VREG %d\n\n", regs_per_vreg);
+ printf ("#define FIRST_PSEUDO_REGISTER %d\n\n", n_regs);
+ regno_reg_class_2 ();
+
+ print_fixed_regs ("FIXED", 0, 0);
+ print_fixed_regs ("CALL_USED", 0xff, 0x1ffff);
+
+ printf ("enum reg_class\n{");
+ for (i = j = 0; i < N_RCLASS; i++)
+ {
+ if (!valid_regclass (i))
+ continue;
+ if (j++ % 4 == 0)
+ printf ("\n ");
+ else
+ printf (" ");
+ emit_regclass_name (i);
+ printf (",");
+ }
+ printf (" LIM_REG_CLASSES\n};\n\n"
+ "#define N_REG_CLASSES (int) LIM_REG_CLASSES\n\n"
+ "#define REG_CLASS_NAMES \\\n{");
+ for (i = j = 0; i < N_RCLASS; i++)
+ {
+ if (!valid_regclass (i))
+ continue;
+ if (j++ % 4 == 0)
+ printf (" \\\n \"");
+ else
+ printf (" \"");
+ emit_regclass_name (i);
+ printf ("\",");
+ }
+ printf (" \"LIM_REG_CLASSES\" \\\n};\n\n");
+ printf ("#define REG_CLASS_CONTENTS \\\n{ \\\n");
+ for (i = 0; i < N_RCLASS; i++)
+ {
+ if (!valid_regclass (i))
+ continue;
+ printf ("/* ");
+ emit_regclass_name (i);
+ printf (" */ \\\n { ");
+ emit_regclass_content (i);
+ printf (" }, \\\n");
+ }
+ printf ("}\n");
+ printf ("\n"
+ "#define REG_ALLOC_ORDER \\\n"
+ "{ \\\n"
+ " /* Non-scalar general registers. */ \\\n ");
+ for (i = 2, n_printed = 0; i < 62; i++)
+ {
+ for (j = 0; j < 8 / MXP_UNITS_PER_MXP_VEC_REG; j++)
+ {
+ printf ("%d, ", i * 16 / MXP_UNITS_PER_MXP_VEC_REG + j);
+ COUNT_REG;
+ }
+ }
+ printf ("/* Other non-scalar vector registers. */ \\\n ");
+ for (i = 2, n_printed = 0; i < 62; i++)
+ {
+ for (j = 8 / MXP_UNITS_PER_MXP_VEC_REG;
+ j < 16 / MXP_UNITS_PER_MXP_VEC_REG; j++)
+ {
+ printf ("%d, ", i * 16 / MXP_UNITS_PER_MXP_VEC_REG + j);
+ COUNT_REG;
+ }
+ }
+ printf ("/* Scalar registers */ \\\n"
+ " 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 0, 8,\\\n"
+ " /* Accumulator */ \\\n ");
+ for (j = 0; j < 16 / MXP_UNITS_PER_MXP_VEC_REG; j++)
+ printf ("%d, ", 62 * 16 / MXP_UNITS_PER_MXP_VEC_REG + j);
+ printf ("\\\n}\n");
+
+}
+
+static void
+emit_md (void)
+{
+ int n_regs = 0;
+ int i;
+
+ printf ("(define_constants\n");
+ n_regs += 16; /* Scalar regs. */
+ printf (" [(VR2_REG\t\t%d)\n", n_regs);
+ n_regs += 29 * regs_per_vreg; /* Advance past vr2..vr30. */
+ printf (" (CALL_STACK_REG\t%d)\n", n_regs);
+ printf (" (VR32_REG\t\t%d)\n", n_regs += regs_per_vreg);
+ n_regs += 30 * regs_per_vreg; /* Advance past vr32..vr62. */
+ printf (" (ACC_REG\t\t%d)\n", n_regs);
+ printf (" (ACCH_REG\t\t%d)\n", n_regs + regs_per_vreg/2);
+ printf (" (VFLAGS_REG\t\t%d)\n", n_regs += regs_per_vreg);
+ printf (" (VFLAGSH_REG\t\t%d)\n", n_regs + regs_per_vreg/2);
+ n_regs += regs_per_vreg;
+ for (i = 0; i < (int) ARRAY_SIZE (fake_reg_names); i++)
+ {
+ printf (" (");
+ upputs (fake_reg_names[i]);
+ printf ("_REG\t\t%d)\n", n_regs++);
+ }
+ printf (" ])\n");
+}
+
+static void
+emit_c (void)
+{
+ int j;
+ const char *s = "scalar_";
+ int n_printed = 0;
+
+ printf (
+"#include \"multi-target.h\"\n"
+"START_TARGET_SPECIFIC\n"
+"/* For each register class, indicate the lanes relevant for potential\n"
+" cross-lane moves. For move destinations, we can disregard scalar\n"
+" registers, since they allow cheap cross-lane moves. */\n");
+ do
+ {
+ printf ("\nunsigned char class_%svec_lanes[] =\n{\n ", s);
+ for (j = 0; j < N_RCLASS; j++)
+ {
+ int i = j;
+ DECODE_REGCLASS
+
+ if (!valid_regclass (j))
+ continue;
+ if (n_printed++ > 12)
+ {
+ printf ("\n ");
+ n_printed = 1;
+ }
+ printf (" %d,", vec | flags | acc | (*s ? scalar : 0));
+ }
+ printf ("\n};\n");
+ }
+ while (*s && (s = ""));
+ printf ("END_TARGET_SPECIFIC");
+}
+
+int
+main (int argc, char **argv)
+{
+ bool gen_header = false, gen_md = false;
+ char *progname = argv[0];
+
+ if (argc == 1)
+ ;
+ else if (argc == 2 && !strcmp (argv[1], "-h"))
+ gen_header = true;
+ else if (argc == 2 && !strcmp (argv[1], "-m"))
+ gen_md = true;
+ else
+ {
+ error ("usage: %s -h|-m > file", progname);
+ return FATAL_EXIT_CODE;
+ }
+ if (gen_header)
+ emit_regsets ();
+ else if (gen_md)
+ emit_md ();
+ else
+ emit_c ();
+ return 0;
+}
diff --git a/gcc/config/mxp/mxp-modes.def b/gcc/config/mxp/mxp-modes.def
new file mode 100644
index 00000000000..f2eadcf8651
--- /dev/null
+++ b/gcc/config/mxp/mxp-modes.def
@@ -0,0 +1,15 @@
+VECTOR_MODES (INT, 4); /* V4QI V2HI */
+VECTOR_MODES (INT, 8); /* V8QI V4HI V2SI */
+VECTOR_MODES (INT, 16); /* V16QI V8HI V4SI V2DI */
+PARTIAL_INT_MODE (SI); /* Needed to make V2PSI / V4PSI. */
+VECTOR_MODE (PARTIAL_INT, PSI, 2); /* V2PSI, flags for DImode arithmetic. */
+VECTOR_MODE (PARTIAL_INT, PSI, 4); /* V4PSI, flags for V2DImode arithmetic. */
+VECTOR_MODES (FLOAT, 8); /* V2SF */
+VECTOR_MODES (FLOAT, 16); /* V4SF V2DF */
+#define CC_MODES(N) SIZED_CC_MODE (N, 2); \
+ VECTOR_MODE (CC, N, 2); VECTOR_MODE (CC, N, 4); VECTOR_MODE (CC, N, 8)
+CC_MODES (CCI); /* Ordinary integer flags. */
+CC_MODES (CCZN); /* Only zero / negative flag relevant. */
+CC_MODES (CCZ); /* Only zero flag relevant. */
+VECTOR_MODE (CC, CC, 2); /* V2CCmode - flag clobber for DI arithmetic. */
+VECTOR_MODE (CC, CC, 4); /* V4CCmode - flag clobber for V2DI arithmetic. */
diff --git a/gcc/config/mxp/mxp-protos.h b/gcc/config/mxp/mxp-protos.h
new file mode 100644
index 00000000000..81d3ef30cb5
--- /dev/null
+++ b/gcc/config/mxp/mxp-protos.h
@@ -0,0 +1,16 @@
+#ifdef RTX_CODE
+extern void mxp_print_operand (FILE *file, rtx x, int code);
+extern bool mxp_legitimate_address_p (enum machine_mode, rtx, int strict_p);
+extern int mxp_initial_elimination_offset (int, int);
+extern void mxp_emit_conditional_branch (rtx *, enum rtx_code);
+#endif /* RTX_CODE */
+
+extern void mxp_expand_prologue (void);
+extern void mxp_expand_epilogue (void);
+extern struct machine_function *mxp_init_machine_status (void);
+extern void mxp_conditional_register_usage (void);
+extern int mxp_register_move_cost (enum machine_mode mode,
+ enum reg_class from, enum reg_class to);
+extern int mxp_memory_move_cost (enum machine_mode, enum reg_class, int);
+extern int peep2_regno_mode_dead_p (int ofs, int regno, enum machine_mode mode);
+
diff --git a/gcc/config/mxp/mxp.c b/gcc/config/mxp/mxp.c
new file mode 100644
index 00000000000..6f526a4febd
--- /dev/null
+++ b/gcc/config/mxp/mxp.c
@@ -0,0 +1,693 @@
+/* Subroutines used for code generation on the ARC mxp cpu.
+
+ Copyright (C) 2008 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#define BINUTILS_FIXED
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "tree.h"
+#include "rtl.h"
+#include "hard-reg-set.h"
+#include "function.h"
+#include "toplev.h"
+#include "tm_p.h"
+#include "ggc.h"
+#include "target.h"
+#include "target-def.h"
+#include "output.h"
+#include "expr.h"
+#include "optabs.h"
+#include "sbitmap.h"
+#include "reload.h"
+#include "recog.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
+
+struct machine_function GTY(())
+{
+ int rounded_frame_size;
+ int saved_regs_size;
+ unsigned char lanes_written[N_HARDWARE_VECREGS];
+};
+
+rtx mxp_compare_op0, mxp_compare_op1;
+sbitmap mxp_acc_classes;
+
+/* Functions to save and restore machine-specific function data. */
+struct machine_function *
+mxp_init_machine_status (void)
+{
+ return ((struct machine_function *)
+ ggc_alloc_cleared (sizeof (struct machine_function)));
+}
+
+static void mxp_init_libfuncs (void);
+
+#undef TARGET_INIT_LIBFUNCS
+#define TARGET_INIT_LIBFUNCS mxp_init_libfuncs
+
+extern int mxp_secondary_reload (bool, rtx, int, enum machine_mode,
+ struct secondary_reload_info *);
+#undef TARGET_SECONDARY_RELOAD
+#define TARGET_SECONDARY_RELOAD mxp_secondary_reload
+
+static bool mxp_vector_mode_supported_p (enum machine_mode mode);
+#undef TARGET_VECTOR_MODE_SUPPORTED_P
+#define TARGET_VECTOR_MODE_SUPPORTED_P mxp_vector_mode_supported_p
+
+#undef TARGET_PROMOTE_FUNCTION_RETURN
+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_const_tree_true
+
+struct gcc_target targetm = TARGET_INITIALIZER;
+
+/* machine-indepemndent: l,c,n
+ v: vector register
+ L: Lane mask
+ N: Lane mask for lower half
+ O: Lane mask for upper half
+ M: memory size/lane specifier
+ #: Output nops for unfilled delay slots */
+void
+mxp_print_operand (FILE *file, rtx x, int code)
+{
+ switch (code)
+ {
+ case 'v': /* Vector register. */
+ if (GET_CODE (x) == PARALLEL)
+ x = XEXP (XVECEXP (x, 0, 0), 0);
+ if (x == CONST0_RTX (GET_MODE (x)))
+ {
+ fprintf (file, "vr62");
+ return;
+ }
+ gcc_assert (REG_P (x));
+ if (REGNO (x) <= LAST_SCALAR_REG)
+ fprintf (file, "vr%d", REGNO (x) >> 3);
+ else if (LANE0_REGNO (REGNO (x)) == ACC_REG)
+ fputs ("vzero", file);
+ else if (LANE0_REGNO (REGNO (x)) == VFLAGS_REG)
+ fputs ("vr63", file);
+ else
+ fputs (reg_names[LANE0_REGNO (REGNO (x))], file);
+ return;
+ case 'L': /* Lane mask. */
+ if (x == const0_rtx)
+ {
+ printf ("3"); /* For viv / vkv. */
+ return;
+ }
+ gcc_assert (REG_P (x));
+ if (REGNO (x) <= LAST_SCALAR_REG)
+ fprintf (file, "%d",
+ (((1 << (GET_MODE_SIZE (GET_MODE (x)) >> 1)) - 1)
+ << (REGNO (x) & 7)));
+ else
+ fprintf (file, "%d",
+ (((1 << (GET_MODE_SIZE (GET_MODE (x)) >> 1)) - 1)
+ << VREG_LANE (REGNO (x))));
+ return;
+ case 'O': /* Lane mask lower half. */
+ fprintf (file, "%d",
+ (((1 << (GET_MODE_SIZE (GET_MODE (x)) >> 2)) - 1)
+ << VREG_LANE (REGNO (x))));
+ return;
+ case 'P': /* Lane mask upper half. */
+ fprintf (file, "%d",
+ (((1 << (GET_MODE_SIZE (GET_MODE (x)) >> 2)) - 1)
+ << (VREG_LANE (REGNO (x))
+ + (GET_MODE_SIZE (GET_MODE (x)) >> 2))));
+ return;
+ case 'N': /* Load memory size and lane specifier. */
+ case 'M': /* Memory size and lane specifier. */
+ {
+ int r, lane;
+
+ gcc_assert (REG_P (x));
+ r = REGNO (x);
+ if (r <= LAST_SCALAR_REG)
+ lane = r & 7;
+ else
+ lane = VREG_LANE (r);
+ fprintf (file, "%d", GET_MODE_BITSIZE (GET_MODE (x)));
+ if (code == 'N' && GET_MODE_SIZE (GET_MODE (x)) == 1)
+ fprintf (file, "w");
+ /* ??? The manual says that _0 is OK. The assembler disagrees. */
+ if (lane)
+ fprintf (file, "_%d", lane);
+ return;
+ }
+ case 'Q': /* 64 bit constant lower half. */
+ {
+ enum machine_mode mode = GET_MODE (x);
+ rtx sub = NULL_RTX;
+
+ mode = GET_MODE (x);
+ if (mode == VOIDmode)
+ mode = DImode;
+ if (GET_MODE_SIZE (mode) >= 8)
+ sub = simplify_subreg (SImode, x, mode, 0);
+ if (sub)
+ mxp_print_operand (file, sub, 0);
+ else
+ output_operand_lossage ("invalid operand to %%Q");
+ return;
+ }
+ case 'R': /* 64 bit constant upper half. */
+ {
+ enum machine_mode mode = GET_MODE (x);
+ rtx sub = NULL_RTX;
+
+ mode = GET_MODE (x);
+ if (mode == VOIDmode)
+ mode = DImode;
+ if (GET_MODE_SIZE (mode) >= 8)
+ sub = simplify_subreg (SImode, x, mode, 4);
+ if (sub)
+ mxp_print_operand (file, sub, 0);
+ else
+ output_operand_lossage ("invalid operand to %%R");
+ return;
+ }
+ case 'C': /* Condition. */
+ {
+ switch (GET_CODE (x))
+ {
+ case GTU: fprintf (file, ".hi"); return;
+ case GEU: fprintf (file, ".hs"); return;
+ case LTU: fprintf (file, ".lo"); return;
+ case LEU: fprintf (file, ".ls"); return;
+ case EQ: fprintf (file, ".eq"); return;
+ case NE: fprintf (file, ".ne"); return;
+ default: gcc_unreachable ();
+ }
+ }
+ case '#':
+ /* Output a nop for each unfilled delay slot. */
+ {
+ int i = 3 - dbr_sequence_length ();
+
+ /* If there are two delay slot insns, check if the second
+ depends on the first; in that case, we want the nop between
+ these two insns. */
+ if (i == 1)
+ {
+ rtx i1 = XVECEXP (final_sequence, 0, 1);
+ rtx i2 = XVECEXP (final_sequence, 0, 2);
+ rtx set = single_set (i1);
+
+ if (set && reg_referenced_p (SET_DEST (set), PATTERN (i2)))
+ {
+ fprintf (file, "\n");
+ final_scan_insn (i1, asm_out_file, optimize, 1, NULL);
+ INSN_DELETED_P (i1) = 1;
+ fprintf (file, "\tvnop");
+ return;
+ }
+ }
+ while (i--)
+ fprintf (file, "\n\tvnop");
+ return;
+ }
+ case 'r': case 'i':
+#ifndef BINUTILS_FIXED
+ if (GET_CODE (x) == SYMBOL_REF
+ || (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (x, 0), 0)) == SYMBOL_REF)
+ || GET_CODE (x) == CODE_LABEL || GET_CODE (x) == LABEL_REF)
+ {
+ fputs ((code == 'r' ? "r0" : "0"), file);
+ return;
+ }
+ break;
+#endif
+ case 0:
+ break;
+ default :
+ /* Unknown flag. */
+ output_operand_lossage ("invalid operand output code");
+ }
+ switch (GET_CODE (x))
+ {
+ case REG:
+ if (REGNO (x) <= LAST_SCALAR_REG && GET_MODE_SIZE (GET_MODE (x)) > 2)
+ {
+ fputc ('k', file);
+ fputs (reg_names[REGNO (x)] + 1, file);
+ break;
+ }
+ fputs (reg_names[REGNO (x)], file);
+ break;
+ case MEM:
+ {
+#if 0
+ int size = GET_MODE_SIZE (GET_MODE (x));
+#endif
+ rtx addr = XEXP (x, 0);
+ rtx offs = const0_rtx;
+ int r = BSS_BASE_REGNUM;
+
+ if (CONSTANT_P (addr))
+ offs = addr;
+ else if (GET_CODE (addr) == PLUS)
+ {
+ r = REGNO (XEXP (addr, 0));
+ offs = XEXP (addr, 1);
+ }
+ else
+ r = REGNO (addr);
+ if (GET_CODE (offs) == CONST_INT)
+#if 0 /* The manual says that you use the unscaled offset... */
+ fprintf (file, "[%s,%ld]", reg_names[r], INTVAL (offs) / size);
+#else /* ... but the assembler expects the scaled offset. */
+ fprintf (file, "[%s,%ld]", reg_names[r], INTVAL (offs));
+#endif
+ else
+ {
+ fprintf (file, "[%s,", reg_names[r]);
+ mxp_print_operand (file, offs, 'i');
+ fputc (']', file);
+ }
+ break;
+ }
+ case CONST_DOUBLE :
+ /* We handle SFmode constants here as output_addr_const doesn't. */
+ if (GET_MODE (x) == SFmode)
+ {
+ REAL_VALUE_TYPE d;
+ long l;
+
+ REAL_VALUE_FROM_CONST_DOUBLE (d, x);
+ REAL_VALUE_TO_TARGET_SINGLE (d, l);
+ fprintf (file, "0x%08lx", l);
+ break;
+ }
+ /* Fall through. Let output_addr_const deal with it. */
+ default:
+ output_addr_const (file, x);
+ break;
+ }
+}
+
+bool
+mxp_legitimate_address_p (enum machine_mode mode, rtx x, int strict_p)
+{
+ int mem_mode_size = (GET_MODE_SIZE (mode));
+ /* 64 bit moves might need to be split. */
+ int min_mode_size
+ = ((mem_mode_size == 8 && !reload_completed) ? 4 : mem_mode_size);
+
+ if (REG_P (x) && (!strict_p || REGNO (x) <= LAST_SCALAR_REG))
+ return 1;
+ if (CONSTANT_P (x) && mem_mode_size >= 16)
+ return 1;
+ if (GET_CODE (x) == PLUS && REG_P (XEXP (x, 0))
+ && (!strict_p || REGNO (XEXP (x, 0)) <= LAST_SCALAR_REG))
+ x = XEXP (x, 1);
+ if (mem_mode_size >= 16 && (CONST_INT_P (x) && (INTVAL (x) & 15) == 0))
+ return 1;
+ if (CONST_INT_P (x)
+ && (INTVAL (x) & (mem_mode_size - 1)) == 0
+ && INTVAL (x) >= (-1 << 11) * min_mode_size
+ && INTVAL (x) < (1 << 11) * min_mode_size)
+ return 1;
+ /* We assume that all symbols are suitably positioned for i9+offset
+ addressing in the data / bss sections. */
+ if (!TARGET_BIGDATA)
+ {
+ if (GET_CODE (x) == SYMBOL_REF)
+ return 1;
+ if (mem_mode_size == 4
+ && GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (x, 0), 0)) == SYMBOL_REF
+ && CONST_INT_P (XEXP (XEXP (x, 0), 1))
+ && INTVAL (XEXP (XEXP (x, 0), 1)) <= 4)
+ return 1;
+ }
+ return 0;
+}
+
+int
+mxp_initial_elimination_offset (int from, int to)
+{
+ /* FIXME */
+ return 0;
+}
+
+static rtx
+frame_insn (rtx x)
+{
+ x = emit_insn (x);
+ RTX_FRAME_RELATED_P (x) = 1;
+ return x;
+}
+
+/* Helper function for find_save_lanes, called via note_stores. */
+static void
+find_save_lanes_1 (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
+{
+ unsigned char *buf = (unsigned char *) data;
+ int r = true_regnum (x);
+ int vecnum, lanes;
+
+ if (r < 0)
+ return;
+ if (r <= LAST_SCALAR_REG)
+ {
+ vecnum = r >> 3;
+ lanes = 1 << (r & 7);
+ }
+ else
+ {
+ lanes = (1 << (GET_MODE_SIZE (GET_MODE (x)) >> 1)) - 1;
+ vecnum
+ = (LANE0_REGNO (r) - (VR2_REG - 2 * REGS_PER_VREG)) / REGS_PER_VREG;
+ lanes <<= VREG_LANE (r);
+ }
+ if ((unsigned)vecnum >= N_HARDWARE_VECREGS)
+ gcc_assert (r >= ACC_REG);
+ else
+ buf[vecnum] |= lanes;
+}
+
+/* Each byte in BUF curresponds to a vector register. For each register,
+ generate a bitmask that shows which lanes need saving. */
+static void
+find_save_lanes (unsigned char *buf)
+{
+ rtx insn;
+
+ memset (buf, 0, N_HARDWARE_VECREGS);
+ for (insn = get_last_insn_anywhere (); insn; insn = PREV_INSN (insn))
+ note_stores (INSN_P (insn) ? PATTERN (insn) : insn,
+ find_save_lanes_1, buf);
+}
+
+/* A register is saved in SAVE_MODE of size SAVE_SIZE if there are bits in
+ both the upper and the lower half that need saving. In that case, return
+ an rtx for the register to be saved. */
+static rtx
+save_reg (int vecnum, int save_size, enum machine_mode save_mode,
+ unsigned char *buf)
+{
+ int lanes = buf[vecnum];
+ int regno, size, i;
+ rtx ret;
+
+ if (!lanes)
+ return NULL_RTX;
+ if (vecnum < 2)
+ {
+ for (regno = vecnum * 8; regno < vecnum * 8 + 8; regno++)
+ if (call_used_regs[regno])
+ lanes &= ~(1 << (regno & 7));
+ if (!lanes)
+ return NULL_RTX;
+ /* FIXME: calculate optimal concatenations. */
+ /* N.B. we can restore the stack together with other scalar registers. */
+ if (save_size != 16)
+ return NULL_RTX;
+ ret = gen_rtx_PARALLEL (V4SImode, rtvec_alloc (4));
+ for (i = 0; i < 4; i++)
+ XVECEXP (ret, 0, i)
+ = gen_rtx_EXPR_LIST (VOIDmode,
+ gen_rtx_REG (SImode, vecnum * 8 + i * 2),
+ GEN_INT (i * 2));
+ return ret;
+ }
+ regno = vecnum * 2 + LAST_SCALAR_REG - 3;
+ if (call_used_regs[regno])
+ lanes &= -16;
+ if (call_used_regs[regno+1])
+ lanes &= 15;
+ if (!lanes)
+ return NULL_RTX;
+ if ((lanes & -16) && (lanes & 15))
+ size = 16;
+ else
+ {
+ regno += (lanes > 15);
+ size = lanes | (lanes >> 4);
+ size = ((size & 3) + 1) << ((size & 8) != 0);
+ }
+ if (size != save_size)
+ return NULL_RTX;
+ return gen_rtx_REG (save_mode, regno);
+}
+
+void
+mxp_expand_prologue (void)
+{
+ int frame_size = 0;
+ int save_size;
+ unsigned char *buf = MACHINE_FUNCTION (*cfun)->lanes_written;
+
+ /* There are no interrupts, hence we may save registers before adjusting
+ the stack pointer, and for leaf functions we can leave out the stack
+ adjustment altogether. */
+ find_save_lanes (buf);
+ for (save_size = 16; save_size >= 2; save_size >>= 1)
+ {
+ enum machine_mode save_mode
+ = mode_for_size (BITS_PER_UNIT * save_size, MODE_INT, 0);
+ rtx addr, reg;
+ int regno;
+
+ for (regno = 0; regno < N_HARDWARE_VECREGS; regno++)
+ {
+ reg = save_reg (regno, save_size, save_mode, buf);
+ if (reg)
+ {
+ frame_size += save_size;
+ addr = gen_rtx_PLUS (HImode,
+ stack_pointer_rtx, GEN_INT (-frame_size));
+ emit_insn (gen_rtx_SET (VOIDmode,
+ gen_rtx_MEM (GET_MODE (reg), addr), reg));
+ }
+ }
+ }
+ MACHINE_FUNCTION (*cfun)->saved_regs_size = frame_size;
+ frame_size += get_frame_size ();
+ /* Round up frame size to keep stack 128-bit aligned. */
+ frame_size = (frame_size + 15) & -16;
+ MACHINE_FUNCTION (*cfun)->rounded_frame_size = frame_size;
+ if (!current_function_is_leaf && frame_size)
+ {
+ /* Adjust stack pointer for register saves, local variables and
+ outgoing arguments. */
+ frame_insn (gen_add2_insn (stack_pointer_rtx, GEN_INT (-frame_size)));
+ frame_size = 0;
+ }
+ if (frame_pointer_needed)
+ frame_insn (gen_addhi3 (hard_frame_pointer_rtx,
+ stack_pointer_rtx, GEN_INT (-frame_size)));
+}
+
+void
+mxp_expand_epilogue (void)
+{
+ int frame_size = get_frame_size ();
+ int save_size;
+ unsigned char *buf = MACHINE_FUNCTION (*cfun)->lanes_written;
+
+ /* Round up frame size to keep stack 128-bit aligned. */
+ frame_size = (frame_size + 15) & -16;
+
+ if (!current_function_is_leaf && frame_size)
+ emit_insn (gen_add2_insn (stack_pointer_rtx,
+ GEN_INT (MACHINE_FUNCTION (*cfun)->rounded_frame_size)));
+ /* FIXME: restore callee-saved registers. */
+ frame_size = MACHINE_FUNCTION (*cfun)->saved_regs_size;
+ for (save_size = 2; save_size <= 16; save_size <<= 1)
+ {
+ enum machine_mode save_mode
+ = mode_for_size (BITS_PER_UNIT * save_size, MODE_INT, 0);
+ rtx addr, reg;
+ int regno;
+
+ for (regno = N_HARDWARE_VECREGS - 1; regno >= 0; regno--)
+ {
+ reg = save_reg (regno, save_size, save_mode, buf);
+ if (reg)
+ {
+ frame_size -= save_size;
+ addr = gen_rtx_PLUS (HImode,
+ stack_pointer_rtx, GEN_INT (-frame_size));
+ emit_insn (gen_rtx_SET (VOIDmode,
+ reg, gen_rtx_MEM (GET_MODE (reg), addr)));
+ }
+ }
+ }
+}
+
+static void
+mxp_init_libfuncs (void)
+{
+ set_optab_libfunc (sdiv_optab, HImode, "__divdi3");
+ set_optab_libfunc (sdiv_optab, SImode, "__divdi3");
+ set_optab_libfunc (sdiv_optab, DImode, "__divdi3");
+}
+
+static rtx
+mxp_emit_comparison (enum rtx_code code)
+{
+ rtx tmp, tmp2, flags, result;
+ enum machine_mode mode = GET_MODE (mxp_compare_op0);
+ result = gen_reg_rtx (HImode);
+ if ((mode != HImode || (code != GEU && code != LEU && code != LTU))
+ && !reg_or_0_operand (mxp_compare_op1, VOIDmode))
+ mxp_compare_op1 = force_reg (mode, mxp_compare_op1);
+ tmp2 = gen_rtx_fmt_ee (code, HImode, mxp_compare_op0, mxp_compare_op1);
+
+ switch (code)
+ {
+ case GE: case GT:
+ case EQ: case NE: case LE: case LT:
+ tmp = gen_rtx_SET (VOIDmode, result, gen_rtx_NEG (HImode, tmp2));
+ tmp2 = gen_rtx_CLOBBER (VOIDmode, gen_rtx_SCRATCH (mode));
+ tmp = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, tmp, tmp2));
+ emit_insn (tmp);
+ break;
+ case GEU: case LEU: case GTU: case LTU:
+ flags = gen_reg_rtx (CCImode);
+ emit_insn ((mode == HImode ? gen_ucmphi : gen_ucmpsi)
+ (flags, mxp_compare_op0, mxp_compare_op1));
+ emit_insn (gen_vtany (result, flags, tmp2));
+ break;
+ default: gcc_unreachable ();
+ }
+
+ return result;
+}
+
+void
+mxp_emit_conditional_branch (rtx *operands, enum rtx_code code)
+{
+ rtx result = mxp_emit_comparison (code);
+
+ emit_jump_insn (gen_branch_true (operands[0], result));
+}
+
+int
+mxp_secondary_reload (bool in_p, rtx x, int /*enum reg_class*/ rclass,
+ enum machine_mode mode,
+ secondary_reload_info *sri ATTRIBUTE_UNUSED)
+{
+ /* FIXME: cross-lane moves from the accumulator; WIP. */
+ if (GET_MODE_SIZE (mode) < 16
+ && (GET_CODE (x) == REG && REGNO (x) < FIRST_PSEUDO_REGISTER)
+ && (in_p
+ ? (rclass == Af0_REGS || rclass == A0f_REGS || rclass == Aff_REGS || rclass == ALL_REGS)
+ : LANE0_REGNO (REGNO (x)) == ACC_REG))
+ {
+ int x_regno = true_regnum (x);
+ int mask = (GET_MODE_SIZE (mode) - 1) | 1;
+ int x_lanes = mask << VREG_LANE (x_regno);
+ int c_lanes = class_scalar_vec_lanes[rclass];
+ int in_lanes = in_p ? x_lanes : c_lanes;
+ int out_lanes = in_p ? c_lanes : x_lanes;
+
+ /* CLASS might contain both lower and higher lanes, so we should look
+ at the lanes from x_class to decide which half of the accumulator
+ is copied from. */
+ if (((in_lanes << 4 | in_lanes >> 4) & out_lanes)
+ || ((in_lanes | out_lanes) & ~(mask | mask * 16)))
+ return (!(VREG_LANE (REGNO (x)) & 3)
+ ? (((in_p ? in_lanes : out_lanes) < 16) ^ in_p
+ ? Vf0_REGS : V0f_REGS)
+ : !(out_lanes & 0xf0) ? Vf0_REGS
+ : !(out_lanes & 0x0f) ? V0f_REGS
+ : V01_REGS /* ??? */);
+ }
+ /* Cross-lanes clobbering the accumulator leads to too messy secondary
+ reloads, thus we don't generate such reloads, but rather use clobber-free
+ instruction sequences for the move patterns. A peephole2 instroduces
+ accumulator clobbers where this is profitable. */
+ return NO_REGS;
+}
+
+void
+mxp_conditional_register_usage (void)
+{
+ int i;
+
+ mxp_acc_classes = sbitmap_alloc (N_REG_CLASSES);
+ for (i = 0; i < N_REG_CLASSES; i++)
+ if (reg_classes_intersect_p ((enum reg_class) i, Aff_REGS))
+ SET_BIT (mxp_acc_classes, i);
+}
+
+int
+mxp_register_move_cost (enum machine_mode mode,
+ enum reg_class from, enum reg_class to)
+{
+ /* Moving from the accumulator has higher latency. */
+ if (from == A0f_REGS || from == Af0_REGS || from == Aff_REGS)
+ return 4;
+ /* Cross-lane moves cost more and require a clobber, unless source or
+ destination is a scalar register. Even if the source is a scalar
+ register, we need a clobber for a cross-lane move to a non-scalar
+ register, so we must show a higher cost than for an ordinary move. */
+ if (GET_MODE_SIZE (mode) < 8
+ && (class_scalar_vec_lanes[from]
+ & (class_vec_lanes[to] << 4 | class_vec_lanes[to] >> 4)))
+ return TEST_BIT (mxp_acc_classes, (to)) ? 6 : 3;
+ if (GET_MODE_SIZE (mode) < 4
+ && class_vec_lanes[from] && class_vec_lanes[to]
+ && ((class_vec_lanes[from] | class_vec_lanes[to])
+ & ~(((GET_MODE_SIZE (mode) - 1) | 1) * 0x11)))
+ return TEST_BIT (mxp_acc_classes, (to)) ? 6 : 3;
+ /* Tilt the balance. */
+ if ((class_vec_lanes[from]|class_vec_lanes[to]) & 0xf0)
+ return 2;
+ return 2;
+}
+
+int
+mxp_memory_move_cost (enum machine_mode mode, enum reg_class rclass,
+ int in_p ATTRIBUTE_UNUSED)
+{
+ return (4
+ + (GET_MODE_SIZE (mode) == 8
+ && (class_scalar_vec_lanes[(rclass)] & 0xf0))
+ + memory_move_secondary_cost (mode, rclass, in_p));
+}
+
+int
+peep2_regno_mode_dead_p (int ofs, int regno, enum machine_mode mode)
+{
+ int i;
+
+ for (i = HARD_REGNO_NREGS (regno, mode); --i >= 0; )
+ if (!peep2_regno_dead_p (ofs, regno + 1))
+ return 0;
+ return 1;
+}
+
+static bool
+mxp_vector_mode_supported_p (enum machine_mode mode)
+{
+ return mov_optab->handlers[mode].insn_code != CODE_FOR_nothing;
+}
+
+#include "gt-mxp.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/config/mxp/mxp.h b/gcc/config/mxp/mxp.h
new file mode 100644
index 00000000000..6b450537858
--- /dev/null
+++ b/gcc/config/mxp/mxp.h
@@ -0,0 +1,285 @@
+/* Don't include mxp-regset.h for target-types.h generation. */
+#if defined(IN_GCC) || defined(GENERATOR_FILE)
+#include "mxp-regset.h"
+#endif
+#include "multi-target.h"
+
+#define N_HARDWARE_VECREGS 32
+/* Data is byte-addressed, using 16 bit addresses. Code is word-addressed,
+ using 16 bit addresses. */
+#define Pmode HImode
+
+#define REGISTER_MOVE_COST(MODE, FROM, TO) \
+ mxp_register_move_cost ((MODE), (FROM), (TO))
+
+#define CONDITIONAL_REGISTER_USAGE mxp_conditional_register_usage ();
+
+#define CASE_VECTOR_MODE HImode
+
+/* For non-pointer types, use the sizes that arc.h has, to make structure
+ passing simpler.
+ 32 bit int & long also makes sense because that's the widest add we can
+ do cheaply. */
+#define SHORT_TYPE_SIZE 16
+#define INT_TYPE_SIZE (TARGET_INT16 ? 16 : 32)
+#define LONG_TYPE_SIZE 32
+#define LONG_LONG_TYPE_SIZE 64
+#define FLOAT_TYPE_SIZE 32
+#define DOUBLE_TYPE_SIZE 64
+#define LONG_DOUBLE_TYPE_SIZE 64
+
+/* Define this as 1 if `char' should by default be signed; else as 0. */
+#define DEFAULT_SIGNED_CHAR 0
+
+#define SIZE_TYPE "short unsigned int"
+#define PTRDIFF_TYPE "short int"
+#define WCHAR_TYPE "short unsigned int"
+#define WCHAR_TYPE_SIZE 16
+
+#define UNITS_PER_SIMD_WORD(MODE) 16
+
+/* ??? arc.h as BIGGEST_ALIGNMENT as 32, but we need 128 bit alignemnt for
+ 128 bit vector loads / stores. */
+#define BIGGEST_ALIGNMENT 128
+#define MAX_FIXED_MODE_SIZE 128
+
+#define STRICT_ALIGNMENT 1
+
+#define PARM_BOUNDARY 16
+
+/* ??? The actual stack boundary is 128 bits, but we want to save stack space
+ when we can combine a frame of unaligned size with a save area of unaligned
+ size. */
+#define STACK_BOUNDARY 16
+#define PREFERRED_STACK_BOUNDARY 128
+
+/* Functions are actually word-aligned, but the code is also word-addressed,
+ and there is no point in trying to model all the details. */
+#define FUNCTION_BOUNDARY 8
+#define FUNCTION_MODE QImode
+
+#define BITS_BIG_ENDIAN 0
+#define BYTES_BIG_ENDIAN 0
+#define WORDS_BIG_ENDIAN 0
+
+#define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \
+ if ((MODE) == QImode) \
+ (MODE) = HImode; \
+
+/* mxp_print_operand relies on LAST_SCALAR_REG to be odd. */
+#define FIRST_PARM_REG VR2_REG
+#define N_PARM_REGS 8
+
+/* In principle, we could describe all the registers in 16-bit granularity,
+ and have a regclass for every lane combination. Then addsi would have
+ four alternatives, each equally valid. However, to much choice of
+ equally good, but incompatible reg classes would only confuse gcc.
+ The other extreme would be to have only one lane combination per mode -
+ then it would be easy to tun out of registers. We use an intermediate
+ approach: for each mode, the lane combination with lane 0 for its lowest
+ bits is the main alternative, and the one with lane 4 for its lowest bits
+ is the fallback alternative. */
+
+#define GENERAL_REGS S03V0f_REGS
+#define SCALAR_REGS Sff_REGS
+
+#define HARD_REGNO_MODE_OK(REGNO,MODE) \
+ ((REGNO) >= VFLAGS_REG \
+ ? (GET_MODE_CLASS ((MODE)) == MODE_VECTOR_CC \
+ ? ((GET_MODE_SIZE (MODE) <= 8 && VREG_LANE (REGNO) == 4) \
+ || !VREG_LANE (REGNO)) \
+ : GET_MODE_CLASS ((MODE)) == MODE_CC) \
+ : (REGNO) == FP_REG || (REGNO) == AP_REG ? (MODE) == HImode \
+ : (REGNO) >= ACC_REG \
+ ? ((GET_MODE_SIZE (MODE) <= 8 && VREG_LANE (REGNO) == 4) \
+ || !VREG_LANE (REGNO)) \
+ : (REGNO) > LAST_SCALAR_REG \
+ ? !(VREG_LANE (REGNO) & ((GET_MODE_SIZE (MODE) - 1) >> 1)) \
+ : (GET_MODE_SIZE (MODE) <= 2 \
+ || (GET_MODE_SIZE (MODE) <= 4 && !((REGNO) & 1))))
+#define HARD_REGNO_NREGS(REGNO, MODE) ((GET_MODE_SIZE (MODE) + 1) >> 1)
+#define CLASS_MAX_NREGS(CLASS, MODE) ((GET_MODE_SIZE (MODE) + 1) >> 1)
+
+#define HARD_FRAME_POINTER_REGNUM 12
+#define FRAME_POINTER_REGNUM FP_REG
+#define ARG_POINTER_REGNUM AP_REG
+
+#define FRAME_POINTER_REQUIRED 0
+
+#define ELIMINABLE_REGS \
+{ \
+ { HARD_FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
+ { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
+ { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \
+ { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
+ { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \
+}
+
+#define CAN_ELIMINATE(FROM, TO) 1
+
+#define CAN_DEBUG_WITHOUT_FP
+
+#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
+ OFFSET = mxp_initial_elimination_offset ((FROM), (TO))
+
+#define STARTING_FRAME_OFFSET 0
+
+#define BASE_REG_CLASS SCALAR_REGS
+#define INDEX_REG_CLASS NO_REGS
+#define MAX_REGS_PER_ADDRESS 1
+
+#ifdef REG_OK_STRICT
+#define REG_OK_STRICT_P 1
+#else
+#define REG_OK_STRICT_P 0
+#endif
+
+#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL) \
+ if (mxp_legitimate_address_p ((MODE), (X), REG_OK_STRICT_P)) goto LABEL
+
+#define GO_IF_MODE_DEPENDENT_ADDRESS(X, LABEL) \
+ if (!mxp_legitimate_address_p (TImode, (X), REG_OK_STRICT_P) \
+ || !mxp_legitimate_address_p (QImode, (X), REG_OK_STRICT_P)) goto LABEL
+
+#define REGNO_OK_FOR_BASE_P(NUM) \
+ ((NUM) <= LAST_SCALAR_REG \
+ || (!REG_OK_STRICT_P && (NUM) >= FIRST_PSEUDO_REGISTER))
+
+#define REGNO_OK_FOR_INDEX_P(NUM) 0
+
+#define PREFERRED_RELOAD_CLASS(X,CLASS) \
+ (GET_CODE (X) == PLUS && CONST_INT_P (XEXP ((X), 1)) \
+ ? ((CLASS) == S01V01_REGS ? S01_REGS \
+ : (CLASS) == S10V10_REGS ? S10_REGS \
+ : (CLASS) == S03V0f_REGS ? S03_REGS \
+ : (CLASS) == S30Vf0_REGS ? S30_REGS \
+ : (CLASS) == SffVff_REGS ? Sff_REGS \
+ : (CLASS)) \
+ : (CLASS))
+
+/* TImode references can address the entire 16 bit data address space using
+ the data base pointer i9 and a 12-bit offset shifted left by 4. */
+#define CONSTANT_ADDRESS_P(X) 1
+
+#define CUMULATIVE_ARGS int
+#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT,N_NAMED_ARGS) \
+ ((CUM) = 0)
+#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
+ ((CUM)++)
+
+#define TRAMPOLINE_SIZE 0
+#define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, STATIC_CHAIN) \
+ sorry ("Trampolines are not implemented.\n");
+/* Trampolines are not supported, yet we have to provide a definition for
+ the static chain to avoid compiler crashes. */
+#define STATIC_CHAIN gen_rtx_MEM (HImode, GEN_INT (0))
+
+#define FUNCTION_PROFILER(FILE, LABELNO) sorry ("Profiling not supported.\n");
+
+#define MOVE_MAX 16
+
+#define SLOW_BYTE_ACCESS 1
+
+#define SHIFT_COUNT_TRUNCATED 1
+
+#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
+
+#define LEGITIMATE_CONSTANT_P(X) (GET_MODE_SIZE (GET_MODE (X)) <= 4)
+
+#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
+ ((CUM) < N_PARM_REGS \
+ ? gen_rtx_REG ((MODE), FIRST_PARM_REG + REGS_PER_VREG * (CUM)) : 0)
+
+#define FUNCTION_ARG_REGNO_P(N) \
+ ((N) >= FIRST_PARM_REG && (N) <= FIRST_PARM_REG + REGS_PER_VREG * N_PARM_REGS)
+
+#define FIRST_PARM_OFFSET(FNDECL) 0
+
+#define FUNCTION_VALUE_REGNO_P(N) ((N) == FIRST_PARM_REG)
+
+#define LIBCALL_VALUE(MODE) gen_rtx_REG ((MODE), FIRST_PARM_REG)
+/* Like LIBCALL_VALUE, except that we must
+ change the mode like PROMOTE_MODE does. */
+#define FUNCTION_VALUE(VALTYPE, FUNC) \
+ gen_rtx_REG ( \
+ ((GET_MODE_CLASS (TYPE_MODE (VALTYPE)) == MODE_INT \
+ && GET_MODE_SIZE (TYPE_MODE (VALTYPE)) < 2 \
+ && (TREE_CODE (VALTYPE) == INTEGER_TYPE \
+ || TREE_CODE (VALTYPE) == ENUMERAL_TYPE \
+ || TREE_CODE (VALTYPE) == BOOLEAN_TYPE \
+ || TREE_CODE (VALTYPE) == OFFSET_TYPE)) \
+ ? HImode : TYPE_MODE (VALTYPE)), \
+ FIRST_PARM_REG)
+
+#define ACCUMULATE_OUTGOING_ARGS 1
+
+#define RETURN_POPS_ARGS(DECL, FUNTYPE, SIZE) 0
+
+#define INIT_EXPANDERS (init_machine_status = mxp_init_machine_status)
+
+#define ASM_APP_ON "#APP\n"
+#define ASM_APP_OFF "#NO_APP\n"
+
+#define ASM_OUTPUT_ALIGN(FILE,LOG) \
+ if ((LOG) != 0) \
+ fprintf ((FILE), "\t.balign %d\n", 1 << (LOG))
+
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.global\t"
+
+#define TEXT_SECTION_ASM_OP "\t.text"
+#define DATA_SECTION_ASM_OP "\t.data"
+
+#define PRINT_OPERAND(STREAM, X, CODE) \
+ mxp_print_operand ((STREAM), (X), (CODE))
+
+#define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \
+ ((CHAR) == '#')
+
+#define PRINT_OPERAND_ADDRESS(FILE, ADDR) gcc_unreachable ()
+
+#define MODES_TIEABLE_P(MODE1, MODE2) \
+ (MODE1 != Pmode && MODE2 != Pmode \
+ && GET_MODE_SIZE (MODE1) <= UNITS_PER_WORD \
+ && GET_MODE_SIZE (MODE2) <= UNITS_PER_WORD)
+
+#define TARGET_CPU_CPP_BUILTINS() do \
+{ \
+ builtin_define ("__mxp__"); \
+ builtin_define ("__LITTLE_ENDIAN__"); \
+} while (0)
+
+#define MEMORY_MOVE_COST(M,C,I) mxp_memory_move_cost ((M), (C), (I))
+
+#define MODE_NLANES(MODE) ((GET_MODE_SIZE (MODE) + 1) >> 1)
+#define VREG_LANE_MASK(REG) \
+(((1 << MODE_NLANES (GET_MODE (REG))) - 1) << VREG_LANE (REGNO ((REG))))
+
+/* ??? We add accumulator clobbers for cross-lane moves in peep2 where
+ possible. Without the accumulator clobbers, cross-lane moves are more
+ expensive. Therefore, we don't want regrename to change lanes of move
+ instruction without accumulator clobbers. Unfortunately, regrename cannot
+ be controlled in a way that takes the instructions involved into account;
+ all we can do is prevent a lane change. */
+#define HARD_REGNO_RENAME_OK(REG,NEW_REG) \
+ (VREG_LANE (REG) == VREG_LANE (NEW_REG))
+
+/* This is how to output a reference to a symbol_ref / label_ref as
+ (part of) an operand. To disambiguate from register names like
+ a1 / a2 / status etc, symbols are preceded by '@'. */
+#define ASM_OUTPUT_SYMBOL_REF(FILE,SYM) \
+ ASM_OUTPUT_LABEL_REF ((FILE), XSTR ((SYM), 0))
+#define ASM_OUTPUT_LABEL_REF(FILE,STR) \
+ do \
+ { \
+ fputc ('@', file); \
+ assemble_name ((FILE), (STR)); \
+ } \
+ while (0)
+
+struct simple_bitmap_def;
+START_TARGET_SPECIFIC
+extern rtx mxp_compare_op0, mxp_compare_op1;
+extern unsigned char class_vec_lanes[], class_scalar_vec_lanes[];
+extern struct simple_bitmap_def *mxp_acc_classes;
+END_TARGET_SPECIFIC
diff --git a/gcc/config/mxp/mxp.md b/gcc/config/mxp/mxp.md
new file mode 100644
index 00000000000..e2231529ace
--- /dev/null
+++ b/gcc/config/mxp/mxp.md
@@ -0,0 +1,917 @@
+;; GCC machine description for ARC mxp.
+;; Copyright (C) 2008 Free Software Foundation, Inc.
+;;
+;; This file is part of GCC.
+;;
+;; GCC is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+;;
+;; GCC is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GCC; see the file COPYING3. If not see
+;; <http://www.gnu.org/licenses/>.
+
+(include ("mxp-regset.md"))
+(include ("predicates.md"))
+(include ("constraints.md"))
+
+(define_attr "type" "jump,load,store,other" (const_string "other"))
+
+;; instruction lengths are in words. Actual machine instructions are always
+;; one word, but some patterns here might emit multiple machine instructions.
+(define_attr "length" "" (const_int 1))
+
+;; The mxp allows anything in a delay slot - even jumps.
+;; However, gcc's delay slot scheduling pass gets confused if we allow this.
+;; Also, we lack a mechanism to fill more than one delay slot with one insn
+;; pattern.
+(define_attr "in_delay_slot" "no,yes"
+ (cond [(eq_attr "type" "jump") (const_string "no")
+ (eq_attr "length" "1") (const_string "yes")] (const_string "no")))
+
+(define_delay
+ (eq_attr "type" "jump")
+ [(eq_attr "in_delay_slot" "yes") (nil) (nil)
+ (eq_attr "in_delay_slot" "yes") (nil) (nil)
+ (eq_attr "in_delay_slot" "yes") (nil) (nil)])
+
+;; moves and logical operations can be performed on 128 bit vectors and
+;; parts of them in 16-bit granularity.
+(define_mode_iterator VECI [HI SI DI TI V2HI V4HI V8HI V2SI V4SI V2DI])
+
+(define_mode_iterator VECX
+ [QI HI CCI CCZN CCZ SI DI TI V2HI V2CCI V2CCZN V2CCZ V4HI V4CCI V4CCZN V4CCZ
+ V8HI V8CCI V8CCZN V8CCZ V2SI V4SI V2DI SF V2SF DF V4SF V2DF])
+
+;; Like VECI, but with size 32 bit (like SImode)
+(define_mode_iterator VECSI [SI V2HI])
+
+;; Like VECI, but with minimum size 32 bit (like SImode)
+(define_mode_iterator VECMSI [SI DI TI V2HI V4HI V8HI V2SI V4SI V2DI])
+
+;; Like VECI, but with minimum size 64 bit (like DImode)
+(define_mode_iterator VECMDI [DI TI V4HI V8HI V2SI V4SI V2DI])
+
+; like VECX, but with size 64 bit (line DImode)
+(define_mode_iterator VECDX [V4HI V4CCI V4CCZN V4CCZ V2SI V2CC V2SF DI DF])
+(define_mode_attr HALF_MODE [(V4HI "V2HI") (V4CCI "V2CCI") (V4CCZN "V2CCZN")
+ (V4CCZ "V2CCZ") (V2SI "SI") (V2CC "CC")
+ (V2SF "SF") (DI "SI") (DF "SI")])
+
+;; single-instruction patterns for arithmetic like add/sub is
+;; limited to 16 and 32 bit per data item.
+(define_mode_iterator VECA [HI SI V2HI V4HI V8HI V2SI V4SI])
+
+;; Like VECA, but exclude HI / SI
+(define_mode_iterator VECVA [V2HI V4HI V8HI V2SI V4SI])
+
+(define_mode_iterator VXHI [HI V2HI V4HI V8HI])
+(define_mode_iterator VXSI [SI V2SI V4SI])
+(define_mode_iterator VXDI [DI V2DI])
+
+(define_mode_iterator HSI [HI SI])
+
+(define_mode_iterator CCX [CC])
+
+(define_mode_attr unit_suffix [(HI "w") (V2HI "w") (V4HI "w") (V8HI "w")
+ (SI "") (V2SI "") (V4SI "")])
+(define_mode_attr size_suffix
+ [(QI "w") (HI "w") (CCI "w") (CCZN "w") (CCZ "w")
+ (V2HI "") (V2CCI "") (V2CCZN "") (V2CCZ "") (SI "") (SF "")])
+
+(define_mode_attr v0
+ [(QI "R01Z") (HI "R01Z") (CCI "fv01Z") (CCZN "fv01Z") (CCZ "fv01Z")
+ (V2HI "R03Z") (V2CCI "fv03Z") (V2CCZN "fv03Z") (V2CCZ "fv03Z")
+ (SI "R03Z") (SF "R03Z")
+ (V4HI "R0fZ") (V4CCI "fv0fZ") (V4CCZN "fv0fZ") (V4CCZ "fv0fZ")
+ (V2SI "R0fZ") (DI "R0fZ") (V2SF "R0fZ") (DF "R0fZ")
+ (V8HI "vZ") (V8CCI "fvffZ") (V8CCZN "fvffZ") (V8CCZ "fvffZ")
+ (V4SI "vZ") (V2DI "vZ") (TI "vZ") (V4SF "vZ") (V2DF "vZ")])
+
+(define_mode_attr v4
+ [(QI "R10Z") (HI "R10Z") (CCI "fv10Z") (CCZN "fv10Z") (CCZ "fv10Z")
+ (V2HI "R30Z") (V2CCI "fv30Z") (V2CCZN "fv30Z") (V2CCZ "fv30Z")
+ (SI "R30Z") (SF "R30Z")
+ (V4HI "Rf0Z") (V4CCI "fvf0Z") (V4CCZN "fvf0Z") (V4CCZ "fvf0Z")
+ (V2SI "Rf0Z") (DI "Rf0Z") (V2SF "Rf0Z") (DF "Rf0Z")
+ (V8HI "vZ") (V8CCI "fvffZ") (V8CCZN "fvffZ") (V8CCZ "fvffZ")
+ (V4SI "vZ") (V2DI "vZ") (TI "vZ") (V4SF "vZ") (V2DF "vZ")])
+
+(define_mode_attr vn
+ [(QI "vZ") (HI "vZ") (CCI "fvffZ") (CCZN "fvffZ") (CCZ "fvffZ")
+ (V2HI "vZ") (V2CCI "fvffZ") (V2CCZN "fvffZ") (V2CCZ "fvffZ")
+ (SI "vZ") (SF "vZ")
+ (V4HI "vZ") (V4CCI "fvffZ") (V4CCZN "fvffZ") (V4CCZ "fvffZ")
+ (V2SI "vZ") (DI "vZ") (V2SF "vZ") (DF "vZ") (V2CC "vZ")
+ (V8HI "vZ") (V8CCI "fvffZ") (V8CCZN "fvffZ") (V8CCZ "fvffZ")
+ (V4SI "vZ") (V2DI "vZ") (TI "vZ") (V4SF "vZ") (V2DF "vZ") (V4CC "vZ")])
+
+(define_mode_attr vx
+ [(HI "R01Z,R10Z") (V2HI "R03Z,R30Z") (SI "R03Z,R30Z") (SF "R03,R30")
+ (V4HI "R0f,Rf0") (V2SI "R0f,Rf0") (DI "R0f,Rf0") (V2SF "R0f,Rf0")
+ (DF "R0f,Rf0")
+ (V8HI "v") (V4SI "v") (V2DI "v") (TI "v") (V4SF "v") (V2DF "v")])
+
+(define_mode_attr vxp
+ [(HI "R01Z,R10Z") (V2HI "R03Z,R30Z") (SI "R03Z,R30Z") (SF "R03,R30")
+ (V4HI "R0f,Rf0") (V2SI "R0f,Rf0") (DI "R0f,Rf0?") (V2SF "R0f,Rf0")
+ (DF "R0f,Rf0")
+ (V8HI "v") (V4SI "v") (V2DI "v") (TI "v") (V4SF "v") (V2DF "v")])
+
+(define_mode_attr a0
+ [(QI "Ral") (HI "Ral") (CCI "Ral") (CCZN "Ral") (CCZ "Ral")
+ (V2HI "Ral") (V2CCI "Ral") (V2CCZN "Ral") (V2CCZ "Ral") (SI "Ral") (SF "Ral")
+ (V4HI "Ral") (V4CCI "Ral") (V4CCZN "Ral") (V4CCZ "Ral") (V2SI "Ral")
+ (DI "Ral") (V2SF "Ral") (DF "Ral")
+ (V8HI "Rac") (V8CCI "Rac") (V8CCZN "Rac") (V8CCZ "Rac") (V4SI "Rac")
+ (V2DI "Rac") (TI "Rac") (V4SF "Rac") (V2DF "Rac")])
+
+(define_mode_attr a4
+ [(QI "Rah") (HI "Rah") (CCI "Rah") (CCZN "Rah") (CCZ "Rah")
+ (V2HI "Rah") (V2CCI "Rah") (V2CCZN "Rah") (V2CCZ "Rah") (SI "Rah") (SF "Rah")
+ (V4HI "Rah") (V4CCI "Rah") (V4CCZN "Rah") (V4CCZ "Rah") (V2SI "Rah")
+ (DI "Rah") (V2SF "Rah") (DF "Rah")
+ (V8HI "Rac") (V8CCI "Rac") (V8CCZN "Rac") (V8CCZ "Rac") (V4SI "Rac")
+ (V2DI "Rac") (TI "Rac") (V4SF "Rac") (V2DF "Rac")])
+
+(define_mode_attr ax
+ [(HI "Ral,Rah") (V2HI "Ral,Rah") (SI "Ral,Rah") (SF "Ral,Rah")
+ (V4HI "Ral,Rah") (V2SI "Ral,Rah") (DI "Ral,Rah") (V2SF "Ral,Rah")
+ (DF "Ral,Rah")
+ (V8HI "Rac") (V4SI "Rac") (V2DI "Rac") (TI "Rac") (V4SF "Rac") (V2DF "Rac")])
+
+(define_mode_attr fx
+ [(DI "Rfl,Rfh") (V2DI "Rfg")])
+
+(define_mode_attr c4
+ [(HI ",") (V2HI ",") (SI ",") (SF ",")
+ (V4HI ",") (V2SI ",") (DI ",") (V2SF ",") (DF ",")
+ (V8HI "") (V4SI "") (V2DI "") (TI "") (V4SF "") (V2DF "")])
+
+(define_mode_attr I16v
+ [(HI "i") (CCI "i") (CCZN "i") (CCZ "i")
+ (V2HI "J2r16") (V2CCI "J2r16") (V2CCZN "J2r16") (V2CCZ "J2r16") (SI "J2r16")
+ (V4HI "J4r16") (V4CCI "J4r16") (V4CCZN "J4r16") (V4CCZ "J4r16")
+ (V2SI "J4r16") (DI "J4r16")
+ (V8HI "J8r16") (V8CCI "J8r16") (V8CCZN "J8r16") (V8CCZ "J8r16")
+ (V4SI "J8r16") (V2DI "J8r16") (TI "J8r16")
+ (SF "F") (V2SF "G2r") (DF "G2r") (V4SF "G4r") (V2DF "G4r")])
+
+(define_mode_attr I32v
+ [(QI "i") (HI "i") (CCI "i") (CCZN "i") (CCZ "i")
+ (V2HI "i") (V2CCI "i") (V2CCZN "i") (V2CCZ "i") (SI "i")
+ (V4HI "J2r32") (V4CCI "J2r32") (V4CCZN "J2r32") (V4CCZ "J2r32")
+ (V2SI "J2r32") (DI "J2r32")
+ (V8HI "J4r32") (V8CCI "J4r32") (V8CCZN "J4r32") (V8CCZ "J4r32")
+ (V4SI "J4r32") (V2DI "J4r32") (TI "J4r32")
+ (SF "F") (V2SF "G2r") (DF "G2r") (V4SF "G4r") (V2DF "G4r")])
+
+(define_mode_attr I32m
+ [(QI "i") (HI "i") (CCI "i") (CCZN "i") (CCZ "i")
+ (V2HI "i") (V2CCI "i") (V2CCZN "i") (V2CCZ "i") (SI "i")
+ (V4HI "i") (V4CCI "i") (V4CCZN "i") (V4CCZ "i")
+ (V2SI "i") (DI "i")
+ (V8HI "J4r32") (V8CCI "J4r32") (V8CCZN "J4r32") (V8CCZ "J4r32")
+ (V4SI "J4r32") (V2DI "J4r32") (TI "J4r32")
+ (SF "F") (V2SF "G2r") (DF "G2r") (V4SF "G4r") (V2DF "G4r")])
+
+(define_mode_attr VXCC [(DI "V2CC") (V2DI "V4CC")])
+
+(define_expand "mov<mode>"
+ [(set (match_operand:VECX 0 "nonimmediate_operand" "")
+ (match_operand:VECX 1 "general_operand" ""))]
+ ""
+ "
+{
+ if (!register_operand (operands[0], <MODE>mode)
+ && !(reg_or_0_operand (operands[1], <MODE>mode)
+ || (GET_MODE_SIZE (<MODE>mode <= 4
+ ? CONSTANT_P (operands[1])
+ : satisfies_constraint_I32 (operands[1])))))
+ operands[1] = copy_to_mode_reg (<MODE>mode, operands[1]);
+}")
+
+(define_insn "*mov<mode>_i"
+ [(set (match_operand:VECX 0 "nonimmediate_operand"
+ "=<vn>,Rac,<v0>,<v4>,<vn>,<vn>,m,m")
+ (match_operand:VECX 1 "general_operand"
+ "<vn>,<vn>,<a0>,<a4>,<I32m>,m,Z,<vn>"))]
+ "register_operand (operands[0], <MODE>mode)
+ || reg_or_0_operand (operands[1], <MODE>mode)"
+ "*
+{
+ switch (which_alternative)
+ {
+ case 0: case 1:
+ {
+ int src, dst, srclane, dstlane;
+ rtx xop[3];
+
+ dst = REGNO (operands[0]);
+ dstlane = dst <= LAST_SCALAR_REG ? dst & 7 : VREG_LANE (dst);
+ if (REG_P (operands[1]))
+ {
+ src = REGNO (operands[1]);
+ srclane = src <= LAST_SCALAR_REG ? src & 7 : VREG_LANE (src);
+ }
+ else /* const0_rtx */
+ srclane = dstlane;
+ if (srclane == dstlane)
+ return (dst >= ACC_REG && dst < ACC_REG + REGS_PER_VREG
+ ? \"vaddw.%L0, %v0,%v1,vr62\"
+ : \"vmvw.%L0 %v0,%v1\" /* Acc unchanged. */);
+ if (dst <= LAST_SCALAR_REG)
+ return (GET_MODE_SIZE (<MODE>mode) <= 2
+ ? \"viv.%L1 %0,%v1\"
+ : \"vkv.%L1 %0,%v1\"); /* Acc unchanged. */
+ if (dst >= ACC_REG && dst < ACC_REG + REGS_PER_VREG)
+ {
+ if (src <= LAST_SCALAR_REG)
+ return \"vmiv<size_suffix>.%L0 %v0,%1\";
+ /* vmr has higher latency. */
+ xop[0] = operands[0];
+ xop[1] = operands[1];
+ xop[2] = GEN_INT ((srclane - dstlane) & 7);
+ output_asm_insn (\"vmr%2w.%L0 %v0,%v1,%v1\", xop);
+ return \"\";
+ }
+ /* Non-scalar cross-lane moves have higher latency. */
+ if (GET_MODE_SIZE (<MODE>mode) <= 4)
+ return \"vxsum<size_suffix>i.%L0 %v0,%v1,%L1\";
+ if ((src ^ dst) & ~(REGS_PER_VREG - 1))
+ {
+ if (GET_MODE_SIZE (<MODE>mode) == 8 && (srclane ^ dstlane) == 4)
+ return ((dstlane & 4)
+ ? \"vexch4.%L0 %v0,%v1\" : \"vexch4.%L0 %v1,%v0\");
+ }
+ if (GET_MODE_SIZE (<MODE>mode) == 8)
+ return \"vxsumi.%O0 %v0,%v1,%O1` vxsumi.%P0 %v0,%v1,%P1\";
+ gcc_unreachable ();
+ }
+ case 2: case 3:
+ return \"vaddaw.%L0 %v0,vr62,vr62\";
+ case 4:
+ if (GET_MODE_SIZE (<MODE>mode) == 8
+ && !satisfies_constraint_J2r32 (operands[1]))
+ return \"vmov.%O0 %v0,%Q1` vmov.%P0 %v0,%R1\";
+ if (GET_MODE_SIZE (<MODE>mode) == 2)
+ return \"vmovw %v0,%1,%L0\";
+ return \"vmov.%L0 %v0,%1\"; /* Acc unchanged. */
+ case 5:
+ if (TARGET_NO_VLD_LABEL && ! REG_P (XEXP (operands[1], 0)))
+ return \"vld%N0 %v0,[i9,0]; ??? SHOULD BE: %1\";
+ return \"vld%N0 %v0,%1\";
+ case 6:
+ {
+ rtx xop[3];
+ xop[0] = operands[0];
+ xop[1] = operands[1];
+ xop[2] = GEN_INT (GET_MODE_BITSIZE (<MODE>mode));
+ output_asm_insn (\"vst%2 %v1,%0\", xop);
+ return \"\";
+ }
+ case 7:
+ return \"vst%M1 %v1,%0\";
+ default: gcc_unreachable ();
+ }
+}"
+ [(set_attr "type" "*,*,*,*,*,load,store,store")])
+
+;; There is no v{ld,st}64_4 . Split into two 32 bit moves.
+(define_split
+ [(set (match_operand:VECDX 0 "nonimmediate_operand")
+ (match_operand:VECDX 1 "nonimmediate_operand"))]
+ "reload_completed
+ && ((memory_operand (operands[0], <MODE>mode)
+ && VREG_LANE (REGNO (operands[1])))
+ || (memory_operand (operands[1], <MODE>mode)
+ && VREG_LANE (REGNO (operands[0]))))"
+ [(set (match_dup 2) (match_dup 3))
+ (set (match_dup 4) (match_dup 5))]
+ "
+{
+ enum machine_mode submode = <HALF_MODE>mode;
+
+ operands[2] = simplify_gen_subreg (submode, operands[0], <MODE>mode, 0);
+ operands[3] = simplify_gen_subreg (submode, operands[1], <MODE>mode, 0);
+ operands[4] = simplify_gen_subreg (submode, operands[0], <MODE>mode, 4);
+ operands[5] = simplify_gen_subreg (submode, operands[1], <MODE>mode, 4);
+}")
+
+; vmiv has lower latency than vxsumi, but it clobbers the accumulator.
+; vmr is faster than two vxsumi, but it clobbers the accumulator.
+(define_peephole2
+ [(set (match_operand 0 "register_operand" "")
+ (match_operand 1 "register_operand" ""))]
+ "REGNO (operands[0]) > LAST_SCALAR_REG
+ && VREG_LANE (REGNO (operands[0])) != VREG_LANE (REGNO (operands[1]))
+ && (REGNO (operands[1]) <= LAST_SCALAR_REG
+ || GET_MODE_SIZE (GET_MODE (operands[0])) == 8)
+ && (peep2_regno_mode_dead_p
+ (1,
+ ACC_REG + VREG_LANE (REGNO (operands[0])) / LANES_PER_REG,
+ GET_MODE (operands[0])))"
+ [(parallel [(set (match_dup 0) (match_dup 1))
+ (clobber (match_dup 2))])]
+ "
+{
+ operands[2]
+ = gen_rtx_REG (GET_MODE (operands[0]),
+ ACC_REG + VREG_LANE (REGNO (operands[0])) / LANES_PER_REG);
+}")
+
+;; post-reload pattern for cross-lane moves.
+;; regrename can change a cross-lane move into an in-lane move.
+;; We could prohibit this, but that would then reduce the effectiveness of
+;; regrename. So rather accept in-lane moves, and split away the clobber.
+(define_insn_and_split "*mov<mode>_clob"
+ [(set (match_operand:VECX 0 "register_operand" "=<vn>")
+ (match_operand:VECX 1 "register_operand" "<vn>"))
+ (clobber (match_operand 2 "register_operand" "=Rac"))]
+ "reload_completed
+ && (VREG_LANE_MASK (operands[0]) & ~VREG_LANE_MASK (operands[2])) == 0"
+ "*
+{
+ int src = REGNO (operands[0]), dst = REGNO (operands[1]);
+ int srclane = src <= LAST_SCALAR_REG ? src & 7 : VREG_LANE (src);
+ int dstlane = dst <= LAST_SCALAR_REG ? dst & 7 : VREG_LANE (dst);
+ rtx xop[3];
+ if (src <= LAST_SCALAR_REG)
+ return \"vmiv<size_suffix>.%L0 %v0,%1\";
+ /* vmr has higher latency. */
+ xop[0] = operands[0];
+ xop[1] = operands[1];
+ xop[2] = GEN_INT ((srclane - dstlane) & 7);
+ output_asm_insn (\"vmr%2w.%L0 %v0,%v1,%v1\", xop);
+ return \"\";
+}"
+ "&& VREG_LANE (REGNO (operands[0])) == VREG_LANE (REGNO (operands[1]))"
+ [(set (match_dup 0) (match_dup 1))]
+ "")
+
+(define_insn "andhi3"
+ [(set (match_operand:HI 0 "register_operand" "=R01,R10,S_n")
+ (and:HI (match_operand:HI 1 "register_operand" "%R01,R10,S_n")
+ (match_operand:HI 2 "nonmemory_operand" "R01,R10,i")))
+ (clobber (match_scratch:HI 3 "=Ral,Rah,X"))]
+ ""
+ "@
+ vand.%L0 %v0,%v1,%v2
+ vand.%L0 %v0,%v1,%v2
+ via %0,%1,%2")
+
+(define_insn "and<mode>3"
+ [(set (match_operand:VECMSI 0 "register_operand" "=<vx>")
+ (and:VECMSI (match_operand:VECMSI 1 "register_operand" "%<vx>")
+ (match_operand:VECMSI 2 "register_operand" "<vx>")))
+ (clobber (match_scratch:VECMSI 3 "=<ax>"))]
+ ""
+ "vand.%L0 %v0,%v1,%v2")
+
+(define_insn "ior<mode>3"
+ [(set (match_operand:VECI 0 "register_operand" "=<vx>")
+ (ior:VECI (match_operand:VECI 1 "register_operand" "%<vx>")
+ (match_operand:VECI 2 "register_operand" "<vx>")))
+ (clobber (match_scratch:VECI 3 "=<ax>"))]
+ ""
+ "vor.%L0 %v0,%v1,%v2")
+
+(define_insn "xor<mode>3"
+ [(set (match_operand:VECI 0 "register_operand" "=<vx>")
+ (xor:VECI (match_operand:VECI 1 "register_operand" "%<vx>")
+ (match_operand:VECI 2 "register_operand" "<vx>")))
+ (clobber (match_scratch:VECI 3 "=<ax>"))]
+ ""
+ "vxor.%L0 %v0,%v1,%v2")
+
+(define_insn "addhi3"
+ [(set (match_operand:HI 0 "register_operand" "=R01,R10,S_n")
+ (plus:HI (match_operand:HI 1 "register_operand" "%R01,R10,S_n")
+ (match_operand:HI 2 "nonmemory_operand" "R01,R10,i")))]
+ ""
+;; This is how we want to do it when binutils is fixed to handle
+;; relocations for vim
+;; "@
+;; vaddnaw.%L0 %v0,%v1,%v2
+;; vaddnaw.%L0 %v0,%v1,%v2
+;; vim %0,%1,%i2")
+{
+ switch (which_alternative)
+ {
+ case 0: return "vaddnaw.%L0 %v0,%v1,%v2";
+ case 1: return "vaddnaw.%L0 %v0,%v1,%v2";
+ case 2: if (TARGET_NO_VIM_LABEL && !CONST_INT_P (operands[2]))
+ {
+ rtx xop[4];
+
+ xop[0] = operands[0];
+ xop[1] = operands[1];
+ xop[2] = operands[2];
+ xop[3] = gen_rtx_REG (HImode, true_regnum (operands[0]) ^ 8);
+ output_asm_insn ("vim %0,%1,0` "
+ "vpushiw vr31,%3` "
+ "vmovw %v3,%2,%L0` "
+ "vaddnaw.%L0 %v0,%v0,%v3` "
+ "vpopw %3,vr31,pcl",
+ xop);
+ return "";
+ }
+ else
+ return "vim %0,%1,%i2";
+ }
+})
+
+(define_insn "addsi3"
+ [(set (match_operand:SI 0 "register_operand" "=R03,R30,S_n,R03,R30")
+ (plus:SI (match_operand:SI 1 "register_operand" "%R03,R30,S_n,R03,R30")
+ (match_operand:SI 2 "nonmemory_operand""R03,R30,I16,S_n,S_n")))
+ (clobber (match_scratch:SI 3 "=X,X,X,Ral,Rah"))]
+ ""
+ "@
+ vaddnaw.%L0 %v0,%v1,%v2
+ vaddnaw.%L0 %v0,%v1,%v2
+ vkm %0,%1,%2
+ vkadd %v0,%v1,%2
+ vkadd %v0,%v1,%2")
+
+(define_insn "add<mode>3"
+ [(set (match_operand:VECVA 0 "register_operand" "=<vx>")
+ (plus:VECVA (match_operand:VECVA 1 "register_operand" "%<vx>")
+ (match_operand:VECVA 2 "register_operand" "<vx>")))]
+ ""
+ "vaddna<unit_suffix>.%L0 %v0,%v1,%v2")
+
+;; ??? This should be a define_insn_and_split.
+(define_insn "add<mode>3"
+ [(set (match_operand:VXDI 0 "register_operand" "=<vxp>")
+ (plus:VXDI (match_operand:VXDI 1 "register_operand" "%<vx>")
+ (match_operand:VXDI 2 "register_operand" "<vx>")))
+ (clobber (match_scratch:<VXCC> 3 "=<fx>"))
+ (clobber (match_scratch:VXDI 4 "=<ax>"))]
+ ""
+ "vaddna.%L0.f %v0,%v1,%v2` vmr6w.%P0 vr63,vr63,vr63` vadc.%P0 %v0,%v0,vr62")
+
+(define_insn "sub<mode>3"
+ [(set (match_operand:VECA 0 "register_operand" "=<vx>")
+ (minus:VECA (match_operand:VECA 1 "register_operand" "<vx>")
+ (match_operand:VECA 2 "register_operand" "<vx>")))]
+ ""
+ "vsubna<unit_suffix>.%L0 %v0,%v1,%v2")
+
+;; ??? This should be a define_insn_and_split.
+(define_insn "sub<mode>3"
+ [(set (match_operand:VXDI 0 "register_operand" "=<vxp>")
+ (minus:VXDI (match_operand:VXDI 1 "register_operand" "<vx>")
+ (match_operand:VXDI 2 "register_operand" "<vx>")))
+ (clobber (match_scratch:<VXCC> 3 "=<fx>"))
+ (clobber (match_scratch:VXDI 4 "=<ax>"))]
+ ""
+ "vsubna.%L0.f %v0,%v1,%v2` vmr6w.%P0 vr63,vr63,vr63` vsbc.%P0 %v0,%v0,vr62")
+
+(define_insn "ashl<mode>3"
+ [(set (match_operand:VECA 0 "register_operand" "=<vx>")
+ (ashift:VECA (match_operand:VECA 1 "register_operand" "<vx>")
+ (match_operand:VECA 2 "register_operand" "<vx>")))
+ (clobber (match_scratch:VECA 3 "=&<ax>"))]
+ ""
+ "vlslv<unit_suffix>.%L0 %v0,%v1,%v2")
+
+(define_insn "lshr<mode>3"
+ [(set (match_operand:VECA 0 "register_operand" "=<vx>")
+ (lshiftrt:VECA (match_operand:VECA 1 "register_operand" "<vx>")
+ (match_operand:VECA 2 "register_operand" "<vx>")))
+ (clobber (match_scratch:VECA 3 "=&<ax>"))]
+ ""
+ "vlsrv<unit_suffix>.%L0 %v0,%v1,%v2")
+
+(define_insn "ashr<mode>3"
+ [(set (match_operand:VECA 0 "register_operand" "=<vx>")
+ (ashiftrt:VECA (match_operand:VECA 1 "register_operand" "<vx>")
+ (match_operand:VECA 2 "register_operand" "<vx>")))
+ (clobber (match_scratch:VECA 3 "=&<ax>"))]
+ ""
+ "vasrv<unit_suffix>.%L0 %v0,%v1,%v2")
+
+;; ??? vblsr also allows scalar registers
+;; ??? should show vblsr / vasr also as alterantives for
+;; lshr<mode>3 / ashr<mode>3 with appropriately restricted constant range.
+;; (using vec_duplicate for operand predicate with scalar register).
+(define_insn "vec_shr_<mode>"
+ [(set (match_operand:VECA 0 "register_operand" "=<vx>")
+ (lshiftrt:VECA (match_operand:VECA 1 "register_operand" "<vx>")
+ (match_operand:HI 2 "immediate_operand" "i<c4>i")))
+ (clobber (match_scratch:VECA 3 "=&<ax>"))]
+ ""
+ "vblsr<unit_suffix>.%L0 %v0,%v1,%2")
+
+(define_insn "ashr<mode>3_scalar"
+ [(set (match_operand:VECA 0 "register_operand" "=<vx>")
+ (ashiftrt:VECA (match_operand:VECA 1 "register_operand" "<vx>")
+ (match_operand:HI 2 "nonmemory_operand" "S_ni<c4>S_ni")))
+ (clobber (match_scratch:VECA 3 "=&<ax>"))]
+ ""
+ "vasr<unit_suffix>.%L0 %v0,%v1,%2")
+
+(define_expand "mul<mode>3"
+ [(parallel [(set (match_operand:VECA 0 "register_operand" "")
+ (mult:VECA (match_operand:VECA 1 "register_operand")
+ (match_operand:VECA 2 "nonmemory_operand")))
+ (clobber (scratch:VECA))])]
+ ""
+ "
+{
+ if (GET_MODE_UNIT_SIZE (<MODE>mode) > 16)
+ operands[2] = force_reg (<MODE>mode, operands[2]);
+}")
+
+(define_insn "*mul<mode>_i"
+ [(set (match_operand:VXHI 0 "register_operand" "=<v0>,<v4>,<v0>,<v4>")
+ (mult:VXHI (match_operand:VXHI 1 "register_operand"
+ "%<v0>,<v4>,<v0>,<v4>")
+ (match_operand:VXHI 2 "nonmemory_operand"
+ "<v0>,<v4>,S_n<I16v>,S_n<I16v>")))
+ (clobber (match_scratch:VXHI 3 "=&<a0>,&<a4>,&<a0>,&<a4>"))]
+ ""
+ "@
+ vmulw.%L0 %v0,%v1,%v2
+ vmulw.%L0 %v0,%v1,%v2
+ vmulw.%L0 %v0,%v1,%2
+ vmulw.%L0 %v0,%v1,%2")
+
+;; ??? should be a define_insn_and_split
+(define_insn "*mul<mode>_i"
+ [(set (match_operand:VXSI 0 "register_operand" "=&<v0>,&<v4>")
+ (mult:VXSI (match_operand:VXSI 1 "register_operand" "%<v0>0,<v4>0")
+ (match_operand:VXSI 2 "nonmemory_operand"
+ "<v0>I32v,<v4>I32v")))
+ (clobber (match_scratch:VXSI 3 "=&<a0>,&<a4>"))]
+ ""
+ "*
+{
+ output_asm_insn (register_operand (operands[2], <MODE>mode)
+ ? \"vmov.%L0 %v0,0x8000` vaddna.%L0 %v0,%v0,%v2` vmvw.%O0 %v0,vr62` vmule.%L0 vr62,%v1,%v2\"
+ : \"vmov.%L0 %v0,%2 + 0x8000 & 0xffff0000` vbmule.%L0 vr62,%v1,%2\",
+ operands);
+ return \"vmulae.%L0 %v0,%v0,%v1\";
+}"
+ [(set_attr "length" "3")])
+
+;; ??? should be a define_insn_and_split
+;; ??? FIXME: check effect of sign extension in vmul*
+(define_insn "muldi3"
+ [(set (match_operand:DI 0 "register_operand" "=r,r,r")
+ (mult:DI (match_operand:DI 1 "register_operand" "%r,r,v")
+ (match_operand:DI 2 "register_operand" "r,v,v")))
+ (clobber (match_scratch:TI 3 "=&v,2,2"))
+ (clobber (match_scratch:TI 4 "=&v,&v,&v"))
+ (clobber (match_scratch:TI 5 "=&v,&v,1"))
+ (clobber (match_scratch:TI 6 "=&Rac,&Rac,&Rac"))]
+ ""
+ "vup %3,%2
+ vmrgw %4,%1,%1
+
+ vmule.3 %0,%3,%1 ; a0b0
+ vswp %5,%3
+
+ vmr5w.16 %3,%0,%0
+ vmule.15 %3,%5,%4 ; b0a1|a1b0
+ vmr4w %5,%5,%5
+ vmr7w %4,%4,vr62
+ vxsumi.192 %3,%3,21
+
+
+ vblsr vr62,%3,16
+ vmulae %5,%4,%5
+
+
+ vxsumwi.2 %0,%3,21
+ vxsumi.12 %0,%5,255"
+ [(set_attr "length" "13")])
+
+;; ??? This should be a define_insn_and_split
+(define_insn "extendsidi2"
+ [(set (match_operand:DI 0 "register_operand" "=R0f,Rf0")
+ (sign_extend:DI (match_operand:SI 1 "register_operand" "0,0")))
+ (clobber (match_scratch:DI 2 "=Ral,Rah"))]
+ ""
+ "vswpe.%P0 %v0,%v1` vlt.%P0 %v0,%v0,vr62"
+ [(set_attr "length" "2")])
+
+(define_insn "vec_unpacks_lo_v8hi"
+ [(set (match_operand:V4SI 0 "register_operand" "=v")
+ (sign_extend:V4SI
+ (vec_select:V4HI (match_operand:V8HI 1 "register_operand" "v")
+ (parallel [(const_int 0) (const_int 1)
+ (const_int 2) (const_int 3)]))))
+ (clobber:TI (match_scratch:TI 2 "=Rac"))]
+ ""
+ "vups %0,%1")
+
+(define_insn "vec_unpacku_lo_v8hi"
+ [(set (match_operand:V4SI 0 "register_operand" "=v")
+ (zero_extend:V4SI
+ (vec_select:V4HI (match_operand:V8HI 1 "register_operand" "v")
+ (parallel [(const_int 0) (const_int 1)
+ (const_int 2) (const_int 3)]))))
+ (clobber:TI (match_scratch:TI 2 "=Rac"))]
+ ""
+ "vup %0,%1")
+
+;; ??? This should be a define_insn_and_split.
+(define_insn "vec_unpacks_hi_v8hi"
+ [(set (match_operand:V4SI 0 "register_operand" "=v")
+ (sign_extend:V4SI
+ (vec_select:V4HI (match_operand:V8HI 1 "register_operand" "v")
+ (parallel [(const_int 4) (const_int 5)
+ (const_int 6) (const_int 7)]))))
+ (clobber:TI (match_scratch:TI 2 "=Rac"))]
+ ""
+ "vmr4w %0,%1,%1\;vups %0,%0"
+ [(set_attr "length" "2")])
+
+;; ??? This should be a define_insn_and_split.
+(define_insn "vec_unpacku_hi_v8hi"
+ [(set (match_operand:V4SI 0 "register_operand" "=v")
+ (zero_extend:V4SI
+ (vec_select:V4HI (match_operand:V8HI 1 "register_operand" "v")
+ (parallel [(const_int 4) (const_int 5)
+ (const_int 6) (const_int 7)]))))
+ (clobber:TI (match_scratch:TI 2 "=Rac"))]
+ ""
+ "vmr4w %0,%1,%1\;vup %0,%0"
+ [(set_attr "length" "2")])
+
+;; ??? This should be a define_insn_and_split.
+;; ??? usually, we will have undefined behaviour for overflow, but
+;; this expander can't tell and thus has to mask the input values.
+(define_insn "vec_pack_trunc_v4si"
+ [(set (match_operand:V8HI 0 "register_operand" "=&v")
+ (vec_concat:V8HI
+ (truncate:V4HI (match_operand:V4SI 1 "register_operand" "v"))
+ (truncate:V4HI (match_operand:V4SI 2 "register_operand" "v"))))
+ (clobber:TI (match_scratch:TI 3 "=&Rac"))
+ (clobber:TI (match_scratch:TI 4 "=&v"))]
+ ""
+ "vmvzw %4,%1,85\;vasrpi %0,%4,0\;vmvzw %4,%2,85\;vasrpi %4,%4,0\;\
+vmr4w.240 %0,%4,%4")
+
+(define_insn "jump"
+ [(set (pc) (label_ref (match_operand 0 "" "")))]
+ ""
+ "vjp %r0%#"
+ [(set_attr "type" "jump")])
+
+;; ??? manual says vjpi, but assempler only accepts vjp.
+(define_insn "indirect_jump"
+ [(set (pc) (match_operand:HI 0 "register_operand" "S_n"))]
+ ""
+ "vjp %0%#"
+ [(set_attr "type" "jump")])
+
+(define_expand "call"
+ [(match_operand 0 "" "") (match_operand 1 "" "")]
+ ""
+ "emit_call_insn (gen_call_i (XEXP (operands[0], 0), operands[1])); DONE;")
+
+(define_insn "call_i"
+ [(call (mem:QI (match_operand:HI 0 "nonmemory_operand" "i,S_n"))
+ (match_operand 1 "" ""))
+ (clobber (reg:TI CALL_STACK_REG))]
+ ""
+ "@
+ vjl vr31,%0%#
+ vjli vr31,%0%#"
+ [(set_attr "type" "jump")])
+
+(define_expand "call_value"
+ [(match_operand 0 "" "") (match_operand 1 "" "") (match_operand 2 "" "")]
+ ""
+ "
+{
+ emit_call_insn (gen_call_value_i (operands[0],
+ XEXP (operands[1], 0), operands[2]));
+ DONE;
+}")
+
+(define_insn "call_value_i"
+ [(set (match_operand 0 "register_operand")
+ (call (mem:QI (match_operand:HI 1 "nonmemory_operand" "i,S_n"))
+ (match_operand 2 "" "")))
+ (clobber (reg:TI CALL_STACK_REG))]
+ ""
+ "@
+ vjl vr31,%1%#
+ vjli vr31,%1%#"
+ [(set_attr "type" "jump")])
+
+(define_expand "prologue"
+ [(const_int 0)]
+ ""
+ "mxp_expand_prologue (); DONE;")
+
+;; We dont really have a use for the arc core register parameter. We use
+;; pcl here because there is no latency attached to it on the ARC700 core.
+(define_insn "return"
+ [(return)]
+ ""
+ "vjb vr31,pcl%#"
+ [(set_attr "type" "jump")])
+
+(define_expand "epilogue"
+ [(return)]
+ ""
+ "mxp_expand_epilogue ();")
+
+(define_insn "*store_scalars"
+ [(set (match_operand:V4SI 0 "memory_operand" "=m")
+ (match_operand:V4SI 1 "scalar_save_operand" ""))]
+ ""
+ "vst128 %v1,%0"
+ [(set_attr "type" "store")])
+
+(define_insn "*load_scalars"
+ [(set (match_operand:V4SI 0 "scalar_save_operand" "")
+ (match_operand:V4SI 1 "memory_operand" "m"))]
+ ""
+ "vld128 %v0,%1"
+ [(set_attr "type" "load")])
+
+(define_expand "cmp<mode>"
+ [(set (reg:CC VFLAGS_REG)
+ (compare:CC (match_operand:VECA 0 "reg_or_0_operand" "")
+ (match_operand:VECA 1 "nonmemory_operand" "")))]
+ ""
+ "
+{
+ mxp_compare_op0 = operands[0];
+ mxp_compare_op1 = operands[1];
+ DONE;
+}")
+
+(define_code_iterator any_cond [;;unordered ordered unlt unge uneq ltgt unle ungt
+ eq ne gt ge lt le gtu geu ltu leu])
+
+(define_expand "b<any_cond:code>"
+ [(set (pc)
+ (if_then_else (any_cond:CC (reg:CC VFLAGS_REG)
+ (const_int 0))
+ (label_ref (match_operand 0 ""))
+ (pc)))]
+ ""
+ "
+{
+ mxp_emit_conditional_branch (operands, <CODE>);
+ DONE;
+}")
+
+(define_code_iterator vec_cond [eq ne le lt])
+
+(define_insn "*cmp<code><mode>"
+ [(set (match_operand:HI 0 "register_operand" "=<vx>")
+ (neg:HI (vec_cond:HI (match_operand:HSI 1 "reg_or_0_operand" "<vx>")
+ (match_operand:HSI 2 "reg_or_0_operand" "<vx>"))))
+ (clobber (match_scratch:HSI 3 "=<ax>"))]
+ ""
+ "v<code><unit_suffix>.%L0 %v0,%v1,%v2")
+
+(define_code_iterator vec_rcond [ge gt])
+(define_code_attr rcode [(gt "lt") (ge "le")])
+
+(define_insn "*cmp<code><mode>"
+ [(set (match_operand:HI 0 "register_operand" "=<vx>")
+ (neg:HI (vec_rcond:HI (match_operand:HSI 1 "reg_or_0_operand" "<vx>")
+ (match_operand:HSI 2 "reg_or_0_operand" "<vx>"))))
+ (clobber (match_scratch:HSI 3 "=<ax>"))]
+ ""
+ "v<rcode><unit_suffix>.%L0 %v0,%v2,%v1")
+
+(define_insn "ucmphi"
+ [(set (match_operand:CCI 0 "register_operand" "=Rfl,Rfh,Rfl,Rfh")
+ (compare:CCI (match_operand:HI 1 "reg_or_0_operand"
+ "R01Z,R10Z,R01Z,R10Z")
+ (match_operand:HI 2 "nonmemory_operand"
+ "R01Z,R10Z,i,i")))
+ (clobber (match_scratch:HI 3 "=Ral,Rah,Ral,Rah"))]
+ ""
+ "@
+ vsubw.%L0.f vr62,%v1,%v2
+ vsubw.%L0.f vr62,%v1,%v2
+ vsubw.%L0.f vr62,%v1,%r2
+ vsubw.%L0.f vr62,%v1,%r2")
+
+(define_insn "ucmpsi"
+ [(set (match_operand:CCI 0 "register_operand" "=Rfl,Rfh,Rfl,Rfh,Rfl,Rfh")
+ (compare:CCI (match_operand:SI 1 "reg_or_0_operand"
+ "R03Z,R30Z,R03Z,R30Z,S_n,S_n")
+ (match_operand:SI 2 "reg_or_0_operand"
+ "R03Z,R30Z,S_n,S_n,R03Z,R30Z")))
+ (clobber (match_scratch:SI 3 "=Ral,Rah,Ral,Rah,Ral,Rah"))]
+ ""
+ "@
+ vsube.%L0.f vr62,%v1,%v2
+ vsube.%L0.f vr62,%v1,%v2
+ vksub.%L0.f vr62,%v1,%2
+ vksub.%L0.f vr62,%v1,%2
+ vkrsub.%L0.f vr62,%v2,%1
+ vkrsub.%L0.f vr62,%v2,%1")
+
+(define_insn "vtany"
+ [(set (match_operand:HI 0 "register_operand" "=S_n")
+ (neg:HI (match_operator:HI 2 "comparison_operator"
+ [(match_operand:CCI 1 "register_operand" "Rfg")
+ (const_int 0)])))]
+ ""
+ "vtany.%L1%C2 %0,0xffff")
+
+(define_insn "branch_true"
+ [(set (pc)
+ (if_then_else (ne (match_operand:HI 1 "register_operand" "S_n")
+ (const_int 0))
+ (label_ref (match_operand 0 "" "")) (pc)))]
+ ""
+ "vjp.%1 %r0%#"
+ [(set_attr "type" "jump")])
+
+(define_insn "branch_false"
+ [(set (pc)
+ (if_then_else (ne (match_operand:HI 1 "register_operand" "S_n")
+ (const_int 65535))
+ (label_ref (match_operand 0 "" "")) (pc)))]
+ ""
+ "vjp.!%1 %r0%#"
+ [(set_attr "type" "jump")])
+
+; FIXME: handle reloads of operands 0 / 2.
+; ??? This doesn't seem to ever get generated.
+(define_insn "decrement_and_branch_until_zero"
+ [(set (pc)
+ (if_then_else (ne (match_operand:HI 0 "register_operand" "S_n")
+ (const_int 0))
+ (label_ref (match_operand 1 "" "")) (pc)))
+ (set (match_operand:HI 2 "register_operand" "+S_n")
+ (plus (match_dup 2) (const_int -1)))]
+ ""
+ "vjd.%0 %2,%r1"
+ [(set_attr "type" "jump")])
+
+; operand 0 is the loop count pseudo register
+; operand 1 is the number of loop iterations or 0 if it is unknown
+; operand 2 is the maximum number of loop iterations
+; operand 3 is the number of levels of enclosed loops
+; operand 4 is the label to jump to at the top of the loop
+(define_expand "doloop_end"
+ [(use (match_operand 0 "register_operand" ""))
+ (use (match_operand:QI 1 "const_int_operand" ""))
+ (use (match_operand:QI 2 "const_int_operand" ""))
+ (use (match_operand:QI 3 "const_int_operand" ""))
+ (use (label_ref (match_operand 4 "" "")))
+ (match_operand 5 "" "")]
+
+ ""
+{
+ emit_jump_insn (gen_decrement_and_branch_until_zero (operands[0], operands[4],
+ operands[0]));
+ DONE;
+})
+
+(define_insn "smax<mode>3"
+ [(set (match_operand:VECA 0 "register_operand" "=<vx>")
+ (smax:VECA (match_operand:VECA 1 "register_operand" "<vx>")
+ (match_operand:VECA 2 "register_operand" "<vx>")))
+ (clobber (match_scratch:VECA 3 "=&<ax>"))]
+ ""
+ "vmax<unit_suffix>.%L0 %v0,%v1,%v2")
+
+(define_insn "smin<mode>3"
+ [(set (match_operand:VECA 0 "register_operand" "=<vx>")
+ (smin:VECA (match_operand:VECA 1 "register_operand" "<vx>")
+ (match_operand:VECA 2 "register_operand" "<vx>")))
+ (clobber (match_scratch:VECA 3 "=&<ax>"))]
+ ""
+ "vmin<unit_suffix>.%L0 %v0,%v1,%v2")
+
+(define_insn "nop"
+ [(const_int 0)]
+ ""
+ "vaddnaw.0 0,0,0")
+
+(define_automaton "mxp")
+
+(define_cpu_unit "issue" "mxp")
+
+(define_insn_reservation "int_pipe" 2
+ (eq_attr "type" "other")
+ "issue")
+
+(define_insn_reservation "load" 4
+ (eq_attr "type" "load")
+ "issue")
+
+;; FIXME: add sibcalls.
+;; FIXME: add conditional execution
diff --git a/gcc/config/mxp/mxp.opt b/gcc/config/mxp/mxp.opt
new file mode 100644
index 00000000000..8abc41692b0
--- /dev/null
+++ b/gcc/config/mxp/mxp.opt
@@ -0,0 +1,15 @@
+mbig-data
+Target Report Mask(BIGDATA)
+Allow for data / bss sections overflowing i9+offset addressing range
+
+mint16
+Target Report Mask(INT16)
+Make integers 16 bit wide.
+
+mno-vim-label
+Target Report Mask(NO_VIM_LABEL)
+Don't output vim with a label operand.
+
+mno-vld-label
+Target Report Mask(NO_VLD_LABEL)
+Don't output vld with a label operand.
diff --git a/gcc/config/mxp/predicates.md b/gcc/config/mxp/predicates.md
new file mode 100644
index 00000000000..f3359be7b3e
--- /dev/null
+++ b/gcc/config/mxp/predicates.md
@@ -0,0 +1,19 @@
+(define_predicate "scalar_save_operand"
+ (and (match_code "parallel")
+ (match_test "1 /*FIXME*/"))
+)
+
+(define_predicate "reg_or_0_operand"
+ (ior (and (match_code "subreg,reg")
+ (match_test "register_operand (op, mode)"))
+ (and (match_code "const_int,const_vector")
+ (match_test "op == CONST0_RTX (GET_MODE (op))"))))
+
+;; Like register_operand, but this predicate is defined with
+;; define_special_predicate, not define_predicate.
+
+(define_special_predicate "any_register_operand"
+ (match_code "subreg,reg")
+{
+ return register_operand (op, mode);
+})
diff --git a/gcc/config/mxp/regset-config.h b/gcc/config/mxp/regset-config.h
new file mode 100644
index 00000000000..9ec93171479
--- /dev/null
+++ b/gcc/config/mxp/regset-config.h
@@ -0,0 +1,96 @@
+/* There are two plausible definitions for UNITS_PER_WORD:
+ * 16, because that is the register size.
+ * 2, because that is the smallest register size that can be written to
+ without affecting other parts of the same register. This is also
+ the size we have the most arithmetic operations for, and which is used
+ for conditions. */
+#define UNITS_PER_WORD 2
+
+/* Even if we set UNITS_PER_WORD as 16, we can still have smaller regsiters
+ as far as gcc is concerned, in order to allow more efficient register
+ allocation. A plausible setting is 8, so that we can use an alternate
+ class, but don't loose ourselves in describing irrelevant details.
+ OTOH, if UNITS_PER_WORD is 2, MXP_UNIT_PER_VEC_REG should also be 2.
+ Note also, that for efficient and sane support of SImode values in
+ scalar registers, we want a setting of 2. Unfortunately, this drives up
+ the number of registers to approximately 512. */
+#define MXP_UNITS_PER_MXP_VEC_REG 2
+
+/* Even if we model registers in 16-bit chunks, we need not allow to use
+ them all for any possible purpose. There are practical advanatages to
+ put artifical restrictions on the usage:
+ - we can keep the number of register classes to be merely high, rather
+ than grow excessively high. If we allow all 256 possible lane
+ combinations for scalars, non-scalar vector registers, accumulators,
+ and flags, and all combinations of these, we get 2**32 register classes,
+ requiring 2 terabits for REG_CLASS_CONTENTS.
+ - If we have 8 lane classes to choose from to put an HImode value in,
+ with no real preference for either of them, the compiler is prone to
+ use them all, and end up with costly cross-lane moves.
+
+ Some register sets serve no practival purpose as a register class.
+ - There should be no need for any register class but ALL_REGS to
+ incorporate both accumulator and flag registers, since it seems
+ rather far-fetched that a value can be hold in the flags register,
+ but alternatively might be stored in the accumulator.
+ - For HImode values in scalar registers, lanes 0 and 4 are special,
+ all other lanes make no difference. Hence useful masks are 0x01, 0x10,
+ 0x11 and 0xff. Likewise, for SImode values in scalar registers,
+ useful masks are 0x03, 0x30 and 0xff; scalar register classes with
+ masks like 0x31 serve no purpose.
+ - When two register classes with specific lane requirements are
+ combined, it is to be expected that the lanes agree. */
+
+/* The non-scalar vector registers have costly cross-lane moves, so we will
+ only allow two lane sets for arithmetic per mode:
+ GENERAL_REGS in lanes 0..3 and an alternate register set in lanes 4..7 .
+ However, we need to allow moves in every lane to make subregs work.
+ To then avoid the arithmetic going astray into an unwanted lane, we need
+ to have exact per-mode lane masks for arithmetic.
+ This gives us a total of eight lane sets for non-scalar vector registers. */
+#define MXP_VEC_LANE_SETS { 0x00, 0x01, 0x10, 0x03, 0x30, 0x0f, 0xf0, 0xff }
+/* We use s smaller set of sets for flags and accumulators. */
+#define MXP_FLAG_ACC_LANE_SETS { 0x00, 0x0f, 0xf0, 0xff }
+/* The scalar registers are good for holding 16 and 32 bit values and have
+ special cross-lane operations, so we allow all lanes for 16 and 32 bit
+ values. Only the lanes that line up with the non-scalar vector registers
+ require consideration of their actual lane values.
+ We don't allow wider values in scalar registers since that would
+ increase regsiter pressure on this valuable register set, and also
+ require more register classes. */
+#define MXP_SCALAR_LANE_SETS { 0x00, 0x01, 0x10, 0x03, 0x30, 0xff }
+
+#define MXP_VALID_REG_CLASS(SCALAR,VECTOR,FLAGS,ACC) \
+ /* ALL_REGS is valid. */ \
+ ((SCALAR) == 0xff && (VECTOR) == 0xff && (FLAGS) == 0xff && (ACC) == 0xff \
+ ? 1 \
+ /* Otherwise, reject combination of FLAGS and ACC. */ \
+ : (FLAGS) != 0 && (ACC) != 0 ? 0 \
+ /* Reject combination of mismatched lanes. */ \
+ : (SCALAR) & ~(VECTOR) & 0xf0 && (VECTOR) & ~(SCALAR) & 0x0f ? 0 \
+ : (SCALAR) & ~(VECTOR) & 0x0f && (VECTOR) & ~(SCALAR) & 0xf0 ? 0 \
+ : (SCALAR) & ~(FLAGS) & 0xf0 && (FLAGS) & ~(SCALAR) & 0x0f ? 0 \
+ : (SCALAR) & ~(FLAGS) & 0x0f && (FLAGS) & ~(SCALAR) & 0xf0 ? 0 \
+ : (SCALAR) & ~(ACC) & 0xf0 && (ACC) & ~(SCALAR) & 0x0f ? 0 \
+ : (SCALAR) & ~(ACC) & 0x0f && (ACC) & ~(SCALAR) & 0xf0 ? 0 \
+ : (VECTOR) & ~(FLAGS) & 0xf0 && (FLAGS) & ~(VECTOR) & 0x0f ? 0 \
+ : (VECTOR) & ~(FLAGS) & 0x0f && (FLAGS) & ~(VECTOR) & 0xf0 ? 0 \
+ : (VECTOR) & ~(ACC) & 0xf0 && (ACC) & ~(VECTOR) & 0x0f ? 0 \
+ : (VECTOR) & ~(ACC) & 0x0f && (ACC) & ~(VECTOR) & 0xf0 ? 0 \
+ : (SCALAR) == 0x01 && (VECTOR) & 0x0e && !((VECTOR) & 0xf0) ? 0 \
+ : (VECTOR) == 0x01 && (SCALAR) & 0x0e && !((SCALAR) & 0xf0) ? 0 \
+ : (SCALAR) == 0x10 && (VECTOR) & 0xe0 && !((VECTOR) & 0x0f) ? 0 \
+ : (VECTOR) == 0x10 && (SCALAR) & 0xe0 && !((SCALAR) & 0x0f) ? 0 \
+ : 1)
+
+/* Actual fixed hard registers. */
+#define STACK_POINTER_REGNUM 8
+#define BSS_BASE_REGNUM 9
+
+/* Frame pointer and argument pointer are nominally hard registers, but
+ they don't actually exist in hardware, and have to be always eliminated. */
+#define MXP_FAKE_REG_NAMES { "fp", "ap" }
+/* The fake registers (fp, ap) are considerd scalar registers. Indicate
+ the lane set to which they are supposed to belong for the purpose of
+ including them in register classes. */
+#define MXP_FAKE_REG_LANES 0xcc
diff --git a/gcc/config/mxp/t-mxp b/gcc/config/mxp/t-mxp
new file mode 100644
index 00000000000..b172be93aba
--- /dev/null
+++ b/gcc/config/mxp/t-mxp
@@ -0,0 +1,28 @@
+# ??? the generated .md file must be placed in srcdir, because that's the
+# only place that the gensupport include knows about.
+s-mddeps: $(srcdir)/config/mxp/mxp-regset.md
+tm_file_list += mxp-regset.h
+mxp-regset.h: s-mxp-regset-h; @true
+mxp-regset.c: s-mxp-regset-c; @true
+$(srcdir)/config/mxp/mxp-regset.md: s-mxp-regset-md; @true
+
+s-mxp-regset-h: build/mxp-genregset$(build_exeext)
+ $(RUN_GEN) build/mxp-genregset$(build_exeext) -h > tmp-mxp-regset.h
+ $(SHELL) $(srcdir)/../move-if-change tmp-mxp-regset.h mxp-regset.h
+ $(STAMP) s-mxp-regset-h
+
+s-mxp-regset-md: build/mxp-genregset$(build_exeext)
+ $(RUN_GEN) build/mxp-genregset$(build_exeext) -m > tmp-mxp-regset.md
+ $(SHELL) $(srcdir)/../move-if-change tmp-mxp-regset.md $(srcdir)/config/mxp/mxp-regset.md
+ $(STAMP) s-mxp-regset-md
+
+s-mxp-regset-c: build/mxp-genregset$(build_exeext)
+ $(RUN_GEN) build/mxp-genregset$(build_exeext) > tmp-mxp-regset.c
+ $(SHELL) $(srcdir)/../move-if-change tmp-mxp-regset.c mxp-regset.c
+ $(STAMP) s-mxp-regset-c
+
+build/mxp-genregset.o : config/mxp/mxp-genregset.c $(BCONFIG_H) $(SYSTEM_H) \
+ errors.h config/mxp/regset-config.h
+
+# The startup code is for the arc core only.
+EXTRA_PARTS=
diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c
index 3aa17143b67..79504dc56bd 100644
--- a/gcc/config/rs6000/rs6000-c.c
+++ b/gcc/config/rs6000/rs6000-c.c
@@ -2864,7 +2864,7 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = {
{ ALTIVEC_BUILTIN_VCMPGE_P, ALTIVEC_BUILTIN_VCMPGEFP_P,
RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_V4SF, RS6000_BTI_V4SF },
- { 0, 0, 0, 0, 0, 0 }
+ { (enum rs6000_builtins) 0, (enum rs6000_builtins) 0, 0, 0, 0, 0 }
};
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 17622c26f00..91e3c435efb 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -862,7 +862,7 @@ static tree rs6000_builtin_reciprocal (unsigned int, bool, bool);
static tree rs6000_builtin_mask_for_load (void);
static tree rs6000_builtin_mul_widen_even (tree);
static tree rs6000_builtin_mul_widen_odd (tree);
-static tree rs6000_builtin_conversion (enum tree_code, tree);
+static tree rs6000_builtin_conversion (unsigned /* enum tree_code */, tree);
static tree rs6000_builtin_vec_perm (tree, tree *);
static void def_builtin (int, const char *, tree, int);
@@ -1351,7 +1351,7 @@ rs6000_init_hard_regno_mode_ok (void)
for (r = 0; r < FIRST_PSEUDO_REGISTER; ++r)
for (m = 0; m < NUM_MACHINE_MODES; ++m)
- if (rs6000_hard_regno_mode_ok (r, m))
+ if (rs6000_hard_regno_mode_ok (r, (enum machine_mode) m))
rs6000_hard_regno_mode_ok_p[m][r] = true;
}
@@ -1776,7 +1776,8 @@ rs6000_override_options (const char *default_cpu)
else if (! strcmp (rs6000_sched_costly_dep_str, "store_to_load"))
rs6000_sched_costly_dep = store_to_load_dep_costly;
else
- rs6000_sched_costly_dep = atoi (rs6000_sched_costly_dep_str);
+ rs6000_sched_costly_dep
+ = (rs6000_dependence_cost) atoi (rs6000_sched_costly_dep_str);
}
/* Handle -minsert-sched-nops option. */
@@ -1792,7 +1793,8 @@ rs6000_override_options (const char *default_cpu)
else if (! strcmp (rs6000_sched_insert_nops_str, "regroup_exact"))
rs6000_sched_insert_nops = sched_finish_regroup_exact;
else
- rs6000_sched_insert_nops = atoi (rs6000_sched_insert_nops_str);
+ rs6000_sched_insert_nops
+ = (rs6000_nop_insertion) atoi (rs6000_sched_insert_nops_str);
}
#ifdef TARGET_REGNAMES
@@ -2013,8 +2015,9 @@ rs6000_builtin_mask_for_load (void)
side of the conversion.
Return NULL_TREE if it is not available. */
static tree
-rs6000_builtin_conversion (enum tree_code code, tree type)
+rs6000_builtin_conversion (unsigned /* enum tree_code */ code_in, tree type)
{
+ enum tree_code code = (enum tree_code) code_in;
if (!TARGET_ALTIVEC)
return NULL_TREE;
@@ -3719,7 +3722,7 @@ avoiding_indexed_address_p (enum machine_mode mode)
return TARGET_AVOID_XFORM && !ALTIVEC_VECTOR_MODE (mode);
}
-inline bool
+bool
legitimate_indirect_address_p (rtx x, int strict)
{
return GET_CODE (x) == REG && INT_REG_OK_FOR_BASE_P (x, strict);
@@ -5018,14 +5021,16 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode)
return;
}
- if (reload_in_progress && cfun->machine->sdmode_stack_slot != NULL_RTX)
- cfun->machine->sdmode_stack_slot =
- eliminate_regs (cfun->machine->sdmode_stack_slot, VOIDmode, NULL_RTX);
+ if (reload_in_progress
+ && MACHINE_FUNCTION (*cfun)->sdmode_stack_slot != NULL_RTX)
+ MACHINE_FUNCTION (*cfun)->sdmode_stack_slot =
+ eliminate_regs (MACHINE_FUNCTION (*cfun)->sdmode_stack_slot, VOIDmode,
+ NULL_RTX);
if (reload_in_progress
&& mode == SDmode
&& MEM_P (operands[0])
- && rtx_equal_p (operands[0], cfun->machine->sdmode_stack_slot)
+ && rtx_equal_p (operands[0], MACHINE_FUNCTION (*cfun)->sdmode_stack_slot)
&& REG_P (operands[1]))
{
if (FP_REGNO_P (REGNO (operands[1])))
@@ -5048,7 +5053,7 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode)
&& mode == SDmode
&& REG_P (operands[0])
&& MEM_P (operands[1])
- && rtx_equal_p (operands[1], cfun->machine->sdmode_stack_slot))
+ && rtx_equal_p (operands[1], MACHINE_FUNCTION (*cfun)->sdmode_stack_slot))
{
if (FP_REGNO_P (REGNO (operands[0])))
{
@@ -6736,7 +6741,7 @@ setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode,
gcc_assert (reg_save_area == virtual_stack_vars_rtx);
}
- cfun->machine->varargs_save_offset = offset;
+ MACHINE_FUNCTION (*cfun)->varargs_save_offset = offset;
save_area = plus_constant (virtual_stack_vars_rtx, offset);
}
}
@@ -6905,10 +6910,10 @@ rs6000_va_start (tree valist, rtx nextarg)
f_sav, NULL_TREE);
/* Count number of gp and fp argument registers used. */
- words = crtl->args.info.words;
- n_gpr = MIN (crtl->args.info.sysv_gregno - GP_ARG_MIN_REG,
+ words = INCOMING_ARGS_INFO (crtl->args).words;
+ n_gpr = MIN (INCOMING_ARGS_INFO (crtl->args).sysv_gregno - GP_ARG_MIN_REG,
GP_ARG_NUM_REG);
- n_fpr = MIN (crtl->args.info.fregno - FP_ARG_MIN_REG,
+ n_fpr = MIN (INCOMING_ARGS_INFO (crtl->args).fregno - FP_ARG_MIN_REG,
FP_ARG_NUM_REG);
if (TARGET_DEBUG_ARG)
@@ -6951,9 +6956,9 @@ rs6000_va_start (tree valist, rtx nextarg)
/* Find the register save area. */
t = make_tree (TREE_TYPE (sav), virtual_stack_vars_rtx);
- if (cfun->machine->varargs_save_offset)
+ if (MACHINE_FUNCTION (*cfun)->varargs_save_offset)
t = build2 (POINTER_PLUS_EXPR, TREE_TYPE (sav), t,
- size_int (cfun->machine->varargs_save_offset));
+ size_int (MACHINE_FUNCTION (*cfun)->varargs_save_offset));
t = build2 (MODIFY_EXPR, TREE_TYPE (sav), sav, t);
TREE_SIDE_EFFECTS (t) = 1;
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
@@ -7690,9 +7695,9 @@ static const struct builtin_description_predicates bdesc_altivec_preds[] =
{ MASK_ALTIVEC, CODE_FOR_altivec_predicate_v16qi, "*vcmpgtsb.", "__builtin_altivec_vcmpgtsb_p", ALTIVEC_BUILTIN_VCMPGTSB_P },
{ MASK_ALTIVEC, CODE_FOR_altivec_predicate_v16qi, "*vcmpgtub.", "__builtin_altivec_vcmpgtub_p", ALTIVEC_BUILTIN_VCMPGTUB_P },
- { MASK_ALTIVEC, 0, NULL, "__builtin_vec_vcmpeq_p", ALTIVEC_BUILTIN_VCMPEQ_P },
- { MASK_ALTIVEC, 0, NULL, "__builtin_vec_vcmpgt_p", ALTIVEC_BUILTIN_VCMPGT_P },
- { MASK_ALTIVEC, 0, NULL, "__builtin_vec_vcmpge_p", ALTIVEC_BUILTIN_VCMPGE_P }
+ { MASK_ALTIVEC, (enum insn_code) 0, NULL, "__builtin_vec_vcmpeq_p", ALTIVEC_BUILTIN_VCMPEQ_P },
+ { MASK_ALTIVEC, (enum insn_code) 0, NULL, "__builtin_vec_vcmpgt_p", ALTIVEC_BUILTIN_VCMPGT_P },
+ { MASK_ALTIVEC, (enum insn_code) 0, NULL, "__builtin_vec_vcmpge_p", ALTIVEC_BUILTIN_VCMPGE_P }
};
/* SPE predicates. */
@@ -8561,8 +8566,8 @@ altivec_expand_vec_set_builtin (tree exp)
mode1 = TYPE_MODE (TREE_TYPE (TREE_TYPE (arg0)));
gcc_assert (VECTOR_MODE_P (tmode));
- op0 = expand_expr (arg0, NULL_RTX, tmode, 0);
- op1 = expand_expr (arg1, NULL_RTX, mode1, 0);
+ op0 = expand_expr (arg0, NULL_RTX, tmode, EXPAND_NORMAL);
+ op1 = expand_expr (arg1, NULL_RTX, mode1, EXPAND_NORMAL);
elt = get_element_number (TREE_TYPE (arg0), arg2);
if (GET_MODE (op1) != mode1 && GET_MODE (op1) != VOIDmode)
@@ -11507,13 +11512,13 @@ rs6000_secondary_memory_needed_rtx (enum machine_mode mode)
return assign_stack_local (mode, GET_MODE_SIZE (mode), 0);
else
{
- rtx mem = cfun->machine->sdmode_stack_slot;
+ rtx mem = MACHINE_FUNCTION (*cfun)->sdmode_stack_slot;
gcc_assert (mem != NULL_RTX);
if (!eliminated)
{
mem = eliminate_regs (mem, VOIDmode, NULL_RTX);
- cfun->machine->sdmode_stack_slot = mem;
+ MACHINE_FUNCTION (*cfun)->sdmode_stack_slot = mem;
eliminated = true;
}
return mem;
@@ -11562,7 +11567,7 @@ rs6000_alloc_sdmode_stack_slot (void)
basic_block bb;
gimple_stmt_iterator gsi;
- gcc_assert (cfun->machine->sdmode_stack_slot == NULL_RTX);
+ gcc_assert (MACHINE_FUNCTION (*cfun)->sdmode_stack_slot == NULL_RTX);
FOR_EACH_BB (bb)
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
@@ -11571,8 +11576,8 @@ rs6000_alloc_sdmode_stack_slot (void)
if (ret)
{
rtx stack = assign_stack_local (DDmode, GET_MODE_SIZE (DDmode), 0);
- cfun->machine->sdmode_stack_slot = adjust_address_nv (stack,
- SDmode, 0);
+ MACHINE_FUNCTION (*cfun)->sdmode_stack_slot
+ = adjust_address_nv (stack, SDmode, 0);
return;
}
}
@@ -11587,8 +11592,8 @@ rs6000_alloc_sdmode_stack_slot (void)
|| TYPE_MODE (DECL_ARG_TYPE (t)) == SDmode)
{
rtx stack = assign_stack_local (DDmode, GET_MODE_SIZE (DDmode), 0);
- cfun->machine->sdmode_stack_slot = adjust_address_nv (stack,
- SDmode, 0);
+ MACHINE_FUNCTION (*cfun)->sdmode_stack_slot
+ = adjust_address_nv (stack, SDmode, 0);
return;
}
}
@@ -11597,8 +11602,8 @@ rs6000_alloc_sdmode_stack_slot (void)
static void
rs6000_instantiate_decls (void)
{
- if (cfun->machine->sdmode_stack_slot != NULL_RTX)
- instantiate_decl_rtl (cfun->machine->sdmode_stack_slot);
+ if (MACHINE_FUNCTION (*cfun)->sdmode_stack_slot != NULL_RTX)
+ instantiate_decl_rtl (MACHINE_FUNCTION (*cfun)->sdmode_stack_slot);
}
/* Return the register class of a scratch register needed to copy IN into
@@ -11848,14 +11853,14 @@ rs6000_get_some_local_dynamic_name (void)
{
rtx insn;
- if (cfun->machine->some_ld_name)
- return cfun->machine->some_ld_name;
+ if (MACHINE_FUNCTION (*cfun)->some_ld_name)
+ return MACHINE_FUNCTION (*cfun)->some_ld_name;
for (insn = get_insns (); insn ; insn = NEXT_INSN (insn))
if (INSN_P (insn)
&& for_each_rtx (&PATTERN (insn),
rs6000_get_some_local_dynamic_name_1, 0))
- return cfun->machine->some_ld_name;
+ return MACHINE_FUNCTION (*cfun)->some_ld_name;
gcc_unreachable ();
}
@@ -11872,7 +11877,7 @@ rs6000_get_some_local_dynamic_name_1 (rtx *px, void *data ATTRIBUTE_UNUSED)
const char *str = XSTR (x, 0);
if (SYMBOL_REF_TLS_MODEL (x) == TLS_MODEL_LOCAL_DYNAMIC)
{
- cfun->machine->some_ld_name = str;
+ MACHINE_FUNCTION (*cfun)->some_ld_name = str;
return 1;
}
}
@@ -14028,7 +14033,7 @@ emit_unlikely_jump (rtx cond, rtx label)
x = gen_rtx_IF_THEN_ELSE (VOIDmode, cond, label, pc_rtx);
x = emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx, x));
- REG_NOTES (x) = gen_rtx_EXPR_LIST (REG_BR_PROB, very_unlikely, NULL_RTX);
+ REG_NOTES (x) = alloc_reg_note (REG_BR_PROB, very_unlikely, NULL_RTX);
}
/* A subroutine of the atomic operation splitters. Emit a load-locked
@@ -14508,7 +14513,8 @@ compute_vrsave_mask (void)
them in again. More importantly, the mask we compute here is
used to generate CLOBBERs in the set_vrsave insn, and we do not
wish the argument registers to die. */
- for (i = crtl->args.info.vregno - 1; i >= ALTIVEC_ARG_MIN_REG; --i)
+ for (i = INCOMING_ARGS_INFO (crtl->args).vregno - 1;
+ i >= ALTIVEC_ARG_MIN_REG; --i)
mask &= ~ALTIVEC_REG_BIT (i);
/* Similarly, remove the return value from the set. */
@@ -14700,10 +14706,11 @@ rs6000_stack_info (void)
if (TARGET_SPE)
{
/* Cache value so we don't rescan instruction chain over and over. */
- if (cfun->machine->insn_chain_scanned_p == 0)
- cfun->machine->insn_chain_scanned_p
+ if (MACHINE_FUNCTION (*cfun)->insn_chain_scanned_p == 0)
+ MACHINE_FUNCTION (*cfun)->insn_chain_scanned_p
= spe_func_has_64bit_regs_p () + 1;
- info_ptr->spe_64bit_regs_used = cfun->machine->insn_chain_scanned_p - 1;
+ info_ptr->spe_64bit_regs_used
+ = MACHINE_FUNCTION (*cfun)->insn_chain_scanned_p - 1;
}
/* Select which calling sequence. */
@@ -14750,7 +14757,7 @@ rs6000_stack_info (void)
/* Does this function call anything? */
info_ptr->calls_p = (! current_function_is_leaf
- || cfun->machine->ra_needs_full_frame);
+ || MACHINE_FUNCTION (*cfun)->ra_needs_full_frame);
/* Determine if we need to save the link register. */
if ((DEFAULT_ABI == ABI_AIX
@@ -15176,7 +15183,7 @@ rs6000_return_addr (int count, rtx frame)
don't try to be too clever here. */
if (count != 0 || (DEFAULT_ABI != ABI_AIX && flag_pic))
{
- cfun->machine->ra_needs_full_frame = 1;
+ MACHINE_FUNCTION (*cfun)->ra_needs_full_frame = 1;
return
gen_rtx_MEM
@@ -15189,7 +15196,7 @@ rs6000_return_addr (int count, rtx frame)
RETURN_ADDRESS_OFFSET)));
}
- cfun->machine->ra_need_lr = 1;
+ MACHINE_FUNCTION (*cfun)->ra_need_lr = 1;
return get_hard_reg_initial_val (Pmode, LR_REGNO);
}
@@ -15622,11 +15629,11 @@ rs6000_emit_allocate_stack (HOST_WIDE_INT size, int copy_r12, int copy_r11)
RTX_FRAME_RELATED_P (insn) = 1;
REG_NOTES (insn) =
- gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- gen_rtx_SET (VOIDmode, stack_reg,
- gen_rtx_PLUS (Pmode, stack_reg,
- GEN_INT (-size))),
- REG_NOTES (insn));
+ alloc_reg_note (REG_FRAME_RELATED_EXPR,
+ gen_rtx_SET (VOIDmode, stack_reg,
+ gen_rtx_PLUS (Pmode, stack_reg,
+ GEN_INT (-size))),
+ REG_NOTES (insn));
}
/* Add to 'insn' a note which is PATTERN (INSN) but with REG replaced
@@ -15707,9 +15714,8 @@ rs6000_frame_related (rtx insn, rtx reg, HOST_WIDE_INT val,
}
RTX_FRAME_RELATED_P (insn) = 1;
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- real,
- REG_NOTES (insn));
+ REG_NOTES (insn)
+ = alloc_reg_note (REG_FRAME_RELATED_EXPR, real, REG_NOTES (insn));
}
/* Returns an insn that has a vrsave set operation with the
@@ -16055,7 +16061,7 @@ rs6000_savres_strategy (rs6000_stack_t *info, bool savep,
|| sibcall
|| crtl->calls_eh_return
|| !info->lr_save_p
- || cfun->machine->ra_need_lr
+ || MACHINE_FUNCTION (*cfun)->ra_need_lr
|| info->total_size > 32767);
savres_fprs_inline = (common
|| info->first_fp_reg_save == 64
@@ -16335,9 +16341,8 @@ rs6000_emit_prologue (void)
We use CR2_REGNO (70) to be compatible with gcc-2.95 on Linux. */
set = gen_rtx_SET (VOIDmode, cr_save_rtx,
gen_rtx_REG (SImode, CR2_REGNO));
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- set,
- REG_NOTES (insn));
+ REG_NOTES (insn)
+ = alloc_reg_note (REG_FRAME_RELATED_EXPR, set, REG_NOTES (insn));
}
/* Do any required saving of fpr's. If only one or two to save, do
@@ -16593,9 +16598,8 @@ rs6000_emit_prologue (void)
insn = emit_insn (gen_movesi_from_cr (cr_save_rtx));
RTX_FRAME_RELATED_P (insn) = 1;
set = gen_rtx_SET (VOIDmode, cr_save_rtx, magic_eh_cr_reg);
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- set,
- REG_NOTES (insn));
+ REG_NOTES (insn)
+ = alloc_reg_note (REG_FRAME_RELATED_EXPR, set, REG_NOTES (insn));
}
insn = emit_move_insn (mem, cr_save_rtx);
@@ -18126,7 +18130,7 @@ output_toc (FILE *file, rtx x, int labelno, enum machine_mode mode)
h->key_mode = mode;
h->labelno = labelno;
- found = htab_find_slot (toc_hash_table, h, 1);
+ found = htab_find_slot (toc_hash_table, h, INSERT);
if (*found == NULL)
*found = h;
else /* This is indeed a duplicate.
@@ -18547,7 +18551,8 @@ output_profile_hook (int labelno ATTRIBUTE_UNUSED)
# define NO_PROFILE_COUNTERS 0
#endif
if (NO_PROFILE_COUNTERS)
- emit_library_call (init_one_libfunc (RS6000_MCOUNT), 0, VOIDmode, 0);
+ emit_library_call (init_one_libfunc (RS6000_MCOUNT), LCT_NORMAL,
+ VOIDmode, 0);
else
{
char buf[30];
@@ -18558,8 +18563,8 @@ output_profile_hook (int labelno ATTRIBUTE_UNUSED)
label_name = (*targetm.strip_name_encoding) (ggc_strdup (buf));
fun = gen_rtx_SYMBOL_REF (Pmode, label_name);
- emit_library_call (init_one_libfunc (RS6000_MCOUNT), 0, VOIDmode, 1,
- fun, Pmode);
+ emit_library_call (init_one_libfunc (RS6000_MCOUNT), LCT_NORMAL,
+ VOIDmode, 1, fun, Pmode);
}
}
else if (DEFAULT_ABI == ABI_DARWIN)
@@ -18578,7 +18583,7 @@ output_profile_hook (int labelno ATTRIBUTE_UNUSED)
caller_addr_regno = 0;
#endif
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, mcount_name),
- 0, VOIDmode, 1,
+ LCT_NORMAL, VOIDmode, 1,
gen_rtx_REG (Pmode, caller_addr_regno), Pmode);
}
}
@@ -20481,7 +20486,7 @@ rs6000_initialize_trampoline (rtx addr, rtx fnaddr, rtx cxt)
case ABI_DARWIN:
case ABI_V4:
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__trampoline_setup"),
- FALSE, VOIDmode, 4,
+ LCT_NORMAL, VOIDmode, 4,
addr, Pmode,
GEN_INT (rs6000_trampoline_size ()), SImode,
fnaddr, Pmode,
@@ -22721,7 +22726,7 @@ rs6000_init_dwarf_reg_sizes_extra (tree address)
{
int i;
enum machine_mode mode = TYPE_MODE (char_type_node);
- rtx addr = expand_expr (address, NULL_RTX, VOIDmode, 0);
+ rtx addr = expand_expr (address, NULL_RTX, VOIDmode, EXPAND_NORMAL);
rtx mem = gen_rtx_MEM (BLKmode, addr);
rtx value = gen_int_mode (4, mode);
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index e0d40a95854..448863b9725 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -14428,7 +14428,8 @@
(use (match_operand 1 "" "")) ; iterations; zero if unknown
(use (match_operand 2 "" "")) ; max iterations
(use (match_operand 3 "" "")) ; loop level
- (use (match_operand 4 "" ""))] ; label
+ (use (match_operand 4 "" "")) ; label
+ (match_operand 5 "" "")]
""
"
{
diff --git a/gcc/config/rs6000/t-rs6000 b/gcc/config/rs6000/t-rs6000
index 30f021e8017..9206ba4364c 100644
--- a/gcc/config/rs6000/t-rs6000
+++ b/gcc/config/rs6000/t-rs6000
@@ -12,7 +12,7 @@ rs6000-c.o: $(srcdir)/config/rs6000/rs6000-c.c \
$(srcdir)/config/rs6000/rs6000-protos.h \
$(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(CPPLIB_H) \
$(TM_P_H) c-pragma.h errors.h coretypes.h $(TM_H)
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/rs6000/rs6000-c.c
+ $(CXXX) $(srcdir)/config/rs6000/rs6000-c.c
# The rs6000 backend doesn't cause warnings in these files.
insn-conditions.o-warn =
diff --git a/gcc/config/sh/predicates.md b/gcc/config/sh/predicates.md
index da9962c9984..a310daa931d 100644
--- a/gcc/config/sh/predicates.md
+++ b/gcc/config/sh/predicates.md
@@ -22,7 +22,7 @@
(define_predicate "trapping_target_operand"
(match_code "if_then_else")
{
- rtx cond, mem, res, tar, and;
+ rtx cond, mem, res, tar, and_expr;
if (GET_MODE (op) != PDImode)
return 0;
@@ -49,12 +49,12 @@
return 0;
if (GET_CODE (cond) != EQ)
return 0;
- and = XEXP (cond, 0);
- return (GET_CODE (and) == AND
- && rtx_equal_p (XEXP (and, 0), tar)
- && GET_CODE (XEXP (and, 1)) == CONST_INT
+ and_expr = XEXP (cond, 0);
+ return (GET_CODE (and_expr) == AND
+ && rtx_equal_p (XEXP (and_expr, 0), tar)
+ && GET_CODE (XEXP (and_expr, 1)) == CONST_INT
&& GET_CODE (XEXP (cond, 1)) == CONST_INT
- && INTVAL (XEXP (and, 1)) == 3
+ && INTVAL (XEXP (and_expr, 1)) == 3
&& INTVAL (XEXP (cond, 1)) == 3);
})
diff --git a/gcc/config/sh/sh-protos.h b/gcc/config/sh/sh-protos.h
index 5b971960f2d..f007c4aa667 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,
@@ -167,15 +169,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 bool sh_symbian_dllimport_name_p (const char *);
@@ -190,3 +194,5 @@ extern void sh_symbian_encode_section_info (tree, rtx, int);
#endif
#endif
#endif /* SYMBIAN */
+
+#endif /* ! GCC_SH_PROTOS_H */
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index c8f4c85ee75..aa6c625e268 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;
@@ -170,6 +172,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);
@@ -191,7 +194,7 @@ static void push_regs (HARD_REG_SET *, int);
static int calc_live_regs (HARD_REG_SET *);
static HOST_WIDE_INT rounded_frame_size (int);
static rtx mark_constant_pool_use (rtx);
-const struct attribute_spec sh_attribute_table[];
+extern const struct attribute_spec sh_attribute_table[];
static tree sh_handle_interrupt_handler_attribute (tree *, tree, tree, int, bool *);
static tree sh_handle_resbank_handler_attribute (tree *, tree,
tree, int, bool *);
@@ -309,6 +312,9 @@ static int sh2a_function_vector_p (tree);
#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
@@ -1085,7 +1091,7 @@ expand_block_move (rtx *operands)
and efficient sequence. */
if (TARGET_SH4A_ARCH && align < 4
&& MEM_ALIGN (operands[0]) >= 32
- && can_move_by_pieces (bytes, 32))
+ && can_move_by_pieces (bytes, 32, 0))
{
rtx dest = copy_rtx (operands[0]);
rtx src = copy_rtx (operands[1]);
@@ -1295,7 +1301,7 @@ prepare_move_operands (rtx operands[], enum machine_mode mode)
else
opc = NULL_RTX;
- if ((tls_kind = tls_symbolic_operand (op1, Pmode)))
+ if ((tls_kind = (tls_model) tls_symbolic_operand (op1, Pmode)))
{
rtx tga_op1, tga_ret, tmp, tmp2;
@@ -1375,7 +1381,7 @@ prepare_cbranch_operands (rtx *operands, enum machine_mode mode,
rtx op1;
rtx scratch = NULL_RTX;
- if (comparison == CODE_FOR_nothing)
+ if (comparison == UNKNOWN)
comparison = GET_CODE (operands[0]);
else
scratch = operands[4];
@@ -1476,8 +1482,7 @@ expand_cbranchsi4 (rtx *operands, enum rtx_code comparison, int probability)
jump = emit_jump_insn (branch_expander (operands[3]));
if (probability >= 0)
REG_NOTES (jump)
- = gen_rtx_EXPR_LIST (REG_BR_PROB, GEN_INT (probability),
- REG_NOTES (jump));
+ = alloc_reg_note (REG_BR_PROB, GEN_INT (probability), REG_NOTES (jump));
}
@@ -1515,7 +1520,7 @@ expand_cbranchdi4 (rtx *operands, enum rtx_code comparison)
op2h = gen_highpart_mode (SImode, DImode, operands[2]);
op1l = gen_lowpart (SImode, operands[1]);
op2l = gen_lowpart (SImode, operands[2]);
- msw_taken = msw_skip = lsw_taken = CODE_FOR_nothing;
+ msw_taken = msw_skip = lsw_taken = UNKNOWN;
prob = split_branch_probability;
rev_prob = REG_BR_PROB_BASE - prob;
switch (comparison)
@@ -1606,9 +1611,9 @@ expand_cbranchdi4 (rtx *operands, enum rtx_code comparison)
break;
default: return false;
}
- num_branches = ((msw_taken != CODE_FOR_nothing)
- + (msw_skip != CODE_FOR_nothing)
- + (lsw_taken != CODE_FOR_nothing));
+ num_branches = ((msw_taken != UNKNOWN)
+ + (msw_skip != UNKNOWN)
+ + (lsw_taken != UNKNOWN));
if (comparison != EQ && comparison != NE && num_branches > 1)
{
if (!CONSTANT_P (operands[2])
@@ -1634,20 +1639,20 @@ expand_cbranchdi4 (rtx *operands, enum rtx_code comparison)
operands[4] = NULL_RTX;
if (reload_completed
&& ! arith_reg_or_0_operand (op2h, SImode) && true_regnum (op1h)
- && (msw_taken != CODE_FOR_nothing || msw_skip != CODE_FOR_nothing))
+ && (msw_taken != UNKNOWN || msw_skip != UNKNOWN))
{
emit_move_insn (scratch, operands[2]);
operands[2] = scratch;
}
- if (msw_taken != CODE_FOR_nothing)
+ if (msw_taken != UNKNOWN)
expand_cbranchsi4 (operands, msw_taken, msw_taken_prob);
- if (msw_skip != CODE_FOR_nothing)
+ if (msw_skip != UNKNOWN)
{
rtx taken_label = operands[3];
/* Operands were possibly modified, but msw_skip doesn't expect this.
Always use the original ones. */
- if (msw_taken != CODE_FOR_nothing)
+ if (msw_taken != UNKNOWN)
{
operands[1] = op1h;
operands[2] = op2h;
@@ -1659,14 +1664,14 @@ expand_cbranchdi4 (rtx *operands, enum rtx_code comparison)
}
operands[1] = op1l;
operands[2] = op2l;
- if (lsw_taken != CODE_FOR_nothing)
+ if (lsw_taken != UNKNOWN)
{
if (reload_completed
&& ! arith_reg_or_0_operand (op2l, SImode) && true_regnum (op1l))
operands[4] = scratch;
expand_cbranchsi4 (operands, lsw_taken, lsw_taken_prob);
}
- if (msw_skip != CODE_FOR_nothing)
+ if (msw_skip != UNKNOWN)
emit_label (skip_label);
return true;
}
@@ -1763,7 +1768,7 @@ from_compare (rtx *operands, int code)
else
insn = gen_rtx_SET (VOIDmode,
gen_rtx_REG (SImode, T_REG),
- gen_rtx_fmt_ee (code, SImode,
+ gen_rtx_fmt_ee ((enum rtx_code) code, SImode,
sh_compare_op0, sh_compare_op1));
if ((TARGET_SH4 || TARGET_SH2A) && GET_MODE_CLASS (mode) == MODE_FLOAT)
{
@@ -5122,7 +5127,7 @@ sh_reorg (void)
/* If we are not optimizing, then there may not be
a note. */
if (note)
- PUT_MODE (note, REG_INC);
+ PUT_REG_NOTE_KIND (note, REG_INC);
*last_float_addr = r0_inc_rtx;
}
@@ -5702,7 +5707,7 @@ output_stack_adjust (int size, rtx reg, int epilogue_p,
}
if (! epilogue_p)
REG_NOTES (insn)
- = (gen_rtx_EXPR_LIST
+ = (alloc_reg_note
(REG_FRAME_RELATED_EXPR,
gen_rtx_SET (VOIDmode, reg,
gen_rtx_PLUS (SImode, reg, GEN_INT (size))),
@@ -5743,8 +5748,7 @@ push (int rn)
x = frame_insn (x);
REG_NOTES (x)
- = gen_rtx_EXPR_LIST (REG_INC,
- gen_rtx_REG (SImode, STACK_POINTER_REGNUM), 0);
+ = alloc_reg_note (REG_INC, gen_rtx_REG (SImode, STACK_POINTER_REGNUM), 0);
return x;
}
@@ -5772,8 +5776,7 @@ pop (int rn)
x = emit_insn (x);
REG_NOTES (x)
- = gen_rtx_EXPR_LIST (REG_INC,
- gen_rtx_REG (SImode, STACK_POINTER_REGNUM), 0);
+ = alloc_reg_note (REG_INC, gen_rtx_REG (SImode, STACK_POINTER_REGNUM), 0);
}
/* Generate code to push the regs specified in the mask. */
@@ -5936,7 +5939,7 @@ calc_live_regs (HARD_REG_SET *live_regs_mask)
/* Force PR to be live if the prologue has to call the SHmedia
argument decoder or register saver. */
if (TARGET_SHCOMPACT
- && ((crtl->args.info.call_cookie
+ && ((INCOMING_ARGS_INFO (crtl->args).call_cookie
& ~ CALL_COOKIE_RET_TRAMP (1))
|| crtl->saves_all_registers))
pr_live = 1;
@@ -5963,7 +5966,7 @@ calc_live_regs (HARD_REG_SET *live_regs_mask)
: (/* Only push those regs which are used and need to be saved. */
(TARGET_SHCOMPACT
&& flag_pic
- && crtl->args.info.call_cookie
+ && INCOMING_ARGS_INFO (crtl->args).call_cookie
&& reg == PIC_OFFSET_TABLE_REGNUM)
|| (df_regs_ever_live_p (reg)
&& ((!call_really_used_regs[reg]
@@ -6085,8 +6088,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
@@ -6216,13 +6219,14 @@ sh_expand_prologue (void)
pretend_args = crtl->args.pretend_args_size;
if (TARGET_VARARGS_PRETEND_ARGS (current_function_decl)
&& (NPARM_REGS(SImode)
- > crtl->args.info.arg_count[(int) SH_ARG_INT]))
+ > INCOMING_ARGS_INFO (crtl->args).arg_count[(int) SH_ARG_INT]))
pretend_args = 0;
output_stack_adjust (-pretend_args
- - crtl->args.info.stack_regs * 8,
+ - INCOMING_ARGS_INFO (crtl->args).stack_regs * 8,
stack_pointer_rtx, 0, NULL);
- if (TARGET_SHCOMPACT && flag_pic && crtl->args.info.call_cookie)
+ if (TARGET_SHCOMPACT && flag_pic
+ && INCOMING_ARGS_INFO (crtl->args).call_cookie)
/* We're going to use the PIC register to load the address of the
incoming-argument decoder and/or of the return trampoline from
the GOT, so make sure the PIC register is preserved and
@@ -6230,7 +6234,8 @@ sh_expand_prologue (void)
df_set_regs_ever_live (PIC_OFFSET_TABLE_REGNUM, true);
if (TARGET_SHCOMPACT
- && (crtl->args.info.call_cookie & ~ CALL_COOKIE_RET_TRAMP(1)))
+ && (INCOMING_ARGS_INFO (crtl->args).call_cookie
+ & ~ CALL_COOKIE_RET_TRAMP(1)))
{
int reg;
@@ -6238,20 +6243,20 @@ sh_expand_prologue (void)
be pushed onto the stack live, so that register renaming
doesn't overwrite them. */
for (reg = 0; reg < NPARM_REGS (SImode); reg++)
- if (CALL_COOKIE_STACKSEQ_GET (crtl->args.info.call_cookie)
+ if (CALL_COOKIE_STACKSEQ_GET (INCOMING_ARGS_INFO (crtl->args).call_cookie)
>= NPARM_REGS (SImode) - reg)
for (; reg < NPARM_REGS (SImode); reg++)
emit_insn (gen_shcompact_preserve_incoming_args
(gen_rtx_REG (SImode, FIRST_PARM_REG + reg)));
else if (CALL_COOKIE_INT_REG_GET
- (crtl->args.info.call_cookie, reg) == 1)
+ (INCOMING_ARGS_INFO (crtl->args).call_cookie, reg) == 1)
emit_insn (gen_shcompact_preserve_incoming_args
(gen_rtx_REG (SImode, FIRST_PARM_REG + reg)));
emit_move_insn (gen_rtx_REG (Pmode, MACL_REG),
stack_pointer_rtx);
emit_move_insn (gen_rtx_REG (SImode, R0_REG),
- GEN_INT (crtl->args.info.call_cookie));
+ GEN_INT (INCOMING_ARGS_INFO (crtl->args).call_cookie));
emit_move_insn (gen_rtx_REG (SImode, MACH_REG),
gen_rtx_REG (SImode, R0_REG));
}
@@ -6276,7 +6281,7 @@ sh_expand_prologue (void)
rtx insn;
if (i >= (NPARM_REGS(SImode)
- - crtl->args.info.arg_count[(int) SH_ARG_INT]
+ - INCOMING_ARGS_INFO (crtl->args).arg_count[(int) SH_ARG_INT]
))
break;
insn = push (rn);
@@ -6351,7 +6356,7 @@ sh_expand_prologue (void)
tmp_pnt = schedule.temps;
for (entry = &schedule.entries[1]; entry->mode != VOIDmode; entry++)
{
- enum machine_mode mode = entry->mode;
+ enum machine_mode mode = (enum machine_mode) entry->mode;
unsigned int reg = entry->reg;
rtx reg_rtx, mem_rtx, pre_dec = NULL_RTX;
rtx orig_reg_rtx;
@@ -6481,8 +6486,8 @@ sh_expand_prologue (void)
rtx set, note_rtx;
set = gen_rtx_SET (VOIDmode, mem_rtx, orig_reg_rtx);
- note_rtx = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, set,
- REG_NOTES (insn));
+ note_rtx = alloc_reg_note (REG_FRAME_RELATED_EXPR, set,
+ REG_NOTES (insn));
REG_NOTES (insn) = note_rtx;
}
@@ -6496,8 +6501,8 @@ sh_expand_prologue (void)
GEN_INT (offset)));
set = gen_rtx_SET (VOIDmode, mem_rtx, reg_rtx);
- note_rtx = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, set,
- REG_NOTES (insn));
+ note_rtx = alloc_reg_note (REG_FRAME_RELATED_EXPR, set,
+ REG_NOTES (insn));
REG_NOTES (insn) = note_rtx;
}
}
@@ -6535,7 +6540,8 @@ sh_expand_prologue (void)
frame_insn (GEN_MOV (hard_frame_pointer_rtx, stack_pointer_rtx));
if (TARGET_SHCOMPACT
- && (crtl->args.info.call_cookie & ~ CALL_COOKIE_RET_TRAMP(1)))
+ && (INCOMING_ARGS_INFO (crtl->args).call_cookie
+ & ~ CALL_COOKIE_RET_TRAMP(1)))
{
/* This must NOT go through the PLT, otherwise mach and macl
may be clobbered. */
@@ -6645,7 +6651,7 @@ sh_expand_epilogue (bool sibcall_p)
tmp_pnt = schedule.temps;
for (; entry->mode != VOIDmode; entry--)
{
- enum machine_mode mode = entry->mode;
+ enum machine_mode mode = (enum machine_mode) entry->mode;
int reg = entry->reg;
rtx reg_rtx, mem_rtx, post_inc = NULL_RTX, insn;
@@ -6806,7 +6812,7 @@ sh_expand_epilogue (bool sibcall_p)
output_stack_adjust (crtl->args.pretend_args_size
+ save_size + d_rounding
- + crtl->args.info.stack_regs * 8,
+ + INCOMING_ARGS_INFO (crtl->args).stack_regs * 8,
stack_pointer_rtx, e, NULL);
if (crtl->calls_eh_return)
@@ -6923,11 +6929,13 @@ static rtx
sh_builtin_saveregs (void)
{
/* First unnamed integer register. */
- int first_intreg = crtl->args.info.arg_count[(int) SH_ARG_INT];
+ int first_intreg
+ = INCOMING_ARGS_INFO (crtl->args).arg_count[(int) SH_ARG_INT];
/* Number of integer registers we need to save. */
int n_intregs = MAX (0, NPARM_REGS (SImode) - first_intreg);
/* First unnamed SFmode float reg */
- int first_floatreg = crtl->args.info.arg_count[(int) SH_ARG_FLOAT];
+ int first_floatreg
+ = INCOMING_ARGS_INFO (crtl->args).arg_count[(int) SH_ARG_FLOAT];
/* Number of SFmode float regs to save. */
int n_floatregs = MAX (0, NPARM_REGS (SFmode) - first_floatreg);
rtx regbuf, fpregs;
@@ -6942,22 +6950,22 @@ sh_builtin_saveregs (void)
while (pushregs < NPARM_REGS (SImode) - 1
&& (CALL_COOKIE_INT_REG_GET
- (crtl->args.info.call_cookie,
+ (INCOMING_ARGS_INFO (crtl->args).call_cookie,
NPARM_REGS (SImode) - pushregs)
== 1))
{
- crtl->args.info.call_cookie
+ INCOMING_ARGS_INFO (crtl->args).call_cookie
&= ~ CALL_COOKIE_INT_REG (NPARM_REGS (SImode)
- pushregs, 1);
pushregs++;
}
if (pushregs == NPARM_REGS (SImode))
- crtl->args.info.call_cookie
+ INCOMING_ARGS_INFO (crtl->args).call_cookie
|= (CALL_COOKIE_INT_REG (0, 1)
| CALL_COOKIE_STACKSEQ (pushregs - 1));
else
- crtl->args.info.call_cookie
+ INCOMING_ARGS_INFO (crtl->args).call_cookie
|= CALL_COOKIE_STACKSEQ (pushregs);
crtl->args.pretend_args_size += 8 * n_intregs;
@@ -7158,7 +7166,7 @@ sh_va_start (tree valist, rtx nextarg)
TREE_SIDE_EFFECTS (t) = 1;
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
- nfp = crtl->args.info.arg_count[SH_ARG_FLOAT];
+ nfp = INCOMING_ARGS_INFO (crtl->args).arg_count[SH_ARG_FLOAT];
if (nfp < 8)
nfp = 8 - nfp;
else
@@ -7173,7 +7181,7 @@ sh_va_start (tree valist, rtx nextarg)
TREE_SIDE_EFFECTS (t) = 1;
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
- nint = crtl->args.info.arg_count[SH_ARG_INT];
+ nint = INCOMING_ARGS_INFO (crtl->args).arg_count[SH_ARG_INT];
if (nint < 4)
nint = 4 - nint;
else
@@ -7881,11 +7889,11 @@ initial_elimination_offset (int from, int to)
if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
return total_saved_regs_space + total_auto_space
- + crtl->args.info.byref_regs * 8;
+ + INCOMING_ARGS_INFO (crtl->args).byref_regs * 8;
if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM)
return total_saved_regs_space + total_auto_space
- + crtl->args.info.byref_regs * 8;
+ + INCOMING_ARGS_INFO (crtl->args).byref_regs * 8;
/* Initial gap between fp and sp is 0. */
if (from == HARD_FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM)
@@ -8697,7 +8705,7 @@ get_free_reg (HARD_REG_SET regs_live)
void
fpscr_set_from_mem (int mode, HARD_REG_SET regs_live)
{
- enum attr_fp_mode fp_mode = mode;
+ enum attr_fp_mode fp_mode = (enum attr_fp_mode) mode;
enum attr_fp_mode norm_mode = ACTUAL_NORMAL_MODE (FP_MODE);
rtx addr_reg;
@@ -8728,7 +8736,7 @@ sh_insn_length_adjustment (rtx insn)
/* SH2e has a bug that prevents the use of annulled branches, so if
the delay slot is not filled, we'll have to put a NOP in it. */
- if (sh_cpu == CPU_SH2E
+ if (sh_cpu == PROCESSOR_SH2E
&& GET_CODE (insn) == JUMP_INSN
&& GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC
&& GET_CODE (PATTERN (insn)) != ADDR_VEC
@@ -9231,7 +9239,7 @@ sh_allocate_initial_value (rtx hard_reg)
if (current_function_is_leaf
&& ! sh_pr_n_sets ()
&& ! (TARGET_SHCOMPACT
- && ((crtl->args.info.call_cookie
+ && ((INCOMING_ARGS_INFO (crtl->args).call_cookie
& ~ CALL_COOKIE_RET_TRAMP (1))
|| crtl->saves_all_registers)))
x = hard_reg;
@@ -9813,7 +9821,7 @@ sh_initialize_trampoline (rtx tramp, rtx fnaddr, rtx cxt)
|| (!(TARGET_SH4A_ARCH || TARGET_SH4_300) && TARGET_USERMODE))
emit_library_call (function_symbol (NULL, "__ic_invalidate",
FUNCTION_ORDINARY),
- 0, VOIDmode, 1, tramp, SImode);
+ LCT_NORMAL, VOIDmode, 1, tramp, SImode);
else
emit_insn (gen_ic_invalidate_line (tramp));
}
@@ -9830,7 +9838,7 @@ sh_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED)
{
return (1
&& (! TARGET_SHCOMPACT
- || crtl->args.info.stack_regs == 0)
+ || INCOMING_ARGS_INFO (crtl->args).stack_regs == 0)
&& ! sh_cfun_interrupt_handler_p ()
&& (! flag_pic
|| (decl && ! TREE_PUBLIC (decl))
@@ -10150,7 +10158,7 @@ sh_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
argmode = TYPE_MODE (TREE_TYPE (arg));
if (argmode != opmode)
arg = build1 (NOP_EXPR, optype, arg);
- op[nop] = expand_expr (arg, NULL_RTX, opmode, 0);
+ op[nop] = expand_expr (arg, NULL_RTX, opmode, EXPAND_NORMAL);
if (! (*insn_data[icode].operand[nop].predicate) (op[nop], opmode))
op[nop] = copy_to_mode_reg (opmode, op[nop]);
}
@@ -10729,7 +10737,7 @@ sh_get_pr_initial_val (void)
PR register on SHcompact, because it might be clobbered by the prologue.
We check first if that is known to be the case. */
if (TARGET_SHCOMPACT
- && ((crtl->args.info.call_cookie
+ && ((INCOMING_ARGS_INFO (crtl->args).call_cookie
& ~ CALL_COOKIE_RET_TRAMP (1))
|| crtl->saves_all_registers))
return gen_frame_mem (SImode, return_address_pointer_rtx);
@@ -11232,8 +11240,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)
@@ -11336,4 +11344,239 @@ sh_secondary_reload (bool in_p, rtx x, enum reg_class rclass,
enum sh_divide_strategy_e sh_div_strategy = SH_DIV_STRATEGY_DEFAULT;
+static bool
+sh_override_options (bool main_target)
+{
+ int regno;
+
+ SUBTARGET_OVERRIDE_OPTIONS;
+ 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;
+ assembler_dialect = 0;
+ if (TARGET_SH2)
+ sh_cpu = PROCESSOR_SH2;
+ if (TARGET_SH2E)
+ sh_cpu = PROCESSOR_SH2E;
+ if (TARGET_SH2A)
+ {
+ sh_cpu = PROCESSOR_SH2A;
+ if (TARGET_SH2A_DOUBLE)
+ target_flags |= MASK_FMOVD;
+ }
+ if (TARGET_SH3)
+ sh_cpu = PROCESSOR_SH3;
+ if (TARGET_SH3E)
+ sh_cpu = PROCESSOR_SH3E;
+ if (TARGET_SH4)
+ {
+ assembler_dialect = 1;
+ sh_cpu = PROCESSOR_SH4;
+ }
+ if (TARGET_SH4A_ARCH)
+ {
+ assembler_dialect = 1;
+ sh_cpu = PROCESSOR_SH4A;
+ }
+ if (TARGET_SH5)
+ {
+ sh_cpu = PROCESSOR_SH5;
+ target_flags |= MASK_ALIGN_DOUBLE;
+ if (TARGET_SHMEDIA_FPU)
+ target_flags |= MASK_FMOVD;
+ if (TARGET_SHMEDIA)
+ {
+ /* There are no delay slots on SHmedia. */
+ flag_delayed_branch = 0;
+ /* Relaxation isn't yet supported for SHmedia */
+ target_flags &= ~MASK_RELAX;
+ /* After reload, if conversion does little good but can cause
+ ICEs:
+ - find_if_block doesn't do anything for SH because we don't
+ have conditional execution patterns. (We use conditional
+ move patterns, which are handled differently, and only
+ before reload).
+ - find_cond_trap doesn't do anything for the SH because we \
+ don't have conditional traps.
+ - find_if_case_1 uses redirect_edge_and_branch_force in
+ the only path that does an optimization, and this causes
+ an ICE when branch targets are in registers.
+ - find_if_case_2 doesn't do anything for the SHmedia after
+ reload except when it can redirect a tablejump - and
+ that's rather rare. */
+ flag_if_conversion2 = 0;
+ if (! strcmp (sh_div_str, "call"))
+ sh_div_strategy = SH_DIV_CALL;
+ else if (! strcmp (sh_div_str, "call2"))
+ sh_div_strategy = SH_DIV_CALL2;
+ if (! strcmp (sh_div_str, "fp") && TARGET_FPU_ANY)
+ sh_div_strategy = SH_DIV_FP;
+ else if (! strcmp (sh_div_str, "inv"))
+ sh_div_strategy = SH_DIV_INV;
+ else if (! strcmp (sh_div_str, "inv:minlat"))
+ sh_div_strategy = SH_DIV_INV_MINLAT;
+ else if (! strcmp (sh_div_str, "inv20u"))
+ sh_div_strategy = SH_DIV_INV20U;
+ else if (! strcmp (sh_div_str, "inv20l"))
+ sh_div_strategy = SH_DIV_INV20L;
+ else if (! strcmp (sh_div_str, "inv:call2"))
+ sh_div_strategy = SH_DIV_INV_CALL2;
+ else if (! strcmp (sh_div_str, "inv:call"))
+ sh_div_strategy = SH_DIV_INV_CALL;
+ else if (! strcmp (sh_div_str, "inv:fp"))
+ {
+ if (TARGET_FPU_ANY)
+ sh_div_strategy = SH_DIV_INV_FP;
+ else
+ sh_div_strategy = SH_DIV_INV;
+ }
+ TARGET_CBRANCHDI4 = 0;
+ /* Assembler CFI isn't yet fully supported for SHmedia. */
+ flag_dwarf2_cfi_asm = 0;
+ }
+ }
+ else
+ {
+ /* Only the sh64-elf assembler fully supports .quad properly. */
+ targetm.asm_out.aligned_op.di = NULL;
+ targetm.asm_out.unaligned_op.di = NULL;
+ }
+ if (TARGET_SH1)
+ {
+ if (! strcmp (sh_div_str, "call-div1"))
+ sh_div_strategy = SH_DIV_CALL_DIV1;
+ else if (! strcmp (sh_div_str, "call-fp")
+ && (TARGET_FPU_DOUBLE
+ || (TARGET_HARD_SH4 && TARGET_SH2E)
+ || (TARGET_SHCOMPACT && TARGET_FPU_ANY)))
+ sh_div_strategy = SH_DIV_CALL_FP;
+ else if (! strcmp (sh_div_str, "call-table") && TARGET_SH2)
+ sh_div_strategy = SH_DIV_CALL_TABLE;
+ else
+ /* Pick one that makes most sense for the target in general.
+ It is not much good to use different functions depending
+ on -Os, since then we'll end up with two different functions
+ when some of the code is compiled for size, and some for
+ speed. */
+
+ /* SH4 tends to emphasize speed. */
+ if (TARGET_HARD_SH4)
+ sh_div_strategy = SH_DIV_CALL_TABLE;
+ /* These have their own way of doing things. */
+ else if (TARGET_SH2A)
+ sh_div_strategy = SH_DIV_INTRINSIC;
+ /* ??? Should we use the integer SHmedia function instead? */
+ else if (TARGET_SHCOMPACT && TARGET_FPU_ANY)
+ sh_div_strategy = SH_DIV_CALL_FP;
+ /* SH1 .. SH3 cores often go into small-footprint systems, so
+ default to the smallest implementation available. */
+ else if (TARGET_SH2) /* ??? EXPERIMENTAL */
+ sh_div_strategy = SH_DIV_CALL_TABLE;
+ else
+ sh_div_strategy = SH_DIV_CALL_DIV1;
+ }
+ if (!TARGET_SH1)
+ TARGET_PRETEND_CMOVE = 0;
+ if (sh_divsi3_libfunc[0])
+ ; /* User supplied - leave it alone. */
+ else if (TARGET_DIVIDE_CALL_FP)
+ sh_divsi3_libfunc = "__sdivsi3_i4";
+ else if (TARGET_DIVIDE_CALL_TABLE)
+ sh_divsi3_libfunc = "__sdivsi3_i4i";
+ else if (TARGET_SH5)
+ sh_divsi3_libfunc = "__sdivsi3_1";
+ else
+ sh_divsi3_libfunc = "__sdivsi3";
+ if (sh_branch_cost == -1)
+ sh_branch_cost
+ = TARGET_SH5 ? 1 : ! TARGET_SH2 || TARGET_HARD_SH4 ? 2 : 1;
+
+ for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
+ if (! VALID_REGISTER_P (regno))
+ sh_register_names[regno][0] = '\0';
+
+ for (regno = 0; regno < ADDREGNAMES_SIZE; regno++)
+ if (! VALID_REGISTER_P (ADDREGNAMES_REGNO (regno)))
+ sh_additional_register_names[regno][0] = '\0';
+
+ if (flag_omit_frame_pointer == 2)
+ {
+ /* The debugging information is sufficient,
+ but gdb doesn't implement this yet */
+ if (0)
+ flag_omit_frame_pointer
+ = (PREFERRED_DEBUGGING_TYPE == DWARF2_DEBUG);
+ else
+ flag_omit_frame_pointer = 0;
+ }
+
+ if ((flag_pic && ! TARGET_PREFERGOT)
+ || (TARGET_SHMEDIA && !TARGET_PT_FIXED))
+ flag_no_function_cse = 1;
+
+ if (SMALL_REGISTER_CLASSES)
+ {
+ /* Never run scheduling before reload, since that can
+ break global alloc, and generates slower code anyway due
+ to the pressure on R0. */
+ /* Enable sched1 for SH4; ready queue will be reordered by
+ the target hooks when pressure is high. We can not do this for
+ PIC, SH3 and lower as they give spill failures for R0. */
+ if (!TARGET_HARD_SH4 || flag_pic)
+ flag_schedule_insns = 0;
+ /* ??? Current exception handling places basic block boundaries
+ after call_insns. It causes the high pressure on R0 and gives
+ spill failures for R0 in reload. See PR 22553 and the thread
+ on gcc-patches
+ <http://gcc.gnu.org/ml/gcc-patches/2005-10/msg00816.html>. */
+ else if (flag_exceptions)
+ {
+ if (flag_schedule_insns == 1)
+ warning (0, "ignoring -fschedule-insns because of exception handling bug");
+ flag_schedule_insns = 0;
+ }
+ }
+
+ if (align_loops == 0)
+ align_loops = 1 << (TARGET_SH5 ? 3 : 2);
+ if (align_jumps == 0)
+ align_jumps = 1 << CACHE_LOG;
+ else if (align_jumps < (TARGET_SHMEDIA ? 4 : 2))
+ align_jumps = TARGET_SHMEDIA ? 4 : 2;
+
+ /* Allocation boundary (in *bytes*) for the code of a function.
+ SH1: 32 bit alignment is faster, because instructions are always
+ fetched as a pair from a longword boundary.
+ SH2 .. SH5 : align to cache line start. */
+ if (align_functions == 0)
+ align_functions
+ = TARGET_SMALLCODE ? FUNCTION_BOUNDARY/8 : (1 << CACHE_LOG);
+ /* The linker relaxation code breaks when a function contains
+ alignments that are larger than that at the start of a
+ compilation unit. */
+ if (TARGET_RELAX)
+ {
+ int min_align
+ = align_loops > align_jumps ? align_loops : align_jumps;
+
+ /* Also take possible .long constants / mova tables int account. */
+ if (min_align < 4)
+ min_align = 4;
+ if (align_functions < min_align)
+ align_functions = min_align;
+ }
+
+ if (sh_fixed_range_str)
+ sh_fix_range (sh_fixed_range_str);
+ return true;
+}
+
#include "gt-sh.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index 6a4ccb0f0e6..fb1c0f615d5 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);
@@ -534,234 +537,6 @@ extern enum sh_divide_strategy_e sh_div_strategy;
#define SUBTARGET_OVERRIDE_OPTIONS (void) 0
extern const char *sh_fixed_range_str;
-
-#define OVERRIDE_OPTIONS \
-do { \
- int regno; \
- \
- SUBTARGET_OVERRIDE_OPTIONS; \
- 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 = CPU_SH1; \
- assembler_dialect = 0; \
- if (TARGET_SH2) \
- sh_cpu = CPU_SH2; \
- if (TARGET_SH2E) \
- sh_cpu = CPU_SH2E; \
- if (TARGET_SH2A) \
- { \
- sh_cpu = CPU_SH2A; \
- if (TARGET_SH2A_DOUBLE) \
- target_flags |= MASK_FMOVD; \
- } \
- if (TARGET_SH3) \
- sh_cpu = CPU_SH3; \
- if (TARGET_SH3E) \
- sh_cpu = CPU_SH3E; \
- if (TARGET_SH4) \
- { \
- assembler_dialect = 1; \
- sh_cpu = CPU_SH4; \
- } \
- if (TARGET_SH4A_ARCH) \
- { \
- assembler_dialect = 1; \
- sh_cpu = CPU_SH4A; \
- } \
- if (TARGET_SH5) \
- { \
- sh_cpu = CPU_SH5; \
- target_flags |= MASK_ALIGN_DOUBLE; \
- if (TARGET_SHMEDIA_FPU) \
- target_flags |= MASK_FMOVD; \
- if (TARGET_SHMEDIA) \
- { \
- /* There are no delay slots on SHmedia. */ \
- flag_delayed_branch = 0; \
- /* Relaxation isn't yet supported for SHmedia */ \
- target_flags &= ~MASK_RELAX; \
- /* After reload, if conversion does little good but can cause \
- ICEs: \
- - find_if_block doesn't do anything for SH because we don't\
- have conditional execution patterns. (We use conditional\
- move patterns, which are handled differently, and only \
- before reload). \
- - find_cond_trap doesn't do anything for the SH because we \
- don't have conditional traps. \
- - find_if_case_1 uses redirect_edge_and_branch_force in \
- the only path that does an optimization, and this causes \
- an ICE when branch targets are in registers. \
- - find_if_case_2 doesn't do anything for the SHmedia after \
- reload except when it can redirect a tablejump - and \
- that's rather rare. */ \
- flag_if_conversion2 = 0; \
- if (! strcmp (sh_div_str, "call")) \
- sh_div_strategy = SH_DIV_CALL; \
- else if (! strcmp (sh_div_str, "call2")) \
- sh_div_strategy = SH_DIV_CALL2; \
- if (! strcmp (sh_div_str, "fp") && TARGET_FPU_ANY) \
- sh_div_strategy = SH_DIV_FP; \
- else if (! strcmp (sh_div_str, "inv")) \
- sh_div_strategy = SH_DIV_INV; \
- else if (! strcmp (sh_div_str, "inv:minlat")) \
- sh_div_strategy = SH_DIV_INV_MINLAT; \
- else if (! strcmp (sh_div_str, "inv20u")) \
- sh_div_strategy = SH_DIV_INV20U; \
- else if (! strcmp (sh_div_str, "inv20l")) \
- sh_div_strategy = SH_DIV_INV20L; \
- else if (! strcmp (sh_div_str, "inv:call2")) \
- sh_div_strategy = SH_DIV_INV_CALL2; \
- else if (! strcmp (sh_div_str, "inv:call")) \
- sh_div_strategy = SH_DIV_INV_CALL; \
- else if (! strcmp (sh_div_str, "inv:fp")) \
- { \
- if (TARGET_FPU_ANY) \
- sh_div_strategy = SH_DIV_INV_FP; \
- else \
- sh_div_strategy = SH_DIV_INV; \
- } \
- TARGET_CBRANCHDI4 = 0; \
- /* Assembler CFI isn't yet fully supported for SHmedia. */ \
- flag_dwarf2_cfi_asm = 0; \
- } \
- } \
- else \
- { \
- /* Only the sh64-elf assembler fully supports .quad properly. */\
- targetm.asm_out.aligned_op.di = NULL; \
- targetm.asm_out.unaligned_op.di = NULL; \
- } \
- if (TARGET_SH1) \
- { \
- if (! strcmp (sh_div_str, "call-div1")) \
- sh_div_strategy = SH_DIV_CALL_DIV1; \
- else if (! strcmp (sh_div_str, "call-fp") \
- && (TARGET_FPU_DOUBLE \
- || (TARGET_HARD_SH4 && TARGET_SH2E) \
- || (TARGET_SHCOMPACT && TARGET_FPU_ANY))) \
- sh_div_strategy = SH_DIV_CALL_FP; \
- else if (! strcmp (sh_div_str, "call-table") && TARGET_SH2) \
- sh_div_strategy = SH_DIV_CALL_TABLE; \
- else \
- /* Pick one that makes most sense for the target in general. \
- It is not much good to use different functions depending \
- on -Os, since then we'll end up with two different functions \
- when some of the code is compiled for size, and some for \
- speed. */ \
- \
- /* SH4 tends to emphasize speed. */ \
- if (TARGET_HARD_SH4) \
- sh_div_strategy = SH_DIV_CALL_TABLE; \
- /* These have their own way of doing things. */ \
- else if (TARGET_SH2A) \
- sh_div_strategy = SH_DIV_INTRINSIC; \
- /* ??? Should we use the integer SHmedia function instead? */ \
- else if (TARGET_SHCOMPACT && TARGET_FPU_ANY) \
- sh_div_strategy = SH_DIV_CALL_FP; \
- /* SH1 .. SH3 cores often go into small-footprint systems, so \
- default to the smallest implementation available. */ \
- else if (TARGET_SH2) /* ??? EXPERIMENTAL */ \
- sh_div_strategy = SH_DIV_CALL_TABLE; \
- else \
- sh_div_strategy = SH_DIV_CALL_DIV1; \
- } \
- if (!TARGET_SH1) \
- TARGET_PRETEND_CMOVE = 0; \
- if (sh_divsi3_libfunc[0]) \
- ; /* User supplied - leave it alone. */ \
- else if (TARGET_DIVIDE_CALL_FP) \
- sh_divsi3_libfunc = "__sdivsi3_i4"; \
- else if (TARGET_DIVIDE_CALL_TABLE) \
- sh_divsi3_libfunc = "__sdivsi3_i4i"; \
- else if (TARGET_SH5) \
- sh_divsi3_libfunc = "__sdivsi3_1"; \
- else \
- sh_divsi3_libfunc = "__sdivsi3"; \
- if (sh_branch_cost == -1) \
- sh_branch_cost \
- = TARGET_SH5 ? 1 : ! TARGET_SH2 || TARGET_HARD_SH4 ? 2 : 1; \
- \
- for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) \
- if (! VALID_REGISTER_P (regno)) \
- sh_register_names[regno][0] = '\0'; \
- \
- for (regno = 0; regno < ADDREGNAMES_SIZE; regno++) \
- if (! VALID_REGISTER_P (ADDREGNAMES_REGNO (regno))) \
- sh_additional_register_names[regno][0] = '\0'; \
- \
- if (flag_omit_frame_pointer == 2) \
- { \
- /* The debugging information is sufficient, \
- but gdb doesn't implement this yet */ \
- if (0) \
- flag_omit_frame_pointer \
- = (PREFERRED_DEBUGGING_TYPE == DWARF2_DEBUG); \
- else \
- flag_omit_frame_pointer = 0; \
- } \
- \
- if ((flag_pic && ! TARGET_PREFERGOT) \
- || (TARGET_SHMEDIA && !TARGET_PT_FIXED)) \
- flag_no_function_cse = 1; \
- \
- if (SMALL_REGISTER_CLASSES) \
- { \
- /* Never run scheduling before reload, since that can \
- break global alloc, and generates slower code anyway due \
- to the pressure on R0. */ \
- /* Enable sched1 for SH4; ready queue will be reordered by \
- the target hooks when pressure is high. We can not do this for \
- PIC, SH3 and lower as they give spill failures for R0. */ \
- if (!TARGET_HARD_SH4 || flag_pic) \
- flag_schedule_insns = 0; \
- /* ??? Current exception handling places basic block boundaries \
- after call_insns. It causes the high pressure on R0 and gives \
- spill failures for R0 in reload. See PR 22553 and the thread \
- on gcc-patches \
- <http://gcc.gnu.org/ml/gcc-patches/2005-10/msg00816.html>. */ \
- else if (flag_exceptions) \
- { \
- if (flag_schedule_insns == 1) \
- warning (0, "ignoring -fschedule-insns because of exception handling bug"); \
- flag_schedule_insns = 0; \
- } \
- } \
- \
- if (align_loops == 0) \
- align_loops = 1 << (TARGET_SH5 ? 3 : 2); \
- if (align_jumps == 0) \
- align_jumps = 1 << CACHE_LOG; \
- else if (align_jumps < (TARGET_SHMEDIA ? 4 : 2)) \
- align_jumps = TARGET_SHMEDIA ? 4 : 2; \
- \
- /* Allocation boundary (in *bytes*) for the code of a function. \
- SH1: 32 bit alignment is faster, because instructions are always \
- fetched as a pair from a longword boundary. \
- SH2 .. SH5 : align to cache line start. */ \
- if (align_functions == 0) \
- align_functions \
- = TARGET_SMALLCODE ? FUNCTION_BOUNDARY/8 : (1 << CACHE_LOG); \
- /* The linker relaxation code breaks when a function contains \
- alignments that are larger than that at the start of a \
- compilation unit. */ \
- if (TARGET_RELAX) \
- { \
- int min_align \
- = align_loops > align_jumps ? align_loops : align_jumps; \
- \
- /* Also take possible .long constants / mova tables int account. */\
- if (min_align < 4) \
- min_align = 4; \
- if (align_functions < min_align) \
- align_functions = min_align; \
- } \
- \
- if (sh_fixed_range_str) \
- sh_fix_range (sh_fixed_range_str); \
-} while (0)
/* Target machine storage layout. */
@@ -1780,6 +1555,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;
@@ -1869,6 +1645,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)
@@ -3145,6 +2922,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. */
@@ -3316,4 +3106,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/config/sh/sh.md b/gcc/config/sh/sh.md
index f494493fd63..91271d94a96 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -181,6 +181,7 @@
;; Target CPU.
+; keep this in sync with enum processor_type in sh.h
(define_attr "cpu"
"sh1,sh2,sh2e,sh2a,sh3,sh3e,sh4,sh4a,sh5"
(const (symbol_ref "sh_cpu_attr")))
@@ -647,7 +648,7 @@
(pc)))
(clobber (reg:SI T_REG))]
"TARGET_CBRANCHDI4"
- "expand_cbranchsi4 (operands, CODE_FOR_nothing, -1); DONE;")
+ "expand_cbranchsi4 (operands, UNKNOWN, -1); DONE;")
;; -------------------------------------------------------------------------
;; SImode unsigned integer comparisons
@@ -720,13 +721,13 @@
if (TARGET_EXPAND_CBRANCHDI4)
{
- if (expand_cbranchdi4 (operands, CODE_FOR_nothing))
+ if (expand_cbranchdi4 (operands, UNKNOWN))
DONE;
}
- comparison = prepare_cbranch_operands (operands, DImode, CODE_FOR_nothing);
+ comparison = prepare_cbranch_operands (operands, DImode, UNKNOWN);
if (comparison != GET_CODE (operands[0]))
operands[0]
- = gen_rtx_fmt_ee (VOIDmode, comparison, operands[1], operands[2]);
+ = gen_rtx_fmt_ee (comparison, VOIDmode, operands[1], operands[2]);
operands[4] = gen_rtx_SCRATCH (SImode);
}")
@@ -4915,7 +4916,7 @@ label:
gen_rtx_PRE_DEC (Pmode,
stack_pointer_rtx)),
get_fpscr_rtx ()));
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_INC, stack_pointer_rtx, NULL_RTX);
+ REG_NOTES (insn) = alloc_reg_note (REG_INC, stack_pointer_rtx, NULL_RTX);
DONE;
}")
@@ -4928,7 +4929,7 @@ label:
gen_frame_mem (PSImode,
gen_rtx_POST_INC (Pmode,
stack_pointer_rtx))));
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_INC, stack_pointer_rtx, NULL_RTX);
+ REG_NOTES (insn) = alloc_reg_note (REG_INC, stack_pointer_rtx, NULL_RTX);
DONE;
}")
@@ -5959,7 +5960,7 @@ label:
gen_rtx_PRE_DEC (Pmode, stack_pointer_rtx));
insn = emit_insn (gen_movdf_i4 (tos, operands[1], operands[2]));
if (! (TARGET_SH5 && true_regnum (operands[1]) < 16))
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_INC, stack_pointer_rtx, NULL_RTX);
+ REG_NOTES (insn) = alloc_reg_note (REG_INC, stack_pointer_rtx, NULL_RTX);
if (TARGET_SH5 && true_regnum (operands[0]) < 16)
tos = gen_tmp_stack_mem (DFmode, stack_pointer_rtx);
else
@@ -5969,7 +5970,7 @@ label:
if (TARGET_SH5 && true_regnum (operands[0]) < 16)
emit_move_insn (stack_pointer_rtx, plus_constant (stack_pointer_rtx, 8));
else
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_INC, stack_pointer_rtx, NULL_RTX);
+ REG_NOTES (insn) = alloc_reg_note (REG_INC, stack_pointer_rtx, NULL_RTX);
DONE;
}")
@@ -6126,7 +6127,7 @@ label:
insn = emit_insn (gen_movsf_ie (gen_rtx_REG (SFmode,
regno + !! TARGET_LITTLE_ENDIAN),
mem2, operands[2]));
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_INC, operands[1], NULL_RTX);
+ REG_NOTES (insn) = alloc_reg_note (REG_INC, operands[1], NULL_RTX);
insn = emit_insn (gen_movsf_ie (gen_rtx_REG (SFmode,
regno + ! TARGET_LITTLE_ENDIAN),
change_address (mem, SFmode, NULL_RTX),
@@ -6165,12 +6166,12 @@ label:
}
addr = XEXP (addr, 0);
insn = emit_insn (gen_movsf_ie (reg0, mem2, operands[2]));
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_INC, addr, NULL_RTX);
+ REG_NOTES (insn) = alloc_reg_note (REG_INC, addr, NULL_RTX);
insn = emit_insn (gen_movsf_ie (reg1, operands[1], operands[2]));
if (adjust)
emit_insn (adjust);
else
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_INC, addr, NULL_RTX);
+ REG_NOTES (insn) = alloc_reg_note (REG_INC, addr, NULL_RTX);
DONE;
}")
@@ -6203,12 +6204,12 @@ label:
}
addr = XEXP (addr, 0);
if (! adjust)
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_INC, addr, NULL_RTX);
+ REG_NOTES (insn) = alloc_reg_note (REG_INC, addr, NULL_RTX);
insn = emit_insn (gen_movsf_ie (operands[0],
gen_rtx_REG (SFmode,
regno + !! TARGET_LITTLE_ENDIAN),
operands[2]));
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_INC, addr, NULL_RTX);
+ REG_NOTES (insn) = alloc_reg_note (REG_INC, addr, NULL_RTX);
DONE;
}")
@@ -7382,12 +7383,15 @@ label:
(pc)))
(set (match_dup 0)
(plus:SI (match_dup 0) (const_int -1)))
- (clobber (reg:SI T_REG))])]
+ (clobber (reg:SI T_REG))])
+ (match_operand 5 "" "")]
"TARGET_SH2"
"
{
if (GET_MODE (operands[0]) != SImode)
FAIL;
+ emit_insn (gen_doloop_end_split (operands[0], operands[4]));
+ DONE;
}
")
@@ -9359,7 +9363,7 @@ mov.l\\t1f,r0\\n\\
}
if (TARGET_SHCOMPACT
- && (crtl->args.info.call_cookie & CALL_COOKIE_RET_TRAMP (1)))
+ && (INCOMING_ARGS_INFO (crtl->args).call_cookie & CALL_COOKIE_RET_TRAMP (1)))
{
emit_jump_insn (gen_shcompact_return_tramp ());
DONE;
@@ -9369,7 +9373,7 @@ mov.l\\t1f,r0\\n\\
(define_insn "*return_i"
[(return)]
"TARGET_SH1 && ! (TARGET_SHCOMPACT
- && (crtl->args.info.call_cookie
+ && (INCOMING_ARGS_INFO (crtl->args).call_cookie
& CALL_COOKIE_RET_TRAMP (1)))
&& reload_completed
&& lookup_attribute (\"trap_exit\",
@@ -9396,7 +9400,7 @@ mov.l\\t1f,r0\\n\\
(define_expand "shcompact_return_tramp"
[(return)]
"TARGET_SHCOMPACT
- && (crtl->args.info.call_cookie & CALL_COOKIE_RET_TRAMP (1))"
+ && (INCOMING_ARGS_INFO (crtl->args).call_cookie & CALL_COOKIE_RET_TRAMP (1))"
"
{
rtx reg = gen_rtx_REG (Pmode, R0_REG);
@@ -9409,7 +9413,7 @@ mov.l\\t1f,r0\\n\\
(define_insn "shcompact_return_tramp_i"
[(parallel [(return) (use (reg:SI R0_REG))])]
"TARGET_SHCOMPACT
- && (crtl->args.info.call_cookie & CALL_COOKIE_RET_TRAMP (1))"
+ && (INCOMING_ARGS_INFO (crtl->args).call_cookie & CALL_COOKIE_RET_TRAMP (1))"
"jmp @r0%#"
[(set_attr "type" "jump_ind")
(set_attr "needs_delay_slot" "yes")])
@@ -10486,7 +10490,7 @@ mov.l\\t1f,r0\\n\\
mem = replace_equiv_address (mem, gen_rtx_POST_INC (Pmode, operands[0]));
new_insn = emit_insn (gen_fpu_switch (fpscr, mem));
- REG_NOTES (new_insn) = gen_rtx_EXPR_LIST (REG_INC, operands[0], NULL_RTX);
+ REG_NOTES (new_insn) = alloc_reg_note (REG_INC, operands[0], NULL_RTX);
DONE;
})
@@ -10504,7 +10508,7 @@ mov.l\\t1f,r0\\n\\
mem = replace_equiv_address (mem, gen_rtx_POST_INC (Pmode, operands[0]));
new_insn = emit_insn (gen_fpu_switch (fpscr, mem));
- REG_NOTES (new_insn) = gen_rtx_EXPR_LIST (REG_INC, operands[0], NULL_RTX);
+ REG_NOTES (new_insn) = alloc_reg_note (REG_INC, operands[0], NULL_RTX);
if (!find_regno_note (curr_insn, REG_DEAD, true_regnum (operands[0])))
emit_insn (gen_addsi3 (operands[0], operands[0], GEN_INT (-4)));
diff --git a/gcc/config/sh/t-sh b/gcc/config/sh/t-sh
index 5f1e8fb0e98..9f92ab6aa29 100644
--- a/gcc/config/sh/t-sh
+++ b/gcc/config/sh/t-sh
@@ -71,7 +71,6 @@ $(T)crtn.o: $(srcdir)/config/sh/crtn.asm $(GCC_PASSES)
$(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/sh/crtn.asm
$(out_object_file): gt-sh.h
-gt-sh.h : s-gtype ; @true
# These are not suitable for COFF.
# EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o crtbegin.o crtend.o
diff --git a/gcc/config/spu/spu-c.c b/gcc/config/spu/spu-c.c
index 7db0bfb83ad..88715d0a8d4 100644
--- a/gcc/config/spu/spu-c.c
+++ b/gcc/config/spu/spu-c.c
@@ -20,7 +20,13 @@
#include "tm.h"
#include "cpplib.h"
#include "tree.h"
+#ifdef CC1PLUS
+#include "cp/cp-tree.h"
+#else /* !CC1PLUS */
#include "c-tree.h"
+#define same_type_p(TYPE1, TYPE2) \
+ comptypes ((TYPE1), (TYPE2))
+#endif /* !CC1PLUS */
#include "c-pragma.h"
#include "function.h"
#include "rtl.h"
@@ -102,7 +108,7 @@ spu_resolve_overloaded_builtin (tree fndecl, tree fnargs)
|| SCALAR_FLOAT_TYPE_P (t) \
|| POINTER_TYPE_P (t))
spu_function_code new_fcode, fcode =
- DECL_FUNCTION_CODE (fndecl) - END_BUILTINS;
+ (spu_function_code) (DECL_FUNCTION_CODE (fndecl) - END_BUILTINS);
struct spu_builtin_description *desc;
tree match = NULL_TREE;
@@ -116,8 +122,9 @@ spu_resolve_overloaded_builtin (tree fndecl, tree fnargs)
/* Compare the signature of each internal builtin function with the
function arguments until a match is found. */
- for (new_fcode = fcode + 1; spu_builtins[new_fcode].type == B_INTERNAL;
- new_fcode++)
+ for (new_fcode = (spu_function_code) (fcode + 1);
+ spu_builtins[new_fcode].type == B_INTERNAL;
+ new_fcode = (spu_function_code) (new_fcode + 1))
{
tree decl = spu_builtins[new_fcode].fndecl;
tree params = TYPE_ARG_TYPES (TREE_TYPE (decl));
@@ -159,8 +166,8 @@ spu_resolve_overloaded_builtin (tree fndecl, tree fnargs)
|| fcode == SPU_HCMPEQ || fcode == SPU_HCMPGT
|| fcode == SPU_MASKB || fcode == SPU_MASKH
|| fcode == SPU_MASKW) && p == 0))
- && !comptypes (TYPE_MAIN_VARIANT (param_type),
- TYPE_MAIN_VARIANT (arg_type)))
+ && !same_type_p (TYPE_MAIN_VARIANT (param_type),
+ TYPE_MAIN_VARIANT (arg_type)))
break;
}
if (param == void_list_node)
diff --git a/gcc/config/spu/spu-protos.h b/gcc/config/spu/spu-protos.h
index 48ec9697237..e42198e8252 100644
--- a/gcc/config/spu/spu-protos.h
+++ b/gcc/config/spu/spu-protos.h
@@ -19,10 +19,10 @@
#include "rtl.h"
+struct cpp_reader;
extern void spu_cpu_cpp_builtins (struct cpp_reader * pfile);
extern void builtin_define_std (const char *);
extern void spu_optimization_options (int level, int size);
-extern void spu_override_options (void);
extern void spu_c_common_override_options (void);
extern int valid_subreg (rtx op);
extern void spu_expand_extv (rtx * ops, int unsignedp);
@@ -39,7 +39,7 @@ extern int spu_split_immediate (rtx * ops);
extern int spu_saved_regs_size (void);
extern int direct_return (void);
extern void spu_expand_prologue (void);
-extern void spu_expand_epilogue (unsigned char sibcall_p);
+extern void spu_expand_epilogue (bool sibcall_p);
extern rtx spu_return_addr (int count, rtx frame);
extern rtx spu_const (enum machine_mode mode, HOST_WIDE_INT val);
extern rtx spu_const_from_ints (enum machine_mode mode,
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index 6e0001b0a05..e2dd53be868 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -57,6 +57,9 @@
#include "sbitmap.h"
#include "timevar.h"
#include "df.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Builtin types, data and prototypes. */
struct spu_builtin_range
@@ -85,8 +88,8 @@ char regs_ever_allocated[FIRST_PSEUDO_REGISTER];
/* Prototypes and external defs. */
static void spu_init_builtins (void);
-static unsigned char spu_scalar_mode_supported_p (enum machine_mode mode);
-static unsigned char spu_vector_mode_supported_p (enum machine_mode mode);
+static bool spu_scalar_mode_supported_p (enum machine_mode mode);
+static bool spu_vector_mode_supported_p (enum machine_mode mode);
static rtx adjust_operand (rtx op, HOST_WIDE_INT * start);
static rtx get_pic_reg (void);
static int need_to_save_reg (int regno, int saving);
@@ -111,14 +114,12 @@ static void spu_sched_init_global (FILE *, int, int);
static void spu_sched_init (FILE *, int, int);
static int spu_sched_reorder (FILE *, int, rtx *, int *, int);
static tree spu_handle_fndecl_attribute (tree * node, tree name, tree args,
- int flags,
- unsigned char *no_add_attrs);
+ int flags, bool *no_add_attrs);
static tree spu_handle_vector_attribute (tree * node, tree name, tree args,
- int flags,
- unsigned char *no_add_attrs);
+ int flags, bool *no_add_attrs);
static int spu_naked_function_p (tree func);
-static unsigned char spu_pass_by_reference (CUMULATIVE_ARGS *cum, enum machine_mode mode,
- const_tree type, unsigned char named);
+static bool spu_pass_by_reference (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+ const_tree type, bool named);
static tree spu_build_builtin_va_list (void);
static void spu_va_start (tree, rtx);
static tree spu_gimplify_va_arg_expr (tree valist, tree type,
@@ -128,9 +129,9 @@ static int store_with_one_insn_p (rtx mem);
static int mem_is_padded_component_ref (rtx x);
static bool spu_assemble_integer (rtx x, unsigned int size, int aligned_p);
static void spu_asm_globalize_label (FILE * file, const char *name);
-static unsigned char spu_rtx_costs (rtx x, int code, int outer_code,
+static bool spu_rtx_costs (rtx x, int code, int outer_code,
int *total, bool speed);
-static unsigned char spu_function_ok_for_sibcall (tree decl, tree exp);
+static bool spu_function_ok_for_sibcall (tree decl, tree exp);
static void spu_init_libfuncs (void);
static bool spu_return_in_memory (const_tree type, const_tree fntype);
static void fix_range (const char *);
@@ -144,6 +145,7 @@ static tree spu_builtin_vec_perm (tree, tree *);
static int spu_sms_res_mii (struct ddg *g);
static void asm_file_start (void);
static unsigned int spu_section_type_flags (tree, const char *, int);
+static bool spu_override_options (bool);
extern const char *reg_names[];
rtx spu_compare_op0, spu_compare_op1;
@@ -248,7 +250,7 @@ tree spu_builtin_types[SPU_BTI_MAX];
#undef TARGET_SCHED_ADJUST_COST
#define TARGET_SCHED_ADJUST_COST spu_sched_adjust_cost
-const struct attribute_spec spu_attribute_table[];
+extern const struct attribute_spec spu_attribute_table[];
#undef TARGET_ATTRIBUTE_TABLE
#define TARGET_ATTRIBUTE_TABLE spu_attribute_table
@@ -333,6 +335,9 @@ const struct attribute_spec spu_attribute_table[];
#undef TARGET_SECTION_TYPE_FLAGS
#define TARGET_SECTION_TYPE_FLAGS spu_section_type_flags
+#undef TARGET_OVERRIDE_OPTIONS
+#define TARGET_OVERRIDE_OPTIONS spu_override_options
+
struct gcc_target targetm = TARGET_INITIALIZER;
void
@@ -350,12 +355,13 @@ spu_optimization_options (int level ATTRIBUTE_UNUSED, int size ATTRIBUTE_UNUSED)
on a particular target machine. You can define a macro
OVERRIDE_OPTIONS to take account of this. This macro, if defined, is
executed once just after all the command options have been parsed. */
-void
-spu_override_options (void)
+static bool
+spu_override_options (bool main_target)
{
/* Small loops will be unpeeled at -O3. For SPU it is more important
to keep code small by default. */
- if (!flag_unroll_loops && !flag_peel_loops
+ /* FIXME: this parameter should exist separately for all targets. */
+ if (!flag_unroll_loops && !flag_peel_loops && main_target
&& !PARAM_SET_P (PARAM_MAX_COMPLETELY_PEEL_TIMES))
PARAM_VALUE (PARAM_MAX_COMPLETELY_PEEL_TIMES) = 1;
@@ -405,6 +411,7 @@ spu_override_options (void)
}
REAL_MODE_FORMAT (SFmode) = &spu_single_format;
+ return true;
}
/* Handle an attribute requiring a FUNCTION_DECL; arguments as in
@@ -786,7 +793,7 @@ spu_emit_branch_or_set (int is_set, enum rtx_code code, rtx operands[])
rtx target = operands[0];
enum machine_mode comp_mode;
enum machine_mode op_mode;
- enum spu_comp_code scode, eq_code, ior_code;
+ enum spu_comp_code scode, eq_code;
int index;
int eq_test = 0;
@@ -986,6 +993,8 @@ spu_emit_branch_or_set (int is_set, enum rtx_code code, rtx operands[])
if (eq_test)
{
+ enum insn_code ior_code;
+
eq_result = gen_reg_rtx (comp_mode);
eq_rtx = GEN_FCN (spu_comp_icode[index][eq_code]) (eq_result,
spu_compare_op0,
@@ -1893,7 +1902,7 @@ spu_expand_prologue (void)
RTX_FRAME_RELATED_P (insn) = 1;
real = gen_addsi3 (sp_reg, sp_reg, GEN_INT (-total_size));
REG_NOTES (insn) =
- gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, real, REG_NOTES (insn));
+ alloc_reg_note (REG_FRAME_RELATED_EXPR, real, REG_NOTES (insn));
if (total_size > 2000)
{
@@ -1911,8 +1920,7 @@ spu_expand_prologue (void)
RTX_FRAME_RELATED_P (insn) = 1;
real = gen_addsi3 (fp_reg, sp_reg, GEN_INT (fp_offset));
REG_NOTES (insn) =
- gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- real, REG_NOTES (insn));
+ alloc_reg_note (REG_FRAME_RELATED_EXPR, real, REG_NOTES (insn));
REGNO_POINTER_ALIGN (HARD_FRAME_POINTER_REGNUM) = STACK_BOUNDARY;
}
}
@@ -5898,7 +5906,7 @@ expand_builtin_args (struct spu_builtin_description *d, tree exp,
tree arg = CALL_EXPR_ARG (exp, a);
if (arg == 0)
abort ();
- ops[i] = expand_expr (arg, NULL_RTX, VOIDmode, 0);
+ ops[i] = expand_expr (arg, NULL_RTX, VOIDmode, EXPAND_NORMAL);
}
/* The insn pattern may have additional operands (SCRATCH).
@@ -6298,3 +6306,4 @@ spu_section_type_flags (tree decl, const char *name, int reloc)
return default_section_type_flags (decl, name, reloc);
}
+END_TARGET_SPECIFIC
diff --git a/gcc/config/spu/spu.h b/gcc/config/spu/spu.h
index 34585f944dd..149fc466d15 100644
--- a/gcc/config/spu/spu.h
+++ b/gcc/config/spu/spu.h
@@ -15,12 +15,13 @@
<http://www.gnu.org/licenses/>. */
+#include "multi-target.h"
+
/* Run-time Target */
#define TARGET_CPU_CPP_BUILTINS() spu_cpu_cpp_builtins(pfile)
#define TARGET_VERSION fprintf (stderr, " (spu %s)", __DATE__);
-#define OVERRIDE_OPTIONS spu_override_options()
#define C_COMMON_OVERRIDE_OPTIONS spu_c_common_override_options()
#define OPTIMIZATION_OPTIONS(level,size) \
@@ -28,6 +29,7 @@
#define INIT_EXPANDERS spu_init_expanders()
+START_TARGET_SPECIFIC
extern int target_flags;
extern const char *spu_fixed_range_string;
@@ -40,6 +42,7 @@ enum processor_type
extern GTY(()) int spu_arch;
extern GTY(()) int spu_tune;
+END_TARGET_SPECIFIC
/* Support for a compile-time default architecture and tuning. The rules are:
--with-arch is ignored if -march is specified.
@@ -617,8 +620,9 @@ targetm.resolve_overloaded_builtin = spu_resolve_overloaded_builtin; \
} \
} while (0)
+START_TARGET_SPECIFIC
/* These are set by the cmp patterns and used while expanding
conditional branches. */
extern GTY(()) rtx spu_compare_op0;
extern GTY(()) rtx spu_compare_op1;
-
+END_TARGET_SPECIFIC
diff --git a/gcc/config/spu/spu.md b/gcc/config/spu/spu.md
index 1dccfcff66a..4c9ff751935 100644
--- a/gcc/config/spu/spu.md
+++ b/gcc/config/spu/spu.md
@@ -4322,7 +4322,8 @@ selb\t%0,%4,%0,%3"
(use (match_operand 1 "" "")) ; iterations; zero if unknown
(use (match_operand 2 "" "")) ; max iterations
(use (match_operand 3 "" "")) ; loop level
- (use (match_operand 4 "" ""))] ; label
+ (use (match_operand 4 "" "")) ; label
+ (match_operand 5 "" "")]
""
"
{
diff --git a/gcc/config/spu/t-spu-elf b/gcc/config/spu/t-spu-elf
index f8c5ba5b01d..959994e6f2f 100644
--- a/gcc/config/spu/t-spu-elf
+++ b/gcc/config/spu/t-spu-elf
@@ -92,7 +92,18 @@ spu-c.o: $(srcdir)/config/spu/spu-c.c \
$(srcdir)/config/spu/spu-protos.h \
$(srcdir)/config/spu/spu-builtins.h \
$(srcdir)/config/spu/spu-builtins.def \
- $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(CPPLIB_H) \
+ $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(CPPLIB_H) $(C_TREE_H) \
$(TM_P_H) c-pragma.h errors.h coretypes.h $(TM_H) insn-codes.h
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/spu/spu-c.c
+ $(CXXX) $(INCLUDES) $(srcdir)/config/spu/spu-c.c
+spu-cxx.o: $(srcdir)/config/spu/spu-c.c \
+ $(srcdir)/config/spu/spu-protos.h \
+ $(srcdir)/config/spu/spu-builtins.h \
+ $(srcdir)/config/spu/spu-builtins.def \
+ $(CONFIG_H) $(SYSTEM_H) $(CPPLIB_H) \
+ $(TREE_H) cp/name-lookup.h cp/cp-tree.h $(C_COMMON_H) \
+ c-common.def $(FUNCTION_H) $(VARRAY_H) \
+ $(SYSTEM_H) coretypes.h $(TARGET_H) $(GGC_H) \
+ $(srcdir)/../include/hashtab.h $(srcdir)/../include/splay-tree.h \
+ $(TM_P_H) c-pragma.h errors.h coretypes.h $(TM_H) insn-codes.h
+ $(CXXX) $(INCLUDES) $(srcdir)/config/spu/spu-c.c -DCC1PLUS -o $@
diff --git a/gcc/config/t-darwin b/gcc/config/t-darwin
index b1ba53c4774..02f2f4632a0 100644
--- a/gcc/config/t-darwin
+++ b/gcc/config/t-darwin
@@ -3,22 +3,22 @@ darwin.o: $(srcdir)/config/darwin.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
conditions.h insn-flags.h output.h insn-attr.h flags.h $(TREE_H) expr.h \
reload.h function.h $(GGC_H) langhooks.h $(TARGET_H) $(TM_P_H) gt-darwin.h \
config/darwin-sections.def
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/darwin.c
+ $(CXX) -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/darwin.c
darwin-c.o: $(srcdir)/config/darwin-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(CPPLIB_H) $(TREE_H) c-pragma.h $(C_TREE_H) toplev.h $(TM_P_H) \
incpath.h flags.h $(C_COMMON_H)
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/darwin-c.c $(PREPROCESSOR_DEFINES)
+ $(CXX) -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/darwin-c.c $(PREPROCESSOR_DEFINES)
darwin-f.o: $(srcdir)/config/darwin-f.c $(CONFIG_H) $(SYSTEM_H) coretypes.h
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+ $(CXX) -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(srcdir)/config/darwin-f.c $(PREPROCESSOR_DEFINES)
gt-darwin.h : s-gtype ; @true
darwin-driver.o: $(srcdir)/config/darwin-driver.c \
$(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H)
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+ $(CXX) -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(srcdir)/config/darwin-driver.c
# How to build crt3.o
diff --git a/gcc/config/x-darwin b/gcc/config/x-darwin
index c2ffd7d5c89..b7b653d96b4 100644
--- a/gcc/config/x-darwin
+++ b/gcc/config/x-darwin
@@ -1,3 +1,3 @@
host-darwin.o : $(srcdir)/config/host-darwin.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h toplev.h config/host-darwin.h
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
+ $(CXX) -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
diff --git a/gcc/config/x-linux b/gcc/config/x-linux
index e4aa040bceb..56907723135 100644
--- a/gcc/config/x-linux
+++ b/gcc/config/x-linux
@@ -1,4 +1,4 @@
host-linux.o : $(srcdir)/config/host-linux.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h hosthooks.h hosthooks-def.h $(HOOKS_H)
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+ $(CXX) -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(srcdir)/config/host-linux.c
diff --git a/gcc/configure b/gcc/configure
index 04775acf6e9..26e5e22e034 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -458,7 +458,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN OBJDUMP ac_ct_OBJDUMP ac_ct_AR STRIP ac_ct_STRIP lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump gcc_cv_readelf libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs fortran_target_objs target_cpu_default GMPLIBS GMPINC PPLLIBS PPLINC CLOOGLIBS CLOOGINC LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn c_loose_warn strict_warn c_strict_warn warn_cflags warn_cxxflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN OBJDUMP ac_ct_OBJDUMP ac_ct_AR STRIP ac_ct_STRIP lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 CXXCPP objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump gcc_cv_readelf libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs fortran_target_objs target_cpu_default with_extra_target_list GMPLIBS GMPINC PPLLIBS PPLINC CLOOGLIBS CLOOGINC LIBOBJS LTLIBOBJS'
ac_subst_files='language_hooks'
ac_pwd=`pwd`
@@ -916,10 +916,22 @@ ac_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_env_CPPFLAGS_value=$CPPFLAGS
ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CXX_set=${CXX+set}
+ac_env_CXX_value=$CXX
+ac_cv_env_CXX_set=${CXX+set}
+ac_cv_env_CXX_value=$CXX
+ac_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_env_CXXFLAGS_value=$CXXFLAGS
+ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_cv_env_CXXFLAGS_value=$CXXFLAGS
ac_env_CPP_set=${CPP+set}
ac_env_CPP_value=$CPP
ac_cv_env_CPP_set=${CPP+set}
ac_cv_env_CPP_value=$CPP
+ac_env_CXXCPP_set=${CXXCPP+set}
+ac_env_CXXCPP_value=$CXXCPP
+ac_cv_env_CXXCPP_set=${CXXCPP+set}
+ac_cv_env_CXXCPP_value=$CXXCPP
ac_env_GMPLIBS_set=${GMPLIBS+set}
ac_env_GMPLIBS_value=$GMPLIBS
ac_cv_env_GMPLIBS_set=${GMPLIBS+set}
@@ -1130,7 +1142,10 @@ Some influential environment variables:
nonstandard directory <lib dir>
CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
headers in a nonstandard directory <include dir>
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
CPP C preprocessor
+ CXXCPP C++ preprocessor
GMPLIBS How to link GMP
GMPINC How to find GMP include files
PPLLIBS How to link PPL
@@ -3113,6 +3128,361 @@ if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
CC="$am_aux_dir/compile $CC"
fi
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CXX" && break
+done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+
+ CXX=$ac_ct_CXX
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cxx_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cxx_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
@@ -7034,7 +7404,7 @@ fi
loose_warn=
save_CFLAGS="$CFLAGS"
-for option in -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual; do
+for option in -W -Wall -Wwrite-strings -Wcast-qual; do
as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
@@ -7099,9 +7469,76 @@ fi
done
CFLAGS="$save_CFLAGS"
+c_loose_warn=
+save_CFLAGS="$CFLAGS"
+for option in -Wstrict-prototypes -Wmissing-prototypes; do
+ as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
+
+ echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
+echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
+if eval "test \"\${$as_acx_Woption+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ CFLAGS="$option"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_acx_Woption=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_acx_Woption=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
+ if test `eval echo '${'$as_acx_Woption'}'` = yes; then
+ c_loose_warn="$c_loose_warn${c_loose_warn:+ }$option"
+fi
+
+ done
+CFLAGS="$save_CFLAGS"
+
strict_warn=
save_CFLAGS="$CFLAGS"
-for option in -Wold-style-definition -Wc++-compat -Wmissing-format-attribute; do
+for option in -Wmissing-format-attribute; do
as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
@@ -7166,6 +7603,73 @@ fi
done
CFLAGS="$save_CFLAGS"
+c_strict_warn=
+save_CFLAGS="$CFLAGS"
+for option in -Wold-style-definition -Wc++-compat; do
+ as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
+
+ echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
+echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
+if eval "test \"\${$as_acx_Woption+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ CFLAGS="$option"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_acx_Woption=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_acx_Woption=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
+ if test `eval echo '${'$as_acx_Woption'}'` = yes; then
+ c_strict_warn="$c_strict_warn${c_strict_warn:+ }$option"
+fi
+
+ done
+CFLAGS="$save_CFLAGS"
+
if test "$GCC" = yes; then
echo "$as_me:$LINENO: checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" >&5
echo $ECHO_N "checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings... $ECHO_C" >&6
@@ -7249,11 +7753,14 @@ fi
# Makefile has more goo to add other flags, so this variabl is used to
# enables warnings only for GCC.
warn_cflags=
+warn_cxxflags=
if test "x$GCC" = "xyes"; then
warn_cflags='$(GCC_WARN_CFLAGS)'
+ warn_cxxflags='$(GCC_WARN_CXXFLAGS)'
fi
+
# Enable expensive internal checks
is_release=
if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
@@ -14509,13 +15016,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:14512: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:15019: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:14515: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:15022: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:14518: output\"" >&5)
+ (eval echo "\"\$as_me:15025: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -15672,7 +16179,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 15675 "configure"' > conftest.$ac_ext
+ echo '#line 16182 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -16471,6 +16978,600 @@ done
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CXX" && break
+done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+
+ CXX=$ac_ct_CXX
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cxx_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cxx_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
+if test -z "$CXXCPP"; then
+ if test "${ac_cv_prog_CXXCPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CXXCPP needs to be expanded
+ for CXXCPP in "$CXX -E" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+ CXXCPP=$ac_cv_prog_CXXCPP
+else
+ ac_cv_prog_CXXCPP=$CXXCPP
+fi
+echo "$as_me:$LINENO: result: $CXXCPP" >&5
+echo "${ECHO_T}$CXXCPP" >&6
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+echo "$as_me: error: in \`$ac_pwd':" >&2;}
+_lt_caught_CXX_error=yes; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+else
+ _lt_caught_CXX_error=yes
+fi
+
+
+
+
+
# Set options
@@ -16971,11 +18072,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16974: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18075: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16978: \$? = $ac_status" >&5
+ echo "$as_me:18079: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -17310,11 +18411,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17313: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18414: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:17317: \$? = $ac_status" >&5
+ echo "$as_me:18418: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -17415,11 +18516,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17418: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18519: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:17422: \$? = $ac_status" >&5
+ echo "$as_me:18523: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17470,11 +18571,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17473: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18574: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:17477: \$? = $ac_status" >&5
+ echo "$as_me:18578: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -20282,7 +21383,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 20285 "configure"
+#line 21386 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -20378,7 +21479,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 20381 "configure"
+#line 21482 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -20586,6 +21687,2943 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
CC="$lt_save_CC"
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+compiler_needs_object_CXX=no
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_direct_absolute_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+inherit_rpath_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+ # save warnings/boilerplate of simple test code
+ ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ compiler=$CC
+ compiler_CXX=$CC
+ for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+ else
+ lt_prog_compiler_no_builtin_flag_CXX=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+ withval="$with_gnu_ld"
+ test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi;
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+ echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec_CXX=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+ ld_shlibs_CXX=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds_CXX=''
+ hardcode_direct_CXX=yes
+ hardcode_direct_absolute_CXX=yes
+ hardcode_libdir_separator_CXX=':'
+ link_all_deplibs_CXX=yes
+ file_list_spec_CXX='${wl}-f,'
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct_CXX=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L_CXX=yes
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ hardcode_libdir_separator_CXX=
+ fi
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ export_dynamic_flag_spec_CXX='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ always_export_symbols_CXX=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag_CXX='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag_CXX="-z nodefs"
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag_CXX=' ${wl}-bernotok'
+ allow_undefined_flag_CXX=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec_CXX='$convenience'
+ archive_cmds_need_lc_CXX=yes
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag_CXX=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ allow_undefined_flag_CXX=unsupported
+ always_export_symbols_CXX=no
+ enable_shared_with_static_runtimes_CXX=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc_CXX=no
+ hardcode_direct_CXX=no
+ hardcode_automatic_CXX=yes
+ hardcode_shlibpath_var_CXX=unsupported
+ whole_archive_flag_spec_CXX=''
+ link_all_deplibs_CXX=yes
+ allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=echo
+ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ fi
+
+ else
+ ld_shlibs_CXX=no
+ fi
+
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ freebsd[12]*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ ld_shlibs_CXX=no
+ ;;
+
+ freebsd-elf*)
+ archive_cmds_need_lc_CXX=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ ld_shlibs_CXX=yes
+ ;;
+
+ gnu*)
+ ;;
+
+ hpux9*)
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ hardcode_direct_CXX=yes
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aCC*)
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ ;;
+ *)
+ hardcode_direct_CXX=yes
+ hardcode_direct_absolute_CXX=yes
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+ fi
+ fi
+ link_all_deplibs_CXX=yes
+ ;;
+ esac
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+ inherit_rpath_CXX=yes
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ archive_cmds_need_lc_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [1-5]* | *pgcpp\ [1-5]*)
+ prelink_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+ old_archive_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+ $RANLIB $oldlib'
+ archive_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ archive_expsym_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ *) # Version 6 will use weak symbols
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+
+ hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ xl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object_CXX=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ ld_shlibs_CXX=yes
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ ld_shlibs_CXX=no
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ hardcode_direct_absolute_CXX=yes
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=echo
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ ;;
+ *)
+ allow_undefined_flag_CXX=' -expect_unresolved \*'
+ archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+ ;;
+ esac
+
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+ case $host in
+ osf3*)
+ archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ esac
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ archive_cmds_need_lc_CXX=yes
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ hardcode_shlibpath_var_CXX=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ link_all_deplibs_CXX=yes
+
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag_CXX='${wl}-z,text'
+ archive_cmds_need_lc_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag_CXX='${wl}-z,text'
+ allow_undefined_flag_CXX='${wl}-z,nodefs'
+ archive_cmds_need_lc_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
+ hardcode_libdir_separator_CXX=':'
+ link_all_deplibs_CXX=yes
+ export_dynamic_flag_spec_CXX='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+
+ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6
+ test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+ GCC_CXX="$GXX"
+ LD_CXX="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ # Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case $p in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" ||
+ test $p = "-R"; then
+ prev=$p
+ continue
+ else
+ prev=
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ case $p in
+ -L* | -R*)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$compiler_lib_search_path_CXX"; then
+ compiler_lib_search_path_CXX="${prev}${p}"
+ else
+ compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$postdeps_CXX"; then
+ postdeps_CXX="${prev}${p}"
+ else
+ postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+ fi
+ fi
+ ;;
+
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$predep_objects_CXX"; then
+ predep_objects_CXX="$p"
+ else
+ predep_objects_CXX="$predep_objects_CXX $p"
+ fi
+ else
+ if test -z "$postdep_objects_CXX"; then
+ postdep_objects_CXX="$p"
+ else
+ postdep_objects_CXX="$postdep_objects_CXX $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix[3-9]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ predep_objects_CXX=
+ postdep_objects_CXX=
+ postdeps_CXX=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+esac
+
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+ compiler_lib_search_dirs_CXX=
+if test -n "${compiler_lib_search_path_CXX}"; then
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic_CXX='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ lt_prog_compiler_pic_CXX=
+ ;;
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic_CXX=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[4-9]*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ else
+ lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
+ lt_prog_compiler_pic_CXX='+Z'
+ fi
+ ;;
+ aCC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64 which still supported -KPIC.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fpic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ xlc* | xlC*)
+ # IBM XL 8.0 on PPC
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-qpic'
+ lt_prog_compiler_static_CXX='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ lt_prog_compiler_pic_CXX='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd*)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ lt_prog_compiler_wl_CXX='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ lt_prog_compiler_pic_CXX='-pic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ lt_prog_compiler_can_build_shared_CXX=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic_CXX=
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+ ;;
+esac
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_pic_works_CXX=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:23498: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:23502: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works_CXX=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6
+
+if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+ case $lt_prog_compiler_pic_CXX in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+ esac
+else
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_static_works_CXX=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6
+
+if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
+ :
+else
+ lt_prog_compiler_static_CXX=
+fi
+
+
+
+
+ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_c_o_CXX=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:23597: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:23601: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o_CXX=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6
+
+
+
+ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_c_o_CXX=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:23649: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:23653: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o_CXX=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+ if test "$hard_links" = no; then
+ { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ case $host_os in
+ aix[4-9]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ export_symbols_cmds_CXX="$ltdll_cmds"
+ ;;
+ cygwin* | mingw* | cegcc*)
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ *)
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+
+echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+with_gnu_ld_CXX=$with_gnu_ld
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc_CXX=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds_CXX in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+if test "${lt_cv_archive_cmds_need_lc_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl_CXX
+ pic_flag=$lt_prog_compiler_pic_CXX
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+ allow_undefined_flag_CXX=
+ if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
+ (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ then
+ lt_cv_archive_cmds_need_lc_CXX=no
+ else
+ lt_cv_archive_cmds_need_lc_CXX=yes
+ fi
+ allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
+echo "${ECHO_T}$lt_cv_archive_cmds_need_lc_CXX" >&6
+ archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then
+ lt_cv_shlibpath_overrides_runpath=yes
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+fi
+
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" ||
+ test -n "$runpath_var_CXX" ||
+ test "X$hardcode_automatic_CXX" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct_CXX" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+ test "$hardcode_minus_L_CXX" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action_CXX=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action_CXX=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action_CXX=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
+echo "${ECHO_T}$hardcode_action_CXX" >&6
+
+if test "$hardcode_action_CXX" = relink ||
+ test "$inherit_rpath_CXX" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
@@ -24497,7 +28535,7 @@ lang_tree_files=
# `language' must be a single word so is spelled singularly.
all_languages=
all_compilers=
-all_outputs='Makefile gccbug'
+all_outputs='Makefile T-extra gccbug'
# List of language makefile fragments.
all_lang_makefrags=
# List of language subdirectory makefiles. Deprecated.
@@ -24769,6 +28807,7 @@ fi;
+
# Echo link setup.
if test x${build} = x${host} ; then
if test x${host} = x${target} ; then
@@ -25463,6 +29502,9 @@ s,@CPPFLAGS@,$CPPFLAGS,;t t
s,@ac_ct_CC@,$ac_ct_CC,;t t
s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t
+s,@CXX@,$CXX,;t t
+s,@CXXFLAGS@,$CXXFLAGS,;t t
+s,@ac_ct_CXX@,$ac_ct_CXX,;t t
s,@GNATBIND@,$GNATBIND,;t t
s,@ac_ct_GNATBIND@,$ac_ct_GNATBIND,;t t
s,@GNATMAKE@,$GNATMAKE,;t t
@@ -25472,8 +29514,11 @@ s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
s,@CPP@,$CPP,;t t
s,@EGREP@,$EGREP,;t t
s,@loose_warn@,$loose_warn,;t t
+s,@c_loose_warn@,$c_loose_warn,;t t
s,@strict_warn@,$strict_warn,;t t
+s,@c_strict_warn@,$c_strict_warn,;t t
s,@warn_cflags@,$warn_cflags,;t t
+s,@warn_cxxflags@,$warn_cxxflags,;t t
s,@nocommon_flag@,$nocommon_flag,;t t
s,@TREEBROWSER@,$TREEBROWSER,;t t
s,@valgrind_path@,$valgrind_path,;t t
@@ -25570,6 +29615,7 @@ s,@OTOOL@,$OTOOL,;t t
s,@ac_ct_OTOOL@,$ac_ct_OTOOL,;t t
s,@OTOOL64@,$OTOOL64,;t t
s,@ac_ct_OTOOL64@,$ac_ct_OTOOL64,;t t
+s,@CXXCPP@,$CXXCPP,;t t
s,@objdir@,$objdir,;t t
s,@enable_fast_install@,$enable_fast_install,;t t
s,@gcc_cv_as@,$gcc_cv_as,;t t
@@ -25642,6 +29688,7 @@ s,@c_target_objs@,$c_target_objs,;t t
s,@cxx_target_objs@,$cxx_target_objs,;t t
s,@fortran_target_objs@,$fortran_target_objs,;t t
s,@target_cpu_default@,$target_cpu_default,;t t
+s,@with_extra_target_list@,$with_extra_target_list,;t t
s,@GMPLIBS@,$GMPLIBS,;t t
s,@GMPINC@,$GMPINC,;t t
s,@PPLLIBS@,$PPLLIBS,;t t
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 04ea19d340d..1e5e7256c83 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -276,6 +276,7 @@ rm -f a.out a.exe b.out
# Find the native compiler
AC_PROG_CC
AM_PROG_CC_C_O
+AC_PROG_CXX
ACX_PROG_GNAT([-I"$srcdir"/ada])
# autoconf is lame and doesn't give us any substitution variable for this.
@@ -323,11 +324,14 @@ AC_CHECK_TYPES([__int64], [AC_CHECK_SIZEOF(__int64)])
# So, we only use -pedantic if we can disable those warnings.
ACX_PROG_CC_WARNING_OPTS(
- m4_quote(m4_do([-W -Wall -Wwrite-strings -Wstrict-prototypes ],
- [-Wmissing-prototypes -Wcast-qual])), [loose_warn])
+ m4_quote(m4_do([-W -Wall -Wwrite-strings -Wcast-qual])), [loose_warn])
ACX_PROG_CC_WARNING_OPTS(
- m4_quote(m4_do([-Wold-style-definition -Wc++-compat ],
- [-Wmissing-format-attribute])), [strict_warn])
+ m4_quote(m4_do([-Wstrict-prototypes -Wmissing-prototypes])),
+ [c_loose_warn])
+ACX_PROG_CC_WARNING_OPTS(
+ m4_quote(m4_do([-Wmissing-format-attribute])), [strict_warn])
+ACX_PROG_CC_WARNING_OPTS(
+ m4_quote(m4_do([-Wold-style-definition -Wc++-compat])), [c_strict_warn])
ACX_PROG_CC_WARNING_ALMOST_PEDANTIC(
m4_quote(m4_do([-Wno-long-long -Wno-variadic-macros ],
[-Wno-overlength-strings])), [strict_warn])
@@ -337,10 +341,13 @@ ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual], [strict_warn])
# Makefile has more goo to add other flags, so this variabl is used to
# enables warnings only for GCC.
warn_cflags=
+warn_cxxflags=
if test "x$GCC" = "xyes"; then
warn_cflags='$(GCC_WARN_CFLAGS)'
+ warn_cxxflags='$(GCC_WARN_CXXFLAGS)'
fi
AC_SUBST(warn_cflags)
+AC_SUBST(warn_cxxflags)
# Enable expensive internal checks
is_release=
@@ -3692,7 +3699,7 @@ lang_tree_files=
# `language' must be a single word so is spelled singularly.
all_languages=
all_compilers=
-all_outputs='Makefile gccbug'
+all_outputs='Makefile T-extra gccbug'
# List of language makefile fragments.
all_lang_makefrags=
# List of language subdirectory makefiles. Deprecated.
@@ -3946,6 +3953,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 b2ac87651d3..b5f63c44f95 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/cp/Make-lang.in b/gcc/cp/Make-lang.in
index 38aec6cf182..fb7218b8915 100644
--- a/gcc/cp/Make-lang.in
+++ b/gcc/cp/Make-lang.in
@@ -54,13 +54,13 @@ c++: cc1plus$(exeext)
g++spec.o: $(srcdir)/cp/g++spec.c $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H) $(CONFIG_H)
(SHLIB_LINK='$(SHLIB_LINK)'; \
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
+ $(CXX) -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
$(INCLUDES) $(srcdir)/cp/g++spec.c)
# Create the compiler driver for g++.
GXX_OBJS = $(GCC_OBJS) g++spec.o intl.o prefix.o version.o
g++$(exeext): $(GXX_OBJS) $(EXTRA_GCC_OBJS) $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ \
$(GXX_OBJS) $(EXTRA_GCC_OBJS) $(LIBS)
# Create a version of the g++ driver which calls the cross-compiler.
@@ -92,7 +92,7 @@ c++_OBJS = $(CXX_OBJS) dummy-checksum.o cc1plus-checksum.o cp/g++spec.o
cp-warn = $(STRICT_WARN)
cc1plus-dummy$(exeext): $(CXX_OBJS) dummy-checksum.o $(BACKEND) $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ \
$(CXX_OBJS) dummy-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
cc1plus-checksum.c : cc1plus-dummy$(exeext) build/genchecksum$(build_exeext)
@@ -101,7 +101,7 @@ cc1plus-checksum.c : cc1plus-dummy$(exeext) build/genchecksum$(build_exeext)
cc1plus-checksum.o : cc1plus-checksum.c
cc1plus$(exeext): $(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ \
$(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
# Special build rules.
@@ -253,7 +253,7 @@ cp/typeck2.o: cp/typeck2.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) toplev.h output.h \
cp/typeck.o: cp/typeck.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) $(RTL_H) $(EXPR_H) \
toplev.h $(DIAGNOSTIC_H) convert.h $(C_COMMON_H) $(TARGET_H)
cp/class.o: cp/class.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) toplev.h $(RTL_H) \
- $(TARGET_H) convert.h $(CGRAPH_H) $(TREE_DUMP_H)
+ $(TARGET_H) convert.h $(CGRAPH_H) $(TREE_DUMP_H) gt-cp-class.h
cp/call.o: cp/call.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) toplev.h $(RTL_H) \
$(EXPR_H) $(DIAGNOSTIC_H) intl.h gt-cp-call.h convert.h $(TARGET_H) langhooks.h
cp/friend.o: cp/friend.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) $(RTL_H) toplev.h \
@@ -284,7 +284,8 @@ cp/repo.o: cp/repo.c $(CXX_TREE_H) $(TM_H) toplev.h $(DIAGNOSTIC_H) \
gt-cp-repo.h
cp/semantics.o: cp/semantics.c $(CXX_TREE_H) $(TM_H) except.h toplev.h \
$(FLAGS_H) debug.h output.h $(RTL_H) $(TIMEVAR_H) $(EXPR_H) \
- $(TREE_INLINE_H) $(CGRAPH_H) $(TARGET_H) $(C_COMMON_H) $(GIMPLE_H)
+ $(TREE_INLINE_H) $(CGRAPH_H) $(TARGET_H) $(C_COMMON_H) $(GIMPLE_H) \
+ gt-cp-semantics.h
cp/dump.o: cp/dump.c $(CXX_TREE_H) $(TM_H) $(TREE_DUMP_H)
cp/optimize.o: cp/optimize.c $(CXX_TREE_H) $(TM_H) rtl.h $(INTEGRATE_H) \
insn-config.h input.h $(PARAMS_H) debug.h $(TREE_INLINE_H) $(GIMPLE_H) \
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index ef7c045acab..2e8f99a2506 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -131,7 +131,7 @@ static struct z_candidate * tourney (struct z_candidate *);
static int equal_functions (tree, tree);
static int joust (struct z_candidate *, struct z_candidate *, bool);
static int compare_ics (conversion *, conversion *);
-static tree build_over_call (struct z_candidate *, int, tsubst_flags_t);
+static tree build_over_call (struct z_candidate *, int, int);
static tree build_java_interface_fn_ref (tree, tree);
#define convert_like(CONV, EXPR, COMPLAIN) \
convert_like_real ((CONV), (EXPR), NULL_TREE, 0, 0, \
@@ -142,10 +142,10 @@ static tree build_java_interface_fn_ref (tree, tree);
/*issue_conversion_warnings=*/true, \
/*c_cast_p=*/false, (COMPLAIN))
static tree convert_like_real (conversion *, tree, tree, int, int, bool,
- bool, tsubst_flags_t);
+ bool, int);
static void op_error (enum tree_code, enum tree_code, tree, tree,
tree, const char *);
-static tree build_object_call (tree, tree, tsubst_flags_t);
+static tree build_object_call (tree, tree, int);
static tree resolve_args (tree);
static struct z_candidate *build_user_type_conversion_1 (tree, tree, int);
static void print_z_candidate (const char *, struct z_candidate *);
@@ -706,7 +706,7 @@ standard_conversion (tree to, tree from, tree expr, bool c_cast_p,
if ((TYPE_PTRFN_P (to) || TYPE_PTRMEMFUNC_P (to))
&& expr && type_unknown_p (expr))
{
- tsubst_flags_t tflags = tf_conv;
+ int tflags = tf_conv;
if (!(flags & LOOKUP_PROTECT))
tflags |= tf_no_access_control;
expr = instantiate_type (to, expr, tflags);
@@ -1195,7 +1195,7 @@ reference_binding (tree rto, tree rfrom, tree expr, bool c_cast_p, int flags)
tree tfrom;
bool related_p;
bool compatible_p;
- cp_lvalue_kind lvalue_p = clk_none;
+ int lvalue_p = clk_none;
if (TREE_CODE (to) == FUNCTION_TYPE && expr && type_unknown_p (expr))
{
@@ -2985,7 +2985,7 @@ perform_overload_resolution (tree fn,
tree
build_new_function_call (tree fn, tree args, bool koenig_p,
- tsubst_flags_t complain)
+ int complain)
{
struct z_candidate *candidates, *cand;
bool any_viable_p;
@@ -3153,7 +3153,7 @@ build_operator_new_call (tree fnname, tree args,
}
static tree
-build_object_call (tree obj, tree args, tsubst_flags_t complain)
+build_object_call (tree obj, tree args, int complain)
{
struct z_candidate *candidates = 0, *cand;
tree fns, convs, mem_args = NULL_TREE;
@@ -3393,8 +3393,7 @@ conditional_conversion (tree e1, tree e2)
arguments to the conditional expression. */
tree
-build_conditional_expr (tree arg1, tree arg2, tree arg3,
- tsubst_flags_t complain)
+build_conditional_expr (tree arg1, tree arg2, tree arg3, int complain)
{
tree arg2_type;
tree arg3_type;
@@ -3889,7 +3888,7 @@ add_candidates (tree fns, tree args,
tree
build_new_op (enum tree_code code, int flags, tree arg1, tree arg2, tree arg3,
- bool *overloaded_p, tsubst_flags_t complain)
+ bool *overloaded_p, int complain)
{
struct z_candidate *candidates = 0, *cand;
tree arglist, fnname;
@@ -4466,7 +4465,7 @@ build_temp (tree expr, tree type, int flags,
else if (errorcount > savee)
*diagnostic_kind = DK_ERROR;
else
- *diagnostic_kind = 0;
+ *diagnostic_kind = DK_UNSPECIFIED;
return expr;
}
@@ -4509,7 +4508,7 @@ conversion_null_warnings (tree totype, tree expr, tree fn, int argnum)
static tree
convert_like_real (conversion *convs, tree expr, tree fn, int argnum,
int inner, bool issue_conversion_warnings,
- bool c_cast_p, tsubst_flags_t complain)
+ bool c_cast_p, int complain)
{
tree totype = convs->type;
diagnostic_t diag_kind;
@@ -4722,7 +4721,7 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum,
|| TREE_CODE (expr) == VA_ARG_EXPR)
{
tree type = convs->u.next->type;
- cp_lvalue_kind lvalue = real_lvalue_p (expr);
+ int lvalue = real_lvalue_p (expr);
if (!CP_TYPE_CONST_NON_VOLATILE_P (TREE_TYPE (ref_type))
&& !TYPE_REF_IS_RVALUE (ref_type))
@@ -5100,7 +5099,7 @@ magic_varargs_p (tree fn)
bitmask of various LOOKUP_* flags which apply to the call itself. */
static tree
-build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
+build_over_call (struct z_candidate *cand, int flags, int complain)
{
tree fn = cand->fn;
tree args = cand->args;
@@ -5599,7 +5598,7 @@ in_charge_arg_for_name (tree name)
tree
build_special_member_call (tree instance, tree name, tree args,
- tree binfo, int flags, tsubst_flags_t complain)
+ tree binfo, int flags, int complain)
{
tree fns;
/* The type of the subobject to be constructed or destroyed. */
@@ -5744,7 +5743,7 @@ name_as_c_string (tree name, tree type, bool *free_p)
tree
build_new_method_call (tree instance, tree fns, tree args,
tree conversion_path, int flags,
- tree *fn_p, tsubst_flags_t complain)
+ tree *fn_p, int complain)
{
struct z_candidate *candidates = 0, *cand;
tree explicit_targs = NULL_TREE;
@@ -7006,7 +7005,7 @@ can_convert_arg_bad (tree to, tree from, tree arg)
doing a bad conversion, convert_like will complain. */
tree
-perform_implicit_conversion (tree type, tree expr, tsubst_flags_t complain)
+perform_implicit_conversion (tree type, tree expr, int complain)
{
conversion *conv;
void *p;
@@ -7055,7 +7054,7 @@ tree
perform_direct_initialization_if_possible (tree type,
tree expr,
bool c_cast_p,
- tsubst_flags_t complain)
+ int complain)
{
conversion *conv;
void *p;
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index ae3f2c4bcde..af1a4302aae 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -4853,7 +4853,7 @@ layout_class_type (tree t, tree *virtuals_p)
if (DECL_C_BIT_FIELD (field)
&& INT_CST_LT (TYPE_SIZE (type), DECL_SIZE (field)))
{
- integer_type_kind itk;
+ int itk;
tree integer_type;
bool was_unnamed_p = false;
/* We must allocate the bits as if suitably aligned for the
@@ -5943,7 +5943,7 @@ pop_lang_context (void)
static tree
resolve_address_of_overloaded_function (tree target_type,
tree overload,
- tsubst_flags_t flags,
+ int flags,
bool template_only,
tree explicit_targs,
tree access_path)
@@ -6247,9 +6247,9 @@ resolve_address_of_overloaded_function (tree target_type,
function, or a pointer to member function. */
tree
-instantiate_type (tree lhstype, tree rhs, tsubst_flags_t flags)
+instantiate_type (tree lhstype, tree rhs, int flags)
{
- tsubst_flags_t flags_in = flags;
+ int flags_in = flags;
tree access_path = NULL_TREE;
flags &= ~tf_ptrmem_ok;
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index bb12988d1fa..466415752ea 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -653,7 +653,7 @@ cp_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
break;
default:
- ret = c_gimplify_expr (expr_p, pre_p, post_p);
+ ret = (enum gimplify_status) c_gimplify_expr (expr_p, pre_p, post_p);
break;
}
diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c
index c8fa77c2099..c49a5286363 100644
--- a/gcc/cp/cp-lang.c
+++ b/gcc/cp/cp-lang.c
@@ -69,7 +69,7 @@ const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
tree
objcp_tsubst_copy_and_build (tree t ATTRIBUTE_UNUSED,
tree args ATTRIBUTE_UNUSED,
- tsubst_flags_t complain ATTRIBUTE_UNUSED,
+ int complain ATTRIBUTE_UNUSED,
tree in_decl ATTRIBUTE_UNUSED,
bool function_p ATTRIBUTE_UNUSED)
{
diff --git a/gcc/cp/cp-objcp-common.h b/gcc/cp/cp-objcp-common.h
index f24107598aa..4a3dac12297 100644
--- a/gcc/cp/cp-objcp-common.h
+++ b/gcc/cp/cp-objcp-common.h
@@ -23,8 +23,7 @@ along with GCC; see the file COPYING3. If not see
/* In cp/cp-lang.c and objcp/objcp-lang.c. */
-extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t,
- tree, bool);
+extern tree objcp_tsubst_copy_and_build (tree, tree, int, tree, bool);
/* Lang hooks that are shared between C++ and ObjC++ are defined here. Hooks
specific to C++ or ObjC++ go in cp/cp-lang.c and objcp/objcp-lang.c,
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 2ff45729ef1..7a05e2fa436 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -4178,8 +4178,7 @@ extern bool pragma_java_exceptions;
extern bool check_dtor_name (tree, tree);
extern tree build_vfield_ref (tree, tree);
-extern tree build_conditional_expr (tree, tree, tree,
- tsubst_flags_t);
+extern tree build_conditional_expr (tree, tree, tree, int);
extern tree build_addr_func (tree);
extern tree build_call_a (tree, int, tree*);
extern tree build_call_n (tree, int, ...);
@@ -4187,17 +4186,16 @@ extern bool null_ptr_cst_p (tree);
extern bool sufficient_parms_p (const_tree);
extern tree type_decays_to (tree);
extern tree build_user_type_conversion (tree, tree, int);
-extern tree build_new_function_call (tree, tree, bool,
- tsubst_flags_t);
+extern tree build_new_function_call (tree, tree, bool, int);
extern tree build_operator_new_call (tree, tree, tree *, tree *,
tree *);
extern tree build_new_method_call (tree, tree, tree, tree, int,
- tree *, tsubst_flags_t);
+ tree *, int);
extern tree build_special_member_call (tree, tree, tree, tree, int,
- tsubst_flags_t);
+ int);
extern tree build_new_op (enum tree_code, int, tree,
tree, tree, bool *,
- tsubst_flags_t);
+ int);
extern tree build_op_delete_call (enum tree_code, tree, tree, bool, tree, tree);
extern bool can_convert (tree, tree);
extern bool can_convert_arg (tree, tree, tree, int);
@@ -4214,9 +4212,9 @@ extern tree set_up_extended_ref_temp (tree, tree, tree *, tree *);
extern tree initialize_reference (tree, tree, tree, tree *);
extern tree make_temporary_var_for_ref_to_temp (tree, tree);
extern tree strip_top_quals (tree);
-extern tree perform_implicit_conversion (tree, tree, tsubst_flags_t);
+extern tree perform_implicit_conversion (tree, tree, int);
extern tree perform_direct_initialization_if_possible (tree, tree, bool,
- tsubst_flags_t);
+ int);
extern tree in_charge_arg_for_name (tree);
extern tree build_cxx_call (tree, int, tree *);
extern bool is_std_init_list (tree);
@@ -4251,7 +4249,7 @@ extern void pop_nested_class (void);
extern int current_lang_depth (void);
extern void push_lang_context (tree);
extern void pop_lang_context (void);
-extern tree instantiate_type (tree, tree, tsubst_flags_t);
+extern tree instantiate_type (tree, tree, int);
extern void print_class_statistics (void);
extern void cxx_print_statistics (void);
extern void cxx_print_xnode (FILE *, tree, int);
@@ -4290,7 +4288,7 @@ extern tree ocp_convert (tree, tree, int, int);
extern tree cp_convert (tree, tree);
extern tree cp_convert_and_check (tree, tree);
extern tree convert_to_void (tree, const char */*implicit context*/,
- tsubst_flags_t);
+ int);
extern tree convert_force (tree, tree, int);
extern tree build_expr_type_conversion (int, tree, bool);
extern tree type_promotes_to (tree);
@@ -4321,8 +4319,9 @@ extern tree declare_local_label (tree);
extern tree define_label (location_t, tree);
extern void check_goto (tree);
extern bool check_omp_return (void);
-extern tree make_typename_type (tree, tree, enum tag_types, tsubst_flags_t);
-extern tree make_unbound_class_template (tree, tree, tree, tsubst_flags_t);
+extern tree make_typename_type (tree, tree, enum tag_types,
+ int);
+extern tree make_unbound_class_template (tree, tree, tree, int);
extern tree check_for_out_of_scope_variable (tree);
extern tree build_library_fn_ptr (const char *, tree);
extern tree build_cp_library_fn_ptr (const char *, tree);
@@ -4476,8 +4475,7 @@ extern tree do_friend (tree, tree, tree, tree, enum overload_flags, bool);
/* in init.c */
extern tree expand_member_init (tree);
extern void emit_mem_initializers (tree);
-extern tree build_aggr_init (tree, tree, int,
- tsubst_flags_t);
+extern tree build_aggr_init (tree, tree, int, int);
extern int is_class_type (tree, int);
extern tree get_type_value (tree);
extern tree build_zero_init (tree, tree, bool);
@@ -4485,9 +4483,9 @@ extern tree build_value_init (tree);
extern tree build_value_init_noctor (tree);
extern tree build_offset_ref (tree, tree, bool);
extern tree build_new (tree, tree, tree, tree, int,
- tsubst_flags_t);
+ int);
extern tree build_vec_init (tree, tree, tree, bool, int,
- tsubst_flags_t);
+ int);
extern tree build_delete (tree, tree,
special_function_kind,
int, int);
@@ -4561,18 +4559,18 @@ extern tree push_template_decl (tree);
extern tree push_template_decl_real (tree, bool);
extern bool redeclare_class_template (tree, tree);
extern tree lookup_template_class (tree, tree, tree, tree,
- int, tsubst_flags_t);
+ int, int);
extern tree lookup_template_function (tree, tree);
extern int uses_template_parms (tree);
extern int uses_template_parms_level (tree, int);
extern tree instantiate_class_template (tree);
-extern tree instantiate_template (tree, tree, tsubst_flags_t);
+extern tree instantiate_template (tree, tree, int);
extern int fn_type_unification (tree, tree, tree, tree,
tree, unification_kind_t, int);
extern void mark_decl_instantiated (tree, int);
extern int more_specialized_fn (tree, tree, int);
extern void do_decl_instantiation (tree, tree);
-extern void do_type_instantiation (tree, tree, tsubst_flags_t);
+extern void do_type_instantiation (tree, tree, int);
extern tree instantiate_decl (tree, int, bool);
extern int comp_template_parms (const_tree, const_tree);
extern bool uses_parameter_packs (tree);
@@ -4589,7 +4587,7 @@ extern tree most_specialized_instantiation (tree);
extern void print_candidates (tree);
extern void instantiate_pending_templates (int);
extern tree tsubst_default_argument (tree, tree, tree);
-extern tree tsubst_copy_and_build (tree, tree, tsubst_flags_t,
+extern tree tsubst_copy_and_build (tree, tree, int,
tree, bool, bool);
extern tree most_general_template (tree);
extern tree get_mostly_instantiated_function_type (tree);
@@ -4634,14 +4632,13 @@ extern tree build_typeid (tree);
extern tree get_tinfo_decl (tree);
extern tree get_typeid (tree);
extern tree build_headof (tree);
-extern tree build_dynamic_cast (tree, tree, tsubst_flags_t);
+extern tree build_dynamic_cast (tree, tree, int);
extern void emit_support_tinfos (void);
extern bool emit_tinfo_decl (tree);
/* in search.c */
extern bool accessible_base_p (tree, tree, bool);
-extern tree lookup_base (tree, tree, base_access,
- base_kind *);
+extern tree lookup_base (tree, tree, int, base_kind *);
extern tree dcast_base_hint (tree, tree);
extern int accessible_p (tree, tree, bool);
extern tree lookup_field_1 (tree, tree, bool);
@@ -4765,8 +4762,7 @@ extern tree finish_stmt_expr_expr (tree, tree);
extern tree finish_stmt_expr (tree, bool);
extern tree stmt_expr_value_expr (tree);
extern tree perform_koenig_lookup (tree, tree);
-extern tree finish_call_expr (tree, tree, bool, bool,
- tsubst_flags_t);
+extern tree finish_call_expr (tree, tree, bool, bool, int);
extern tree finish_increment_expr (tree, enum tree_code);
extern tree finish_this_expr (void);
extern tree finish_pseudo_destructor_expr (tree, tree, tree);
@@ -4850,7 +4846,7 @@ extern tree canonical_type_variant (tree);
extern tree copy_binfo (tree, tree, tree,
tree *, int);
extern int member_p (const_tree);
-extern cp_lvalue_kind real_lvalue_p (tree);
+extern int real_lvalue_p (tree);
extern bool builtin_valid_in_constant_expr_p (const_tree);
extern tree build_min (enum tree_code, tree, ...);
extern tree build_min_nt (enum tree_code, ...);
@@ -4891,7 +4887,7 @@ extern const struct attribute_spec cxx_attribute_table[];
extern tree make_ptrmem_cst (tree, tree);
extern tree cp_build_type_attribute_variant (tree, tree);
extern tree cp_build_reference_type (tree, bool);
-extern tree cp_build_qualified_type_real (tree, int, tsubst_flags_t);
+extern tree cp_build_qualified_type_real (tree, int, int);
#define cp_build_qualified_type(TYPE, QUALS) \
cp_build_qualified_type_real ((TYPE), (QUALS), tf_warning_or_error)
extern special_function_kind special_function_p (const_tree);
@@ -4931,45 +4927,40 @@ extern tree cxx_sizeof_nowarn (tree);
extern tree is_bitfield_expr_with_lowered_type (const_tree);
extern tree unlowered_expr_type (const_tree);
extern tree decay_conversion (tree);
-extern tree build_class_member_access_expr (tree, tree, tree, bool,
- tsubst_flags_t);
-extern tree finish_class_member_access_expr (tree, tree, bool,
- tsubst_flags_t);
+extern tree build_class_member_access_expr (tree, tree, tree, bool, int);
+extern tree finish_class_member_access_expr (tree, tree, bool, int);
extern tree build_x_indirect_ref (tree, const char *,
- tsubst_flags_t);
-extern tree cp_build_indirect_ref (tree, const char *,
- tsubst_flags_t);
+ int);
+extern tree cp_build_indirect_ref (tree, const char *, int);
extern tree build_array_ref (tree, tree, location_t);
extern tree get_member_function_from_ptrfunc (tree *, tree);
-extern tree cp_build_function_call (tree, tree, tsubst_flags_t);
+extern tree cp_build_function_call (tree, tree, int);
extern tree build_x_binary_op (enum tree_code, tree,
enum tree_code, tree,
enum tree_code, bool *,
- tsubst_flags_t);
-extern tree build_x_array_ref (tree, tree, tsubst_flags_t);
-extern tree build_x_unary_op (enum tree_code, tree,
- tsubst_flags_t);
+ int);
+extern tree build_x_array_ref (tree, tree, int);
+extern tree build_x_unary_op (enum tree_code, tree, int);
extern tree cp_build_unary_op (enum tree_code, tree, int,
- tsubst_flags_t);
+ int);
extern tree unary_complex_lvalue (enum tree_code, tree);
-extern tree build_x_conditional_expr (tree, tree, tree,
- tsubst_flags_t);
+extern tree build_x_conditional_expr (tree, tree, tree, int);
extern tree build_x_compound_expr_from_list (tree, const char *);
-extern tree build_x_compound_expr (tree, tree, tsubst_flags_t);
+extern tree build_x_compound_expr (tree, tree, int);
extern tree build_compound_expr (tree, tree);
-extern tree cp_build_compound_expr (tree, tree, tsubst_flags_t);
-extern tree build_static_cast (tree, tree, tsubst_flags_t);
-extern tree build_reinterpret_cast (tree, tree, tsubst_flags_t);
-extern tree build_const_cast (tree, tree, tsubst_flags_t);
+extern tree cp_build_compound_expr (tree, tree, int);
+extern tree build_static_cast (tree, tree, int);
+extern tree build_reinterpret_cast (tree, tree, int);
+extern tree build_const_cast (tree, tree, int);
extern tree build_c_cast (tree, tree);
-extern tree cp_build_c_cast (tree, tree, tsubst_flags_t);
+extern tree cp_build_c_cast (tree, tree, int);
extern tree build_x_modify_expr (tree, enum tree_code, tree,
- tsubst_flags_t);
+ int);
extern tree cp_build_modify_expr (tree, enum tree_code, tree,
- tsubst_flags_t);
+ int);
extern tree convert_for_initialization (tree, tree, tree, int,
const char *, tree, int,
- tsubst_flags_t);
+ int);
extern int comp_ptr_ttypes (tree, tree);
extern bool comp_ptr_ttypes_const (tree, tree);
extern int ptr_reasonably_similar (const_tree, const_tree);
@@ -4984,23 +4975,23 @@ extern void expand_ptrmemfunc_cst (tree, tree *, tree *);
extern tree type_after_usual_arithmetic_conversions (tree, tree);
extern tree common_pointer_type (tree, tree);
extern tree composite_pointer_type (tree, tree, tree, tree,
- const char*, tsubst_flags_t);
+ const char*, int);
extern tree merge_types (tree, tree);
extern tree check_return_expr (tree, bool *);
extern tree cp_build_binary_op (location_t,
enum tree_code, tree, tree,
- tsubst_flags_t);
+ int);
#define cxx_sizeof(T) cxx_sizeof_or_alignof_type (T, SIZEOF_EXPR, true)
extern tree build_ptrmemfunc_access_expr (tree, tree);
extern tree build_address (tree);
extern tree build_nop (tree, tree);
extern tree non_reference (tree);
extern tree lookup_anon_field (tree, tree);
-extern bool invalid_nonstatic_memfn_p (const_tree, tsubst_flags_t);
+extern bool invalid_nonstatic_memfn_p (const_tree, int);
extern tree convert_member_func_to_ptr (tree, tree);
extern tree convert_ptrmem (tree, tree, bool, bool);
extern int lvalue_or_else (tree, enum lvalue_use,
- tsubst_flags_t);
+ int);
extern int lvalue_p (tree);
/* in typeck2.c */
@@ -5022,7 +5013,7 @@ extern tree digest_init (tree, tree);
extern tree build_scoped_ref (tree, tree, tree *);
extern tree build_x_arrow (tree);
extern tree build_m_component_ref (tree, tree);
-extern tree build_functional_cast (tree, tree, tsubst_flags_t);
+extern tree build_functional_cast (tree, tree, int);
extern tree add_exception_specifier (tree, tree, int);
extern tree merge_exception_specifiers (tree, tree);
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index fed4ab2910c..f9f47c81684 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -783,7 +783,7 @@ ocp_convert (tree type, tree expr, int convtype, int flags)
IMPLICIT is tells us the context of an implicit void conversion. */
tree
-convert_to_void (tree expr, const char *implicit, tsubst_flags_t complain)
+convert_to_void (tree expr, const char *implicit, int complain)
{
if (expr == error_mark_node
|| TREE_TYPE (expr) == error_mark_node)
@@ -807,11 +807,12 @@ convert_to_void (tree expr, const char *implicit, tsubst_flags_t complain)
/* The two parts of a cond expr might be separate lvalues. */
tree op1 = TREE_OPERAND (expr,1);
tree op2 = TREE_OPERAND (expr,2);
+ bool side_effects = TREE_SIDE_EFFECTS (op1) || TREE_SIDE_EFFECTS (op2);
tree new_op1 = convert_to_void
- (op1, (implicit && !TREE_SIDE_EFFECTS (op2)
+ (op1, (implicit && !side_effects
? "second operand of conditional" : NULL), complain);
tree new_op2 = convert_to_void
- (op2, (implicit && !TREE_SIDE_EFFECTS (op1)
+ (op2, (implicit && !side_effects
? "third operand of conditional" : NULL), complain);
expr = build3 (COND_EXPR, TREE_TYPE (new_op1),
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 6537c50409f..c44f44ab584 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -2945,7 +2945,7 @@ build_typename_type (tree context, tree name, tree fullname,
tree
make_typename_type (tree context, tree name, enum tag_types tag_type,
- tsubst_flags_t complain)
+ int complain)
{
tree fullname;
tree t;
@@ -3065,7 +3065,7 @@ make_typename_type (tree context, tree name, enum tag_types tag_type,
tree
make_unbound_class_template (tree context, tree name, tree parm_list,
- tsubst_flags_t complain)
+ int complain)
{
tree t;
tree d;
@@ -11027,7 +11027,7 @@ finish_enum (tree enumtype)
int lowprec;
int highprec;
int precision;
- integer_type_kind itk;
+ int itk;
tree underlying_type = NULL_TREE;
bool fixed_underlying_type_p
= ENUM_UNDERLYING_TYPE (enumtype) != NULL_TREE;
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 2be621da7c5..cded0235102 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -1035,6 +1035,12 @@ is_late_template_attribute (tree attr, tree decl)
if (is_attribute_p ("weak", name))
return true;
+ /* The unused attribute on a label must be applied at instantiation
+ time. */
+ if (TREE_CODE (decl) == LABEL_DECL
+ && is_attribute_p ("unused", name))
+ return true;
+
/* If any of the arguments are dependent expressions, we can't evaluate
the attribute until instantiation time. */
for (arg = args; arg; arg = TREE_CHAIN (arg))
@@ -1858,7 +1864,7 @@ constrain_visibility (tree decl, int visibility)
else if (visibility > DECL_VISIBILITY (decl)
&& !DECL_VISIBILITY_SPECIFIED (decl))
{
- DECL_VISIBILITY (decl) = visibility;
+ DECL_VISIBILITY (decl) = (symbol_visibility) visibility;
return true;
}
return false;
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 936560b0b76..12ee1201173 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -2614,8 +2614,8 @@ cp_printer (pretty_printer *pp, text_info *text, const char *spec,
const char *result;
tree t = NULL;
#define next_tree (t = va_arg (*text->args_ptr, tree))
-#define next_tcode va_arg (*text->args_ptr, enum tree_code)
-#define next_lang va_arg (*text->args_ptr, enum languages)
+#define next_tcode ((enum tree_code) va_arg (*text->args_ptr, int))
+#define next_lang ((enum languages) va_arg (*text->args_ptr, int))
#define next_int va_arg (*text->args_ptr, int)
if (precision != 0 || wide)
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 8e3e4895264..0d8d6656148 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -39,8 +39,8 @@ along with GCC; see the file COPYING3. If not see
static bool begin_init_stmts (tree *, tree *);
static tree finish_init_stmts (bool, tree, tree);
static void construct_virtual_base (tree, tree);
-static void expand_aggr_init_1 (tree, tree, tree, tree, int, tsubst_flags_t);
-static void expand_default_init (tree, tree, tree, tree, int, tsubst_flags_t);
+static void expand_aggr_init_1 (tree, tree, tree, tree, int, int);
+static void expand_default_init (tree, tree, tree, tree, int, int);
static tree build_vec_delete_1 (tree, tree, tree, special_function_kind, int);
static void perform_member_init (tree, tree);
static tree build_builtin_delete_call (tree);
@@ -1204,7 +1204,7 @@ expand_member_init (tree name)
perform the initialization, but not both, as it would be ambiguous. */
tree
-build_aggr_init (tree exp, tree init, int flags, tsubst_flags_t complain)
+build_aggr_init (tree exp, tree init, int flags, int complain)
{
tree stmt_expr;
tree compound_stmt;
@@ -1274,7 +1274,7 @@ build_aggr_init (tree exp, tree init, int flags, tsubst_flags_t complain)
static void
expand_default_init (tree binfo, tree true_exp, tree exp, tree init, int flags,
- tsubst_flags_t complain)
+ int complain)
{
tree type = TREE_TYPE (exp);
tree ctor_name;
@@ -1369,7 +1369,7 @@ expand_default_init (tree binfo, tree true_exp, tree exp, tree init, int flags,
static void
expand_aggr_init_1 (tree binfo, tree true_exp, tree exp, tree init, int flags,
- tsubst_flags_t complain)
+ int complain)
{
tree type = TREE_TYPE (exp);
@@ -1781,7 +1781,7 @@ avoid_placement_new_aliasing (tree t, tree placement)
static tree
build_new_1 (tree placement, tree type, tree nelts, tree init,
- bool globally_qualified_p, tsubst_flags_t complain)
+ bool globally_qualified_p, int complain)
{
tree size, rval;
/* True iff this is a call to "operator new[]" instead of just
@@ -2302,7 +2302,7 @@ build_new_1 (tree placement, tree type, tree nelts, tree init,
tree
build_new (tree placement, tree type, tree nelts, tree init,
- int use_global_new, tsubst_flags_t complain)
+ int use_global_new, int complain)
{
tree rval;
tree orig_placement;
@@ -2641,7 +2641,7 @@ get_temp_regvar (tree type, tree init)
tree
build_vec_init (tree base, tree maxindex, tree init,
bool explicit_value_init_p,
- int from_array, tsubst_flags_t complain)
+ int from_array, int complain)
{
tree rval;
tree base2 = NULL_TREE;
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 11edd4f0750..5fcb952adca 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -469,7 +469,8 @@ cp_lexer_get_preprocessor_token (cp_lexer *lexer, cp_token *token)
else if (token->type == CPP_PRAGMA)
{
/* We smuggled the cpp_token->u.pragma value in an INTEGER_CST. */
- token->pragma_kind = TREE_INT_CST_LOW (token->u.value);
+ token->pragma_kind = ((enum pragma_kind)
+ TREE_INT_CST_LOW (token->u.value));
token->u.value = NULL_TREE;
}
}
@@ -1272,7 +1273,7 @@ typedef struct cp_parser_expression_stack_entry
/* Tree code for the binary operation we are parsing. */
enum tree_code tree_type;
/* Precedence of the binary operation we are parsing. */
- int prec;
+ enum cp_parser_prec prec;
} cp_parser_expression_stack_entry;
/* The stack for storing partial expressions. We only need NUM_PREC_VALUES
@@ -1670,16 +1671,16 @@ static void cp_parser_block_declaration
static void cp_parser_simple_declaration
(cp_parser *, bool);
static void cp_parser_decl_specifier_seq
- (cp_parser *, cp_parser_flags, cp_decl_specifier_seq *, int *);
+ (cp_parser *, int, cp_decl_specifier_seq *, int *);
static tree cp_parser_storage_class_specifier_opt
(cp_parser *);
static tree cp_parser_function_specifier_opt
(cp_parser *, cp_decl_specifier_seq *);
static tree cp_parser_type_specifier
- (cp_parser *, cp_parser_flags, cp_decl_specifier_seq *, bool,
+ (cp_parser *, int, cp_decl_specifier_seq *, bool,
int *, bool *);
static tree cp_parser_simple_type_specifier
- (cp_parser *, cp_decl_specifier_seq *, cp_parser_flags);
+ (cp_parser *, cp_decl_specifier_seq *, int);
static tree cp_parser_type_name
(cp_parser *);
static tree cp_parser_nonclass_name
@@ -2155,11 +2156,11 @@ static void
cp_parser_check_decl_spec (cp_decl_specifier_seq *decl_specs,
location_t location)
{
- cp_decl_spec ds;
+ int ds;
for (ds = ds_first; ds != ds_last; ++ds)
{
- unsigned count = decl_specs->specs[(int)ds];
+ unsigned count = decl_specs->specs[ds];
if (count < 2)
continue;
/* The "long" specifier is a special case because of "long long". */
@@ -2190,7 +2191,7 @@ cp_parser_check_decl_spec (cp_decl_specifier_seq *decl_specs,
"__complex",
"__thread"
};
- error ("%Hduplicate %qs", &location, decl_spec_names[(int)ds]);
+ error ("%Hduplicate %qs", &location, decl_spec_names[ds]);
}
}
}
@@ -6377,16 +6378,25 @@ cp_parser_question_colon_clause (cp_parser* parser, tree logical_or_expr)
cp_lexer_consume_token (parser->lexer);
if (cp_parser_allow_gnu_extensions_p (parser)
&& cp_lexer_next_token_is (parser->lexer, CPP_COLON))
- /* Implicit true clause. */
- expr = NULL_TREE;
+ {
+ /* Implicit true clause. */
+ expr = NULL_TREE;
+ skip_evaluation += logical_or_expr == truthvalue_true_node;
+ }
else
- /* Parse the expression. */
- expr = cp_parser_expression (parser, /*cast_p=*/false, NULL);
+ {
+ /* Parse the expression. */
+ skip_evaluation += logical_or_expr == truthvalue_false_node;
+ expr = cp_parser_expression (parser, /*cast_p=*/false, NULL);
+ skip_evaluation += ((logical_or_expr == truthvalue_true_node)
+ - (logical_or_expr == truthvalue_false_node));
+ }
/* The next token should be a `:'. */
cp_parser_require (parser, CPP_COLON, "%<:%>");
/* Parse the assignment-expression. */
assignment_expr = cp_parser_assignment_expression (parser, /*cast_p=*/false, NULL);
+ skip_evaluation -= logical_or_expr == truthvalue_true_node;
/* Build the conditional-expression. */
return build_x_conditional_expr (logical_or_expr,
@@ -7044,6 +7054,7 @@ static void
cp_parser_label_for_labeled_statement (cp_parser* parser)
{
cp_token *token;
+ tree label = NULL_TREE;
/* The next token should be an identifier. */
token = cp_lexer_peek_token (parser->lexer);
@@ -7103,12 +7114,21 @@ cp_parser_label_for_labeled_statement (cp_parser* parser)
default:
/* Anything else must be an ordinary label. */
- finish_label_stmt (cp_parser_identifier (parser));
+ label = finish_label_stmt (cp_parser_identifier (parser));
break;
}
/* Require the `:' token. */
cp_parser_require (parser, CPP_COLON, "%<:%>");
+
+ /* For an ordinary label, check for attributes. */
+ if (label != NULL_TREE)
+ {
+ tree attrs = cp_parser_attributes_opt (parser);
+
+ if (attrs != NULL_TREE)
+ cplus_decl_attributes (&label, attrs, 0);
+ }
}
/* Parse an expression-statement.
@@ -8354,7 +8374,7 @@ cp_parser_simple_declaration (cp_parser* parser,
static void
cp_parser_decl_specifier_seq (cp_parser* parser,
- cp_parser_flags flags,
+ int flags,
cp_decl_specifier_seq *decl_specs,
int* declares_class_or_enum)
{
@@ -10962,7 +10982,7 @@ cp_parser_explicit_specialization (cp_parser* parser)
static tree
cp_parser_type_specifier (cp_parser* parser,
- cp_parser_flags flags,
+ int flags,
cp_decl_specifier_seq *decl_specs,
bool is_declaration,
int* declares_class_or_enum,
@@ -11141,7 +11161,7 @@ cp_parser_type_specifier (cp_parser* parser,
static tree
cp_parser_simple_type_specifier (cp_parser* parser,
cp_decl_specifier_seq *decl_specs,
- cp_parser_flags flags)
+ int flags)
{
tree type = NULL_TREE;
cp_token *token;
@@ -13320,182 +13340,184 @@ cp_parser_direct_declarator (cp_parser* parser,
}
else if (first && dcl_kind != CP_PARSER_DECLARATOR_ABSTRACT)
{
- tree qualifying_scope;
- tree unqualified_name;
- special_function_kind sfk;
- bool abstract_ok;
- bool pack_expansion_p = false;
- cp_token *declarator_id_start_token;
-
- /* Parse a declarator-id */
- abstract_ok = (dcl_kind == CP_PARSER_DECLARATOR_EITHER);
- if (abstract_ok)
- {
- cp_parser_parse_tentatively (parser);
-
- /* If we see an ellipsis, we should be looking at a
- parameter pack. */
- if (token->type == CPP_ELLIPSIS)
- {
- /* Consume the `...' */
- cp_lexer_consume_token (parser->lexer);
+ {
+ tree qualifying_scope;
+ tree unqualified_name;
+ special_function_kind sfk;
+ bool abstract_ok;
+ bool pack_expansion_p = false;
+ cp_token *declarator_id_start_token;
+
+ /* Parse a declarator-id */
+ abstract_ok = (dcl_kind == CP_PARSER_DECLARATOR_EITHER);
+ if (abstract_ok)
+ {
+ cp_parser_parse_tentatively (parser);
- pack_expansion_p = true;
- }
- }
+ /* If we see an ellipsis, we should be looking at a
+ parameter pack. */
+ if (token->type == CPP_ELLIPSIS)
+ {
+ /* Consume the `...' */
+ cp_lexer_consume_token (parser->lexer);
- declarator_id_start_token = cp_lexer_peek_token (parser->lexer);
- unqualified_name
- = cp_parser_declarator_id (parser, /*optional_p=*/abstract_ok);
- qualifying_scope = parser->scope;
- if (abstract_ok)
- {
- bool okay = false;
-
- if (!unqualified_name && pack_expansion_p)
- {
- /* Check whether an error occurred. */
- okay = !cp_parser_error_occurred (parser);
-
- /* We already consumed the ellipsis to mark a
- parameter pack, but we have no way to report it,
- so abort the tentative parse. We will be exiting
- immediately anyway. */
- cp_parser_abort_tentative_parse (parser);
- }
- else
- okay = cp_parser_parse_definitely (parser);
-
- if (!okay)
- unqualified_name = error_mark_node;
- else if (unqualified_name
- && (qualifying_scope
- || (TREE_CODE (unqualified_name)
- != IDENTIFIER_NODE)))
- {
- cp_parser_error (parser, "expected unqualified-id");
- unqualified_name = error_mark_node;
- }
- }
+ pack_expansion_p = true;
+ }
+ }
- if (!unqualified_name)
- return NULL;
- if (unqualified_name == error_mark_node)
- {
- declarator = cp_error_declarator;
- pack_expansion_p = false;
- declarator->parameter_pack_p = false;
- break;
- }
+ declarator_id_start_token = cp_lexer_peek_token (parser->lexer);
+ unqualified_name
+ = cp_parser_declarator_id (parser, /*optional_p=*/abstract_ok);
+ qualifying_scope = parser->scope;
+ if (abstract_ok)
+ {
+ bool okay = false;
- if (qualifying_scope && at_namespace_scope_p ()
- && TREE_CODE (qualifying_scope) == TYPENAME_TYPE)
- {
- /* In the declaration of a member of a template class
- outside of the class itself, the SCOPE will sometimes
- be a TYPENAME_TYPE. For example, given:
-
- template <typename T>
- int S<T>::R::i = 3;
-
- the SCOPE will be a TYPENAME_TYPE for `S<T>::R'. In
- this context, we must resolve S<T>::R to an ordinary
- type, rather than a typename type.
-
- The reason we normally avoid resolving TYPENAME_TYPEs
- is that a specialization of `S' might render
- `S<T>::R' not a type. However, if `S' is
- specialized, then this `i' will not be used, so there
- is no harm in resolving the types here. */
- tree type;
+ if (!unqualified_name && pack_expansion_p)
+ {
+ /* Check whether an error occurred. */
+ okay = !cp_parser_error_occurred (parser);
+
+ /* We already consumed the ellipsis to mark a
+ parameter pack, but we have no way to report it,
+ so abort the tentative parse. We will be exiting
+ immediately anyway. */
+ cp_parser_abort_tentative_parse (parser);
+ }
+ else
+ okay = cp_parser_parse_definitely (parser);
- /* Resolve the TYPENAME_TYPE. */
- type = resolve_typename_type (qualifying_scope,
- /*only_current_p=*/false);
- /* If that failed, the declarator is invalid. */
- if (TREE_CODE (type) == TYPENAME_TYPE)
- error ("%H%<%T::%E%> is not a type",
- &declarator_id_start_token->location,
- TYPE_CONTEXT (qualifying_scope),
- TYPE_IDENTIFIER (qualifying_scope));
- qualifying_scope = type;
- }
+ if (!okay)
+ unqualified_name = error_mark_node;
+ else if (unqualified_name
+ && (qualifying_scope
+ || (TREE_CODE (unqualified_name)
+ != IDENTIFIER_NODE)))
+ {
+ cp_parser_error (parser, "expected unqualified-id");
+ unqualified_name = error_mark_node;
+ }
+ }
- sfk = sfk_none;
+ if (!unqualified_name)
+ return NULL;
+ if (unqualified_name == error_mark_node)
+ {
+ declarator = cp_error_declarator;
+ pack_expansion_p = false;
+ declarator->parameter_pack_p = false;
+ break;
+ }
- if (unqualified_name)
- {
- tree class_type;
+ if (qualifying_scope && at_namespace_scope_p ()
+ && TREE_CODE (qualifying_scope) == TYPENAME_TYPE)
+ {
+ /* In the declaration of a member of a template class
+ outside of the class itself, the SCOPE will sometimes
+ be a TYPENAME_TYPE. For example, given:
+
+ template <typename T>
+ int S<T>::R::i = 3;
+
+ the SCOPE will be a TYPENAME_TYPE for `S<T>::R'. In
+ this context, we must resolve S<T>::R to an ordinary
+ type, rather than a typename type.
+
+ The reason we normally avoid resolving TYPENAME_TYPEs
+ is that a specialization of `S' might render
+ `S<T>::R' not a type. However, if `S' is
+ specialized, then this `i' will not be used, so there
+ is no harm in resolving the types here. */
+ tree type;
+
+ /* Resolve the TYPENAME_TYPE. */
+ type = resolve_typename_type (qualifying_scope,
+ /*only_current_p=*/false);
+ /* If that failed, the declarator is invalid. */
+ if (TREE_CODE (type) == TYPENAME_TYPE)
+ error ("%H%<%T::%E%> is not a type",
+ &declarator_id_start_token->location,
+ TYPE_CONTEXT (qualifying_scope),
+ TYPE_IDENTIFIER (qualifying_scope));
+ qualifying_scope = type;
+ }
- if (qualifying_scope
- && CLASS_TYPE_P (qualifying_scope))
- class_type = qualifying_scope;
- else
- class_type = current_class_type;
+ sfk = sfk_none;
- if (TREE_CODE (unqualified_name) == TYPE_DECL)
- {
- tree name_type = TREE_TYPE (unqualified_name);
- if (class_type && same_type_p (name_type, class_type))
- {
- if (qualifying_scope
- && CLASSTYPE_USE_TEMPLATE (name_type))
- {
- error ("%Hinvalid use of constructor as a template",
- &declarator_id_start_token->location);
- inform (input_location, "use %<%T::%D%> instead of %<%T::%D%> to "
- "name the constructor in a qualified name",
- class_type,
- DECL_NAME (TYPE_TI_TEMPLATE (class_type)),
- class_type, name_type);
- declarator = cp_error_declarator;
- break;
- }
- else
- unqualified_name = constructor_name (class_type);
- }
- else
- {
- /* We do not attempt to print the declarator
- here because we do not have enough
- information about its original syntactic
- form. */
- cp_parser_error (parser, "invalid declarator");
- declarator = cp_error_declarator;
- break;
- }
- }
+ if (unqualified_name)
+ {
+ tree class_type;
- if (class_type)
- {
- if (TREE_CODE (unqualified_name) == BIT_NOT_EXPR)
- sfk = sfk_destructor;
- else if (IDENTIFIER_TYPENAME_P (unqualified_name))
- sfk = sfk_conversion;
- else if (/* There's no way to declare a constructor
- for an anonymous type, even if the type
- got a name for linkage purposes. */
- !TYPE_WAS_ANONYMOUS (class_type)
- && constructor_name_p (unqualified_name,
- class_type))
- {
- unqualified_name = constructor_name (class_type);
- sfk = sfk_constructor;
- }
+ if (qualifying_scope
+ && CLASS_TYPE_P (qualifying_scope))
+ class_type = qualifying_scope;
+ else
+ class_type = current_class_type;
- if (ctor_dtor_or_conv_p && sfk != sfk_none)
- *ctor_dtor_or_conv_p = -1;
- }
- }
- declarator = make_id_declarator (qualifying_scope,
- unqualified_name,
- sfk);
- declarator->id_loc = token->location;
- declarator->parameter_pack_p = pack_expansion_p;
+ if (TREE_CODE (unqualified_name) == TYPE_DECL)
+ {
+ tree name_type = TREE_TYPE (unqualified_name);
+ if (class_type && same_type_p (name_type, class_type))
+ {
+ if (qualifying_scope
+ && CLASSTYPE_USE_TEMPLATE (name_type))
+ {
+ error ("%Hinvalid use of constructor as a template",
+ &declarator_id_start_token->location);
+ inform (input_location, "use %<%T::%D%> instead "
+ "of %<%T::%D%> to "
+ "name the constructor in a qualified name",
+ class_type,
+ DECL_NAME (TYPE_TI_TEMPLATE (class_type)),
+ class_type, name_type);
+ declarator = cp_error_declarator;
+ break;
+ }
+ else
+ unqualified_name = constructor_name (class_type);
+ }
+ else
+ {
+ /* We do not attempt to print the declarator
+ here because we do not have enough
+ information about its original syntactic
+ form. */
+ cp_parser_error (parser, "invalid declarator");
+ declarator = cp_error_declarator;
+ break;
+ }
+ }
- if (pack_expansion_p)
- maybe_warn_variadic_templates ();
+ if (class_type)
+ {
+ if (TREE_CODE (unqualified_name) == BIT_NOT_EXPR)
+ sfk = sfk_destructor;
+ else if (IDENTIFIER_TYPENAME_P (unqualified_name))
+ sfk = sfk_conversion;
+ else if (/* There's no way to declare a constructor
+ for an anonymous type, even if the type
+ got a name for linkage purposes. */
+ !TYPE_WAS_ANONYMOUS (class_type)
+ && constructor_name_p (unqualified_name,
+ class_type))
+ {
+ unqualified_name = constructor_name (class_type);
+ sfk = sfk_constructor;
+ }
+ if (ctor_dtor_or_conv_p && sfk != sfk_none)
+ *ctor_dtor_or_conv_p = -1;
+ }
+ }
+ declarator = make_id_declarator (qualifying_scope,
+ unqualified_name,
+ sfk);
+ declarator->id_loc = token->location;
+ declarator->parameter_pack_p = pack_expansion_p;
+
+ if (pack_expansion_p)
+ maybe_warn_variadic_templates ();
+ }
handle_declarator:;
scope = get_scope_of_declarator (declarator);
if (scope)
@@ -13842,7 +13864,7 @@ cp_parser_type_specifier_seq (cp_parser* parser,
cp_decl_specifier_seq *type_specifier_seq)
{
bool seen_type_specifier = false;
- cp_parser_flags flags = CP_PARSER_FLAGS_OPTIONAL;
+ int flags = CP_PARSER_FLAGS_OPTIONAL;
cp_token *start_token = NULL;
/* Clear the TYPE_SPECIFIER_SEQ. */
@@ -20331,7 +20353,7 @@ cp_parser_omp_var_list_no_open (cp_parser *parser, enum omp_clause_code kind,
decl = cp_parser_lookup_name_simple (parser, name, token->location);
if (decl == error_mark_node)
cp_parser_name_lookup_error (parser, name, decl, NULL, token->location);
- else if (kind != 0)
+ else if (kind != OMP_CLAUSE_ERROR)
{
tree u = build_omp_clause (kind);
OMP_CLAUSE_DECL (u) = decl;
@@ -21038,7 +21060,7 @@ static void
cp_parser_omp_flush (cp_parser *parser, cp_token *pragma_tok)
{
if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_PAREN))
- (void) cp_parser_omp_var_list (parser, 0, NULL);
+ (void) cp_parser_omp_var_list (parser, OMP_CLAUSE_ERROR, NULL);
cp_parser_require_pragma_eol (parser, pragma_tok);
finish_omp_flush ();
@@ -21879,7 +21901,7 @@ cp_parser_omp_threadprivate (cp_parser *parser, cp_token *pragma_tok)
{
tree vars;
- vars = cp_parser_omp_var_list (parser, 0, NULL);
+ vars = cp_parser_omp_var_list (parser, OMP_CLAUSE_ERROR, NULL);
cp_parser_require_pragma_eol (parser, pragma_tok);
finish_omp_threadprivate (vars);
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index bc0219461a8..3edbd5744c5 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -110,12 +110,11 @@ static void pop_tinst_level (void);
static tree reopen_tinst_level (struct tinst_level *);
static tree tsubst_initializer_list (tree, tree);
static tree get_class_bindings (tree, tree, tree);
-static tree coerce_template_parms (tree, tree, tree, tsubst_flags_t,
- bool, bool);
+static tree coerce_template_parms (tree, tree, tree, int, bool, bool);
static void tsubst_enum (tree, tree, tree);
static tree add_to_template_args (tree, tree);
static tree add_outermost_template_args (tree, tree);
-static bool check_instantiated_args (tree, tree, tsubst_flags_t);
+static bool check_instantiated_args (tree, tree, int);
static int maybe_adjust_types_for_deduction (unification_kind_t, tree*, tree*,
tree);
static int type_unification_real (tree, tree, tree, tree,
@@ -123,8 +122,7 @@ static int type_unification_real (tree, tree, tree, tree,
static void note_template_header (int);
static tree convert_nontype_argument_function (tree, tree);
static tree convert_nontype_argument (tree, tree);
-static tree convert_template_argument (tree, tree, tree,
- tsubst_flags_t, int, tree);
+static tree convert_template_argument (tree, tree, tree, int, int, tree);
static int for_each_template_parm (tree, tree_fn_t, void*,
struct pointer_set_t*, bool);
static tree expand_template_argument_pack (tree);
@@ -133,7 +131,7 @@ static bool inline_needs_template_parms (tree);
static void push_inline_template_parms_recursive (tree, int);
static tree retrieve_local_specialization (tree);
static void register_local_specialization (tree, tree);
-static tree reduce_template_parm_level (tree, tree, int, tree, tsubst_flags_t);
+static tree reduce_template_parm_level (tree, tree, int, tree, int);
static int mark_template_parm (tree, void *);
static int template_parm_this_level_p (tree, void *);
static tree tsubst_friend_function (tree, tree);
@@ -144,37 +142,36 @@ static int template_decl_level (tree);
static int check_cv_quals_for_unify (int, tree, tree);
static void template_parm_level_and_index (tree, int*, int*);
static int unify_pack_expansion (tree, tree, tree, tree, int, bool, bool);
-static tree tsubst_template_arg (tree, tree, tsubst_flags_t, tree);
-static tree tsubst_template_args (tree, tree, tsubst_flags_t, tree);
-static tree tsubst_template_parms (tree, tree, tsubst_flags_t);
+static tree tsubst_template_arg (tree, tree, int, tree);
+static tree tsubst_template_args (tree, tree, int, tree);
+static tree tsubst_template_parms (tree, tree, int);
static void regenerate_decl_from_template (tree, tree);
static tree most_specialized_class (tree, tree);
-static tree tsubst_aggr_type (tree, tree, tsubst_flags_t, tree, int);
-static tree tsubst_arg_types (tree, tree, tsubst_flags_t, tree);
-static tree tsubst_function_type (tree, tree, tsubst_flags_t, tree);
+static tree tsubst_aggr_type (tree, tree, int, tree, int);
+static tree tsubst_arg_types (tree, tree, int, tree);
+static tree tsubst_function_type (tree, tree, int, tree);
static bool check_specialization_scope (void);
static tree process_partial_specialization (tree);
static void set_current_access_from_decl (tree);
static tree get_template_base (tree, tree, tree, tree);
static tree try_class_unification (tree, tree, tree, tree);
-static int coerce_template_template_parms (tree, tree, tsubst_flags_t,
- tree, tree);
+static int coerce_template_template_parms (tree, tree, int, tree, tree);
static bool template_template_parm_bindings_ok_p (tree, tree);
static int template_args_equal (tree, tree);
static void tsubst_default_arguments (tree);
static tree for_each_template_parm_r (tree *, int *, void *);
static tree copy_default_args_to_explicit_spec_1 (tree, tree);
static void copy_default_args_to_explicit_spec (tree);
-static int invalid_nontype_parm_type_p (tree, tsubst_flags_t);
+static int invalid_nontype_parm_type_p (tree, int);
static int eq_local_specializations (const void *, const void *);
static bool dependent_template_arg_p (tree);
static bool any_template_arguments_need_structural_equality_p (tree);
static bool dependent_type_p_r (tree);
-static tree tsubst (tree, tree, tsubst_flags_t, tree);
-static tree tsubst_expr (tree, tree, tsubst_flags_t, tree, bool);
-static tree tsubst_copy (tree, tree, tsubst_flags_t, tree);
-static tree tsubst_pack_expansion (tree, tree, tsubst_flags_t, tree);
-static tree tsubst_decl (tree, tree, tsubst_flags_t);
+static tree tsubst (tree, tree, int, tree);
+static tree tsubst_expr (tree, tree, int, tree, bool);
+static tree tsubst_copy (tree, tree, int, tree);
+static tree tsubst_pack_expansion (tree, tree, int, tree);
+static tree tsubst_decl (tree, tree, int);
/* Make the current scope suitable for access checking when we are
processing T. T can be FUNCTION_DECL for instantiated function
@@ -2920,7 +2917,7 @@ canonical_type_parameter (tree type)
static tree
reduce_template_parm_level (tree index, tree type, int levels, tree args,
- tsubst_flags_t complain)
+ int complain)
{
if (TEMPLATE_PARM_DESCENDANTS (index) == NULL_TREE
|| (TEMPLATE_PARM_LEVEL (TEMPLATE_PARM_DESCENDANTS (index))
@@ -3007,7 +3004,7 @@ process_template_parm (tree list, tree parm, bool is_non_type,
The top-level cv-qualifiers on the template-parameter are
ignored when determining its type. */
TREE_TYPE (parm) = TYPE_MAIN_VARIANT (TREE_TYPE (parm));
- if (invalid_nontype_parm_type_p (TREE_TYPE (parm), 1))
+ if (invalid_nontype_parm_type_p (TREE_TYPE (parm), tf_error))
{
err_parm_list = build_tree_list (defval, parm);
TREE_VALUE (err_parm_list) = error_mark_node;
@@ -4663,7 +4660,7 @@ convert_nontype_argument (tree type, tree expr)
static int
coerce_template_template_parm (tree parm,
tree arg,
- tsubst_flags_t complain,
+ int complain,
tree in_decl,
tree outer_args)
{
@@ -4741,7 +4738,7 @@ coerce_template_template_parm (tree parm,
static int
coerce_template_template_parms (tree parm_parms,
tree arg_parms,
- tsubst_flags_t complain,
+ int complain,
tree in_decl,
tree outer_args)
{
@@ -4920,7 +4917,7 @@ static tree
convert_template_argument (tree parm,
tree arg,
tree args,
- tsubst_flags_t complain,
+ int complain,
int i,
tree in_decl)
{
@@ -5130,7 +5127,7 @@ coerce_template_parameter_pack (tree parms,
tree new_args,
int* lost,
tree in_decl,
- tsubst_flags_t complain)
+ int complain)
{
tree parm = TREE_VEC_ELT (parms, parm_idx);
int nargs = inner_args ? NUM_TMPL_ARGS (inner_args) : 0;
@@ -5249,7 +5246,7 @@ static tree
coerce_template_parms (tree parms,
tree args,
tree in_decl,
- tsubst_flags_t complain,
+ int complain,
bool require_all_args,
bool use_default_args)
{
@@ -5598,7 +5595,7 @@ lookup_template_class (tree d1,
tree in_decl,
tree context,
int entering_scope,
- tsubst_flags_t complain)
+ int complain)
{
tree templ = NULL_TREE, parmlist;
tree t;
@@ -6860,7 +6857,7 @@ can_complete_type_without_circularity (tree type)
static void
apply_late_template_attributes (tree *decl_p, tree attributes, int attr_flags,
- tree args, tsubst_flags_t complain, tree in_decl)
+ tree args, int complain, tree in_decl)
{
tree last_dep = NULL_TREE;
tree t;
@@ -7420,7 +7417,7 @@ instantiate_class_template (tree type)
}
static tree
-tsubst_template_arg (tree t, tree args, tsubst_flags_t complain, tree in_decl)
+tsubst_template_arg (tree t, tree args, int complain, tree in_decl)
{
tree r;
@@ -7474,8 +7471,7 @@ make_fnparm_pack (tree spec_parm)
(if only a partial substitution could be performed) or
ERROR_MARK_NODE if there was an error. */
tree
-tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain,
- tree in_decl)
+tsubst_pack_expansion (tree t, tree args, int complain, tree in_decl)
{
tree pattern;
tree pack, packs = NULL_TREE, unsubstituted_packs = NULL_TREE;
@@ -7711,7 +7707,7 @@ tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain,
/* Substitute ARGS into the vector or list of template arguments T. */
static tree
-tsubst_template_args (tree t, tree args, tsubst_flags_t complain, tree in_decl)
+tsubst_template_args (tree t, tree args, int complain, tree in_decl)
{
tree orig_t = t;
int len = TREE_VEC_LENGTH (t);
@@ -7808,7 +7804,7 @@ tsubst_template_args (tree t, tree args, tsubst_flags_t complain, tree in_decl)
result will be `template <int*, double, class V>'. */
static tree
-tsubst_template_parms (tree parms, tree args, tsubst_flags_t complain)
+tsubst_template_parms (tree parms, tree args, int complain)
{
tree r = NULL_TREE;
tree* new_parms;
@@ -7876,7 +7872,7 @@ tsubst_template_parms (tree parms, tree args, tsubst_flags_t complain)
static tree
tsubst_aggr_type (tree t,
tree args,
- tsubst_flags_t complain,
+ int complain,
tree in_decl,
int entering_scope)
{
@@ -8037,7 +8033,7 @@ tsubst_default_arguments (tree fn)
control of COMPLAIN. */
static tree
-tsubst_decl (tree t, tree args, tsubst_flags_t complain)
+tsubst_decl (tree t, tree args, int complain)
{
location_t saved_loc;
tree r = NULL_TREE;
@@ -8782,7 +8778,7 @@ tsubst_decl (tree t, tree args, tsubst_flags_t complain)
static tree
tsubst_arg_types (tree arg_types,
tree args,
- tsubst_flags_t complain,
+ int complain,
tree in_decl)
{
tree remaining_arg_types;
@@ -8888,7 +8884,7 @@ tsubst_arg_types (tree arg_types,
static tree
tsubst_function_type (tree t,
tree args,
- tsubst_flags_t complain,
+ int complain,
tree in_decl)
{
tree return_type;
@@ -8962,7 +8958,7 @@ tsubst_function_type (tree t,
static tree
tsubst_exception_specification (tree fntype,
tree args,
- tsubst_flags_t complain,
+ int complain,
tree in_decl)
{
tree specs;
@@ -9042,7 +9038,7 @@ tsubst_exception_specification (tree fntype,
for expressions, use tsubst_expr or tsubst_copy. */
static tree
-tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
+tsubst (tree t, tree args, int complain, tree in_decl)
{
tree type, r;
@@ -9776,7 +9772,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
static tree
tsubst_baselink (tree baselink, tree object_type,
- tree args, tsubst_flags_t complain, tree in_decl)
+ tree args, int complain, tree in_decl)
{
tree name;
tree qualifying_scope;
@@ -9842,7 +9838,7 @@ tsubst_baselink (tree baselink, tree object_type,
static tree
tsubst_qualified_id (tree qualified_id, tree args,
- tsubst_flags_t complain, tree in_decl,
+ int complain, tree in_decl,
bool done, bool address_p)
{
tree expr;
@@ -9957,7 +9953,7 @@ tsubst_qualified_id (tree qualified_id, tree args,
tsubst_expr. */
static tree
-tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
+tsubst_copy (tree t, tree args, int complain, tree in_decl)
{
enum tree_code code;
tree r;
@@ -10390,8 +10386,7 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
/* Like tsubst_copy, but specifically for OpenMP clauses. */
static tree
-tsubst_omp_clauses (tree clauses, tree args, tsubst_flags_t complain,
- tree in_decl)
+tsubst_omp_clauses (tree clauses, tree args, int complain, tree in_decl)
{
tree new_clauses = NULL, nc, oc;
@@ -10443,8 +10438,7 @@ tsubst_omp_clauses (tree clauses, tree args, tsubst_flags_t complain,
/* Like tsubst_copy_and_build, but unshare TREE_LIST nodes. */
static tree
-tsubst_copy_asm_operands (tree t, tree args, tsubst_flags_t complain,
- tree in_decl)
+tsubst_copy_asm_operands (tree t, tree args, int complain, tree in_decl)
{
#define RECUR(t) tsubst_copy_asm_operands (t, args, complain, in_decl)
@@ -10479,7 +10473,7 @@ tsubst_copy_asm_operands (tree t, tree args, tsubst_flags_t complain,
static void
tsubst_omp_for_iterator (tree t, int i, tree declv, tree initv,
tree condv, tree incrv, tree *clauses,
- tree args, tsubst_flags_t complain, tree in_decl,
+ tree args, int complain, tree in_decl,
bool integral_constant_expression_p)
{
#define RECUR(NODE) \
@@ -10619,7 +10613,7 @@ tsubst_omp_for_iterator (tree t, int i, tree declv, tree initv,
processing. */
static tree
-tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl,
+tsubst_expr (tree t, tree args, int complain, tree in_decl,
bool integral_constant_expression_p)
{
#define RECUR(NODE) \
@@ -10828,7 +10822,14 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl,
break;
case LABEL_EXPR:
- finish_label_stmt (DECL_NAME (LABEL_EXPR_LABEL (t)));
+ {
+ tree decl = LABEL_EXPR_LABEL (t);
+ tree label;
+
+ label = finish_label_stmt (DECL_NAME (decl));
+ if (DECL_ATTRIBUTES (decl) != NULL_TREE)
+ cplus_decl_attributes (&label, DECL_ATTRIBUTES (decl), 0);
+ }
break;
case GOTO_EXPR:
@@ -11062,7 +11063,7 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl,
static tree
tsubst_non_call_postfix_expression (tree t, tree args,
- tsubst_flags_t complain,
+ int complain,
tree in_decl)
{
if (TREE_CODE (t) == SCOPE_REF)
@@ -11082,7 +11083,7 @@ tsubst_non_call_postfix_expression (tree t, tree args,
tree
tsubst_copy_and_build (tree t,
tree args,
- tsubst_flags_t complain,
+ int complain,
tree in_decl,
bool function_p,
bool integral_constant_expression_p)
@@ -11863,7 +11864,7 @@ tsubst_copy_and_build (tree t,
Emit an error under control of COMPLAIN, and return TRUE on error. */
static bool
-check_instantiated_arg (tree tmpl, tree t, tsubst_flags_t complain)
+check_instantiated_arg (tree tmpl, tree t, int complain)
{
if (ARGUMENT_PACK_P (t))
{
@@ -11923,7 +11924,7 @@ check_instantiated_arg (tree tmpl, tree t, tsubst_flags_t complain)
}
static bool
-check_instantiated_args (tree tmpl, tree args, tsubst_flags_t complain)
+check_instantiated_args (tree tmpl, tree args, int complain)
{
int ix, len = DECL_NTPARMS (tmpl);
bool result = false;
@@ -11942,7 +11943,7 @@ check_instantiated_args (tree tmpl, tree args, tsubst_flags_t complain)
the template arguments in TARG_PTR. */
tree
-instantiate_template (tree tmpl, tree targ_ptr, tsubst_flags_t complain)
+instantiate_template (tree tmpl, tree targ_ptr, int complain)
{
tree fndecl;
tree gen_tmpl;
@@ -13087,7 +13088,9 @@ unify_pack_expansion (tree tparms, tree targs, tree packed_parms,
match. */
if (resolve_overloaded_unification
- (tparms, targs, parm, arg, strict, sub_strict)
+ (tparms, targs, parm, arg,
+ (unification_kind_t) strict,
+ sub_strict)
!= 0)
return 1;
skip_arg_p = true;
@@ -13106,8 +13109,8 @@ unify_pack_expansion (tree tparms, tree targs, tree packed_parms,
if (!subr)
arg_strict |=
- maybe_adjust_types_for_deduction (strict, &parm, &arg,
- arg_expr);
+ maybe_adjust_types_for_deduction ((unification_kind_t) strict,
+ &parm, &arg, arg_expr);
}
if (!skip_arg_p)
@@ -14928,7 +14931,7 @@ instantiate_class_member (tree decl, int extern_p)
since the standard is unclear (as detailed below). */
void
-do_type_instantiation (tree t, tree storage, tsubst_flags_t complain)
+do_type_instantiation (tree t, tree storage, int complain)
{
int extern_p = 0;
int nomem_p = 0;
@@ -15970,7 +15973,7 @@ current_instantiation (void)
warning messages under control of COMPLAIN. */
static int
-invalid_nontype_parm_type_p (tree type, tsubst_flags_t complain)
+invalid_nontype_parm_type_p (tree type, int complain)
{
if (INTEGRAL_TYPE_P (type))
return 0;
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index 1d5da671437..76c68bfe34f 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -104,7 +104,7 @@ static GTY (()) VEC(tinfo_s,gc) *tinfo_descs;
static tree ifnonnull (tree, tree);
static tree tinfo_name (tree);
-static tree build_dynamic_cast_1 (tree, tree, tsubst_flags_t);
+static tree build_dynamic_cast_1 (tree, tree, int);
static tree throw_bad_cast (void);
static tree throw_bad_typeid (void);
static tree get_tinfo_decl_dynamic (tree);
@@ -488,7 +488,7 @@ ifnonnull (tree test, tree result)
paper. */
static tree
-build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain)
+build_dynamic_cast_1 (tree type, tree expr, int complain)
{
enum tree_code tc = TREE_CODE (type);
tree exprtype = TREE_TYPE (expr);
@@ -743,7 +743,7 @@ build_dynamic_cast_1 (tree type, tree expr, tsubst_flags_t complain)
}
tree
-build_dynamic_cast (tree type, tree expr, tsubst_flags_t complain)
+build_dynamic_cast (tree type, tree expr, int complain)
{
if (type == error_mark_node || expr == error_mark_node)
return error_mark_node;
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index 4f36e643268..cb54c9d8c30 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -189,7 +189,7 @@ accessible_base_p (tree t, tree base, bool consider_local_p)
NULL_TREE is returned. */
tree
-lookup_base (tree t, tree base, base_access access, base_kind *kind_ptr)
+lookup_base (tree t, tree base, int access, base_kind *kind_ptr)
{
tree binfo;
tree t_binfo;
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 365e5ca3a00..1fc3e6c87f7 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -1316,7 +1316,7 @@ finish_asm_stmt (int volatile_p, tree string, tree output_operands,
return add_stmt (r);
}
-/* Finish a label with the indicated NAME. */
+/* Finish a label with the indicated NAME. Returns the new label. */
tree
finish_label_stmt (tree name)
@@ -1326,7 +1326,9 @@ finish_label_stmt (tree name)
if (decl == error_mark_node)
return error_mark_node;
- return add_stmt (build_stmt (LABEL_EXPR, decl));
+ add_stmt (build_stmt (LABEL_EXPR, decl));
+
+ return decl;
}
/* Finish a series of declarations for local labels. G++ allows users
@@ -1853,7 +1855,7 @@ perform_koenig_lookup (tree fn, tree args)
tree
finish_call_expr (tree fn, tree args, bool disallow_virtual, bool koenig_p,
- tsubst_flags_t complain)
+ int complain)
{
tree result;
tree orig_fn;
@@ -3615,7 +3617,7 @@ finish_omp_clauses (tree clauses)
for (pc = &clauses, c = clauses; c ; c = *pc)
{
- enum tree_code c_kind = OMP_CLAUSE_CODE (c);
+ enum omp_clause_code c_kind = OMP_CLAUSE_CODE (c);
bool remove = false;
bool need_complete_non_reference = false;
bool need_default_ctor = false;
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index b4b977ef1a9..e939205feb8 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -44,7 +44,7 @@ static tree build_cplus_array_type_1 (tree, tree);
static int list_hash_eq (const void *, const void *);
static hashval_t list_hash_pieces (tree, tree, tree);
static hashval_t list_hash (const void *);
-static cp_lvalue_kind lvalue_p_1 (tree, int);
+static int lvalue_p_1 (tree, int);
static tree build_target_expr (tree, tree);
static tree count_trees_r (tree *, int *, void *);
static tree verify_stmt_tree_r (tree *, int *, void *);
@@ -58,12 +58,12 @@ static tree handle_init_priority_attribute (tree *, tree, tree, int, bool *);
Otherwise, returns clk_none. If TREAT_CLASS_RVALUES_AS_LVALUES is
nonzero, rvalues of class type are considered lvalues. */
-static cp_lvalue_kind
+static int
lvalue_p_1 (tree ref,
int treat_class_rvalues_as_lvalues)
{
- cp_lvalue_kind op1_lvalue_kind = clk_none;
- cp_lvalue_kind op2_lvalue_kind = clk_none;
+ int op1_lvalue_kind = clk_none;
+ int op2_lvalue_kind = clk_none;
/* Expressions of reference type are sometimes wrapped in
INDIRECT_REFs. INDIRECT_REFs are just internal compiler
@@ -241,7 +241,7 @@ lvalue_p_1 (tree ref,
[basic.lval]. This function should really be named lvalue_p; it
computes the C++ definition of lvalue. */
-cp_lvalue_kind
+int
real_lvalue_p (tree ref)
{
return lvalue_p_1 (ref,
@@ -748,7 +748,7 @@ c_build_qualified_type (tree type, int type_quals)
tree
cp_build_qualified_type_real (tree type,
int type_quals,
- tsubst_flags_t complain)
+ int complain)
{
tree result;
int bad_quals = TYPE_UNQUALIFIED;
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 76d6d5d8c44..ae63046bff8 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -48,7 +48,7 @@ along with GCC; see the file COPYING3. If not see
static tree pfn_from_ptrmemfunc (tree);
static tree delta_from_ptrmemfunc (tree);
static tree convert_for_assignment (tree, tree, const char *, tree, int,
- tsubst_flags_t);
+ int);
static tree cp_pointer_int_sum (enum tree_code, tree, tree);
static tree rationalize_conditional_expr (enum tree_code, tree,
tsubst_flags_t);
@@ -61,8 +61,7 @@ static void casts_away_constness_r (tree *, tree *);
static bool casts_away_constness (tree, tree);
static void maybe_warn_about_returning_address_of_local (tree);
static tree lookup_destructor (tree, tree, tree);
-static int convert_arguments (int, tree *, tree, tree, tree, int,
- tsubst_flags_t);
+static int convert_arguments (int, tree *, tree, tree, tree, int, int);
/* Do `exp = require_complete_type (exp);' to make sure exp
does not have an incomplete type. (That includes void types.)
@@ -417,7 +416,7 @@ type_after_usual_arithmetic_conversions (tree t1, tree t2)
static tree
composite_pointer_type_r (tree t1, tree t2, const char* location,
- tsubst_flags_t complain)
+ int complain)
{
tree pointee1;
tree pointee2;
@@ -492,7 +491,7 @@ composite_pointer_type_r (tree t1, tree t2, const char* location,
tree
composite_pointer_type (tree t1, tree t2, tree arg1, tree arg2,
- const char* location, tsubst_flags_t complain)
+ const char* location, int complain)
{
tree class1;
tree class2;
@@ -1506,7 +1505,7 @@ cxx_sizeof_or_alignof_expr (tree e, enum tree_code op, bool complain)
violates these rules. */
bool
-invalid_nonstatic_memfn_p (const_tree expr, tsubst_flags_t complain)
+invalid_nonstatic_memfn_p (const_tree expr, int complain)
{
if (DECL_NONSTATIC_MEMBER_FUNCTION_P (expr))
{
@@ -1874,7 +1873,7 @@ lookup_anon_field (tree t, tree type)
tree
build_class_member_access_expr (tree object, tree member,
tree access_path, bool preserve_reference,
- tsubst_flags_t complain)
+ int complain)
{
tree object_type;
tree member_scope;
@@ -2222,7 +2221,7 @@ check_template_keyword (tree decl)
tree
finish_class_member_access_expr (tree object, tree name, bool template_p,
- tsubst_flags_t complain)
+ int complain)
{
tree expr;
tree object_type;
@@ -2430,7 +2429,7 @@ build_ptrmemfunc_access_expr (tree ptrmem, tree member_name)
tree
build_x_indirect_ref (tree expr, const char *errorstring,
- tsubst_flags_t complain)
+ int complain)
{
tree orig_expr = expr;
tree rval;
@@ -2462,8 +2461,7 @@ build_indirect_ref (location_t loc __attribute__ ((__unused__)),
}
tree
-cp_build_indirect_ref (tree ptr, const char *errorstring,
- tsubst_flags_t complain)
+cp_build_indirect_ref (tree ptr, const char *errorstring, int complain)
{
tree pointer, type;
@@ -2858,7 +2856,7 @@ build_function_call (tree function, tree params)
}
tree
-cp_build_function_call (tree function, tree params, tsubst_flags_t complain)
+cp_build_function_call (tree function, tree params, int complain)
{
tree fntype, fndecl;
tree name = NULL_TREE;
@@ -2976,7 +2974,7 @@ cp_build_function_call (tree function, tree params, tsubst_flags_t complain)
static int
convert_arguments (int nargs, tree *argarray,
tree typelist, tree values, tree fndecl, int flags,
- tsubst_flags_t complain)
+ int complain)
{
tree typetail, valtail;
const char *called_thing = 0;
@@ -3157,7 +3155,7 @@ convert_arguments (int nargs, tree *argarray,
tree
build_x_binary_op (enum tree_code code, tree arg1, enum tree_code arg1_code,
tree arg2, enum tree_code arg2_code, bool *overloaded_p,
- tsubst_flags_t complain)
+ int complain)
{
tree orig_arg1;
tree orig_arg2;
@@ -3201,7 +3199,7 @@ build_x_binary_op (enum tree_code code, tree arg1, enum tree_code arg1_code,
/* Build and return an ARRAY_REF expression. */
tree
-build_x_array_ref (tree arg1, tree arg2, tsubst_flags_t complain)
+build_x_array_ref (tree arg1, tree arg2, int complain)
{
tree orig_arg1 = arg1;
tree orig_arg2 = arg2;
@@ -3257,7 +3255,7 @@ build_binary_op (location_t location, enum tree_code code, tree op0, tree op1,
tree
cp_build_binary_op (location_t location,
enum tree_code code, tree orig_op0, tree orig_op1,
- tsubst_flags_t complain)
+ int complain)
{
tree op0, op1;
enum tree_code code0, code1;
@@ -3502,13 +3500,14 @@ cp_build_binary_op (location_t location,
{
if (tree_int_cst_lt (op1, integer_zero_node))
{
- if (complain & tf_warning)
+ if ((complain & tf_warning) && !skip_evaluation)
warning (0, "right shift count is negative");
}
else
{
if (compare_tree_int (op1, TYPE_PRECISION (type0)) >= 0
- && (complain & tf_warning))
+ && (complain & tf_warning)
+ && !skip_evaluation)
warning (0, "right shift count >= width of type");
}
}
@@ -3529,12 +3528,12 @@ cp_build_binary_op (location_t location,
{
if (tree_int_cst_lt (op1, integer_zero_node))
{
- if (complain & tf_warning)
+ if ((complain & tf_warning) && !skip_evaluation)
warning (0, "left shift count is negative");
}
else if (compare_tree_int (op1, TYPE_PRECISION (type0)) >= 0)
{
- if (complain & tf_warning)
+ if ((complain & tf_warning) && !skip_evaluation)
warning (0, "left shift count >= width of type");
}
}
@@ -4083,7 +4082,7 @@ pointer_diff (tree op0, tree op1, tree ptrtype)
and XARG is the operand. */
tree
-build_x_unary_op (enum tree_code code, tree xarg, tsubst_flags_t complain)
+build_x_unary_op (enum tree_code code, tree xarg, int complain)
{
tree orig_expr = xarg;
tree exp;
@@ -4236,7 +4235,7 @@ build_nop (tree type, tree expr)
tree
cp_build_unary_op (enum tree_code code, tree xarg, int noconvert,
- tsubst_flags_t complain)
+ int complain)
{
/* No default_conversion here. It causes trouble for ADDR_EXPR. */
tree arg = xarg;
@@ -4900,8 +4899,7 @@ cxx_mark_addressable (tree exp)
/* Build and return a conditional expression IFEXP ? OP1 : OP2. */
tree
-build_x_conditional_expr (tree ifexp, tree op1, tree op2,
- tsubst_flags_t complain)
+build_x_conditional_expr (tree ifexp, tree op1, tree op2, int complain)
{
tree orig_ifexp = ifexp;
tree orig_op1 = op1;
@@ -4954,7 +4952,7 @@ tree build_x_compound_expr_from_list (tree list, const char *msg)
/* Handle overloading of the ',' operator when needed. */
tree
-build_x_compound_expr (tree op1, tree op2, tsubst_flags_t complain)
+build_x_compound_expr (tree op1, tree op2, int complain)
{
tree result;
tree orig_op1 = op1;
@@ -4991,7 +4989,7 @@ build_compound_expr (tree lhs, tree rhs)
/* Build a compound expression. */
tree
-cp_build_compound_expr (tree lhs, tree rhs, tsubst_flags_t complain)
+cp_build_compound_expr (tree lhs, tree rhs, int complain)
{
lhs = convert_to_void (lhs, "left-hand operand of comma", complain);
@@ -5131,7 +5129,7 @@ ignore_overflows (tree expr, tree orig)
static tree
build_static_cast_1 (tree type, tree expr, bool c_cast_p,
- bool *valid_p, tsubst_flags_t complain)
+ bool *valid_p, int complain)
{
tree intype;
tree result;
@@ -5332,7 +5330,7 @@ build_static_cast_1 (tree type, tree expr, bool c_cast_p,
/* Return an expression representing static_cast<TYPE>(EXPR). */
tree
-build_static_cast (tree type, tree expr, tsubst_flags_t complain)
+build_static_cast (tree type, tree expr, int complain)
{
tree result;
bool valid_p;
@@ -5407,7 +5405,7 @@ convert_member_func_to_ptr (tree type, tree expr)
static tree
build_reinterpret_cast_1 (tree type, tree expr, bool c_cast_p,
- bool *valid_p, tsubst_flags_t complain)
+ bool *valid_p, int complain)
{
tree intype;
@@ -5564,7 +5562,7 @@ build_reinterpret_cast_1 (tree type, tree expr, bool c_cast_p,
}
tree
-build_reinterpret_cast (tree type, tree expr, tsubst_flags_t complain)
+build_reinterpret_cast (tree type, tree expr, int complain)
{
if (type == error_mark_node || expr == error_mark_node)
return error_mark_node;
@@ -5701,7 +5699,7 @@ build_const_cast_1 (tree dst_type, tree expr, bool complain,
}
tree
-build_const_cast (tree type, tree expr, tsubst_flags_t complain)
+build_const_cast (tree type, tree expr, int complain)
{
if (type == error_mark_node || error_operand_p (expr))
return error_mark_node;
@@ -5733,7 +5731,7 @@ build_c_cast (tree type, tree expr)
TYPE of expression EXPR. */
tree
-cp_build_c_cast (tree type, tree expr, tsubst_flags_t complain)
+cp_build_c_cast (tree type, tree expr, int complain)
{
tree value = expr;
tree result;
@@ -5854,7 +5852,7 @@ build_modify_expr (location_t location ATTRIBUTE_UNUSED,
tree
cp_build_modify_expr (tree lhs, enum tree_code modifycode, tree rhs,
- tsubst_flags_t complain)
+ int complain)
{
tree result;
tree newrhs = rhs;
@@ -6155,7 +6153,7 @@ cp_build_modify_expr (tree lhs, enum tree_code modifycode, tree rhs,
tree
build_x_modify_expr (tree lhs, enum tree_code modifycode, tree rhs,
- tsubst_flags_t complain)
+ int complain)
{
if (processing_template_decl)
return build_min_nt (MODOP_EXPR, lhs,
@@ -6518,7 +6516,7 @@ delta_from_ptrmemfunc (tree t)
static tree
convert_for_assignment (tree type, tree rhs,
const char *errtype, tree fndecl, int parmnum,
- tsubst_flags_t complain)
+ int complain)
{
tree rhstype;
enum tree_code coder;
@@ -6661,7 +6659,7 @@ convert_for_assignment (tree type, tree rhs,
tree
convert_for_initialization (tree exp, tree type, tree rhs, int flags,
const char *errtype, tree fndecl, int parmnum,
- tsubst_flags_t complain)
+ int complain)
{
enum tree_code codel = TREE_CODE (type);
tree rhstype;
@@ -7401,7 +7399,7 @@ non_reference (tree t)
how the lvalue is being used and so selects the error message. */
int
-lvalue_or_else (tree ref, enum lvalue_use use, tsubst_flags_t complain)
+lvalue_or_else (tree ref, enum lvalue_use use, int complain)
{
int win = lvalue_p (ref);
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 747c964706c..a7a887393ae 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -1430,7 +1430,7 @@ build_m_component_ref (tree datum, tree component)
/* Return a tree node for the expression TYPENAME '(' PARMS ')'. */
tree
-build_functional_cast (tree exp, tree parms, tsubst_flags_t complain)
+build_functional_cast (tree exp, tree parms, int complain)
{
/* This is either a call to a constructor,
or a C cast in C++'s `functional' notation. */
diff --git a/gcc/cse.c b/gcc/cse.c
index 04f52fb7d77..4139c99173d 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. */
@@ -517,6 +520,12 @@ static struct table_elt *free_element_chain;
static int constant_pool_entries_cost;
static int constant_pool_entries_regcost;
+struct branch_path
+{
+ /* The basic block for this path entry. */
+ basic_block bb;
+};
+
/* This data describes a block that will be processed by
cse_extended_basic_block. */
@@ -527,11 +536,7 @@ struct cse_basic_block_data
/* Size of current branch path, if any. */
int path_size;
/* Current path, indicating which basic_blocks will be processed. */
- struct branch_path
- {
- /* The basic block for this path entry. */
- basic_block bb;
- } *path;
+ struct branch_path *path;
};
@@ -1463,7 +1468,8 @@ insert (rtx x, struct table_elt *classp, unsigned int hash, enum machine_mode mo
struct table_elt *p, *next;
for (p = classp; (next = p->next_same_value) && CHEAPER (next, elt);
- p = next);
+ p = next)
+ ;
/* Put it after P and before NEXT. */
elt->next_same_value = next;
@@ -2329,14 +2335,14 @@ hash_rtx_cb (const_rtx x, enum machine_mode mode,
goto repeat;
}
- hash += hash_rtx_cb (XEXP (x, i), 0, do_not_record_p,
+ hash += hash_rtx_cb (XEXP (x, i), VOIDmode, do_not_record_p,
hash_arg_in_memory_p,
have_reg_qty, cb);
break;
case 'E':
for (j = 0; j < XVECLEN (x, i); j++)
- hash += hash_rtx_cb (XVECEXP (x, i, j), 0, do_not_record_p,
+ hash += hash_rtx_cb (XVECEXP (x, i, j), VOIDmode, do_not_record_p,
hash_arg_in_memory_p,
have_reg_qty, cb);
break;
@@ -6998,3 +7004,4 @@ struct rtl_opt_pass pass_cse2 =
}
};
+END_TARGET_SPECIFIC
diff --git a/gcc/cselib.c b/gcc/cselib.c
index 945a4a118de..eec968f1b3c 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -42,6 +42,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 *);
@@ -1869,3 +1872,5 @@ cselib_finish (void)
}
#include "gt-cselib.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/cselib.h b/gcc/cselib.h
index 59ccec6f179..8aa68ac3bec 100644
--- a/gcc/cselib.h
+++ b/gcc/cselib.h
@@ -56,6 +56,10 @@ struct elt_list GTY(())
cselib_val *elt;
};
+#ifdef EXTRA_TARGET
+namespace EXTRA_TARGET {
+#endif
+
extern void (*cselib_discard_hook) (cselib_val *);
extern cselib_val *cselib_lookup (rtx, enum machine_mode, int);
@@ -69,3 +73,7 @@ extern int references_value_p (const_rtx, int);
extern rtx cselib_expand_value_rtx (rtx, bitmap, int);
extern rtx cselib_subst_to_values (rtx);
extern void cselib_invalidate_rtx (rtx);
+
+#ifdef EXTRA_TARGET
+} /* Close EXTRA_TARGET namespace. */
+#endif
diff --git a/gcc/dbgcnt.c b/gcc/dbgcnt.c
index 1e004d1656c..c4c80e8de69 100644
--- a/gcc/dbgcnt.c
+++ b/gcc/dbgcnt.c
@@ -88,7 +88,7 @@ dbg_cnt_set_limit_by_name (const char *name, int len, int value)
if (i < 0)
return false;
- dbg_cnt_set_limit_by_index (i, value);
+ dbg_cnt_set_limit_by_index ((enum debug_counter) i, value);
return true;
}
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index babba15f8a5..67dde18b484 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"
@@ -178,6 +179,8 @@ struct typeinfo GTY(())
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.
@@ -2809,7 +2812,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
if (!decl_rtl)
DBXOUT_DECR_NESTING_AND_RETURN (0);
- decl_rtl = eliminate_regs (decl_rtl, 0, NULL_RTX);
+ decl_rtl = eliminate_regs (decl_rtl, VOIDmode, NULL_RTX);
#ifdef LEAF_REG_REMAP
if (current_function_uses_only_leaf_regs)
leaf_renumber_regs_insn (decl_rtl);
@@ -3314,8 +3317,9 @@ dbxout_parms (tree parms)
/* Perform any necessary register eliminations on the parameter's rtl,
so that the debugging output will be accurate. */
DECL_INCOMING_RTL (parms)
- = eliminate_regs (DECL_INCOMING_RTL (parms), 0, NULL_RTX);
- SET_DECL_RTL (parms, eliminate_regs (DECL_RTL (parms), 0, NULL_RTX));
+ = eliminate_regs (DECL_INCOMING_RTL (parms), VOIDmode, NULL_RTX);
+ SET_DECL_RTL (parms,
+ eliminate_regs (DECL_RTL (parms), VOIDmode, NULL_RTX));
#ifdef LEAF_REG_REMAP
if (current_function_uses_only_leaf_regs)
{
@@ -3684,3 +3688,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 6d38ab8a814..1a056c632f1 100644
--- a/gcc/dce.c
+++ b/gcc/dce.c
@@ -34,6 +34,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
DEF_VEC_I(int);
DEF_VEC_ALLOC_I(int,heap);
@@ -1090,8 +1093,7 @@ run_fast_df_dce (void)
/* If dce is able to delete something, it has to happen
immediately. Otherwise there will be problems handling the
eq_notes. */
- enum df_changeable_flags old_flags
- = df_clear_flags (DF_DEFER_INSN_RESCAN + DF_NO_INSN_RESCAN);
+ int old_flags = df_clear_flags (DF_DEFER_INSN_RESCAN + DF_NO_INSN_RESCAN);
df_in_progress = true;
rest_of_handle_fast_dce ();
@@ -1160,3 +1162,5 @@ struct rtl_opt_pass pass_fast_rtl_byte_dce =
TODO_ggc_collect /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/dce.h b/gcc/dce.h
index 2635d49922b..0b0ce86fe11 100644
--- a/gcc/dce.h
+++ b/gcc/dce.h
@@ -20,7 +20,11 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_DCE_H
#define GCC_DCE_H
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
extern void run_fast_dce (void);
extern void run_fast_df_dce (void);
+END_TARGET_SPECIFIC
#endif /* GCC_DCE_H */
diff --git a/gcc/ddg.c b/gcc/ddg.c
index adecb707749..8ca3be33851 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);
@@ -1111,4 +1114,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 9eaeea5bd29..fe2f4df6633 100644
--- a/gcc/ddg.h
+++ b/gcc/ddg.h
@@ -164,6 +164,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);
@@ -183,4 +187,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 7e4db4b35bc..f3c6dd1f028 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 000c4fda79c..e26b359dc9e 100644
--- a/gcc/df-core.c
+++ b/gcc/df-core.c
@@ -403,6 +403,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 *);
@@ -410,18 +413,22 @@ static void df_set_bb_info (struct dataflow *, unsigned int, void *);
static void df_set_clean_cfg (void);
#endif
+#ifndef EXTRA_TARGET
/* 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. */
bitmap_obstack df_bitmap_obstack;
+#endif /* !EXTRA_TARGET */
/*----------------------------------------------------------------------------
Functions to create, destroy and manipulate an instance of df.
----------------------------------------------------------------------------*/
-struct df *df;
+#ifndef EXTRA_TARGET
+struct df_d *df;
+#endif /* !EXTRA_TARGET */
/* Add PROBLEM (and any dependent problems) to the DF instance. */
@@ -474,10 +481,10 @@ df_add_problem (struct df_problem *problem)
/* Set the MASK flags in the DFLOW problem. The old flags are
returned. If a flag is not allowed to be changed this will fail if
checking is enabled. */
-enum df_changeable_flags
-df_set_flags (enum df_changeable_flags changeable_flags)
+int
+df_set_flags (int changeable_flags)
{
- enum df_changeable_flags old_flags = df->changeable_flags;
+ int old_flags = df->changeable_flags;
df->changeable_flags |= changeable_flags;
return old_flags;
}
@@ -486,10 +493,10 @@ df_set_flags (enum df_changeable_flags changeable_flags)
/* Clear the MASK flags in the DFLOW problem. The old flags are
returned. If a flag is not allowed to be changed this will fail if
checking is enabled. */
-enum df_changeable_flags
-df_clear_flags (enum df_changeable_flags changeable_flags)
+int
+df_clear_flags (int changeable_flags)
{
- enum df_changeable_flags old_flags = df->changeable_flags;
+ int old_flags = df->changeable_flags;
df->changeable_flags &= ~changeable_flags;
return old_flags;
}
@@ -712,7 +719,7 @@ static unsigned int
rest_of_handle_df_initialize (void)
{
gcc_assert (!df);
- df = XCNEW (struct df);
+ df = XCNEW (struct df_d);
df->changeable_flags = 0;
bitmap_obstack_initialize (&df_bitmap_obstack);
@@ -766,7 +773,7 @@ struct rtl_opt_pass pass_df_initialize_opt =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -793,7 +800,7 @@ struct rtl_opt_pass pass_df_initialize_no_opt =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -842,7 +849,7 @@ struct rtl_opt_pass pass_df_finish =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -2185,3 +2192,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 c0f79d83020..a2ad73b7625 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
@@ -388,7 +391,7 @@ df_rd_bb_local_compute (unsigned int bb_index)
if (!(df->changeable_flags & DF_NO_HARD_REGS))
df_rd_bb_local_compute_process_def (bb_info,
df_get_artificial_defs (bb_index),
- 0);
+ DF_REF_NONE);
FOR_BB_INSNS_REVERSE (bb, insn)
{
@@ -398,7 +401,8 @@ df_rd_bb_local_compute (unsigned int bb_index)
continue;
df_rd_bb_local_compute_process_def (bb_info,
- DF_INSN_UID_DEFS (uid), 0);
+ DF_INSN_UID_DEFS (uid),
+ DF_REF_NONE);
/* This complex dance with the two bitmaps is required because
instructions can assign twice to the same pseudo. This
@@ -2121,10 +2125,11 @@ df_chain_create_bb (unsigned int bb_index)
/* Now scan the uses and link them up with the defs that remain
in the cpy vector. */
- df_chain_create_bb_process_use (cpy, DF_INSN_UID_USES (uid), 0);
+ df_chain_create_bb_process_use (cpy, DF_INSN_UID_USES (uid), DF_REF_NONE);
if (df->changeable_flags & DF_EQ_NOTES)
- df_chain_create_bb_process_use (cpy, DF_INSN_UID_EQ_USES (uid), 0);
+ df_chain_create_bb_process_use (cpy, DF_INSN_UID_EQ_USES (uid),
+ DF_REF_NONE);
/* Since we are going forwards, process the defs second. This
@@ -2152,7 +2157,7 @@ df_chain_create_bb (unsigned int bb_index)
if (!(df->changeable_flags & DF_NO_HARD_REGS))
df_chain_create_bb_process_use (cpy,
df_get_artificial_uses (bb->index),
- 0);
+ DF_REF_NONE);
BITMAP_FREE (cpy);
}
@@ -2325,10 +2330,10 @@ static struct df_problem problem_CHAIN =
solution. */
void
-df_chain_add_problem (enum df_chain_flags chain_flags)
+df_chain_add_problem (unsigned int chain_flags)
{
df_add_problem (&problem_CHAIN);
- df_chain->local_flags = (unsigned int)chain_flags;
+ df_chain->local_flags = chain_flags;
df_chain->out_of_date_transfer_functions = BITMAP_ALLOC (NULL);
}
@@ -2491,7 +2496,7 @@ df_byte_lr_alloc (bitmap all_blocks ATTRIBUTE_UNUSED)
unsigned int index = 0;
unsigned int max_reg = max_reg_num();
struct df_byte_lr_problem_data *problem_data
- = problem_data = XNEW (struct df_byte_lr_problem_data);
+ = XNEW (struct df_byte_lr_problem_data);
df_byte_lr->problem_data = problem_data;
@@ -3893,19 +3898,21 @@ df_simulate_one_insn_forwards (basic_block bb, rtx insn, bitmap live)
for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
{
switch (REG_NOTE_KIND (link))
+ {
case REG_DEAD:
case REG_UNUSED:
- {
- rtx reg = XEXP (link, 0);
- int regno = REGNO (reg);
- if (regno < FIRST_PSEUDO_REGISTER)
- {
- int n = hard_regno_nregs[regno][GET_MODE (reg)];
- while (--n >= 0)
- bitmap_clear_bit (live, regno + n);
- }
- else
- bitmap_clear_bit (live, regno);
+ {
+ rtx reg = XEXP (link, 0);
+ int regno = REGNO (reg);
+ if (regno < FIRST_PSEUDO_REGISTER)
+ {
+ int n = hard_regno_nregs[regno][GET_MODE (reg)];
+ while (--n >= 0)
+ bitmap_clear_bit (live, regno + n);
+ }
+ else
+ bitmap_clear_bit (live, regno);
+ }
break;
default:
break;
@@ -3932,4 +3939,4 @@ df_simulate_finalize_forwards (basic_block bb, bitmap live)
}
}
-
+END_TARGET_SPECIFIC
diff --git a/gcc/df-scan.c b/gcc/df-scan.c
index d8ad4a06698..3c18930e99a 100644
--- a/gcc/df-scan.c
+++ b/gcc/df-scan.c
@@ -45,6 +45,9 @@ 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"
+
+START_TARGET_SPECIFIC
#ifndef HAVE_epilogue
#define HAVE_epilogue 0
@@ -100,24 +103,22 @@ static struct df_mw_hardreg * df_null_mw_rec[1];
static void df_ref_record (enum df_ref_class, struct df_collection_rec *,
rtx, rtx *,
basic_block, struct df_insn_info *,
- enum df_ref_type, enum df_ref_flags,
- int, int, enum machine_mode);
+ enum df_ref_type, int, int, int,
+ enum machine_mode);
static void df_def_record_1 (struct df_collection_rec *, rtx,
basic_block, struct df_insn_info *,
- enum df_ref_flags);
+ int);
static void df_defs_record (struct df_collection_rec *, rtx,
- basic_block, struct df_insn_info *,
- enum df_ref_flags);
+ basic_block, struct df_insn_info *, int);
static void df_uses_record (enum df_ref_class, struct df_collection_rec *,
rtx *, enum df_ref_type,
basic_block, struct df_insn_info *,
- enum df_ref_flags,
- int, int, enum machine_mode);
+ int, int, int, enum machine_mode);
static df_ref df_ref_create_structure (enum df_ref_class,
struct df_collection_rec *, rtx, rtx *,
basic_block, struct df_insn_info *,
- enum df_ref_type, enum df_ref_flags,
+ enum df_ref_type, int,
int, int, enum machine_mode);
static void df_insn_refs_collect (struct df_collection_rec*,
@@ -708,7 +709,7 @@ df_ref
df_ref_create (rtx reg, rtx *loc, rtx insn,
basic_block bb,
enum df_ref_type ref_type,
- enum df_ref_flags ref_flags,
+ int ref_flags,
int width, int offset, enum machine_mode mode)
{
df_ref ref;
@@ -2146,7 +2147,7 @@ df_notes_rescan (rtx insn)
case REG_EQUAL:
df_uses_record (DF_REF_REGULAR, &collection_rec,
&XEXP (note, 0), DF_REF_REG_USE,
- bb, insn_info, DF_REF_IN_NOTE, -1, -1, 0);
+ bb, insn_info, DF_REF_IN_NOTE, -1, -1, VOIDmode);
default:
break;
}
@@ -2691,8 +2692,8 @@ df_ref_create_structure (enum df_ref_class cl,
rtx reg, rtx *loc,
basic_block bb, struct df_insn_info *info,
enum df_ref_type ref_type,
- enum df_ref_flags ref_flags,
- int width, int offset, enum machine_mode mode)
+ int ref_flags, int width, int offset,
+ enum machine_mode mode)
{
df_ref this_ref = NULL;
int regno = REGNO (GET_CODE (reg) == SUBREG ? SUBREG_REG (reg) : reg);
@@ -2789,8 +2790,8 @@ df_ref_record (enum df_ref_class cl,
rtx reg, rtx *loc,
basic_block bb, struct df_insn_info *insn_info,
enum df_ref_type ref_type,
- enum df_ref_flags ref_flags,
- int width, int offset, enum machine_mode mode)
+ int ref_flags, int width, int offset,
+ enum machine_mode mode)
{
unsigned int regno;
@@ -2878,13 +2879,13 @@ df_read_modify_subreg_p (rtx x)
static void
df_def_record_1 (struct df_collection_rec *collection_rec,
rtx x, basic_block bb, struct df_insn_info *insn_info,
- enum df_ref_flags flags)
+ int flags)
{
rtx *loc;
rtx dst;
int offset = -1;
int width = -1;
- enum machine_mode mode = 0;
+ enum machine_mode mode = VOIDmode;
enum df_ref_class cl = DF_REF_REGULAR;
/* We may recursively call ourselves on EXPR_LIST when dealing with PARALLEL
@@ -2971,14 +2972,14 @@ df_def_record_1 (struct df_collection_rec *collection_rec,
static void
df_defs_record (struct df_collection_rec *collection_rec,
rtx x, basic_block bb, struct df_insn_info *insn_info,
- enum df_ref_flags flags)
+ int flags)
{
RTX_CODE code = GET_CODE (x);
if (code == SET || code == CLOBBER)
{
/* Mark the single def within the pattern. */
- enum df_ref_flags clobber_flags = flags;
+ int clobber_flags = flags;
clobber_flags |= (code == CLOBBER) ? DF_REF_MUST_CLOBBER : 0;
df_def_record_1 (collection_rec, x, bb, insn_info, clobber_flags);
}
@@ -3009,8 +3010,7 @@ static void
df_uses_record (enum df_ref_class cl, struct df_collection_rec *collection_rec,
rtx *loc, enum df_ref_type ref_type,
basic_block bb, struct df_insn_info *insn_info,
- enum df_ref_flags flags,
- int width, int offset, enum machine_mode mode)
+ int flags, int width, int offset, enum machine_mode mode)
{
RTX_CODE code;
rtx x;
@@ -3295,7 +3295,7 @@ df_get_conditional_uses (struct df_collection_rec *collection_rec)
{
int width = -1;
int offset = -1;
- enum machine_mode mode = 0;
+ enum machine_mode mode = VOIDmode;
df_ref use;
if (DF_REF_FLAGS_IS_SET (ref, DF_REF_SIGN_EXTRACT | DF_REF_ZERO_EXTRACT))
@@ -3322,7 +3322,7 @@ static void
df_get_call_refs (struct df_collection_rec * collection_rec,
basic_block bb,
struct df_insn_info *insn_info,
- enum df_ref_flags flags)
+ int flags)
{
rtx note;
bitmap_iterator bi;
@@ -3347,7 +3347,8 @@ df_get_call_refs (struct df_collection_rec * collection_rec,
{
if (GET_CODE (XEXP (note, 0)) == USE)
df_uses_record (DF_REF_REGULAR, collection_rec, &XEXP (XEXP (note, 0), 0),
- DF_REF_REG_USE, bb, insn_info, flags, -1, -1, 0);
+ DF_REF_REG_USE, bb, insn_info, flags, -1, -1,
+ VOIDmode);
else if (GET_CODE (XEXP (note, 0)) == CLOBBER)
{
if (REG_P (XEXP (XEXP (note, 0), 0)))
@@ -3359,7 +3360,8 @@ df_get_call_refs (struct df_collection_rec * collection_rec,
}
else
df_uses_record (DF_REF_REGULAR, collection_rec, &XEXP (note, 0),
- DF_REF_REG_USE, bb, insn_info, flags, -1, -1, 0);
+ DF_REF_REG_USE, bb, insn_info, flags, -1, -1,
+ VOIDmode);
}
}
@@ -3367,7 +3369,7 @@ df_get_call_refs (struct df_collection_rec * collection_rec,
df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[STACK_POINTER_REGNUM],
NULL, bb, insn_info, DF_REF_REG_USE,
DF_REF_CALL_STACK_USAGE | flags,
- -1, -1, 0);
+ -1, -1, VOIDmode);
/* Calls may also reference any of the global registers,
so they are recorded as used. */
@@ -3375,9 +3377,11 @@ df_get_call_refs (struct df_collection_rec * collection_rec,
if (global_regs[i])
{
df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i],
- NULL, bb, insn_info, DF_REF_REG_USE, flags, -1, -1, 0);
+ NULL, bb, insn_info, DF_REF_REG_USE, flags, -1, -1,
+ VOIDmode);
df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i],
- NULL, bb, insn_info, DF_REF_REG_DEF, flags, -1, -1, 0);
+ NULL, bb, insn_info, DF_REF_REG_DEF, flags, -1, -1,
+ VOIDmode);
}
is_sibling_call = SIBLING_CALL_P (insn_info->insn);
@@ -3392,7 +3396,7 @@ df_get_call_refs (struct df_collection_rec * collection_rec,
df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[ui],
NULL, bb, insn_info, DF_REF_REG_DEF,
DF_REF_MAY_CLOBBER | flags,
- -1, -1, 0);
+ -1, -1, VOIDmode);
}
BITMAP_FREE (defs_generated);
@@ -3430,19 +3434,19 @@ df_insn_refs_collect (struct df_collection_rec* collection_rec,
case REG_EQUAL:
df_uses_record (DF_REF_REGULAR, collection_rec,
&XEXP (note, 0), DF_REF_REG_USE,
- bb, insn_info, DF_REF_IN_NOTE, -1, -1, 0);
+ bb, insn_info, DF_REF_IN_NOTE, -1, -1, VOIDmode);
break;
case REG_NON_LOCAL_GOTO:
/* The frame ptr is used by a non-local goto. */
df_ref_record (DF_REF_BASE, collection_rec,
regno_reg_rtx[FRAME_POINTER_REGNUM],
NULL, bb, insn_info,
- DF_REF_REG_USE, 0, -1, -1, 0);
+ DF_REF_REG_USE, 0, -1, -1, VOIDmode);
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
df_ref_record (DF_REF_BASE, collection_rec,
regno_reg_rtx[HARD_FRAME_POINTER_REGNUM],
NULL, bb, insn_info,
- DF_REF_REG_USE, 0, -1, -1, 0);
+ DF_REF_REG_USE, 0, -1, -1, VOIDmode);
#endif
break;
default:
@@ -3457,7 +3461,7 @@ df_insn_refs_collect (struct df_collection_rec* collection_rec,
/* Record the register uses. */
df_uses_record (DF_REF_REGULAR, collection_rec,
&PATTERN (insn_info->insn), DF_REF_REG_USE, bb, insn_info, 0,
- -1, -1, 0);
+ -1, -1, VOIDmode);
/* DF_REF_CONDITIONAL needs corresponding USES. */
if (is_cond_exec)
@@ -3540,7 +3544,8 @@ df_bb_refs_collect (struct df_collection_rec *collection_rec, basic_block bb)
if (regno == INVALID_REGNUM)
break;
df_ref_record (DF_REF_ARTIFICIAL, collection_rec, regno_reg_rtx[regno], NULL,
- bb, NULL, DF_REF_REG_DEF, DF_REF_AT_TOP, -1, -1, 0);
+ bb, NULL, DF_REF_REG_DEF, DF_REF_AT_TOP, -1, -1,
+ VOIDmode);
}
}
#endif
@@ -3549,7 +3554,7 @@ df_bb_refs_collect (struct df_collection_rec *collection_rec, basic_block bb)
non-local goto. */
if (bb->flags & BB_NON_LOCAL_GOTO_TARGET)
df_ref_record (DF_REF_ARTIFICIAL, collection_rec, hard_frame_pointer_rtx, NULL,
- bb, NULL, DF_REF_REG_DEF, DF_REF_AT_TOP, -1, -1, 0);
+ bb, NULL, DF_REF_REG_DEF, DF_REF_AT_TOP, -1, -1, VOIDmode);
/* Add the artificial uses. */
if (bb->index >= NUM_FIXED_BLOCKS)
@@ -3563,7 +3568,7 @@ df_bb_refs_collect (struct df_collection_rec *collection_rec, basic_block bb)
EXECUTE_IF_SET_IN_BITMAP (au, 0, regno, bi)
{
df_ref_record (DF_REF_ARTIFICIAL, collection_rec, regno_reg_rtx[regno], NULL,
- bb, NULL, DF_REF_REG_USE, 0, -1, -1, 0);
+ bb, NULL, DF_REF_REG_USE, 0, -1, -1, VOIDmode);
}
}
@@ -3864,7 +3869,8 @@ df_entry_block_defs_collect (struct df_collection_rec *collection_rec,
EXECUTE_IF_SET_IN_BITMAP (entry_block_defs, 0, i, bi)
{
df_ref_record (DF_REF_ARTIFICIAL, collection_rec, regno_reg_rtx[i], NULL,
- ENTRY_BLOCK_PTR, NULL, DF_REF_REG_DEF, 0, -1, -1, 0);
+ ENTRY_BLOCK_PTR, NULL, DF_REF_REG_DEF, 0, -1, -1,
+ VOIDmode);
}
df_canonize_collection_rec (collection_rec);
@@ -4025,7 +4031,7 @@ df_exit_block_uses_collect (struct df_collection_rec *collection_rec, bitmap exi
EXECUTE_IF_SET_IN_BITMAP (exit_block_uses, 0, i, bi)
df_ref_record (DF_REF_ARTIFICIAL, collection_rec, regno_reg_rtx[i], NULL,
- EXIT_BLOCK_PTR, NULL, DF_REF_REG_USE, 0, -1, -1, 0);
+ EXIT_BLOCK_PTR, NULL, DF_REF_REG_USE, 0, -1, -1, VOIDmode);
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
/* It is deliberate that this is not put in the exit block uses but
@@ -4035,7 +4041,7 @@ df_exit_block_uses_collect (struct df_collection_rec *collection_rec, bitmap exi
&& bb_has_eh_pred (EXIT_BLOCK_PTR)
&& fixed_regs[ARG_POINTER_REGNUM])
df_ref_record (DF_REF_ARTIFICIAL, collection_rec, regno_reg_rtx[ARG_POINTER_REGNUM], NULL,
- EXIT_BLOCK_PTR, NULL, DF_REF_REG_USE, 0, -1, -1, 0);
+ EXIT_BLOCK_PTR, NULL, DF_REF_REG_USE, 0, -1, -1, VOIDmode);
#endif
df_canonize_collection_rec (collection_rec);
@@ -4571,3 +4577,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 639c52157b4..cc8d27e28fc 100644
--- a/gcc/df.h
+++ b/gcc/df.h
@@ -29,9 +29,11 @@ along with GCC; see the file COPYING3. If not see
#include "bitmap.h"
#include "basic-block.h"
#include "alloc-pool.h"
+#include "timevar.h"
+#include "multi-target.h"
struct dataflow;
-struct df;
+struct df_d;
struct df_problem;
struct df_link;
struct df_insn_info;
@@ -81,6 +83,8 @@ enum df_ref_type {DF_REF_REG_DEF, DF_REF_REG_USE,
enum df_ref_flags
{
+ DF_REF_NONE = 0,
+
/* This flag is set if this ref occurs inside of a conditional
execution instruction. */
DF_REF_CONDITIONAL = 1 << 0,
@@ -275,7 +279,7 @@ struct df_problem {
struct df_problem *dependent_problem;
/* The timevar id associated with this pass. */
- unsigned int tv_id;
+ timevar_id_t tv_id;
/* True if the df_set_blocks should null out the basic block info if
this block drops out of df->blocks_to_analyze. */
@@ -341,8 +345,7 @@ struct df_mw_hardreg
accesses to 16-bit fields will usually be quicker. */
ENUM_BITFIELD(df_ref_type) type : 16;
/* Used to see if the ref is read or write. */
- ENUM_BITFIELD(df_ref_flags) flags : 16;
- /* Various flags. */
+ int flags : 16; /* Various flags. */
unsigned int start_regno; /* First word of the multi word subreg. */
unsigned int end_regno; /* Last word of the multi word subreg. */
unsigned int mw_order; /* Same as df_ref.ref_order. */
@@ -360,8 +363,7 @@ struct df_base_ref
ENUM_BITFIELD(df_ref_type) type : 8;
/* Type of ref. */
- ENUM_BITFIELD(df_ref_flags) flags : 16;
- /* Various flags. */
+ int flags : 16; /* Various flags. */
rtx reg; /* The register referenced. */
struct df_link *chain; /* Head of def-use, use-def. */
/* Pointer to the insn info of the containing instruction. FIXME!
@@ -522,7 +524,7 @@ struct df_reg_info
used by owners of the problem.
----------------------------------------------------------------------------*/
-struct df
+struct df_d
{
/* The set of problems to be solved is stored in two arrays. In
@@ -602,8 +604,9 @@ struct df
addresses. It is incremented whenever a ref is created. */
unsigned int ref_order;
- /* Problem specific control information. */
- ENUM_BITFIELD (df_changeable_flags) changeable_flags : 8;
+ /* Problem specific control information. This is a bitmask of the
+ values defined in enum df_changeable_flags. */
+ unsigned int changeable_flags : 8;
/* If this is true, then only a subset of the blocks of the program
is considered to compute the solutions of dataflow problems. */
@@ -764,7 +767,6 @@ struct df
extern bitmap_obstack df_bitmap_obstack;
-
/* One of these structures is allocated for every basic block. */
struct df_scan_bb_info
{
@@ -850,11 +852,10 @@ struct df_byte_lr_bb_info
bitmap out; /* At the bottom of the block. */
};
-
/* 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
should not be used by regular code. */
-extern struct df *df;
+extern struct df_d *df;
#define df_scan (df->problems_by_index[DF_SCAN])
#define df_rd (df->problems_by_index[DF_RD])
#define df_lr (df->problems_by_index[DF_LR])
@@ -874,12 +875,13 @@ extern struct df *df;
#define DF_DEBUG_CFG
#endif
+START_TARGET_SPECIFIC
/* Functions defined in df-core.c. */
extern void df_add_problem (struct df_problem *);
-extern enum df_changeable_flags df_set_flags (enum df_changeable_flags);
-extern enum df_changeable_flags df_clear_flags (enum df_changeable_flags);
+extern int df_set_flags (int flags);
+extern int df_clear_flags (int flags);
extern void df_set_blocks (bitmap);
extern void df_remove_problem (struct dataflow *);
extern void df_finish_pass (bool);
@@ -944,7 +946,7 @@ extern void df_lr_verify_transfer_functions (void);
extern void df_live_verify_transfer_functions (void);
extern void df_live_add_problem (void);
extern void df_live_set_all_dirty (void);
-extern void df_chain_add_problem (enum df_chain_flags);
+extern void df_chain_add_problem (unsigned int);
extern void df_byte_lr_add_problem (void);
extern int df_byte_lr_get_regno_start (unsigned int);
extern int df_byte_lr_get_regno_len (unsigned int);
@@ -971,8 +973,8 @@ extern void df_grow_reg_info (void);
extern void df_grow_insn_info (void);
extern void df_scan_blocks (void);
extern df_ref df_ref_create (rtx, rtx *, rtx,basic_block,
- enum df_ref_type, enum df_ref_flags,
- int, int, enum machine_mode);
+ enum df_ref_type, int, int, int,
+ enum machine_mode);
extern void df_ref_remove (df_ref);
extern struct df_insn_info * df_insn_create_insn_record (rtx);
extern void df_insn_delete (basic_block, unsigned int);
@@ -1086,4 +1088,6 @@ extern void union_defs (df_ref,
struct web_entry *, 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 ad17a378d98..ff0be9cf10c 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -2841,6 +2841,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.
@@ -7041,6 +7050,7 @@ instructions, but allow the compiler to schedule those calls.
@menu
* Alpha Built-in Functions::
+* ARC Built-in Functions::
* ARM iWMMXt Built-in Functions::
* ARM NEON Intrinsics::
* Blackfin Built-in Functions::
@@ -7138,6 +7148,287 @@ void *__builtin_thread_pointer (void)
void __builtin_set_thread_pointer (void *)
@end smallexample
+@node ARC Built-in Functions
+@subsection ARC Built-in Functions
+
+SIMD instruction can be generated for ARC, using the built-in functions provided
+for the ARC cores when the @option{-msimd} switch is used:
+
+The set of builtins defined for ARC can be categorized according to their
+signatures into the following types:
+
+@smallexample
+I) Return type : v8hi
+ First argument : v8hi
+ Second argument: v8hi
+
+v8hi __builtin_arc_vaddaw (v8hi, v8hi)
+v8hi __builtin_arc_vaddw (v8hi, v8hi)
+v8hi __builtin_arc_vavb (v8hi, v8hi)
+v8hi __builtin_arc_vavrb (v8hi, v8hi)
+v8hi __builtin_arc_vdifaw (v8hi, v8hi)
+v8hi __builtin_arc_vdifw (v8hi, v8hi)
+v8hi __builtin_arc_vmaxaw (v8hi, v8hi)
+v8hi __builtin_arc_vmaxw (v8hi, v8hi)
+v8hi __builtin_arc_vminaw (v8hi, v8hi)
+v8hi __builtin_arc_vminw (v8hi, v8hi)
+v8hi __builtin_arc_vmulaw (v8hi, v8hi)
+v8hi __builtin_arc_vmulfaw (v8hi, v8hi)
+v8hi __builtin_arc_vmulfw (v8hi, v8hi)
+v8hi __builtin_arc_vmulw (v8hi, v8hi)
+v8hi __builtin_arc_vsubaw (v8hi, v8hi)
+v8hi __builtin_arc_vsubw (v8hi, v8hi)
+v8hi __builtin_arc_vsummw (v8hi, v8hi)
+v8hi __builtin_arc_vand (v8hi, v8hi)
+v8hi __builtin_arc_vandaw (v8hi, v8hi)
+v8hi __builtin_arc_vbic (v8hi, v8hi)
+v8hi __builtin_arc_vbicaw (v8hi, v8hi)
+v8hi __builtin_arc_vor (v8hi, v8hi)
+v8hi __builtin_arc_vxor (v8hi, v8hi)
+v8hi __builtin_arc_vxoraw (v8hi, v8hi)
+v8hi __builtin_arc_veqw (v8hi, v8hi)
+v8hi __builtin_arc_vlew (v8hi, v8hi)
+v8hi __builtin_arc_vltw (v8hi, v8hi)
+v8hi __builtin_arc_vnew (v8hi, v8hi)
+v8hi __builtin_arc_vmr1aw (v8hi, v8hi)
+v8hi __builtin_arc_vmr1w (v8hi, v8hi)
+v8hi __builtin_arc_vmr2aw (v8hi, v8hi)
+v8hi __builtin_arc_vmr2w (v8hi, v8hi)
+v8hi __builtin_arc_vmr3aw (v8hi, v8hi)
+v8hi __builtin_arc_vmr3w (v8hi, v8hi)
+v8hi __builtin_arc_vmr4aw (v8hi, v8hi)
+v8hi __builtin_arc_vmr4w (v8hi, v8hi)
+v8hi __builtin_arc_vmr5aw (v8hi, v8hi)
+v8hi __builtin_arc_vmr5w (v8hi, v8hi)
+v8hi __builtin_arc_vmr6aw (v8hi, v8hi)
+v8hi __builtin_arc_vmr6w (v8hi, v8hi)
+v8hi __builtin_arc_vmr7aw (v8hi, v8hi)
+v8hi __builtin_arc_vmr7w (v8hi, v8hi)
+v8hi __builtin_arc_vmrb (v8hi, v8hi)
+v8hi __builtin_arc_vh264f (v8hi, v8hi)
+v8hi __builtin_arc_vh264ft (v8hi, v8hi)
+v8hi __builtin_arc_vh264fw (v8hi, v8hi)
+v8hi __builtin_arc_vvc1f (v8hi, v8hi)
+v8hi __builtin_arc_vvc1ft (v8hi, v8hi)
+@end smallexample
+
+@smallexample
+II) Return type : v8hi
+ First argument : v8hi
+ Second argument: int
+
+v8hi __builtin_arc_vbaddw (v8hi, int)
+v8hi __builtin_arc_vbmaxw (v8hi, int)
+v8hi __builtin_arc_vbminw (v8hi, int)
+v8hi __builtin_arc_vbmulaw (v8hi, int)
+v8hi __builtin_arc_vbmulfw (v8hi, int)
+v8hi __builtin_arc_vbmulw (v8hi, int)
+v8hi __builtin_arc_vbrsubw (v8hi, int)
+v8hi __builtin_arc_vbsubw (v8hi, int)
+@end smallexample
+
+@smallexample
+III) Return type : v8hi
+ First argument : v8hi
+ Second argument: const int
+
+ The second argument in these builtins has to be an unsigned 3-bit
+integer constant, as it indicate the registers I0-I7:
+
+v8hi __builtin_arc_vasrw (v8hi, const int)
+v8hi __builtin_arc_vsr8 (v8hi, const int)
+v8hi __builtin_arc_vsr8aw (v8hi, const int)
+@end smallexample
+
+@smallexample
+IV) Return type : v8hi
+ First argument : v8hi
+ Second argument: const int
+
+ The second argument in these builtins has to be an unsigned 6-bit
+integer constant:
+
+v8hi __builtin_arc_vasrrwi (v8hi, const int)
+v8hi __builtin_arc_vasrsrwi (v8hi, const int)
+v8hi __builtin_arc_vasrwi (v8hi, const int)
+v8hi __builtin_arc_vasrpwbi (v8hi, const int)
+v8hi __builtin_arc_vasrrpwbi (v8hi, const int)
+v8hi __builtin_arc_vsr8awi (v8hi, const int)
+v8hi __builtin_arc_vsr8i (v8hi, const int)
+@end smallexample
+
+@smallexample
+V) Return type : v8hi
+ First argument : v8hi
+ Second argument: const int
+
+ The second argument in these builtins has to be an unsigned 8-bit
+integer constant:
+
+v8hi __builtin_arc_vmvaw (v8hi, const int)
+v8hi __builtin_arc_vmvw (v8hi, const int)
+v8hi __builtin_arc_vmvzw (v8hi, const int)
+v8hi __builtin_arc_vd6tapf (v8hi, const int)
+@end smallexample
+
+@smallexample
+VI) Return type : v8hi
+ First argument : int
+ Second argument: const int
+
+ The second argument in these builtins has to be an unsigned 8-bit
+integer constant:
+
+v8hi __builtin_arc_vmovaw (int, const int)
+v8hi __builtin_arc_vmovw (int, const int)
+v8hi __builtin_arc_vmovzw (int, const int)
+@end smallexample
+
+@smallexample
+VII) Return type : v8hi
+ First argument : v8hi
+
+v8hi __builtin_arc_vabsaw (v8hi)
+v8hi __builtin_arc_vabsw (v8hi)
+v8hi __builtin_arc_vaddsuw (v8hi)
+v8hi __builtin_arc_vsignw (v8hi)
+v8hi __builtin_arc_vexch1 (v8hi)
+v8hi __builtin_arc_vexch2 (v8hi)
+v8hi __builtin_arc_vexch4 (v8hi)
+v8hi __builtin_arc_vupbaw (v8hi)
+v8hi __builtin_arc_vupbw (v8hi)
+v8hi __builtin_arc_vupsbaw (v8hi)
+v8hi __builtin_arc_vupsbw (v8hi)
+@end smallexample
+
+@smallexample
+VIII) Return type : void
+ First argument : int
+ Second argument : int
+
+void __builtin_arc_vdirun (int, int)
+void __builtin_arc_vdorun (int, int)
+@end smallexample
+
+@smallexample
+IX) Return type : void
+ First argument : const int
+ Second argument : int
+
+ The first argument in these builtins has to be an unsigned 3-bit
+integer constant, as it indicates DR0-DR7 DMA channel setup registers. The file
+arc-simd.h also profides defines which can be used in place of the DMA register
+numbers to facilitate better code readability:
+
+void __builtin_arc_vdiwr (const int, int)
+void __builtin_arc_vdowr (const int, int)
+@end smallexample
+
+@smallexample
+X) Return type : void
+ First argument : int
+
+void __builtin_arc_vrec (int)
+void __builtin_arc_vrun (int)
+void __builtin_arc_vrecrun (int)
+void __builtin_arc_vendrec (int)
+@end smallexample
+
+@smallexample
+XI) Return type : v8hi
+ First argument : v8hi
+ Second argument : const int
+ Third argument : const int
+
+ The second argument in these builtins has to be an unsigned 3-bit
+integer constant, as it indicates I0-I7 registers. The third argument has to be
+an unsigned 8-bit quantity The file arc-simd.h also profides defines which can
+be used in place of the I0-I7 registe numbers to facilitate better code readability:
+
+v8hi __builtin_arc_vld32wh (v8hi, const int, const int)
+v8hi __builtin_arc_vld32wl (v8hi, const int, const int)
+v8hi __builtin_arc_vld64 (v8hi, const int, const int)
+v8hi __builtin_arc_vld32 (v8hi, const int, const int)
+
+NOTE: Although the equivalent hardware instructions do not take a simd register
+ as an operand, these builtins overwrite the relevant bits of the v8hi
+ quantity provided as the first argument with the value loaded from
+ [Ib, u8] location in the SDM.
+
+@end smallexample
+
+@smallexample
+XII) Return type : v8hi
+ First argument : const int
+ Second argument : const int
+
+ The first argument in these builtins has to be an unsigned 3-bit
+integer constant, as it indicates I0-I7 registers. The second argument has to be
+an unsigned 8-bit quantity The file arc-simd.h also profides defines which can
+be used in place of the I0-I7 registe numbers to facilitate better code readability:
+
+v8hi __builtin_arc_vld64w (const int, const int)
+v8hi __builtin_arc_vld128 (const int, const int)
+@end smallexample
+
+@smallexample
+XIII) Return type : void
+ First argument : v8hi
+ Second argument : const int
+ Third argument : const int
+
+ The second argument in these builtins has to be an unsigned 3-bit
+integer constant, as it indicates I0-I7 registers. The third argument has to be
+an unsigned 8-bit quantity The file arc-simd.h also profides defines which can
+be used in place of the I0-I7 registe numbers to facilitate better code readability:
+
+void __builtin_arc_vst128 (v8hi, const int, const int)
+void __builtin_arc_vst64 (v8hi, const int, const int)
+@end smallexample
+
+
+@smallexample
+XIV) Return type : void
+ First argument : v8hi
+ Second argument : const int
+ Third argument : const int
+
+ The second argument has to be an unsigned 3-bit quantity to identify the
+16-bit subregister to be stored. The third argument in these builtins has to be
+an unsigned 3-bit integer constant, as it indicates I0-I7 registers. The fourth
+argument has to be an unsigned 8-bit quantity The file arc-simd.h also profides
+defines which can be used in place of the I0-I7 registe numbers to facilitate
+better code readability:
+
+void __builtin_arc_vst16_n (v8hi, const int, const int, const int)
+void __builtin_arc_vst32_n (v8hi, const int, const int, const int)
+@end smallexample
+
+
+@smallexample
+XIV) Return type : void
+ First argument : const int
+
+ The argument has to be an unsigned 6-bit quantity.
+
+void __builtin_arc_vinti (const int)
+@end smallexample
+
+@smallexample
+NOTE: For all builtins __builtin_arc_<someinsn>, the header file arc-simd.h also
+ provides macros called _<someinsn> which can be used for programming ease
+ and improved readability.
+
+ Besides these, the following extra defines and typedefs are also provided
+in the header file
+
+#define _setup_dma_in_channel_reg _vdiwr
+#define _setup_dma_out_channel_reg _vdowr
+
+typedef int __v4si __attribute__((vector_size(16)));
+typedef short __v8hi __attribute__((vector_size(16)));
+@end smallexample
+
@node ARM iWMMXt Built-in Functions
@subsection ARM iWMMXt Built-in Functions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 6a14a531446..de09c00112e 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -426,8 +426,33 @@ Objective-C and Objective-C++ Dialects}.
@emph{ARC Options}
@gccoptlist{-EB -EL @gol
--mmangle-cpu -mcpu=@var{cpu} -mtext=@var{text-section} @gol
--mdata=@var{data-section} -mrodata=@var{readonly-data-section}}
+-mbig-endian -mlittle-endian @gol
+-mA4 -mA5 -mA6 -mARC600 -mA7 -mARC700 -mmixed-code @gol
+-mtext=@var{text-section} -mdata=@var{data-section} @gol
+-mrodata=@var{readonly-data-section} @gol
+-malign-loops -mno-align-loops @gol
+-mvolatile-cache -mno-volatile-cache @gol
+-mno-cond-exec @gol
+-mnorm @gol
+-mswap @gol
+-mbarrel_shifter @gol
+-mmul64 @gol
+-mmin_max @gol
+-mEA @gol
+-msoft-float @gol
+-mno-mpy @gol
+-mno-brcc @gol
+-mlong-calls @gol
+-mno-sdata @gol
+-mno-millicode @gol
+-mspfp @gol
+-mspfp_compact @gol
+-mspfp_fast @gol
+-mdpfp @gol
+-mdpfp_compact @gol
+-mdpfp_fast @gol
+-msimd @gol
+}
@emph{ARM Options}
@gccoptlist{-mapcs-frame -mno-apcs-frame @gol
@@ -8868,44 +8893,162 @@ These options are defined for ARC implementations:
@table @gcctabopt
@item -EL
@opindex EL
+@itemx -mlittle-endian
+@opindex mlittle-endian
Compile code for little endian mode. This is the default.
@item -EB
@opindex EB
+@itemx -mbig-endian
+@opindex mbig-endian
Compile code for big endian mode.
-@item -mmangle-cpu
-@opindex mmangle-cpu
-Prepend the name of the cpu to all public symbol names.
-In multiple-processor systems, there are many ARC variants with different
-instruction and register set characteristics. This flag prevents code
-compiled for one cpu to be linked with code compiled for another.
-No facility exists for handling variants that are ``almost identical''.
-This is an all or nothing option.
+@item -mA4
+@opindex mA4
+Generates code for ARCtangent-A4 processor. This is the default.
-@item -mcpu=@var{cpu}
-@opindex mcpu
-Compile code for ARC variant @var{cpu}.
-Which variants are supported depend on the configuration.
-All variants support @option{-mcpu=base}, this is the default.
+@item -mA5
+@opindex mA5
+Generates ARCompact 32-bit code for ARCtangent-A5 processor.
+
+@item -mA6
+@opindex mA6
+@itemx -mARC600
+@opindex mARC600
+Generates ARCompact 32-bit code for ARCtangent-ARC600 processor.
+
+@item -mA7
+@opindex mA7
+@itemx -mARC700
+@opindex mARC700
+Generates ARCompact 32-bit code for ARCtangent-ARC700 processor.
+
+@item -mmixed-code
+@opindex mmixed-code
+Generates ARCompact 16-bit instructions intermixed with 32-bit instructions
+for ARCtangent-A5 and higher processors.
@item -mtext=@var{text-section}
@itemx -mdata=@var{data-section}
@itemx -mrodata=@var{readonly-data-section}
-@opindex mtext
-@opindex mdata
-@opindex mrodata
+@opindex mtext=@var{text-section}
+@opindex mdata=@var{data-section}
+@opindex mrodata=@var{readonly-data-section}
Put functions, data, and readonly data in @var{text-section},
@var{data-section}, and @var{readonly-data-section} respectively
by default. This can be overridden with the @code{section} attribute.
@xref{Variable Attributes}.
-@item -mfix-cortex-m3-ldrd
-@opindex mfix-cortex-m3-ldrd
-Some Cortex-M3 cores can cause data corruption when @code{ldrd} instructions
-with overlapping destination and base registers are used. This option avoids
-generating these instructions. This option is enabled by default when
-@option{-mcpu=cortex-m3} is specified.
+@item -malign-loops
+@opindex malign-loops
+Align loop starts to 32-byte boundaries (cache line size).
+
+@item -malign-loops
+@opindex malign-loops
+Do not align loop starts to 32-byte boundaries (cache line size).
+
+@item -mvolatile-cache
+@opindex mvolatile-cache
+Allow caching of volatile references. This is the default.
+
+@item -mno-valatile-cache
+@opindex mno-volatile-cache
+Do not cache volatile references.
+
+@item -mno-cond-exec
+@opindex mno-cond-exec
+Do not generate predicated instructions for conditional execution.
+
+@item -mnorm
+@opindex mnorm
+Allow generation of norm instruction through the use of builtins. For
+ARC700, the -mnorm option is turned on by default.
+
+@item -mswap
+@opindex mswap
+Allow generation of swap instruction through the use of builtins. For
+ARC700, the -mswap option is turned on by default.
+
+@item -mbarrel_shifter
+@opindex mbarrel_shifter
+Allow generation of multiple shift instruction supported by barrel
+shifter unit. For post A4 cores, such as A5, ARC600, ARC700, the
+-mbarrel_shifter option is turned on by default.
+
+@item -mmul64
+@opindex mmul64
+Allow generation of mul64 and mulu64 instructions, by using
+builtins. This option is not allowed for ARC700.
+
+@item -mmin_max
+@opindex mmin_max
+Allow generation of min and max instructions for A4. For post A4
+cores, these are generated by default.
+
+@item -mno-mpy
+@opindex mno-mpy
+Disallow generation of mpy mpyh, mpyhu, mpyu instructions for ARC700. This
+option is allowed only for ARC700 processor.
+
+@item -mEA
+@opindex mEA
+Allow generation of extended arithmetic instructions.
+
+@item -msoft-float
+@opindex msoft-float
+Dummy flag. Many applications use this flag generically, and soft-floats
+are the only option on ARC.
+
+@item -mno-brcc
+@opindex mno-brcc
+Disable generation of BRcc instructions.
+
+@item -mlong-calls
+@opindex mlong-calls
+Make all function calls as register-indirect. This flag can be overridden
+by using the @samp{short_call} function attribute.
+
+@item -mno-sdata
+@opindex mno-sdata
+Do not generate sdata references
+
+@item -mno-millicode
+@opindex mno-millicode
+Do not generate millicode thunk code for saving and restoring registers in
+functions' prologue/epilogue. This flags is needed only with -Os, since millicode
+thunks are used only when optimizing for size..
+
+@end table
+
+@subsection FPX Options
+@cindex ARC FPX Options
+These options can be used to generate code for the FPX (Floating Point
+eXtension) extension unit.
+
+@table @gcctabopt
+@item -mspfp
+@opindex mspfp
+@itemx -mspfp_compact
+@opindex mspfp_compact
+Generate Single Precision FPX (compact) instructions
+
+@item -mspfp_fast
+@opindex mspfp_fast
+Generate Single Precision FPX (fast) instructions
+
+@item -mdpfp
+@opindex mdpfp
+@itemx -mdpfp_compact
+@opindex mdpfp_compact
+Generate Double Precision FPX (compact) instructions
+
+@item -mdpfp_fast
+@opindex mdpfp_fast
+Generate Double Precision FPX (fast) instructions
+
+@item -msimd
+@opindex msimd
+Enable generation of ARC SIMD instructions via target-specific builtins.
@end table
@@ -8917,6 +9060,13 @@ These @samp{-m} options are defined for Advanced RISC Machines (ARM)
architectures:
@table @gcctabopt
+@item -mfix-cortex-m3-ldrd
+@opindex mfix-cortex-m3-ldrd
+Some Cortex-M3 cores can cause data corruption when @code{ldrd} instructions
+with overlapping destination and base registers are used. This option avoids
+generating these instructions. This option is enabled by default when
+@option{-mcpu=cortex-m3} is specified.
+
@item -mabi=@var{name}
@opindex mabi
Generate code for the specified ABI@. Permissible values are: @samp{apcs-gnu},
diff --git a/gcc/doc/mxp.texi b/gcc/doc/mxp.texi
new file mode 100644
index 00000000000..69cef2657da
--- /dev/null
+++ b/gcc/doc/mxp.texi
@@ -0,0 +1,106 @@
+data/bss layout: uses different sections ordered by minimum addressing scale.
+no separate .rodata section(s).
+.data16: scaling factor 16
+.data8, .data4, data2, .data1: likewise for smaller scaling factors
+.bss1, .bss2, .bss4, .bss8, .bss16: bss sections for increasing scaling
+factors
+The data base pointer register i9 typically points at the place where .bss1
+ends and .data1 starts. It might be moved up or down if allocation
+would otherwise overflow on one side, and on the other side is slack.
+
+Tasks to be done:
+- Convert this document into a proper texinfo file, incorporate it into
+ gcc ducumentation, and test 'make info'
+- binutils support for using undefined labels in mxp data/bss sections
+ as offsets in memory addresses.
+- binutils support for mxp code labels. For a start, we are looking to
+ have a special text section where to put all the mxp code. At link time,
+ this special text section is considered to be loaded at the start of the
+ SCM for purposes of resolving SCM absolute relocations. However, the
+ code gets actually a different load address for the ARC700 core, and gets
+ a j_s [blink] instruction appended (extra points if you make this a j_s.d
+ [blink] before the last insn without the potential to break stuff...)
+ Later we will likely want to move to multiple of such special text sections
+ to handle overlays, and possibly also have different load addreses to
+ accomodate multiple overlays. If we want to be able to handle SCM PIE,
+ I.e. code that can be loaded to varying SCM locations, the arc will need
+ to load an a core register with the SCM load address before calling the
+ SCQ loading code, and the latter will have to use add instructions to
+ calculate SCM locations on the fly.
+ No matter if we use such add instructions, or long immediates, instructions
+ that reference SCM memory locations work out as 64 bit of code on the
+ arc side, while the other SIMD instructions are injected with a single
+ 32 bit code from the arc side. Thus we have a discrepancy between the
+ space taken up by the instructions in the object file and the size we
+ have to consider for purposes of calculating SCM addresses.
+ Luckily, these differences are constant from the first time the SIMD
+ assembly is emitted. Thus, the total number of instructions
+ with SCM references that precede an SCM label gives us the number of
+ 32 bit words to subtract from the total number of preceding 32 bits words
+ to arrive at the offset from the SCM load address.
+ To account for preceding SCM references in the same module, we can make
+ the SCM label appear to be accordingly earlier in the module.
+ (This will have to be compensated for if we want to do any linktime
+ relaxation at some later point in time.)
+ We also need to keep a tally of the total number of SCM references in each
+ module.
+ When linking multiple modules together, the total of these tallies for all
+ preceding modules needs to be added up, and subtracted from the value of
+ each label.
+ Like SCM references, (other) long immediates bulk up the code on the arc
+ side while leaving the SIMD instruction count the same, so they have to
+ be tallied up together with the SCM references.
+- library functions:
+ - divsi3: use sh64 code as starting point. Note that there is no
+ point in loading the table base address before the function call, because
+ all SCM memory addressing has an offset.
+ divv8hi3, divv4si3: use older sh64 code w/out lookup table as starting
+ point
+ - divhi3
+- Investigate register class preferencing issues. Naming lane sets with
+ lane 0 first actually results in the wrong reg_class_subunions. In theory
+ the ordierng should be something like 00, 10, 01, 30, 03, ff, to get the
+ sets with lane zero prefered for subunions. preferred classes can be
+ seen in the *lreg dump file after compiling with -da. Another avenue to
+ saner subunions is to add proper union lane sets 11, 33.
+ The paradoxical thing I am seeing here is that the instruction count for
+ muldi increases when I introduce these measures.
+ Another - or complimentary - approach is to shift the cost balance.
+ in theory REGISTER_MOVE_COST should have an influence, but in practice
+ I haven't seen any. What works is adding extra cost to insn alternatives
+ which allow non-lane0 registers. A problem here - and in general - is that
+ we want a viable alternate register class. Jacking up the cost for
+ non-lane0 alternatives can disparage these to the point that we loose the
+ altclass. We also have often altclasses that don't actually contain any
+ extra valid registers. In theory increasing MEMORY_MOVE_COST can
+ compensate, however I see paradoxical outcomes when I try to make this
+ dependent on !(reload_in_progress || reload_completed). I have a diff
+ for some of the changes I've tried in
+ /home/joernr/prefclass-experiments-20080428.
+ Maybe we ned to jackup REGISTER_MOVE_COST, MEMORY_MOVE_COST and RTX_COST
+ consistently to get a more fine-grained resolution of costs.
+- Obtain code samples of code that we think is suitable and relevant for
+ autovectorization. E.g. some codec.
+ Dependent tasks:
+ - Identify the actual section of this code that we think we should be
+ able to autovectorize.
+ - Make sure autovectorization takes place.
+- Partitioning work. Check with IBM Haifa and other Milepost partners
+ what they already have.
+ Inasmuch as not already done:
+ - Identify individual functions and subgraphs of the callgraph we can move
+ to the SIMD engine.
+ - Add code to tree loop analysis to break out loops that we can move to
+ the SIMD engine.
+ - Handle data sets that don't fit into SDM. The simplest to implement
+ approach is probably to do loop tiling at the interface between arc core
+ and simd engine. OTOH we can get much better parallelism if we hand
+ over the entire work to the simd engine and let it DMA out the previoud
+ block, and DMA in the next block, while it is performing calculations.
+ For this we need to represent main memory pointers.
+ Need not necessarilty be exposed as pointers to the mxp-gcc, we could
+ express the loop tiling with intrinsics.
+- Add doloop pattern
+- Convert multi-insn define_insn patterns into define_insn_and_split patterns.
+- Add scheduler description
+- Where missing, add comments to the code according to GNU coding standards.
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index f4680b69391..b074570d05b 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -869,7 +869,8 @@ when another one comes along.
GCC defines a data structure called @code{struct function} which
contains all of the data specific to an individual function. This
-structure contains a field called @code{machine} whose type is
+structure contains a field which can be accessed as
+MACHINE_FUNCTION (@var{function}) whose type is
@code{struct machine_function *}, which can be used by targets to point
to their own specific data.
@@ -2776,6 +2777,12 @@ Do not define this macro if you do not define
is @code{BITS_PER_WORD} bits wide is correct for your machine.
@end defmac
+@deftypefn {Target Hook} bool TARGET_PRESERVE_RELOAD_P (rtx @var{in})
+Called when doing an input reload using the value @var{in}. Return true
+if the reload register should be available for inheritance later. This
+might increase the spill pressure, but enhances reload inheritance.
+@end deftypefn
+
@defmac SMALL_REGISTER_CLASSES
On some machines, it is risky to let hard registers live across arbitrary
insns. Typically, these machines have instructions that require values
@@ -5973,6 +5980,13 @@ will be used. Defaults to 1 if @code{move_by_pieces_ninsns} returns less
than @code{MOVE_RATIO}.
@end defmac
+@defmac CAN_MOVE_BY_PIECES (@var{size}, @var{alignment})
+A C expression used to determine whether a chunk of memory is to be copied
+in pieces either by @code{move_by_pieces}, or by a movmem expander. This
+is used by other optimizers that want to anticipate how a block copy is
+going to be done. If not defined, MOVE_BY_PIECES_P is used instead.
+@end defmac
+
@defmac MOVE_MAX_PIECES
A C expression used by @code{move_by_pieces} to determine the largest unit
a load or store used to copy memory is. Defaults to @code{MOVE_MAX}.
diff --git a/gcc/dojump.c b/gcc/dojump.c
index 060eb51e77e..4433e99dd69 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, int, rtx, rtx);
@@ -1025,3 +1028,5 @@ do_compare_and_jump (tree exp, enum rtx_code signed_code,
}
#include "gt-dojump.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/dominance.c b/gcc/dominance.c
index b4dff4c6c16..e50fb8e9b3e 100644
--- a/gcc/dominance.c
+++ b/gcc/dominance.c
@@ -1321,7 +1321,12 @@ iterate_fix_dominators (enum cdi_direction dir, VEC (basic_block, heap) *bbs,
}
}
for (y = 0; y < g->n_vertices; y++)
- BITMAP_FREE (g->vertices[y].data);
+ {
+ /* Strange contortions for C++ compilation. */
+ bitmap b = (bitmap) g->vertices[y].data;
+ BITMAP_FREE (b);
+ g->vertices[y].data = NULL;
+ }
pointer_map_destroy (map);
/* Find the dominator tree of G. */
diff --git a/gcc/double-int.c b/gcc/double-int.c
index 7bcf88f2780..4423c7c1904 100644
--- a/gcc/double-int.c
+++ b/gcc/double-int.c
@@ -211,8 +211,9 @@ double_int_divmod (double_int a, double_int b, bool uns, unsigned code,
{
double_int ret;
- div_and_round_double (code, uns, a.low, a.high, b.low, b.high,
- &ret.low, &ret.high, &mod->low, &mod->high);
+ div_and_round_double ((enum tree_code) code, uns, a.low, a.high,
+ b.low, b.high, &ret.low, &ret.high,
+ &mod->low, &mod->high);
return ret;
}
diff --git a/gcc/dse.c b/gcc/dse.c
index a35f07bb113..4969f77fa53 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;
@@ -244,7 +246,7 @@ struct store_info
{
/* A bitmap with one bit per byte. Cleared bit means the position
is needed. Used if IS_LARGE is false. */
- bitmap bitmap;
+ bitmap bmap;
/* Number of set bits (i.e. unneeded bytes) in BITMAP. If it is
equal to END - BEGIN, the whole store is unused. */
@@ -791,7 +793,7 @@ free_store_info (insn_info_t insn_info)
{
store_info_t next = store_info->next;
if (store_info->is_large)
- BITMAP_FREE (store_info->positions_needed.large.bitmap);
+ BITMAP_FREE (store_info->positions_needed.large.bmap);
if (store_info->cse_base)
pool_free (cse_store_info_pool, store_info);
else
@@ -826,7 +828,7 @@ replace_inc_dec (rtx *r, void *d)
case POST_INC:
{
rtx r1 = XEXP (x, 0);
- rtx c = gen_int_mode (Pmode, data->size);
+ rtx c = gen_int_mode (data->size, Pmode);
emit_insn_before (gen_rtx_SET (Pmode, r1,
gen_rtx_PLUS (Pmode, r1, c)),
data->insn);
@@ -837,7 +839,7 @@ replace_inc_dec (rtx *r, void *d)
case POST_DEC:
{
rtx r1 = XEXP (x, 0);
- rtx c = gen_int_mode (Pmode, -data->size);
+ rtx c = gen_int_mode (-data->size, Pmode);
emit_insn_before (gen_rtx_SET (Pmode, r1,
gen_rtx_PLUS (Pmode, r1, c)),
data->insn);
@@ -1213,10 +1215,10 @@ set_position_unneeded (store_info_t s_info, int pos)
{
if (__builtin_expect (s_info->is_large, false))
{
- if (!bitmap_bit_p (s_info->positions_needed.large.bitmap, pos))
+ if (!bitmap_bit_p (s_info->positions_needed.large.bmap, pos))
{
s_info->positions_needed.large.count++;
- bitmap_set_bit (s_info->positions_needed.large.bitmap, pos);
+ bitmap_set_bit (s_info->positions_needed.large.bmap, pos);
}
}
else
@@ -1233,7 +1235,7 @@ set_all_positions_unneeded (store_info_t s_info)
{
int pos, end = s_info->end - s_info->begin;
for (pos = 0; pos < end; pos++)
- bitmap_set_bit (s_info->positions_needed.large.bitmap, pos);
+ bitmap_set_bit (s_info->positions_needed.large.bmap, pos);
s_info->positions_needed.large.count = end;
}
else
@@ -1263,7 +1265,7 @@ all_positions_needed_p (store_info_t s_info, int start, int width)
{
int end = start + width;
while (start < end)
- if (bitmap_bit_p (s_info->positions_needed.large.bitmap, start++))
+ if (bitmap_bit_p (s_info->positions_needed.large.bmap, start++))
return false;
return true;
}
@@ -1588,7 +1590,7 @@ record_store (rtx body, bb_info_t bb_info)
{
store_info->is_large = true;
store_info->positions_needed.large.count = 0;
- store_info->positions_needed.large.bitmap = BITMAP_ALLOC (NULL);
+ store_info->positions_needed.large.bmap = BITMAP_ALLOC (NULL);
}
else
{
@@ -2687,7 +2689,7 @@ dse_step1 (void)
for (s_info = ptr->store_rec; s_info; s_info = s_info->next)
if (s_info->is_large)
{
- BITMAP_FREE (s_info->positions_needed.large.bitmap);
+ BITMAP_FREE (s_info->positions_needed.large.bmap);
s_info->is_large = false;
}
}
@@ -3859,3 +3861,5 @@ struct rtl_opt_pass pass_rtl_dse2 =
TODO_ggc_collect /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/dse.h b/gcc/dse.h
index 862eacadc1e..7c9c94bc57e 100644
--- a/gcc/dse.h
+++ b/gcc/dse.h
@@ -23,8 +23,6 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_DSE_H
#define GCC_DSE_H
-struct df;
-
extern void dse_record_singleton_alias_set (alias_set_type, enum machine_mode);
extern void dse_invalidate_singleton_alias_set (alias_set_type);
diff --git a/gcc/dummy-checksum.c b/gcc/dummy-checksum.c
index 81190a6ca15..d503105d6be 100644
--- a/gcc/dummy-checksum.c
+++ b/gcc/dummy-checksum.c
@@ -1 +1,4 @@
+#ifdef __cplusplus
+extern
+#endif
const unsigned char executable_checksum[16] = { 0 };
diff --git a/gcc/dwarf2.h b/gcc/dwarf2.h
index a0a97eee3bb..0c5148681f1 100644
--- a/gcc/dwarf2.h
+++ b/gcc/dwarf2.h
@@ -589,11 +589,11 @@ enum dwarf_type
DW_ATE_HP_complex_float128 = 0x83, /* Complex floating-point (128 bit). */
DW_ATE_HP_floathpintel = 0x84, /* Floating-point (82 bit IA64). */
DW_ATE_HP_imaginary_float80 = 0x85,
- DW_ATE_HP_imaginary_float128 = 0x86
- };
+ DW_ATE_HP_imaginary_float128 = 0x86,
-#define DW_ATE_lo_user 0x80
-#define DW_ATE_hi_user 0xff
+ DW_ATE_lo_user = 0x80,
+ DW_ATE_hi_user = 0xff
+ };
/* Decimal sign encodings. */
enum dwarf_decimal_sign_encoding
diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c
index 5ccbcf1a81a..0f952364015 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. */
@@ -985,3 +988,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 04c4320c67a..7bc28f0c5b1 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 9bf0803ce57..66c8c394d2c 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -89,6 +89,9 @@ along with GCC; see the file COPYING3. If not see
#include "hashtab.h"
#include "cgraph.h"
#include "input.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
#ifdef DWARF2_DEBUGGING_INFO
static void dwarf2out_source_line (unsigned int, const char *);
@@ -198,6 +201,8 @@ static GTY(()) section *debug_str_section;
static GTY(()) section *debug_ranges_section;
static GTY(()) section *debug_frame_section;
+END_TARGET_SPECIFIC
+
/* How to start an assembler comment. */
#ifndef ASM_COMMENT_START
#define ASM_COMMENT_START ";#"
@@ -343,6 +348,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;
@@ -376,14 +383,18 @@ static GTY(()) dw_cfi_ref cie_cfi_head;
static unsigned current_funcdef_fde;
#endif
+END_TARGET_SPECIFIC
+
struct indirect_string_node GTY(())
{
const char *str;
unsigned int refcount;
- unsigned int form;
+ enum dwarf_form form;
char *label;
};
+START_TARGET_SPECIFIC
+
static GTY ((param_is (struct indirect_string_node))) htab_t debug_str_hash;
static GTY(()) int dw2_string_counter;
@@ -1977,6 +1988,7 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label)
cfa_temp.reg = cfa.reg;
cfa_temp.offset = cfa.offset;
}
+else if (dest == stack_pointer_rtx && src == frame_pointer_rtx) ; /*FIXME*/
else
{
/* Saving a register in a register. */
@@ -2147,6 +2159,10 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label)
}
return;
+ case MEM:
+ /* FIXME. Need this for epilogues. */
+ break;
+
default:
gcc_unreachable ();
}
@@ -2427,7 +2443,7 @@ dwarf2out_frame_debug (rtx insn, bool after_p)
dwarf2out_frame_debug_expr (insn, label);
}
-#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
@@ -3382,7 +3398,9 @@ dwarf2out_switch_text_section (void)
if (cold_text_section != NULL)
dwarf2out_note_section_used ();
}
-#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. */
@@ -3396,7 +3414,8 @@ struct dwarf_file_data GTY(())
/* We need some way to distinguish DW_OP_addr with a direct symbol
relocation from DW_OP_addr with a dtp-relative symbol relocation. */
-#define INTERNAL_DW_OP_tls_addr (0x100 + DW_OP_addr)
+#define INTERNAL_DW_OP_tls_addr \
+ ((enum dwarf_location_atom) (0x100 + DW_OP_addr))
typedef struct dw_val_struct *dw_val_ref;
@@ -3519,6 +3538,8 @@ typedef struct dw_loc_list_struct GTY(())
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);
@@ -3866,12 +3887,13 @@ new_reg_loc_descr (unsigned int reg, unsigned HOST_WIDE_INT offset)
if (offset)
{
if (reg <= 31)
- return new_loc_descr (DW_OP_breg0 + reg, offset, 0);
+ return new_loc_descr ((enum dwarf_location_atom) (DW_OP_breg0 + reg),
+ offset, 0);
else
return new_loc_descr (DW_OP_bregx, reg, offset);
}
else if (reg <= 31)
- return new_loc_descr (DW_OP_reg0 + reg, 0, 0);
+ return new_loc_descr ((enum dwarf_location_atom) (DW_OP_reg0 + reg), 0, 0);
else
return new_loc_descr (DW_OP_regx, reg, 0);
}
@@ -4584,7 +4606,10 @@ const struct gcc_debug_hooks dwarf2_debug_hooks =
dwarf2out_switch_text_section,
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'
@@ -4685,8 +4710,10 @@ typedef struct pubname_struct GTY(())
}
pubname_entry;
+START_TARGET_SPECIFIC
DEF_VEC_O(pubname_entry);
DEF_VEC_ALLOC_O(pubname_entry, gc);
+END_TARGET_SPECIFIC
struct dw_ranges_struct GTY(())
{
@@ -4784,6 +4811,8 @@ limbo_die_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. */
@@ -4975,7 +5004,7 @@ static hashval_t debug_str_do_hash (const void *);
static int debug_str_eq (const void *, const void *);
static void add_AT_string (dw_die_ref, enum dwarf_attribute, const char *);
static inline const char *AT_string (dw_attr_ref);
-static int AT_string_form (dw_attr_ref);
+static enum dwarf_form AT_string_form (dw_attr_ref);
static void add_AT_die_ref (dw_die_ref, enum dwarf_attribute, dw_die_ref);
static void add_AT_specification (dw_die_ref, dw_die_ref);
static inline dw_die_ref AT_ref (dw_attr_ref);
@@ -5969,7 +5998,7 @@ AT_string (dw_attr_ref a)
/* Find out whether a string should be output inline in DIE
or out-of-line in .debug_str section. */
-static int
+static enum dwarf_form
AT_string_form (dw_attr_ref a)
{
struct indirect_string_node *node;
@@ -9759,13 +9788,13 @@ int_loc_descriptor (HOST_WIDE_INT i)
if (i >= 0)
{
if (i <= 31)
- op = DW_OP_lit0 + i;
+ op = (enum dwarf_location_atom) (DW_OP_lit0 + i);
else if (i <= 0xff)
op = DW_OP_const1u;
else if (i <= 0xffff)
op = DW_OP_const2u;
else if (HOST_BITS_PER_WIDE_INT == 32
- || i <= 0xffffffff)
+ || i <= (HOST_WIDE_INT) 0xffffffff)
op = DW_OP_const4u;
else
op = DW_OP_constu;
@@ -9777,7 +9806,7 @@ int_loc_descriptor (HOST_WIDE_INT i)
else if (i >= -0x8000)
op = DW_OP_const2s;
else if (HOST_BITS_PER_WIDE_INT == 32
- || i >= -0x80000000)
+ || i >= (HOST_WIDE_INT) -0x80000000)
op = DW_OP_const4s;
else
op = DW_OP_consts;
@@ -9852,7 +9881,8 @@ based_loc_descr (rtx reg, HOST_WIDE_INT offset,
regno = dbx_reg_number (reg);
if (regno <= 31)
- result = new_loc_descr (DW_OP_breg0 + regno, offset, 0);
+ result = new_loc_descr ((enum dwarf_location_atom) (DW_OP_breg0 + regno),
+ offset, 0);
else
result = new_loc_descr (DW_OP_bregx, regno, offset);
@@ -10267,6 +10297,7 @@ loc_descriptor (rtx rtl, enum var_init_status initialized)
break;
case MEM:
+ rtl = targetm.delegitimize_address (rtl);
loc_result = mem_loc_descriptor (XEXP (rtl, 0), GET_MODE (rtl),
initialized);
if (loc_result == NULL)
@@ -10380,8 +10411,8 @@ loc_descriptor_from_tree_1 (tree loc, int want_address)
if (DECL_THREAD_LOCAL_P (loc))
{
rtx rtl;
- unsigned first_op;
- unsigned second_op;
+ enum dwarf_location_atom first_op;
+ enum dwarf_location_atom second_op;
if (targetm.have_tls)
{
@@ -12733,7 +12764,8 @@ add_calling_convention_attribute (dw_die_ref subr_die, tree decl)
{
enum dwarf_calling_convention value = DW_CC_normal;
- value = targetm.dwarf_calling_convention (TREE_TYPE (decl));
+ value = ((enum dwarf_calling_convention)
+ targetm.dwarf_calling_convention (TREE_TYPE (decl)));
/* DWARF doesn't provide a way to identify a program's source-level
entry point. DW_AT_calling_convention attributes are only meant
@@ -16679,3 +16711,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 ca033824c0d..0c0a0be543b 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -58,14 +58,18 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "tree-pass.h"
#include "df.h"
+#include "multi-target.h"
+START_TARGET_SPECIFIC
/* Commonly used modes. */
enum machine_mode byte_mode; /* Mode whose width is BITS_PER_UNIT. */
enum machine_mode word_mode; /* Mode whose width is BITS_PER_WORD. */
enum machine_mode double_mode; /* Mode whose width is DOUBLE_TYPE_SIZE. */
enum machine_mode ptr_mode; /* Mode whose width is POINTER_SIZE. */
+END_TARGET_SPECIFIC
+#ifndef EXTRA_TARGET
/* Datastructures maintained for currently processed function in RTL form. */
struct rtl_data x_rtl;
@@ -76,7 +80,9 @@ struct rtl_data x_rtl;
with length attribute nested in top level structures. */
rtx * regno_reg_rtx;
+#endif /* !EXTRA_TARGET */
+START_TARGET_SPECIFIC
/* This is *not* reset after each function. It gives each CODE_LABEL
in the entire compilation a unique label number. */
@@ -143,6 +149,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
@@ -153,8 +169,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)))
@@ -164,10 +184,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;
@@ -416,6 +432,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). */
@@ -427,6 +444,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
@@ -477,6 +495,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
@@ -489,6 +508,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
@@ -635,6 +655,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)
{
@@ -657,6 +678,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. */
@@ -907,6 +929,8 @@ gen_reg_rtx (enum machine_mode mode)
crtl->emit.regno_pointer_align_length = old_size * 2;
}
+ else
+ gcc_assert (reg_rtx_no < crtl->emit.regno_pointer_align_length);
val = gen_raw_REG (mode, reg_rtx_no);
regno_reg_rtx[reg_rtx_no++] = val;
@@ -2392,7 +2416,7 @@ struct rtl_opt_pass pass_unshare_all_rtl =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -4923,7 +4947,8 @@ push_to_sequence (rtx first)
start_sequence ();
- for (last = first; last && NEXT_INSN (last); last = NEXT_INSN (last));
+ for (last = first; last && NEXT_INSN (last); last = NEXT_INSN (last))
+ ;
first_insn = first;
last_insn = last;
@@ -5278,6 +5303,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
@@ -5307,6 +5334,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
@@ -5387,11 +5416,13 @@ init_emit_once (int line_numbers)
/* 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);
@@ -5707,3 +5738,5 @@ gen_hard_reg_clobber (enum machine_mode mode, unsigned int regno)
}
#include "gt-emit-rtl.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/errors.h b/gcc/errors.h
index 10d52c72d2d..5ed34e07df7 100644
--- a/gcc/errors.h
+++ b/gcc/errors.h
@@ -40,6 +40,13 @@ extern void internal_error (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_PRIN
extern const char *trim_filename (const char *);
extern int have_error;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
extern const char *progname;
+#ifdef __cplusplus
+}
+#endif
#endif /* ! GCC_ERRORS_H */
diff --git a/gcc/except.c b/gcc/except.c
index be6fb2aba94..1d1653e7467 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -77,6 +77,9 @@ along with GCC; see the file COPYING3. If not see
#include "diagnostic.h"
#include "tree-pass.h"
#include "timevar.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* Provide defaults for stuff that may not be defined when using
sjlj exceptions. */
@@ -99,7 +102,7 @@ tree (*lang_eh_runtime_type) (tree);
struct ehl_map_entry GTY(())
{
rtx label;
- struct eh_region *region;
+ struct eh_region_d *region;
};
static GTY(()) int call_site_base;
@@ -113,16 +116,30 @@ 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
+/* Possible types of an exception region. */
+enum eh_region_type
+ {
+ ERT_UNKNOWN = 0,
+ ERT_CLEANUP,
+ ERT_TRY,
+ ERT_CATCH,
+ ERT_ALLOWED_EXCEPTIONS,
+ ERT_MUST_NOT_THROW,
+ ERT_THROW
+ };
+
/* Describes one exception region. */
-struct eh_region GTY(())
+struct eh_region_d GTY(())
{
/* The immediately surrounding region. */
- struct eh_region *outer;
+ struct eh_region_d *outer;
/* The list of immediately contained regions. */
- struct eh_region *inner;
- struct eh_region *next_peer;
+ struct eh_region_d *inner;
+ struct eh_region_d *next_peer;
/* An identifier for this region. */
int region_number;
@@ -132,31 +149,22 @@ struct eh_region GTY(())
bitmap aka;
/* Each region does exactly one thing. */
- enum eh_region_type
- {
- ERT_UNKNOWN = 0,
- ERT_CLEANUP,
- ERT_TRY,
- ERT_CATCH,
- ERT_ALLOWED_EXCEPTIONS,
- ERT_MUST_NOT_THROW,
- ERT_THROW
- } type;
+ enum eh_region_type type;
/* Holds the action to perform based on the preceding type. */
union eh_region_u {
/* A list of catch blocks, a surrounding try block,
and the label for continuing after a catch. */
struct eh_region_u_try {
- struct eh_region *eh_catch;
- struct eh_region *last_catch;
+ struct eh_region_d *eh_catch;
+ struct eh_region_d *last_catch;
} GTY ((tag ("ERT_TRY"))) eh_try;
/* The list through the catch handlers, the list of type objects
matched, and the list of associated filters. */
struct eh_region_u_catch {
- struct eh_region *next_catch;
- struct eh_region *prev_catch;
+ struct eh_region_d *next_catch;
+ struct eh_region_d *prev_catch;
tree type_list;
tree filter_list;
} GTY ((tag ("ERT_CATCH"))) eh_catch;
@@ -176,7 +184,7 @@ struct eh_region GTY(())
/* Retain the cleanup expression even after expansion so that
we can match up fixup regions. */
struct eh_region_u_cleanup {
- struct eh_region *prev_try;
+ struct eh_region_d *prev_try;
} GTY ((tag ("ERT_CLEANUP"))) cleanup;
} GTY ((desc ("%0.type"))) u;
@@ -198,9 +206,9 @@ struct eh_region GTY(())
unsigned may_contain_throw : 1;
};
-typedef struct eh_region *eh_region;
+typedef struct eh_region_d *eh_region;
-struct call_site_record GTY(())
+struct call_site_record_d GTY(())
{
rtx landing_pad;
int action;
@@ -213,7 +221,7 @@ DEF_VEC_ALLOC_P(eh_region, gc);
struct eh_status GTY(())
{
/* The tree of all regions for this function. */
- struct eh_region *region_tree;
+ struct eh_region_d *region_tree;
/* The same information as an indexable array. */
VEC(eh_region,gc) *region_array;
@@ -222,6 +230,7 @@ struct eh_status GTY(())
htab_t GTY((param_is (struct throw_stmt_node))) throw_stmt_table;
};
+START_TARGET_SPECIFIC
static int t2r_eq (const void *, const void *);
static hashval_t t2r_hash (const void *);
static void add_type_for_runtime (tree);
@@ -251,9 +260,9 @@ static void sjlj_build_landing_pads (void);
static hashval_t ehl_hash (const void *);
static int ehl_eq (const void *, const void *);
-static void add_ehl_entry (rtx, struct eh_region *);
+static void add_ehl_entry (rtx, struct eh_region_d *);
static void remove_exception_handler_label (rtx);
-static void remove_eh_handler (struct eh_region *);
+static void remove_eh_handler (struct eh_region_d *);
static int for_each_eh_label_1 (void **, void *);
/* The return value of reachable_next_level. */
@@ -270,13 +279,13 @@ enum reachable_code
};
struct reachable_info;
-static enum reachable_code reachable_next_level (struct eh_region *, tree,
+static enum reachable_code reachable_next_level (struct eh_region_d *, tree,
struct reachable_info *);
static int action_record_eq (const void *, const void *);
static hashval_t action_record_hash (const void *);
static int add_action_record (htab_t, int, int);
-static int collect_one_action_chain (htab_t, struct eh_region *);
+static int collect_one_action_chain (htab_t, struct eh_region_d *);
static int add_call_site (rtx, int);
static void push_uleb128 (varray_type *, unsigned int);
@@ -416,17 +425,17 @@ init_eh_for_function (void)
These are used from tree-eh.c when processing exception related
nodes during tree optimization. */
-static struct eh_region *
-gen_eh_region (enum eh_region_type type, struct eh_region *outer)
+static struct eh_region_d *
+gen_eh_region (enum eh_region_type type, struct eh_region_d *outer)
{
- struct eh_region *new_eh;
+ struct eh_region_d *new_eh;
#ifdef ENABLE_CHECKING
gcc_assert (doing_eh (0));
#endif
/* Insert a new blank region as a leaf in the tree. */
- new_eh = GGC_CNEW (struct eh_region);
+ new_eh = GGC_CNEW (struct eh_region_d);
new_eh->type = type;
new_eh->outer = outer;
if (outer)
@@ -445,24 +454,24 @@ gen_eh_region (enum eh_region_type type, struct eh_region *outer)
return new_eh;
}
-struct eh_region *
-gen_eh_region_cleanup (struct eh_region *outer, struct eh_region *prev_try)
+struct eh_region_d *
+gen_eh_region_cleanup (struct eh_region_d *outer, struct eh_region_d *prev_try)
{
- struct eh_region *cleanup = gen_eh_region (ERT_CLEANUP, outer);
+ struct eh_region_d *cleanup = gen_eh_region (ERT_CLEANUP, outer);
cleanup->u.cleanup.prev_try = prev_try;
return cleanup;
}
-struct eh_region *
-gen_eh_region_try (struct eh_region *outer)
+struct eh_region_d *
+gen_eh_region_try (struct eh_region_d *outer)
{
return gen_eh_region (ERT_TRY, outer);
}
-struct eh_region *
-gen_eh_region_catch (struct eh_region *t, tree type_or_list)
+struct eh_region_d *
+gen_eh_region_catch (struct eh_region_d *t, tree type_or_list)
{
- struct eh_region *c, *l;
+ struct eh_region_d *c, *l;
tree type_list, type_node;
/* Ensure to always end up with a type list to normalize further
@@ -491,10 +500,10 @@ gen_eh_region_catch (struct eh_region *t, tree type_or_list)
return c;
}
-struct eh_region *
-gen_eh_region_allowed (struct eh_region *outer, tree allowed)
+struct eh_region_d *
+gen_eh_region_allowed (struct eh_region_d *outer, tree allowed)
{
- struct eh_region *region = gen_eh_region (ERT_ALLOWED_EXCEPTIONS, outer);
+ struct eh_region_d *region = gen_eh_region (ERT_ALLOWED_EXCEPTIONS, outer);
region->u.allowed.type_list = allowed;
for (; allowed ; allowed = TREE_CHAIN (allowed))
@@ -503,32 +512,32 @@ gen_eh_region_allowed (struct eh_region *outer, tree allowed)
return region;
}
-struct eh_region *
-gen_eh_region_must_not_throw (struct eh_region *outer)
+struct eh_region_d *
+gen_eh_region_must_not_throw (struct eh_region_d *outer)
{
return gen_eh_region (ERT_MUST_NOT_THROW, outer);
}
int
-get_eh_region_number (struct eh_region *region)
+get_eh_region_number (struct eh_region_d *region)
{
return region->region_number;
}
bool
-get_eh_region_may_contain_throw (struct eh_region *region)
+get_eh_region_may_contain_throw (struct eh_region_d *region)
{
return region->may_contain_throw;
}
tree
-get_eh_region_tree_label (struct eh_region *region)
+get_eh_region_tree_label (struct eh_region_d *region)
{
return region->tree_label;
}
void
-set_eh_region_tree_label (struct eh_region *region, tree lab)
+set_eh_region_tree_label (struct eh_region_d *region, tree lab)
{
region->tree_label = lab;
}
@@ -537,7 +546,7 @@ void
expand_resx_expr (tree exp)
{
int region_nr = TREE_INT_CST_LOW (TREE_OPERAND (exp, 0));
- struct eh_region *reg = VEC_index (eh_region,
+ struct eh_region_d *reg = VEC_index (eh_region,
cfun->eh->region_array, region_nr);
gcc_assert (!reg->resume);
@@ -550,7 +559,7 @@ expand_resx_expr (tree exp)
call to a function which itself may contain a throw. */
void
-note_eh_region_may_contain_throw (struct eh_region *region)
+note_eh_region_may_contain_throw (struct eh_region_d *region)
{
while (region && !region->may_contain_throw)
{
@@ -589,7 +598,7 @@ get_exception_filter (void)
void
collect_eh_region_array (void)
{
- struct eh_region *i;
+ struct eh_region_d *i;
i = cfun->eh->region_tree;
if (! i)
@@ -629,7 +638,7 @@ remove_unreachable_regions (rtx insns)
{
int i, *uid_region_num;
bool *reachable;
- struct eh_region *r;
+ struct eh_region_d *r;
rtx insn;
uid_region_num = XCNEWVEC (int, get_max_uid ());
@@ -682,7 +691,7 @@ remove_unreachable_regions (rtx insns)
{
/* TRY regions are reachable if any of its CATCH regions
are reachable. */
- struct eh_region *c;
+ struct eh_region_d *c;
for (c = r->u.eh_try.eh_catch; c ; c = c->u.eh_catch.next_catch)
if (reachable[c->region_number])
{
@@ -719,7 +728,7 @@ convert_from_eh_region_ranges (void)
we allocated earlier. */
for (i = 1; i <= n; ++i)
{
- struct eh_region *region;
+ struct eh_region_d *region;
region = VEC_index (eh_region, cfun->eh->region_array, i);
if (region && region->tree_label)
@@ -730,7 +739,7 @@ convert_from_eh_region_ranges (void)
}
static void
-add_ehl_entry (rtx label, struct eh_region *region)
+add_ehl_entry (rtx label, struct eh_region_d *region)
{
struct ehl_map_entry **slot, *entry;
@@ -773,7 +782,7 @@ find_exception_handler_labels (void)
for (i = cfun->eh->last_region_number; i > 0; --i)
{
- struct eh_region *region;
+ struct eh_region_d *region;
rtx lab;
region = VEC_index (eh_region, cfun->eh->region_array, i);
@@ -803,7 +812,7 @@ current_function_has_exception_handlers (void)
for (i = cfun->eh->last_region_number; i > 0; --i)
{
- struct eh_region *region;
+ struct eh_region_d *region;
region = VEC_index (eh_region, cfun->eh->region_array, i);
if (region
@@ -847,7 +856,7 @@ duplicate_eh_regions_1 (eh_region old, eh_region outer, int eh_offset)
{
eh_region ret, n;
- ret = n = GGC_NEW (struct eh_region);
+ ret = n = GGC_NEW (struct eh_region_d);
*n = *old;
n->outer = outer;
@@ -1023,7 +1032,7 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
bool
eh_region_outer_p (struct function *ifun, int region_a, int region_b)
{
- struct eh_region *rp_a, *rp_b;
+ struct eh_region_d *rp_a, *rp_b;
gcc_assert (ifun->eh->last_region_number > 0);
gcc_assert (ifun->eh->region_tree);
@@ -1050,7 +1059,7 @@ eh_region_outer_p (struct function *ifun, int region_a, int region_b)
int
eh_region_outermost (struct function *ifun, int region_a, int region_b)
{
- struct eh_region *rp_a, *rp_b;
+ struct eh_region_d *rp_a, *rp_b;
sbitmap b_outer;
gcc_assert (ifun->eh->last_region_number > 0);
@@ -1277,7 +1286,7 @@ assign_filter_values (void)
for (i = cfun->eh->last_region_number; i > 0; --i)
{
- struct eh_region *r;
+ struct eh_region_d *r;
r = VEC_index (eh_region, cfun->eh->region_array, i);
@@ -1372,7 +1381,7 @@ build_post_landing_pads (void)
for (i = cfun->eh->last_region_number; i > 0; --i)
{
- struct eh_region *region;
+ struct eh_region_d *region;
rtx seq;
region = VEC_index (eh_region, cfun->eh->region_array, i);
@@ -1399,7 +1408,7 @@ build_post_landing_pads (void)
switch statement generation code in expand_end_case.
Rapid prototyping sez a sequence of ifs. */
{
- struct eh_region *c;
+ struct eh_region_d *c;
for (c = region->u.eh_try.eh_catch; c ; c = c->u.eh_catch.next_catch)
{
if (c->u.eh_catch.type_list == NULL)
@@ -1492,8 +1501,8 @@ connect_post_landing_pads (void)
for (i = cfun->eh->last_region_number; i > 0; --i)
{
- struct eh_region *region;
- struct eh_region *outer;
+ struct eh_region_d *region;
+ struct eh_region_d *outer;
rtx seq;
rtx barrier;
@@ -1569,7 +1578,7 @@ dw2_build_landing_pads (void)
for (i = cfun->eh->last_region_number; i > 0; --i)
{
- struct eh_region *region;
+ struct eh_region_d *region;
rtx seq;
basic_block bb;
edge e;
@@ -1634,7 +1643,7 @@ sjlj_find_directly_reachable_regions (struct sjlj_lp_info *lp_info)
for (insn = get_insns (); insn ; insn = NEXT_INSN (insn))
{
- struct eh_region *region;
+ struct eh_region_d *region;
enum reachable_code rc;
tree type_thrown;
rtx note;
@@ -1688,7 +1697,7 @@ sjlj_assign_call_site_values (rtx dispatch_label, struct sjlj_lp_info *lp_info)
for (i = cfun->eh->last_region_number; i > 0; --i)
if (lp_info[i].directly_reachable)
{
- struct eh_region *r = VEC_index (eh_region, cfun->eh->region_array, i);
+ struct eh_region_d *r = VEC_index (eh_region, cfun->eh->region_array, i);
r->landing_pad = dispatch_label;
lp_info[i].action_index = collect_one_action_chain (ar_hash, r);
@@ -1745,7 +1754,7 @@ sjlj_mark_call_sites (struct sjlj_lp_info *lp_info)
for (insn = get_insns (); insn ; insn = NEXT_INSN (insn))
{
- struct eh_region *region;
+ struct eh_region_d *region;
int this_call_site;
rtx note, before, p;
@@ -1991,14 +2000,14 @@ sjlj_emit_dispatch_table (rtx dispatch_label, struct sjlj_lp_info *lp_info)
emit_cmp_and_jump_insns (dispatch, GEN_INT (lp_info[i].dispatch_index),
EQ, NULL_RTX, TYPE_MODE (integer_type_node), 0,
- ((struct eh_region *)VEC_index (eh_region, cfun->eh->region_array, i))
+ ((struct eh_region_d *)VEC_index (eh_region, cfun->eh->region_array, i))
->post_landing_pad);
}
seq = get_insns ();
end_sequence ();
- before = (((struct eh_region *)VEC_index (eh_region, cfun->eh->region_array, first_reachable))
+ before = (((struct eh_region_d *)VEC_index (eh_region, cfun->eh->region_array, first_reachable))
->post_landing_pad);
bb = emit_to_new_bb_before (seq, before);
@@ -2145,9 +2154,9 @@ remove_exception_handler_label (rtx label)
/* Splice REGION from the region tree etc. */
static void
-remove_eh_handler (struct eh_region *region)
+remove_eh_handler (struct eh_region_d *region)
{
- struct eh_region **pp, **pp_start, *p, *outer, *inner;
+ struct eh_region_d **pp, **pp_start, *p, *outer, *inner;
rtx lab;
/* For the benefit of efficiently handling REG_EH_REGION notes,
@@ -2206,7 +2215,7 @@ remove_eh_handler (struct eh_region *region)
if (region->type == ERT_CATCH)
{
- struct eh_region *eh_try, *next, *prev;
+ struct eh_region_d *eh_try, *next, *prev;
for (eh_try = region->next_peer;
eh_try->type == ERT_CATCH;
@@ -2240,7 +2249,7 @@ void
maybe_remove_eh_handler (rtx label)
{
struct ehl_map_entry **slot, tmp;
- struct eh_region *region;
+ struct eh_region_d *region;
/* ??? After generating landing pads, it's not so simple to determine
if the region data is completely unused. One must examine the
@@ -2294,12 +2303,12 @@ for_each_eh_label_1 (void **pentry, void *data)
/* Invoke CALLBACK for every exception region in the current function. */
void
-for_each_eh_region (void (*callback) (struct eh_region *))
+for_each_eh_region (void (*callback) (struct eh_region_d *))
{
int i, n = cfun->eh->last_region_number;
for (i = 1; i <= n; ++i)
{
- struct eh_region *region;
+ struct eh_region_d *region;
region = VEC_index (eh_region, cfun->eh->region_array, i);
if (region)
@@ -2314,7 +2323,7 @@ struct reachable_info
{
tree types_caught;
tree types_allowed;
- void (*callback) (struct eh_region *, void *);
+ void (*callback) (struct eh_region_d *, void *);
void *callback_data;
bool saw_any_handlers;
};
@@ -2354,7 +2363,7 @@ check_handled (tree handled, tree type)
static void
add_reachable_handler (struct reachable_info *info,
- struct eh_region *lp_region, struct eh_region *region)
+ struct eh_region_d *lp_region, struct eh_region_d *region)
{
if (! info)
return;
@@ -2373,7 +2382,7 @@ add_reachable_handler (struct reachable_info *info,
and caught/allowed type information between invocations. */
static enum reachable_code
-reachable_next_level (struct eh_region *region, tree type_thrown,
+reachable_next_level (struct eh_region_d *region, tree type_thrown,
struct reachable_info *info)
{
switch (region->type)
@@ -2387,7 +2396,7 @@ reachable_next_level (struct eh_region *region, tree type_thrown,
case ERT_TRY:
{
- struct eh_region *c;
+ struct eh_region_d *c;
enum reachable_code ret = RNL_NOT_CAUGHT;
for (c = region->u.eh_try.eh_catch; c ; c = c->u.eh_catch.next_catch)
@@ -2540,11 +2549,11 @@ reachable_next_level (struct eh_region *region, tree type_thrown,
void
foreach_reachable_handler (int region_number, bool is_resx,
- void (*callback) (struct eh_region *, void *),
+ void (*callback) (struct eh_region_d *, void *),
void *callback_data)
{
struct reachable_info info;
- struct eh_region *region;
+ struct eh_region_d *region;
tree type_thrown;
memset (&info, 0, sizeof (info));
@@ -2587,7 +2596,7 @@ foreach_reachable_handler (int region_number, bool is_resx,
reached by a given insn. */
static void
-arh_to_landing_pad (struct eh_region *region, void *data)
+arh_to_landing_pad (struct eh_region_d *region, void *data)
{
rtx *p_handlers = (rtx *) data;
if (! *p_handlers)
@@ -2595,7 +2604,7 @@ arh_to_landing_pad (struct eh_region *region, void *data)
}
static void
-arh_to_label (struct eh_region *region, void *data)
+arh_to_label (struct eh_region_d *region, void *data)
{
rtx *p_handlers = (rtx *) data;
*p_handlers = alloc_INSN_LIST (region->label, *p_handlers);
@@ -2637,7 +2646,7 @@ reachable_handlers (rtx insn)
bool
can_throw_internal_1 (int region_number, bool is_resx)
{
- struct eh_region *region;
+ struct eh_region_d *region;
tree type_thrown;
region = VEC_index (eh_region, cfun->eh->region_array, region_number);
@@ -2697,7 +2706,7 @@ can_throw_internal (const_rtx insn)
bool
can_throw_external_1 (int region_number, bool is_resx)
{
- struct eh_region *region;
+ struct eh_region_d *region;
tree type_thrown;
region = VEC_index (eh_region, cfun->eh->region_array, region_number);
@@ -2818,7 +2827,7 @@ struct rtl_opt_pass pass_set_nothrow_function_flags =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -3078,9 +3087,9 @@ add_action_record (htab_t ar_hash, int filter, int next)
}
static int
-collect_one_action_chain (htab_t ar_hash, struct eh_region *region)
+collect_one_action_chain (htab_t ar_hash, struct eh_region_d *region)
{
- struct eh_region *c;
+ struct eh_region_d *c;
int next;
/* If we've reached the top of the region chain, then we have
@@ -3193,7 +3202,7 @@ add_call_site (rtx landing_pad, int action)
{
call_site_record record;
- record = GGC_NEW (struct call_site_record);
+ record = GGC_NEW (struct call_site_record_d);
record->landing_pad = landing_pad;
record->action = action;
@@ -3227,7 +3236,7 @@ convert_to_eh_region_ranges (void)
for (iter = get_insns (); iter ; iter = NEXT_INSN (iter))
if (INSN_P (iter))
{
- struct eh_region *region;
+ struct eh_region_d *region;
int this_action;
rtx this_landing_pad;
@@ -3271,7 +3280,7 @@ convert_to_eh_region_ranges (void)
landing pads. Collect the landing pad for this region. */
if (this_action >= 0)
{
- struct eh_region *o;
+ struct eh_region_d *o;
for (o = region; ! o->landing_pad ; o = o->outer)
continue;
this_landing_pad = o->landing_pad;
@@ -3340,7 +3349,7 @@ struct rtl_opt_pass pass_convert_to_eh_region_ranges =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -3394,7 +3403,7 @@ dw2_size_of_call_site_table (void)
for (i = 0; i < n; ++i)
{
- struct call_site_record *cs = VEC_index (call_site_record, crtl->eh.call_site_record, i);
+ call_site_record cs = VEC_index (call_site_record, crtl->eh.call_site_record, i);
size += size_of_uleb128 (cs->action);
}
@@ -3410,7 +3419,7 @@ sjlj_size_of_call_site_table (void)
for (i = 0; i < n; ++i)
{
- struct call_site_record *cs = VEC_index (call_site_record, crtl->eh.call_site_record, i);
+ call_site_record cs = VEC_index (call_site_record, crtl->eh.call_site_record, i);
size += size_of_uleb128 (INTVAL (cs->landing_pad));
size += size_of_uleb128 (cs->action);
}
@@ -3427,7 +3436,7 @@ dw2_output_call_site_table (void)
for (i = 0; i < n; ++i)
{
- struct call_site_record *cs = VEC_index (call_site_record, crtl->eh.call_site_record, i);
+ call_site_record cs = VEC_index (call_site_record, crtl->eh.call_site_record, i);
char reg_start_lab[32];
char reg_end_lab[32];
char landing_pad_lab[32];
@@ -3481,7 +3490,7 @@ sjlj_output_call_site_table (void)
for (i = 0; i < n; ++i)
{
- struct call_site_record *cs = VEC_index (call_site_record, crtl->eh.call_site_record, i);
+ call_site_record cs = VEC_index (call_site_record, crtl->eh.call_site_record, i);
dw2_asm_output_data_uleb128 (INTVAL (cs->landing_pad),
"region %d landing pad", i);
@@ -3798,7 +3807,7 @@ get_eh_throw_stmt_table (struct function *fun)
void
dump_eh_tree (FILE *out, struct function *fun)
{
- struct eh_region *i;
+ struct eh_region_d *i;
int depth = 0;
static const char * const type_name[] = {"unknown", "cleanup", "try", "catch",
"allowed_exceptions", "must_not_throw",
@@ -3844,7 +3853,7 @@ dump_eh_tree (FILE *out, struct function *fun)
void
verify_eh_tree (struct function *fun)
{
- struct eh_region *i, *outer = NULL;
+ struct eh_region_d *i, *outer = NULL;
bool err = false;
int nvisited = 0;
int count = 0;
@@ -3975,3 +3984,5 @@ struct rtl_opt_pass pass_rtl_eh =
};
#include "gt-except.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/except.h b/gcc/except.h
index 9f83a9948f8..c7f8c0ecbfe 100644
--- a/gcc/except.h
+++ b/gcc/except.h
@@ -20,6 +20,8 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#include "multi-target.h"
+
struct function;
/* Per-function EH data. Used only in except.c, but GC and others
@@ -27,21 +29,23 @@ struct function;
struct eh_status;
/* Internal structure describing a region. */
-struct eh_region;
+struct eh_region_d;
+
+START_TARGET_SPECIFIC
/* Test: is exception handling turned on? */
extern int doing_eh (int);
/* Note that the current EH region (if any) may contain a throw, or a
call to a function which itself may contain a throw. */
-extern void note_eh_region_may_contain_throw (struct eh_region *);
+extern void note_eh_region_may_contain_throw (struct eh_region_d *);
/* Invokes CALLBACK for every exception handler label. Only used by old
loop hackery; should not be used by new code. */
extern void for_each_eh_label (void (*) (rtx));
/* Invokes CALLBACK for every exception region in the current function. */
-extern void for_each_eh_region (void (*) (struct eh_region *));
+extern void for_each_eh_region (void (*) (struct eh_region_d *));
/* Determine if the given INSN can throw an exception. */
extern bool can_throw_internal_1 (int, bool);
@@ -86,19 +90,19 @@ extern int duplicate_eh_regions (struct function *, duplicate_eh_regions_map,
extern void sjlj_emit_function_exit_after (rtx);
extern void default_init_unwind_resume_libfunc (void);
-extern struct eh_region *gen_eh_region_cleanup (struct eh_region *,
- struct eh_region *);
-extern struct eh_region *gen_eh_region_try (struct eh_region *);
-extern struct eh_region *gen_eh_region_catch (struct eh_region *, tree);
-extern struct eh_region *gen_eh_region_allowed (struct eh_region *, tree);
-extern struct eh_region *gen_eh_region_must_not_throw (struct eh_region *);
-extern int get_eh_region_number (struct eh_region *);
-extern bool get_eh_region_may_contain_throw (struct eh_region *);
-extern tree get_eh_region_tree_label (struct eh_region *);
-extern void set_eh_region_tree_label (struct eh_region *, tree);
+extern struct eh_region_d *gen_eh_region_cleanup (struct eh_region_d *,
+ struct eh_region_d *);
+extern struct eh_region_d *gen_eh_region_try (struct eh_region_d *);
+extern struct eh_region_d *gen_eh_region_catch (struct eh_region_d *, tree);
+extern struct eh_region_d *gen_eh_region_allowed (struct eh_region_d *, tree);
+extern struct eh_region_d *gen_eh_region_must_not_throw (struct eh_region_d *);
+extern int get_eh_region_number (struct eh_region_d *);
+extern bool get_eh_region_may_contain_throw (struct eh_region_d *);
+extern tree get_eh_region_tree_label (struct eh_region_d *);
+extern void set_eh_region_tree_label (struct eh_region_d *, tree);
extern void foreach_reachable_handler (int, bool,
- void (*) (struct eh_region *, void *),
+ void (*) (struct eh_region_d *, void *),
void *);
extern void collect_eh_region_array (void);
@@ -122,6 +126,7 @@ extern int (*lang_eh_type_covers) (tree a, tree b);
/* Map a type to a runtime object to match type. */
extern tree (*lang_eh_runtime_type) (tree);
+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
@@ -172,5 +177,7 @@ struct throw_stmt_node GTY(())
int region_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
diff --git a/gcc/explow.c b/gcc/explow.c
index c9bf675d36f..ce6d93dc6b9 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);
@@ -418,8 +421,15 @@ memory_address (enum machine_mode mode, rtx x)
/* By passing constant addresses through registers
we get a chance to cse them. */
- if (! cse_not_expected && CONSTANT_P (x) && CONSTANT_ADDRESS_P (x))
- x = force_reg (Pmode, x);
+ if (1 && ! cse_not_expected && CONSTANT_P (x) && CONSTANT_ADDRESS_P (x))
+ {
+ /* If the target has offset addressing and a suitable LEGITIMIZE_ADDRESS
+ definition, that can give much better cse. */
+#if 1
+ LEGITIMIZE_ADDRESS (x, oldx, mode, done);
+#endif
+ x = force_reg (Pmode, x);
+ }
/* We get better cse by rejecting indirect addressing at this stage.
Let the combiner create indirect addresses where appropriate.
@@ -1496,6 +1506,7 @@ hard_libcall_value (enum machine_mode mode)
return LIBCALL_VALUE (mode);
}
+#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
@@ -1532,5 +1543,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 da0db3b8347..6c327507c6c 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,
@@ -208,7 +211,7 @@ init_expmed (void)
for (speed = 0; speed < 2; speed++)
{
crtl->maybe_hot_insn_p = speed;
- zero_cost[speed] = rtx_cost (const0_rtx, 0, speed);
+ zero_cost[speed] = rtx_cost (const0_rtx, SET, speed);
for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT);
mode != VOIDmode;
@@ -5627,3 +5630,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 0e8e0eeee5c..5c115c09d36 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -54,6 +54,7 @@ along with GCC; see the file COPYING3. If not see
#include "timevar.h"
#include "df.h"
#include "diagnostic.h"
+#include "multi-target.h"
/* Decide whether a function's arguments should be processed
from first to last or from last to first.
@@ -80,6 +81,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
@@ -87,10 +89,11 @@ 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. */
-struct move_by_pieces
+struct move_by_pieces_d
{
rtx to;
rtx to_addr;
@@ -108,7 +111,7 @@ struct move_by_pieces
/* This structure is used by store_by_pieces to describe the clear to
be performed. */
-struct store_by_pieces
+struct store_by_pieces_d
{
rtx to;
rtx to_addr;
@@ -121,20 +124,21 @@ struct store_by_pieces
int reverse;
};
+START_TARGET_SPECIFIC
+
static unsigned HOST_WIDE_INT move_by_pieces_ninsns (unsigned HOST_WIDE_INT,
unsigned int,
unsigned int);
static void move_by_pieces_1 (rtx (*) (rtx, ...), enum machine_mode,
- struct move_by_pieces *);
+ struct move_by_pieces_d *);
static bool block_move_libcall_safe_for_call_parm (void);
-static bool emit_block_move_via_movmem (rtx, rtx, rtx, unsigned, unsigned, HOST_WIDE_INT);
static tree emit_block_move_libcall_fn (int);
static void emit_block_move_via_loop (rtx, rtx, rtx, unsigned);
static rtx clear_by_pieces_1 (void *, HOST_WIDE_INT, enum machine_mode);
static void clear_by_pieces (rtx, unsigned HOST_WIDE_INT, unsigned int);
-static void store_by_pieces_1 (struct store_by_pieces *, unsigned int);
+static void store_by_pieces_1 (struct store_by_pieces_d *, unsigned int);
static void store_by_pieces_2 (rtx (*) (rtx, ...), enum machine_mode,
- struct store_by_pieces *);
+ struct store_by_pieces_d *);
static tree clear_storage_libcall_fn (int);
static rtx compress_float_constant (rtx, rtx);
static rtx get_subtarget (rtx);
@@ -268,7 +272,7 @@ init_expr_target (void)
reg = gen_rtx_REG (VOIDmode, -1);
insn = rtx_alloc (INSN);
- pat = gen_rtx_SET (0, NULL_RTX, NULL_RTX);
+ pat = gen_rtx_SET (VOIDmode, NULL_RTX, NULL_RTX);
PATTERN (insn) = pat;
for (mode = VOIDmode; (int) mode < NUM_MACHINE_MODES;
@@ -868,13 +872,20 @@ convert_modes (enum machine_mode mode, enum machine_mode oldmode, rtx x, int uns
#define STORE_MAX_PIECES MIN (MOVE_MAX_PIECES, 2 * sizeof (HOST_WIDE_INT))
/* Determine whether the LEN bytes can be moved by using several move
- instructions. Return nonzero if a call to move_by_pieces should
- succeed. */
+ instructions. If consider_movmem is false: Return nonzero if a call
+ to move_by_pieces should should be done for this move.
+ If consider_movmem is true: Return nonzero if we want to do this move
+ in pieces, either via move_by_pieces, or via movmem. */
int
can_move_by_pieces (unsigned HOST_WIDE_INT len,
- unsigned int align ATTRIBUTE_UNUSED)
+ unsigned int align ATTRIBUTE_UNUSED,
+ bool consider_movmem ATTRIBUTE_UNUSED)
{
+#ifdef CAN_MOVE_BY_PIECES
+ if (consider_movmem)
+ return CAN_MOVE_BY_PIECES (len, align);
+#endif
return MOVE_BY_PIECES_P (len, align);
}
@@ -894,7 +905,7 @@ rtx
move_by_pieces (rtx to, rtx from, unsigned HOST_WIDE_INT len,
unsigned int align, int endp)
{
- struct move_by_pieces data;
+ struct move_by_pieces_d data;
rtx to_addr, from_addr = XEXP (from, 0);
unsigned int max_size = MOVE_MAX_PIECES + 1;
enum machine_mode mode = VOIDmode, tmode;
@@ -1106,7 +1117,7 @@ move_by_pieces_ninsns (unsigned HOST_WIDE_INT l, unsigned int align,
static void
move_by_pieces_1 (rtx (*genfun) (rtx, ...), enum machine_mode mode,
- struct move_by_pieces *data)
+ struct move_by_pieces_d *data)
{
unsigned int size = GET_MODE_SIZE (mode);
rtx to1 = NULL_RTX, from1;
@@ -1302,7 +1313,7 @@ block_move_libcall_safe_for_call_parm (void)
/* A subroutine of emit_block_move. Expand a movmem pattern;
return true if successful. */
-static bool
+bool
emit_block_move_via_movmem (rtx x, rtx y, rtx size, unsigned int align,
unsigned int expected_align, HOST_WIDE_INT expected_size)
{
@@ -2380,7 +2391,7 @@ store_by_pieces (rtx to, unsigned HOST_WIDE_INT len,
rtx (*constfun) (void *, HOST_WIDE_INT, enum machine_mode),
void *constfundata, unsigned int align, bool memsetp, int endp)
{
- struct store_by_pieces data;
+ struct store_by_pieces_d data;
if (len == 0)
{
@@ -2432,7 +2443,7 @@ store_by_pieces (rtx to, unsigned HOST_WIDE_INT len,
static void
clear_by_pieces (rtx to, unsigned HOST_WIDE_INT len, unsigned int align)
{
- struct store_by_pieces data;
+ struct store_by_pieces_d data;
if (len == 0)
return;
@@ -2460,7 +2471,7 @@ clear_by_pieces_1 (void *data ATTRIBUTE_UNUSED,
rtx with BLKmode). ALIGN is maximum alignment we can assume. */
static void
-store_by_pieces_1 (struct store_by_pieces *data ATTRIBUTE_UNUSED,
+store_by_pieces_1 (struct store_by_pieces_d *data ATTRIBUTE_UNUSED,
unsigned int align ATTRIBUTE_UNUSED)
{
rtx to_addr = XEXP (data->to, 0);
@@ -2558,7 +2569,7 @@ store_by_pieces_1 (struct store_by_pieces *data ATTRIBUTE_UNUSED,
static void
store_by_pieces_2 (rtx (*genfun) (rtx, ...), enum machine_mode mode,
- struct store_by_pieces *data)
+ struct store_by_pieces_d *data)
{
unsigned int size = GET_MODE_SIZE (mode);
rtx to1, cst;
@@ -4945,6 +4956,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. */
@@ -5033,6 +5046,8 @@ count_type_elements (const_tree type, bool allow_flexarr)
}
}
+#endif /* !EXTRA_TARGET */
+
/* Return 1 if EXP contains mostly (3/4) zeros. */
static int
@@ -6085,6 +6100,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. */
@@ -6190,6 +6206,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. */
@@ -6219,6 +6236,7 @@ component_ref_field_offset (tree exp)
return SUBSTITUTE_PLACEHOLDER_IN_EXPR (DECL_FIELD_OFFSET (field), exp);
}
+#ifndef EXTRA_TARGET
/* Return 1 if T is an expression that get_inner_reference handles. */
int
@@ -6239,6 +6257,7 @@ handled_component_p (const_tree t)
return 0;
}
}
+#endif /* EXTRA_TARGET */
/* Given an rtx VALUE that may contain additions and multiplications, return
an equivalent value that just refers to a register, memory, or constant.
@@ -6988,9 +7007,9 @@ expand_constructor (tree exp, rtx target, enum expand_modifier modifier,
&& ! (target != 0 && safe_from_p (target, exp, 1)))
|| TREE_ADDRESSABLE (exp)
|| (host_integerp (TYPE_SIZE_UNIT (type), 1)
- && (! MOVE_BY_PIECES_P
+ && (! can_move_by_pieces
(tree_low_cst (TYPE_SIZE_UNIT (type), 1),
- TYPE_ALIGN (type)))
+ TYPE_ALIGN (type), 1))
&& ! mostly_zeros_p (exp))))
|| ((modifier == EXPAND_INITIALIZER || modifier == EXPAND_CONST_ADDRESS)
&& TREE_CONSTANT (exp)))
@@ -8495,7 +8514,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
|| mode != ptr_mode)
{
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- subtarget, &op0, &op1, 0);
+ subtarget, &op0, &op1, EXPAND_NORMAL);
if (op0 == const0_rtx)
return op1;
if (op1 == const0_rtx)
@@ -8667,11 +8686,11 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
if (TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (subexp0, 0))))
expand_operands (TREE_OPERAND (subexp0, 0),
TREE_OPERAND (subexp1, 0),
- NULL_RTX, &op0, &op1, 0);
+ NULL_RTX, &op0, &op1, EXPAND_NORMAL);
else
expand_operands (TREE_OPERAND (subexp0, 0),
TREE_OPERAND (subexp1, 0),
- NULL_RTX, &op1, &op0, 0);
+ NULL_RTX, &op1, &op0, EXPAND_NORMAL);
goto binop3;
}
@@ -8748,7 +8767,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
}
}
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- subtarget, &op0, &op1, 0);
+ subtarget, &op0, &op1, EXPAND_NORMAL);
return REDUCE_BIT_FIELD (expand_mult (mode, op0, op1, target, unsignedp));
case TRUNC_DIV_EXPR:
@@ -8768,7 +8787,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
then if the divisor is constant can optimize the case
where some terms of the dividend have coeffs divisible by it. */
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- subtarget, &op0, &op1, 0);
+ subtarget, &op0, &op1, EXPAND_NORMAL);
return expand_divmod (0, code, mode, op0, op1, target, unsignedp);
case RDIV_EXPR:
@@ -8781,7 +8800,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
if (modifier == EXPAND_STACK_PARM)
target = 0;
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- subtarget, &op0, &op1, 0);
+ subtarget, &op0, &op1, EXPAND_NORMAL);
return expand_divmod (1, code, mode, op0, op1, target, unsignedp);
case FIXED_CONVERT_EXPR:
@@ -8858,7 +8877,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
&& REGNO (target) < FIRST_PSEUDO_REGISTER))
target = gen_reg_rtx (mode);
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- target, &op0, &op1, 0);
+ target, &op0, &op1, EXPAND_NORMAL);
/* First try to do it with a special MIN or MAX instruction.
If that does not win, use a conditional jump to select the proper
@@ -9366,7 +9385,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
tree oprnd0 = TREE_OPERAND (exp, 0);
tree oprnd1 = TREE_OPERAND (exp, 1);
- expand_operands (oprnd0, oprnd1, NULL_RTX, &op0, &op1, 0);
+ expand_operands (oprnd0, oprnd1, NULL_RTX, &op0, &op1, EXPAND_NORMAL);
target = expand_widen_pattern_expr (exp, op0, NULL_RTX, op1,
target, unsignedp);
return target;
@@ -9387,7 +9406,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
case VEC_EXTRACT_ODD_EXPR:
{
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- NULL_RTX, &op0, &op1, 0);
+ NULL_RTX, &op0, &op1, EXPAND_NORMAL);
this_optab = optab_for_tree_code (code, type, optab_default);
temp = expand_binop (mode, this_optab, op0, op1, target, unsignedp,
OPTAB_WIDEN);
@@ -9399,7 +9418,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
case VEC_INTERLEAVE_LOW_EXPR:
{
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- NULL_RTX, &op0, &op1, 0);
+ NULL_RTX, &op0, &op1, EXPAND_NORMAL);
this_optab = optab_for_tree_code (code, type, optab_default);
temp = expand_binop (mode, this_optab, op0, op1, target, unsignedp,
OPTAB_WIDEN);
@@ -9447,7 +9466,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
tree oprnd0 = TREE_OPERAND (exp, 0);
tree oprnd1 = TREE_OPERAND (exp, 1);
- expand_operands (oprnd0, oprnd1, NULL_RTX, &op0, &op1, 0);
+ expand_operands (oprnd0, oprnd1, NULL_RTX, &op0, &op1, EXPAND_NORMAL);
target = expand_widen_pattern_expr (exp, op0, op1, NULL_RTX,
target, unsignedp);
gcc_assert (target);
@@ -9468,7 +9487,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
/* Here to do an ordinary binary operator. */
binop:
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- subtarget, &op0, &op1, 0);
+ subtarget, &op0, &op1, EXPAND_NORMAL);
binop2:
this_optab = optab_for_tree_code (code, type, optab_default);
binop3:
@@ -9882,7 +9901,7 @@ do_store_flag (tree exp, rtx target, enum machine_mode mode, int only_cheap)
|| GET_MODE (subtarget) != operand_mode)
subtarget = 0;
- expand_operands (arg0, arg1, subtarget, &op0, &op1, 0);
+ expand_operands (arg0, arg1, subtarget, &op0, &op1, EXPAND_NORMAL);
if (target == 0)
target = gen_reg_rtx (mode);
@@ -10186,3 +10205,5 @@ const_vector_from_tree (tree exp)
return gen_rtx_CONST_VECTOR (mode, v);
}
#include "gt-expr.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/expr.h b/gcc/expr.h
index 216de87feb1..dac7d539bbf 100644
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -286,6 +286,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." */
@@ -323,8 +327,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,
@@ -393,6 +405,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
@@ -404,6 +420,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 *);
@@ -412,6 +432,8 @@ extern rtx emit_block_move (rtx, rtx, rtx, enum block_op_methods);
extern rtx emit_block_move_via_libcall (rtx, rtx, rtx, bool);
extern rtx emit_block_move_hints (rtx, rtx, rtx, enum block_op_methods,
unsigned int, HOST_WIDE_INT);
+extern bool emit_block_move_via_movmem (rtx, rtx, rtx, unsigned,
+ unsigned, HOST_WIDE_INT);
/* Copy all or part of a value X into registers starting at REGNO.
The number of registers to be filled is NREGS. */
@@ -470,7 +492,7 @@ extern bool set_storage_via_setmem (rtx, rtx, rtx, unsigned int,
/* Determine whether the LEN bytes can be moved by using several move
instructions. Return nonzero if a call to move_by_pieces should
succeed. */
-extern int can_move_by_pieces (unsigned HOST_WIDE_INT, unsigned int);
+extern int can_move_by_pieces (unsigned HOST_WIDE_INT, unsigned int, bool);
/* Return nonzero if it is desirable to store LEN bytes generated by
CONSTFUN with several move instructions by store_by_pieces
@@ -587,11 +609,19 @@ extern int try_tablejump (tree, tree, tree, tree, rtx, rtx);
XXX Should be a target hook. */
extern unsigned int case_values_threshold (void);
+#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);
@@ -603,6 +633,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 (rtx, rtx, rtx *, int, int);
extern bool shift_return_value (enum machine_mode, bool, rtx);
@@ -673,9 +704,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);
@@ -732,9 +771,19 @@ extern void adjust_stack (rtx);
/* Add some bytes to the stack. An rtx says how many. */
extern void anti_adjust_stack (rtx);
+#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);
@@ -763,7 +812,6 @@ extern rtx hard_libcall_value (enum machine_mode);
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);
@@ -790,4 +838,8 @@ extern rtx set_user_assembler_libfunc (const char *, const char *);
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 5b935fbd80c..deb6b1b1abf 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -80,6 +80,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
@@ -123,6 +124,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;
@@ -304,6 +307,7 @@ dbr_sequence_length (void)
`insn_current_length'. */
static int *insn_lengths;
+static char *uid_lock_length;
VEC(int,heap) *insn_addresses_;
@@ -438,6 +442,20 @@ get_attr_length (rtx insn)
return get_attr_length_1 (insn, insn_default_length);
}
+#ifdef HAVE_ATTR_lock_length
+int
+get_attr_lock_length (rtx insn)
+{
+ if (uid_lock_length && insn_lengths_max_uid > INSN_UID (insn))
+ return uid_lock_length[INSN_UID (insn)];
+ return get_attr_length_1 (insn, insn_min_lock_length);
+}
+#define INSN_VARIABLE_LENGTH_P(INSN) \
+ (insn_variable_length_p (INSN) || insn_variable_lock_length_p (INSN))
+#else
+#define INSN_VARIABLE_LENGTH_P(INSN) (insn_variable_length_p (INSN))
+#endif
+
/* Obtain the current length of an insn. If branch shortening has been done,
get its actual length. Otherwise, get its minimum length. */
int
@@ -801,7 +819,7 @@ struct rtl_opt_pass pass_compute_alignments =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -839,6 +857,7 @@ shorten_branches (rtx first ATTRIBUTE_UNUSED)
rtx body;
int uid;
rtx align_tab[MAX_CODE_ALIGN];
+ int (*length_fun) (rtx);
#endif
@@ -849,6 +868,10 @@ shorten_branches (rtx first ATTRIBUTE_UNUSED)
free (uid_shuid);
uid_shuid = XNEWVEC (int, max_uid);
+#ifdef HAVE_ATTR_lock_length
+ uid_lock_length = XNEWVEC (char, max_uid);
+ memset (uid_lock_length, 0, max_uid);
+#endif
if (max_labelno != max_label_num ())
{
@@ -1041,6 +1064,10 @@ shorten_branches (rtx first ATTRIBUTE_UNUSED)
#endif /* CASE_VECTOR_SHORTEN_MODE */
/* Compute initial lengths, addresses, and varying flags for each insn. */
+ length_fun = insn_default_length;
+#ifdef HAVE_ATTR_lock_length
+ length_fun = insn_min_length;
+#endif
for (insn_current_address = 0, insn = first;
insn != 0;
insn_current_address += insn_lengths[uid], insn = NEXT_INSN (insn))
@@ -1105,26 +1132,32 @@ shorten_branches (rtx first ATTRIBUTE_UNUSED)
inner_length = (asm_insn_count (PATTERN (inner_insn))
* insn_default_length (inner_insn));
else
- inner_length = insn_default_length (inner_insn);
+ inner_length = length_fun (inner_insn);
insn_lengths[inner_uid] = inner_length;
if (const_delay_slots)
{
if ((varying_length[inner_uid]
- = insn_variable_length_p (inner_insn)) != 0)
+ = INSN_VARIABLE_LENGTH_P (inner_insn)) != 0)
varying_length[uid] = 1;
INSN_ADDRESSES (inner_uid) = (insn_current_address
+ insn_lengths[uid]);
}
else
- varying_length[inner_uid] = 0;
+ {
+ /* We'd need to make this code a bit more complicated
+ to properly support non-const-delay-slots with the
+ lock_length attribute. */
+ gcc_assert (length_fun == &insn_default_length);
+ varying_length[inner_uid] = 0;
+ }
insn_lengths[uid] += inner_length;
}
}
else if (GET_CODE (body) != USE && GET_CODE (body) != CLOBBER)
{
- insn_lengths[uid] = insn_default_length (insn);
- varying_length[uid] = insn_variable_length_p (insn);
+ insn_lengths[uid] = length_fun (insn);
+ varying_length[uid] = INSN_VARIABLE_LENGTH_P (insn);
}
/* If needed, do any adjustment. */
@@ -1194,6 +1227,7 @@ shorten_branches (rtx first ATTRIBUTE_UNUSED)
rtx prev;
int rel_align = 0;
addr_diff_vec_flags flags;
+ enum machine_mode vec_mode;
/* Avoid automatic aggregate initialization. */
flags = ADDR_DIFF_VEC_FLAGS (body);
@@ -1272,9 +1306,15 @@ shorten_branches (rtx first ATTRIBUTE_UNUSED)
else
max_addr += align_fuzz (max_lab, rel_lab, 0, 0);
}
- PUT_MODE (body, CASE_VECTOR_SHORTEN_MODE (min_addr - rel_addr,
- max_addr - rel_addr,
- body));
+ vec_mode = CASE_VECTOR_SHORTEN_MODE (min_addr - rel_addr,
+ max_addr - rel_addr, body);
+ if (!uid_lock_length
+ || !uid_lock_length[uid]
+ || (GET_MODE_SIZE (vec_mode)
+ >= GET_MODE_SIZE (GET_MODE (body))))
+ PUT_MODE (body, vec_mode);
+ if (uid_lock_length)
+ uid_lock_length[uid] = 1;
if (JUMP_TABLES_IN_TEXT_SECTION
|| readonly_data_section == text_section)
{
@@ -1334,18 +1374,44 @@ shorten_branches (rtx first ATTRIBUTE_UNUSED)
else
inner_length = insn_current_length (inner_insn);
- if (inner_length != insn_lengths[inner_uid])
+ /* We can't record lengths of delay slot insns. */
+ if (i == 0 && inner_length != insn_lengths[inner_uid])
{
- insn_lengths[inner_uid] = inner_length;
- something_changed = 1;
+#ifdef HAVE_ATTR_lock_length
+ int lock_length = insn_current_lock_length (inner_insn);
+
+ if (lock_length > uid_lock_length[inner_uid])
+ uid_lock_length[inner_uid] = lock_length;
+ else
+ lock_length = uid_lock_length[inner_uid];
+ if (inner_length < lock_length)
+ inner_length = lock_length;
+ if (inner_length != insn_lengths[inner_uid])
+#endif
+ {
+ insn_lengths[inner_uid] = inner_length;
+ something_changed = 1;
+ }
}
- insn_current_address += insn_lengths[inner_uid];
+ insn_current_address += inner_length;
new_length += inner_length;
}
}
else
{
new_length = insn_current_length (insn);
+#ifdef HAVE_ATTR_lock_length
+ {
+ int lock_length = insn_current_lock_length (insn);
+
+ if (lock_length > uid_lock_length[uid])
+ uid_lock_length[uid] = lock_length;
+ else
+ lock_length = uid_lock_length[uid];
+ if (new_length < lock_length)
+ new_length = lock_length;
+ }
+#endif
insn_current_address += new_length;
}
@@ -1362,12 +1428,17 @@ shorten_branches (rtx first ATTRIBUTE_UNUSED)
something_changed = 1;
}
}
+#ifndef HAVE_ATTR_lock_length
/* For a non-optimizing compile, do only a single pass. */
if (!optimize)
break;
+#endif
}
free (varying_length);
+ if (uid_lock_length)
+ free (uid_lock_length);
+ uid_lock_length = 0;
#endif /* HAVE_ATTR_length */
}
@@ -1375,26 +1446,33 @@ shorten_branches (rtx first ATTRIBUTE_UNUSED)
#ifdef HAVE_ATTR_length
/* Given the body of an INSN known to be generated by an ASM statement, return
the number of machine instructions likely to be generated for this insn.
- This is used to compute its length. */
+ This is used to compute its length.
+ Note that an empty asm body like in execute/20001009-2.c has length zero. */
static int
asm_insn_count (rtx body)
{
const char *templ;
- int count = 1;
+ int count = 0;
+ int text;
if (GET_CODE (body) == ASM_INPUT)
templ = XSTR (body, 0);
else
templ = decode_asm_operands (body, NULL, NULL, NULL, NULL, NULL);
- if (!*templ)
- return 0;
-
- for (; *templ; templ++)
- if (IS_ASM_LOGICAL_LINE_SEPARATOR (*templ, templ)
- || *templ == '\n')
- count++;
+ for (text = 0; *templ; templ++)
+ {
+ if (IS_ASM_LOGICAL_LINE_SEPARATOR (*templ, templ)
+ || *templ == '\n')
+ {
+ count += text;
+ text = 0;
+ }
+ else
+ text = 1;
+ }
+ count += text;
return count;
}
@@ -4347,3 +4425,4 @@ struct rtl_opt_pass pass_clean_state =
}
};
+END_TARGET_SPECIFIC
diff --git a/gcc/fixed-value.c b/gcc/fixed-value.c
index d0670e6f061..d63d35ab750 100644
--- a/gcc/fixed-value.c
+++ b/gcc/fixed-value.c
@@ -784,7 +784,7 @@ bool
fixed_compare (int icode, const FIXED_VALUE_TYPE *op0,
const FIXED_VALUE_TYPE *op1)
{
- enum tree_code code = icode;
+ enum tree_code code = (enum tree_code) icode;
gcc_assert (op0->mode == op1->mode);
switch (code)
diff --git a/gcc/fixed-value.h b/gcc/fixed-value.h
index 69db190e8f1..88751809d09 100644
--- a/gcc/fixed-value.h
+++ b/gcc/fixed-value.h
@@ -23,11 +23,12 @@ 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 fixed_value GTY(())
{
- double_int data; /* Store data up to 2 wide integers. */
- unsigned int mode; /* Use machine mode to know IBIT and FBIT. */
+ double_int data; /* Store data up to 2 wide integers. */
+ enum machine_mode mode; /* Use machine mode to know IBIT and FBIT. */
};
#define FIXED_VALUE_TYPE struct 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 e406bf17914..ea21c679288 100644
--- a/gcc/flags.h
+++ b/gcc/flags.h
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "options.h"
#include "real.h"
+#include "multi-target.h"
enum debug_info_type
{
@@ -213,7 +214,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
@@ -240,6 +243,7 @@ extern bool g_switch_set;
/* Same for selective scheduling. */
extern bool sel_sched_switch_set;
+START_TARGET_SPECIFIC
/* Values of the -falign-* flags: how much to align labels in code.
0 means `use default', 1 means `don't align'.
For each variable, there is an _log variant which is the power
@@ -252,6 +256,7 @@ extern int align_jumps_max_skip;
extern int align_labels_log;
extern int align_labels_max_skip;
extern int align_functions_log;
+END_TARGET_SPECIFIC
/* Nonzero if we dump in VCG format, not plain text. */
extern int dump_for_graph;
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index e38850fd5df..932bf53974c 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -964,7 +964,7 @@ fold_undefer_overflow_warnings (bool issue, const_gimple stmt, int code)
if (fold_deferred_overflow_warning != NULL
&& code != 0
&& code < (int) fold_deferred_overflow_code)
- fold_deferred_overflow_code = code;
+ fold_deferred_overflow_code = (enum warn_strict_overflow_code) code;
return;
}
@@ -2914,7 +2914,7 @@ combine_comparisons (enum tree_code code, enum tree_code lcode,
bool honor_nans = HONOR_NANS (TYPE_MODE (TREE_TYPE (ll_arg)));
enum comparison_code lcompcode = comparison_to_compcode (lcode);
enum comparison_code rcompcode = comparison_to_compcode (rcode);
- enum comparison_code compcode;
+ int compcode;
switch (code)
{
@@ -2980,8 +2980,11 @@ combine_comparisons (enum tree_code code, enum tree_code lcode,
else if (compcode == COMPCODE_FALSE)
return constant_boolean_node (false, truth_type);
else
- return fold_build2 (compcode_to_comparison (compcode),
- truth_type, ll_arg, lr_arg);
+ {
+ enum comparison_code cc = (enum comparison_code) compcode;
+ return fold_build2 (compcode_to_comparison (cc),
+ truth_type, ll_arg, lr_arg);
+ }
}
/* Return nonzero if two operands (typically of the same tree node)
@@ -8277,13 +8280,14 @@ fold_unary (enum tree_code code, tree type, tree op0)
/* Not if the conversion is to the sub-type. */
&& TREE_TYPE (type) != TREE_TYPE (op0))
{
- tree and = op0;
- tree and0 = TREE_OPERAND (and, 0), and1 = TREE_OPERAND (and, 1);
+ tree and_expr = op0;
+ tree and0 = TREE_OPERAND (and_expr, 0);
+ tree and1 = TREE_OPERAND (and_expr, 1);
int change = 0;
- if (TYPE_UNSIGNED (TREE_TYPE (and))
+ if (TYPE_UNSIGNED (TREE_TYPE (and_expr))
|| (TYPE_PRECISION (type)
- <= TYPE_PRECISION (TREE_TYPE (and))))
+ <= TYPE_PRECISION (TREE_TYPE (and_expr))))
change = 1;
else if (TYPE_PRECISION (TREE_TYPE (and1))
<= HOST_BITS_PER_WIDE_INT
diff --git a/gcc/fortran/Make-lang.in b/gcc/fortran/Make-lang.in
index d4be7dc295e..cb94205cbf2 100644
--- a/gcc/fortran/Make-lang.in
+++ b/gcc/fortran/Make-lang.in
@@ -80,13 +80,13 @@ fortran: f951$(exeext)
gfortranspec.o: $(srcdir)/fortran/gfortranspec.c $(SYSTEM_H) $(TM_H) $(GCC_H) \
$(CONFIG_H) coretypes.h intl.h
(SHLIB_LINK='$(SHLIB_LINK)'; \
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
+ $(CXX) -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
$(INCLUDES) $(srcdir)/fortran/gfortranspec.c)
# Create the compiler driver gfortran.
GFORTRAN_D_OBJS = $(GCC_OBJS) gfortranspec.o version.o prefix.o intl.o
gfortran$(exeext): $(GFORTRAN_D_OBJS) $(EXTRA_GCC_OBJS) $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ \
$(GFORTRAN_D_OBJS) $(EXTRA_GCC_OBJS) $(LIBS)
# Create a version of the gfortran driver which calls the cross-compiler.
@@ -97,7 +97,7 @@ gfortran-cross$(exeext): gfortran$(exeext)
# The compiler itself is called f951.
f951$(exeext): $(F95_OBJS) \
$(BACKEND) $(LIBDEPS) attribs.o
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -export-dynamic -o $@ \
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -export-dynamic -o $@ \
$(F95_OBJS) $(BACKEND) $(LIBS) attribs.o $(BACKENDLIBS)
gt-fortran-trans.h : s-gtype; @true
@@ -337,5 +337,5 @@ fortran/resolve.o: fortran/dependency.h fortran/data.h fortran/target-memory.h
fortran/data.o: fortran/data.h
fortran/options.o: $(PARAMS_H) $(TARGET_H) fortran/cpp.h
fortran/cpp.o: fortran/cpp.c $(BASEVER) incpath.h incpath.o
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) -DBASEVER=$(BASEVER_s) \
+ $(CXX) -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) -DBASEVER=$(BASEVER_s) \
$< $(OUTPUT_OPTION)
diff --git a/gcc/fortran/cpp.c b/gcc/fortran/cpp.c
index d45d0c15b78..11b115bfbba 100644
--- a/gcc/fortran/cpp.c
+++ b/gcc/fortran/cpp.c
@@ -66,7 +66,7 @@ typedef struct gfc_cpp_macro_queue
} gfc_cpp_macro_queue;
static gfc_cpp_macro_queue *cpp_define_queue, *cpp_undefine_queue;
-struct
+struct gfc_cpp_option_data
{
/* Argument of -cpp, implied by SPEC;
if NULL, preprocessing disabled. */
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index f6677fe42e0..67758a9b3b3 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -1435,7 +1435,7 @@ build_struct (const char *name, gfc_charlen *cl, gfc_expr **init,
gfc_constructor *ctor = c->initializer->value.constructor;
bool first = true;
- int first_len;
+ int first_len = 0;
has_ts = (c->initializer->ts.cl
&& c->initializer->ts.cl->length_from_typespec);
@@ -2804,7 +2804,7 @@ match_attr_spec (void)
locus start, seen_at[NUM_DECL];
int seen[NUM_DECL];
- decl_types d;
+ int d;
const char *attr;
match m;
gfc_try t;
@@ -4516,7 +4516,7 @@ static bool
add_global_entry (const char *name, int sub)
{
gfc_gsymbol *s;
- unsigned int type;
+ enum gfc_symbol_type type;
s = gfc_get_gsymbol(name);
type = sub ? GSYM_SUBROUTINE : GSYM_FUNCTION;
@@ -6519,7 +6519,7 @@ gfc_match_derived_decl (void)
is the case. Since there is no bounds-checking for Cray Pointees,
this will be okay. */
-gfc_try
+match
gfc_mod_pointee_as (gfc_array_spec *as)
{
as->cray_pointee = true; /* This will be useful to know later. */
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c
index 32c97d06b73..9f313431d66 100644
--- a/gcc/fortran/dump-parse-tree.c
+++ b/gcc/fortran/dump-parse-tree.c
@@ -1955,7 +1955,7 @@ show_namespace (gfc_namespace *ns)
{
gfc_interface *intr;
gfc_namespace *save;
- gfc_intrinsic_op op;
+ int op;
gfc_equiv *eq;
int i;
@@ -2005,7 +2005,7 @@ show_namespace (gfc_namespace *ns)
show_indent ();
fprintf (dumpfile, "Operator interfaces for %s:",
- gfc_op2string (op));
+ gfc_op2string ((gfc_intrinsic_op) op));
for (; intr; intr = intr->next)
fprintf (dumpfile, " %s", intr->sym->name);
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index 8795bee3c91..956e5346683 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -922,29 +922,34 @@ enum
/* Because a symbol can belong to multiple namelists, they must be
linked externally to the symbol itself. */
+
+enum omp_sched_kind
+{
+ OMP_SCHED_NONE,
+ OMP_SCHED_STATIC,
+ OMP_SCHED_DYNAMIC,
+ OMP_SCHED_GUIDED,
+ OMP_SCHED_RUNTIME,
+ OMP_SCHED_AUTO
+};
+
+enum omp_sharing
+{
+ OMP_DEFAULT_UNKNOWN,
+ OMP_DEFAULT_NONE,
+ OMP_DEFAULT_PRIVATE,
+ OMP_DEFAULT_SHARED,
+ OMP_DEFAULT_FIRSTPRIVATE
+};
+
typedef struct gfc_omp_clauses
{
struct gfc_expr *if_expr;
struct gfc_expr *num_threads;
gfc_namelist *lists[OMP_LIST_NUM];
- enum
- {
- OMP_SCHED_NONE,
- OMP_SCHED_STATIC,
- OMP_SCHED_DYNAMIC,
- OMP_SCHED_GUIDED,
- OMP_SCHED_RUNTIME,
- OMP_SCHED_AUTO
- } sched_kind;
+ enum omp_sched_kind sched_kind;
struct gfc_expr *chunk_size;
- enum
- {
- OMP_DEFAULT_UNKNOWN,
- OMP_DEFAULT_NONE,
- OMP_DEFAULT_PRIVATE,
- OMP_DEFAULT_SHARED,
- OMP_DEFAULT_FIRSTPRIVATE
- } default_sharing;
+ enum omp_sharing default_sharing;
int collapse;
bool nowait, ordered, untied;
}
@@ -1314,6 +1319,12 @@ extern gfc_namespace *gfc_current_ns;
this to detect collisions already when parsing.
TODO: Extend to verify procedure calls. */
+enum gfc_symbol_type
+{
+ GSYM_UNKNOWN=1, GSYM_PROGRAM, GSYM_FUNCTION, GSYM_SUBROUTINE,
+ GSYM_MODULE, GSYM_COMMON, GSYM_BLOCK_DATA
+};
+
typedef struct gfc_gsymbol
{
BBT_HEADER(gfc_gsymbol);
@@ -1322,8 +1333,7 @@ typedef struct gfc_gsymbol
const char *sym_name;
const char *mod_name;
const char *binding_label;
- enum { GSYM_UNKNOWN=1, GSYM_PROGRAM, GSYM_FUNCTION, GSYM_SUBROUTINE,
- GSYM_MODULE, GSYM_COMMON, GSYM_BLOCK_DATA } type;
+ enum gfc_symbol_type type;
int defined, used;
locus where;
@@ -1347,6 +1357,12 @@ extern gfc_interface_info current_interface;
/* Array reference. */
+
+enum gfc_array_ref_dimen_type
+{
+ DIMEN_ELEMENT = 1, DIMEN_RANGE, DIMEN_VECTOR, DIMEN_UNKNOWN
+};
+
typedef struct gfc_array_ref
{
ar_type type;
@@ -1358,9 +1374,7 @@ typedef struct gfc_array_ref
struct gfc_expr *start[GFC_MAX_DIMENSIONS], *end[GFC_MAX_DIMENSIONS],
*stride[GFC_MAX_DIMENSIONS];
- enum
- { DIMEN_ELEMENT = 1, DIMEN_RANGE, DIMEN_VECTOR, DIMEN_UNKNOWN }
- dimen_type[GFC_MAX_DIMENSIONS];
+ enum gfc_array_ref_dimen_type dimen_type[GFC_MAX_DIMENSIONS];
struct gfc_expr *offset;
}
@@ -2257,7 +2271,7 @@ gfc_try gfc_add_optional (symbol_attribute *, locus *);
gfc_try gfc_add_pointer (symbol_attribute *, locus *);
gfc_try gfc_add_cray_pointer (symbol_attribute *, locus *);
gfc_try gfc_add_cray_pointee (symbol_attribute *, locus *);
-gfc_try gfc_mod_pointee_as (gfc_array_spec *);
+match gfc_mod_pointee_as (gfc_array_spec *);
gfc_try gfc_add_protected (symbol_attribute *, const char *, locus *);
gfc_try gfc_add_result (symbol_attribute *, const char *, locus *);
gfc_try gfc_add_save (symbol_attribute *, const char *, locus *);
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index 88638070d3c..b0527e20e85 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -1276,7 +1276,7 @@ gfc_check_interfaces (gfc_namespace *ns)
{
gfc_namespace *old_ns, *ns2;
char interface_name[100];
- gfc_intrinsic_op i;
+ int iloop;
old_ns = gfc_current_ns;
gfc_current_ns = ns;
@@ -1285,8 +1285,10 @@ gfc_check_interfaces (gfc_namespace *ns)
gfc_traverse_user_op (ns, check_uop_interfaces);
- for (i = GFC_INTRINSIC_BEGIN; i != GFC_INTRINSIC_END; i++)
+ for (iloop = GFC_INTRINSIC_BEGIN; iloop != GFC_INTRINSIC_END; iloop++)
{
+ gfc_intrinsic_op i = (gfc_intrinsic_op) iloop;
+
if (i == INTRINSIC_USER)
continue;
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index d5a9f54a76a..7eb1dfb3be2 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -119,6 +119,16 @@ fixup_t;
/* Structure for holding extra info needed for pointers being read. */
+enum rsym_state
+{
+ UNUSED, NEEDED, USED
+};
+
+enum wsym_state
+{
+ UNREFERENCED = 0, NEEDS_WRITE, WRITTEN
+};
+
typedef struct pointer_info
{
BBT_HEADER (pointer_info);
@@ -138,9 +148,7 @@ typedef struct pointer_info
{
gfc_symbol *sym;
char true_name[GFC_MAX_SYMBOL_LEN + 1], module[GFC_MAX_SYMBOL_LEN + 1];
- enum
- { UNUSED, NEEDED, USED }
- state;
+ enum rsym_state state;
int ns, referenced, renamed;
module_locus where;
fixup_t *stfixup;
@@ -152,9 +160,7 @@ typedef struct pointer_info
struct
{
gfc_symbol *sym;
- enum
- { UNREFERENCED = 0, NEEDS_WRITE, WRITTEN }
- state;
+ enum wsym_state state;
}
wsym;
}
@@ -2161,7 +2167,7 @@ mio_array_ref (gfc_array_ref *ar)
for (i = 0; i < ar->dimen; i++)
{
require_atom (ATOM_INTEGER);
- ar->dimen_type[i] = atom_int;
+ ar->dimen_type[i] = (enum gfc_array_ref_dimen_type) atom_int;
}
}
@@ -3452,7 +3458,7 @@ mio_symbol (gfc_symbol *sym)
else
{
mio_integer (&intmod);
- sym->from_intmod = intmod;
+ sym->from_intmod = (intmod_id) intmod;
}
mio_integer (&(sym->intmod_sym_id));
@@ -3996,7 +4002,7 @@ read_module (void)
module_locus operator_interfaces, user_operators;
const char *p;
char name[GFC_MAX_SYMBOL_LEN + 1];
- gfc_intrinsic_op i;
+ int i;
int ambiguous, j, nuse, symbol;
pointer_info *info, *q;
gfc_use_rename *u;
@@ -4204,7 +4210,7 @@ read_module (void)
if (only_flag)
{
- u = find_use_operator (i);
+ u = find_use_operator ((gfc_intrinsic_op) i);
if (u == NULL)
{
@@ -4656,7 +4662,7 @@ write_symtree (gfc_symtree *st)
static void
write_module (void)
{
- gfc_intrinsic_op i;
+ int i;
/* Write the operator interfaces. */
mio_lparen ();
@@ -4976,9 +4982,12 @@ import_iso_c_binding_module (void)
for (u = gfc_rename_list; u; u = u->next)
{
- i = get_c_kind (u->use_name, c_interop_kinds_table);
+ iso_c_binding_symbol is;
+
+ is = (iso_c_binding_symbol) get_c_kind (u->use_name,
+ c_interop_kinds_table);
- if (i == ISOCBINDING_INVALID || i == ISOCBINDING_LAST)
+ if (is == ISOCBINDING_INVALID || is == ISOCBINDING_LAST)
{
gfc_error ("Symbol '%s' referenced at %L does not exist in "
"intrinsic module ISO_C_BINDING.", u->use_name,
@@ -4986,7 +4995,7 @@ import_iso_c_binding_module (void)
continue;
}
- generate_isocbinding_symbol (iso_c_module_name, i, u->local_name);
+ generate_isocbinding_symbol (iso_c_module_name, is, u->local_name);
}
}
else
@@ -5003,7 +5012,9 @@ import_iso_c_binding_module (void)
break;
}
}
- generate_isocbinding_symbol (iso_c_module_name, i, local_name);
+ generate_isocbinding_symbol (iso_c_module_name,
+ (iso_c_binding_symbol) i,
+ local_name);
}
for (u = gfc_rename_list; u; u = u->next)
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c
index 64272e2a51e..dfdc538a01e 100644
--- a/gcc/fortran/parse.c
+++ b/gcc/fortran/parse.c
@@ -1572,13 +1572,15 @@ unexpected_statement (gfc_statement st)
*/
+enum state_order
+{
+ ORDER_START, ORDER_USE, ORDER_IMPORT, ORDER_IMPLICIT_NONE,
+ ORDER_IMPLICIT, ORDER_SPEC, ORDER_EXEC
+};
+
typedef struct
{
- enum
- { ORDER_START, ORDER_USE, ORDER_IMPORT, ORDER_IMPLICIT_NONE,
- ORDER_IMPLICIT, ORDER_SPEC, ORDER_EXEC
- }
- state;
+ enum state_order state;
gfc_statement last_statement;
locus where;
}
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 47f0a7abc8f..6b0ec109208 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -1590,7 +1590,7 @@ static void
resolve_global_procedure (gfc_symbol *sym, locus *where, int sub)
{
gfc_gsymbol * gsym;
- unsigned int type;
+ enum gfc_symbol_type type;
type = sub ? GSYM_SUBROUTINE : GSYM_FUNCTION;
@@ -4302,7 +4302,8 @@ check_host_association (gfc_expr *e)
gfc_symtree *st;
int n;
gfc_ref *ref;
- gfc_actual_arglist *arg, *tail;
+ gfc_actual_arglist *arg;
+ gfc_actual_arglist *tail = NULL;
bool retval = e->expr_type == EXPR_FUNCTION;
/* If the expression is the result of substitution in
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index ca9d0a3fe53..3a609871493 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -2179,7 +2179,7 @@ gfc_get_namespace (gfc_namespace *parent, int parent_types)
{
gfc_namespace *ns;
gfc_typespec *ts;
- gfc_intrinsic_op in;
+ int in;
int i;
ns = XCNEW (gfc_namespace);
@@ -3034,7 +3034,7 @@ void
gfc_free_namespace (gfc_namespace *ns)
{
gfc_namespace *p, *q;
- gfc_intrinsic_op i;
+ int i;
if (ns == NULL)
return;
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index c0ffc14b720..4bd711d4845 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -93,9 +93,11 @@ gfc_intrinsic_map_t;
except for atan2. */
#define DEFINE_MATH_BUILTIN(ID, NAME, ARGTYPE) \
{ GFC_ISYM_ ## ID, BUILT_IN_ ## ID ## F, BUILT_IN_ ## ID, \
- BUILT_IN_ ## ID ## L, BUILT_IN_ ## ID ## L, 0, 0, 0, 0, true, \
- false, true, NAME, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE, \
- NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE},
+ BUILT_IN_ ## ID ## L, BUILT_IN_ ## ID ## L, (enum built_in_function) 0, \
+ (enum built_in_function) 0, (enum built_in_function) 0, \
+ (enum built_in_function) 0, true, false, true, NAME, NULL_TREE, \
+ NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE, \
+ NULL_TREE},
#define DEFINE_MATH_BUILTIN_C(ID, NAME, ARGTYPE) \
{ GFC_ISYM_ ## ID, BUILT_IN_ ## ID ## F, BUILT_IN_ ## ID, \
@@ -1489,7 +1491,7 @@ gfc_conv_intrinsic_ttynam (gfc_se * se, gfc_expr * expr)
/* TODO: Mismatching types can occur when specific names are used.
These should be handled during resolution. */
static void
-gfc_conv_intrinsic_minmax (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_minmax (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
tree tmp;
tree mvar;
@@ -1725,7 +1727,7 @@ gfc_conv_intrinsic_funcall (gfc_se * se, gfc_expr * expr)
}
*/
static void
-gfc_conv_intrinsic_anyall (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_anyall (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
tree resvar;
stmtblock_t block;
@@ -1880,7 +1882,7 @@ gfc_conv_intrinsic_count (gfc_se * se, gfc_expr * expr)
/* Inline implementation of the sum and product intrinsics. */
static void
-gfc_conv_intrinsic_arith (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_arith (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
tree resvar;
tree type;
@@ -2107,7 +2109,7 @@ gfc_conv_intrinsic_dot_product (gfc_se * se, gfc_expr * expr)
static void
-gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
stmtblock_t body;
stmtblock_t block;
@@ -2311,7 +2313,7 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, int op)
}
static void
-gfc_conv_intrinsic_minmaxval (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_minmaxval (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
tree limit;
tree type;
@@ -2483,7 +2485,7 @@ gfc_conv_intrinsic_btest (gfc_se * se, gfc_expr * expr)
/* Generate code to perform the specified operation. */
static void
-gfc_conv_intrinsic_bitop (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_bitop (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
tree args[2];
@@ -2508,7 +2510,7 @@ gfc_conv_intrinsic_singlebitop (gfc_se * se, gfc_expr * expr, int set)
tree args[2];
tree type;
tree tmp;
- int op;
+ enum tree_code op;
gfc_conv_intrinsic_function_args (se, expr, args, 2);
type = TREE_TYPE (args[0]);
@@ -3583,7 +3585,7 @@ gfc_conv_intrinsic_sizeof (gfc_se *se, gfc_expr *expr)
/* Intrinsic string comparison functions. */
static void
-gfc_conv_intrinsic_strcmp (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_strcmp (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
tree args[4];
diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c
index b5749ec89ac..045c613b957 100644
--- a/gcc/fortran/trans-io.c
+++ b/gcc/fortran/trans-io.c
@@ -107,7 +107,7 @@ static GTY(()) gfc_st_parameter_field st_parameter_field[] =
{ #name, mask, IOPARM_ptype_##param_type, IOPARM_type_##type, NULL, NULL },
#include "ioparm.def"
#undef IOPARM
- { NULL, 0, 0, 0, NULL, NULL }
+ { NULL, 0, (enum ioparam_type) 0, (enum iofield_type) 0, NULL, NULL }
};
/* Library I/O subroutines */
@@ -155,7 +155,7 @@ static stmtblock_t *dt_post_end_block;
static void
gfc_build_st_parameter (enum ioparam_type ptype, tree *types)
{
- enum iofield type;
+ int type;
gfc_st_parameter_field *p;
char name[64];
size_t len;
@@ -281,7 +281,7 @@ gfc_build_io_library_fndecls (void)
tree gfc_intio_type_node;
tree parm_type, dt_parm_type;
HOST_WIDE_INT pad_size;
- enum ioparam_type ptype;
+ int ptype;
types[IOPARM_type_int4] = gfc_int4_type_node = gfc_get_int_type (4);
types[IOPARM_type_intio] = gfc_intio_type_node
@@ -304,7 +304,7 @@ gfc_build_io_library_fndecls (void)
TYPE_ALIGN (gfc_get_int_type (gfc_intio_kind)));
for (ptype = IOPARM_ptype_common; ptype < IOPARM_ptype_num; ptype++)
- gfc_build_st_parameter (ptype, types);
+ gfc_build_st_parameter ((enum ioparam_type) ptype, types);
/* Define the transfer functions. */
diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c
index 717859c5360..47262642ae3 100644
--- a/gcc/fortran/trans-types.c
+++ b/gcc/fortran/trans-types.c
@@ -252,13 +252,16 @@ void init_c_interop_kinds (void)
void
gfc_init_kinds (void)
{
- enum machine_mode mode;
+ int mode_loop;
int i_index, r_index, kind;
bool saw_i4 = false, saw_i8 = false;
bool saw_r4 = false, saw_r8 = false, saw_r16 = false;
- for (i_index = 0, mode = MIN_MODE_INT; mode <= MAX_MODE_INT; mode++)
+ for (i_index = 0, mode_loop = MIN_MODE_INT;
+ mode_loop <= MAX_MODE_INT;
+ mode_loop++)
{
+ enum machine_mode mode = (enum machine_mode) mode_loop;
int kind, bitsize;
if (!targetm.scalar_mode_supported_p (mode))
@@ -307,8 +310,11 @@ gfc_init_kinds (void)
/* Set the maximum integer kind. Used with at least BOZ constants. */
gfc_max_integer_kind = gfc_integer_kinds[i_index - 1].kind;
- for (r_index = 0, mode = MIN_MODE_FLOAT; mode <= MAX_MODE_FLOAT; mode++)
+ for (r_index = 0, mode_loop = MIN_MODE_FLOAT;
+ mode_loop <= MAX_MODE_FLOAT;
+ mode_loop++)
{
+ enum machine_mode mode = (enum machine_mode) mode_loop;
const struct real_format *fmt = REAL_MODE_FORMAT (mode);
int kind;
diff --git a/gcc/function.c b/gcc/function.c
index 5e59677f767..a1aadfb4a68 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 arrays record the INSN_UIDs of the prologue and epilogue insns. */
static VEC(int,heap) *prologue;
@@ -152,6 +157,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. */
@@ -215,7 +222,7 @@ free_after_compilation (struct function *f)
memset (crtl, 0, sizeof (struct rtl_data));
f->eh = NULL;
- f->machine = NULL;
+ MACHINE_FUNCTION (*f) = NULL;
f->cfg = NULL;
regno_reg_rtx = NULL;
@@ -432,6 +439,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.
@@ -482,6 +490,7 @@ struct temp_slot GTY(())
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. */
@@ -1813,7 +1822,7 @@ struct rtl_opt_pass pass_instantiate_virtual_regs =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1827,6 +1836,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)
@@ -3263,7 +3276,7 @@ assign_parms (tree fndecl)
/* For stdarg.h function, save info about
regs and stack space used by the named args. */
- crtl->args.info = all.args_so_far;
+ INCOMING_ARGS_INFO (crtl->args) = all.args_so_far;
/* Set the rtx used for the function return value. Put this in its
own variable so any optimizers that need this information don't have
@@ -4030,6 +4043,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);
}
}
@@ -4063,6 +4077,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
@@ -4079,17 +4099,40 @@ 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 ();
if (init_machine_status)
- cfun->machine = (*init_machine_status) ();
+ MACHINE_FUNCTION (*cfun) = (*init_machine_status) ();
#ifdef OVERRIDE_ABI_FORMAT
OVERRIDE_ABI_FORMAT (fndecl);
@@ -4134,6 +4177,20 @@ push_struct_function (tree fndecl)
allocate_struct_function (fndecl, false);
}
+END_TARGET_SPECIFIC
+extern void (*init_emit_array[]) (void);
+START_TARGET_SPECIFIC
+
+#ifndef EXTRA_TARGET
+
+EXTRA_TARGETS_DECL (void init_emit (void))
+
+void (*init_emit_array[]) (void)
+ = { &init_emit, EXTRA_TARGETS_EXPAND_COMMA (&,init_emit) };
+
+#endif /* !EXTRA_TARGET */
+
+
/* Reset cfun, and other non-struct-function variables to defaults as
appropriate for emitting rtl at the start of a function. */
@@ -4142,7 +4199,13 @@ prepare_function_start (void)
{
gcc_assert (!crtl->emit.x_last_insn);
init_temp_slots ();
- init_emit ();
+ /* Instruction emitting must be initialized even before the function is
+ actually expanded from trees to rtl for the benefit of tree
+ optimizers like tree-ssa-loop-ivopts.c which use expand_expr to
+ gauge the cost of certain expressions. Since init_function_start is
+ called from tree_rest_of_compilation, we must dispatch here to the
+ different target variants of init_emit. */
+ (cfun ? *init_emit_array[cfun->target_arch] : init_emit) ();
init_varasm_status ();
init_expr ();
default_rtl_profile ();
@@ -4179,6 +4242,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. */
@@ -4186,6 +4251,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
@@ -4223,7 +4289,7 @@ struct rtl_opt_pass pass_init_function =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -5397,7 +5463,7 @@ struct rtl_opt_pass pass_leaf_regs =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -5632,7 +5698,7 @@ struct rtl_opt_pass pass_match_asm_constraints =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -5643,3 +5709,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 31d223a3d39..ed1c62fbc7f 100644
--- a/gcc/function.h
+++ b/gcc/function.h
@@ -25,6 +25,19 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "hashtab.h"
#include "varray.h"
+#include "multi-target.h"
+#ifdef GENERATOR_FILE
+#include "target-gtypes.h"
+#elif 1
+/* ??? We still have clashes of target-defines with enum tags, e.g. mxp
+ insn-constants.h defiens FP_REG, which is an enum tag in arc.h that
+ gets copied into the arc namespace of target-types.h.
+ Using target-gtypes.h is not standards conformant, because the same type
+ has different definitions in different files (albeit all the same size). */
+#include "target-gtypes.h"
+#else
+#include "target-types.h"
+#endif
/* Stack of pending (incomplete) sequences saved by `start_sequence'.
Each element describes one pending sequence.
@@ -82,7 +95,6 @@ struct emit_status GTY(())
unsigned char * GTY((skip)) regno_pointer_align;
};
-
/* 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
@@ -137,7 +149,7 @@ struct expr_status GTY(())
rtx x_forced_labels;
};
-typedef struct call_site_record *call_site_record;
+typedef struct call_site_record_d *call_site_record;
DEF_VEC_P(call_site_record);
DEF_VEC_ALLOC_P(call_site_record, gc);
@@ -175,12 +187,12 @@ struct rtl_eh GTY(())
struct gimple_df;
struct temp_slot;
typedef struct temp_slot *temp_slot_p;
-struct call_site_record;
+struct call_site_record_d;
DEF_VEC_P(temp_slot_p);
DEF_VEC_ALLOC_P(temp_slot_p,gc);
-struct ipa_opt_pass;
-typedef struct ipa_opt_pass *ipa_opt_pass;
+struct ipa_opt_pass_d;
+typedef struct ipa_opt_pass_d *ipa_opt_pass;
DEF_VEC_P(ipa_opt_pass);
DEF_VEC_ALLOC_P(ipa_opt_pass,heap);
@@ -230,12 +242,24 @@ struct incoming_args GTY(())
/* Quantities of various kinds of registers
used for the current function's args. */
- CUMULATIVE_ARGS info;
+ cumulative_args_u GTY ((desc ("cfun ? cfun->target_arch : -1"))) info;
/* The arg pointer hard register, or the pseudo into which it was copied. */
rtx internal_arg_pointer;
};
+#ifdef EXTRA_TARGET
+#define CONCAT_(A,B) A##B
+#define CONCAT(A,B) CONCAT_(A,B)
+#define INCOMING_ARGS_INFO(INCOMING_ARGS) \
+ ((INCOMING_ARGS).info.CONCAT(EXTRA_TARGET,_ca))
+#define MACHINE_FUNCTION(FUNCTION) \
+ ((FUNCTION).machine.CONCAT(EXTRA_TARGET,_mf))
+#else
+#define INCOMING_ARGS_INFO(INCOMING_ARGS) ((INCOMING_ARGS).info._ca)
+#define MACHINE_FUNCTION(FUNCTION) ((FUNCTION).machine._mf)
+#endif
+
/* Data for function partitioning. */
struct function_subsections GTY(())
{
@@ -254,6 +278,8 @@ struct function_subsections GTY(())
const char *unlikely_text_section_name;
};
+struct initial_value_struct;
+
/* Datastructures maintained for currently processed function in RTL form. */
struct rtl_data GTY(())
{
@@ -507,7 +533,7 @@ struct function GTY(())
/* For md files. */
/* tm.h can use this to store whatever it likes. */
- struct machine_function * GTY ((maybe_undef)) machine;
+ machine_function_u GTY ((desc ("%0.target_arch"))) machine;
/* Language-specific code can use this to store whatever it likes. */
struct language_function * language;
@@ -600,6 +626,9 @@ struct function GTY(())
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
@@ -615,6 +644,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;
@@ -687,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 2f78cd49f82..193ddb31cc9 100644
--- a/gcc/fwprop.c
+++ b/gcc/fwprop.c
@@ -38,6 +38,7 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "cfgloop.h"
#include "tree-pass.h"
+#include "multi-target.h"
/* This pass does simple forward propagation and simplification when an
@@ -103,6 +104,8 @@ along with GCC; see the file COPYING3. If not see
where the first two insns are now dead. */
+START_TARGET_SPECIFIC
+
static int num_changes;
@@ -694,7 +697,7 @@ update_df (rtx insn, rtx *loc, df_ref *use_rec, enum df_ref_type type,
df_ref orig_use = use, new_use;
int width = -1;
int offset = -1;
- enum machine_mode mode = 0;
+ enum machine_mode mode = VOIDmode;
rtx *new_loc = find_occurrence (loc, DF_REF_REG (orig_use));
use_rec++;
@@ -1143,3 +1146,4 @@ struct rtl_opt_pass pass_rtl_fwprop_addr =
TODO_dump_func /* todo_flags_finish */
}
};
+END_TARGET_SPECIFIC
diff --git a/gcc/gcc.c b/gcc/gcc.c
index ee953660e5c..673dd778c37 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -3606,10 +3606,11 @@ process_command (int argc, const char **argv)
}
/* Convert new-style -- options to old-style. */
- translate_options (&argc, (const char *const **) &argv);
+ translate_options (&argc, CONST_CAST (const char *const **, &argv));
/* Do language-specific adjustment/addition of flags. */
- lang_specific_driver (&argc, (const char *const **) &argv, &added_libraries);
+ lang_specific_driver (&argc, CONST_CAST (const char *const **, &argv),
+ &added_libraries);
/* Scan argv twice. Here, the first time, just count how many switches
there will be in their vector, and how many input files in theirs.
@@ -6337,7 +6338,7 @@ main (int argc, char **argv)
Make a table of specified input files (infiles, n_infiles).
Decode switches that are handled locally. */
- process_command (argc, (const char **) argv);
+ process_command (argc, CONST_CAST (const char **, argv));
/* Initialize the vector of specs to just the default.
This means one element containing 0s, as a terminator. */
diff --git a/gcc/gcov.c b/gcc/gcov.c
index 61ac7ed6974..cd70dbee2b8 100644
--- a/gcc/gcov.c
+++ b/gcc/gcov.c
@@ -1091,7 +1091,6 @@ read_count_file (void)
;
else if (gcov_read_unsigned () != fn->checksum)
{
- mismatch:;
fnotice (stderr, "%s:profile mismatch for '%s'\n",
da_file_name, fn->name);
goto cleanup;
@@ -1100,7 +1099,11 @@ read_count_file (void)
else if (tag == GCOV_TAG_FOR_COUNTER (GCOV_COUNTER_ARCS) && fn)
{
if (length != GCOV_TAG_COUNTER_LENGTH (fn->num_counts))
- goto mismatch;
+ {
+ fnotice (stderr, "%s:profile mismatch for '%s'\n",
+ da_file_name, fn->name);
+ goto cleanup;
+ }
if (!fn->counts)
fn->counts = XCNEWVEC (gcov_type, fn->num_counts);
diff --git a/gcc/gcse.c b/gcc/gcse.c
index ee2d31e0a42..4b1fbcadd78 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -172,6 +172,7 @@ along with GCC; see the file COPYING3. If not see
#include "hashtab.h"
#include "df.h"
#include "dbgcnt.h"
+#include "multi-target.h"
/* Propagate flow information through back edges and thus enable PRE's
moving loop invariant calculations out of loops.
@@ -270,6 +271,8 @@ along with GCC; see the file COPYING3. If not see
each register in each block and thus can try to use an existing
register. */
+START_TARGET_SPECIFIC
+
/* GCSE global vars. */
/* Note whether or not we should run jump optimization after gcse. We
@@ -2902,6 +2905,37 @@ constprop_register (rtx insn, rtx from, rtx to, bool alter_jumps)
{
rtx sset;
+ /* ??? This algorithm lacks proper infrastructure to do a const-benefit
+ analysis, since we would first have to tally the cost of all the users
+ of the constant and then compare it to the benefit of the constant
+ loading instruction saved.
+ In the absense of a proper way to tally costs, it is probably better
+ to punt on any cost-increasing changes; combine can still do
+ combinations where a constant is only used in one insn.
+ We could propably have a target hook here.
+ For now, hard-code ARC heuristic as proof of concept. */
+ sset = single_set (insn);
+ /* Memory addresses and stored constants can be encoded as a long immediate,
+ but that costs an extra cycle. */
+ if (sset
+ && (MEM_P (SET_SRC (sset))
+ || ((GET_CODE (SET_SRC (sset)) == ZERO_EXTEND
+ || GET_CODE (SET_SRC (sset)) == SIGN_EXTEND)
+ && MEM_P (XEXP (SET_SRC (sset), 0)))
+ || MEM_P (SET_DEST (sset)))
+ && (REG_N_REFS (REGNO (from)) > 2
+ || rtx_cost (to, GET_CODE (to), SET) <= 1))
+ return 0;
+ /* Likewise, putting a long immediate costs an extra cycle.
+ We assum here that even if the instruction looks three-address now,
+ we could fix it up if necessary. A more strict check would reject
+ constants that can't be encoded within a 32 bit opcode with the
+ prima facie number of operands. */
+ if (sset && BINARY_P (SET_SRC (sset))
+ && REG_P (XEXP (SET_SRC (sset), 0))
+ && rtx_cost (to, GET_CODE (to), GET_CODE (SET_SRC (sset))) > 1
+ && REG_N_REFS (REGNO (from)) > 2)
+ return 0;
/* Check for reg or cc0 setting instructions followed by
conditional branch instructions first. */
if (alter_jumps
@@ -3353,6 +3387,15 @@ one_cprop_pass (int pass, bool cprop_jumps, bool bypass_jumps)
{
int changed = 0;
+ /* Make REG_N_REFS usable so that we can better assess the merit of
+ constant propagation. Note that while constant propagation can
+ iterate a few times, we'll still consider the same regs to eliminate,
+ even though they might have been set to something prima facie
+ non-constant initially, and later are set to a literal constant. */
+ df_note_add_problem ();
+ df_analyze ();
+ regstat_init_n_sets_and_refs ();
+
global_const_prop_count = local_const_prop_count = 0;
global_copy_prop_count = local_copy_prop_count = 0;
@@ -3383,6 +3426,7 @@ one_cprop_pass (int pass, bool cprop_jumps, bool bypass_jumps)
}
free_hash_table (&set_hash_table);
+ regstat_free_n_sets_and_refs ();
if (dump_file)
{
@@ -6704,3 +6748,5 @@ struct rtl_opt_pass pass_gcse =
#include "gt-gcse.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/genattr.c b/gcc/genattr.c
index ac3426a2ae9..e1c273610d4 100644
--- a/gcc/genattr.c
+++ b/gcc/genattr.c
@@ -81,7 +81,15 @@ 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");
+extern int insn_default_lock_length (rtx);\n\
+extern int insn_min_lock_length (rtx);\n\
+extern int insn_variable_lock_length_p (rtx);\n\
+extern int insn_current_lock_length (rtx);\n\n\
+END_TARGET_SPECIFIC /* insn-addr.h includes vecprim.h */\n\
+#include \"vec.h\"\n\
+#include \"statistics.h\"\n\
+#include \"insn-addr.h\"\n\
+START_TARGET_SPECIFIC\n");
}
}
@@ -103,7 +111,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 +291,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 794a8db1bb1..dbc3679cf1e 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -235,6 +235,7 @@ static rtx true_rtx, false_rtx;
static const char *alternative_name;
static const char *length_str;
+static const char *lock_length_str;
static const char *delay_type_str;
static const char *delay_1_0_str;
static const char *num_delay_slots_str;
@@ -1527,14 +1528,14 @@ substitute_address (rtx exp, rtx (*no_address_fn) (rtx),
*/
static void
-make_length_attrs (void)
+make_length_attrs (const char **base)
{
static const char *new_names[] =
{
- "*insn_default_length",
- "*insn_min_length",
- "*insn_variable_length_p",
- "*insn_current_length"
+ "*insn_default_%s",
+ "*insn_min_%s",
+ "*insn_variable_%s_p",
+ "*insn_current_%s"
};
static rtx (*const no_address_fn[]) (rtx)
= {identity_fn,identity_fn, zero_fn, zero_fn};
@@ -1547,7 +1548,7 @@ make_length_attrs (void)
/* See if length attribute is defined. If so, it must be numeric. Make
it special so we don't output anything for it. */
- length_attr = find_attr (&length_str, 0);
+ length_attr = find_attr (base, 0);
if (length_attr == 0)
return;
@@ -1560,11 +1561,14 @@ make_length_attrs (void)
/* Make each new attribute, in turn. */
for (i = 0; i < ARRAY_SIZE (new_names); i++)
{
- make_internal_attr (new_names[i],
+ const char *p = attr_printf (strlen (new_names[i]) - 2 + strlen (*base),
+ new_names[i], *base);
+
+ make_internal_attr (p,
substitute_address (length_attr->default_val->value,
no_address_fn[i], address_fn[i]),
ATTR_NONE);
- new_attr = find_attr (&new_names[i], 0);
+ new_attr = find_attr (&p, 0);
for (av = length_attr->first_value; av; av = av->next)
for (ie = av->first_insn; ie; ie = ie->next)
{
@@ -1637,6 +1641,9 @@ write_length_unit_log (void)
for (length_unit_log = 0; length_or & 1; length_or >>= 1)
length_unit_log++;
}
+ puts ("#ifdef __cplusplus");
+ puts ("extern");
+ puts ("#endif");
printf ("const int length_unit_log = %u;\n", length_unit_log);
}
@@ -4461,6 +4468,7 @@ main (int argc, char **argv)
alternative_name = DEF_ATTR_STRING ("alternative");
length_str = DEF_ATTR_STRING ("length");
+ lock_length_str = DEF_ATTR_STRING ("lock_length");
delay_type_str = DEF_ATTR_STRING ("*delay_type");
delay_1_0_str = DEF_ATTR_STRING ("*delay_1_0");
num_delay_slots_str = DEF_ATTR_STRING ("*num_delay_slots");
@@ -4541,8 +4549,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");
printf ("\n");
- printf ("#define operands recog_data.operand\n\n");
+ printf ("START_TARGET_SPECIFIC\n\n");
/* Make `insn_alternatives'. */
insn_alternatives = oballocvec (int, insn_code_number);
@@ -4577,7 +4588,8 @@ from the machine description file `md'. */\n\n");
fill_attr (attr);
/* Construct extra attributes for `length'. */
- make_length_attrs ();
+ make_length_attrs (&length_str);
+ make_length_attrs (&lock_length_str);
/* Perform any possible optimizations to speed up compilation. */
optimize_attrs ();
@@ -4609,6 +4621,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 d314b8f221c..048f813246d 100644
--- a/gcc/genautomata.c
+++ b/gcc/genautomata.c
@@ -1789,7 +1789,7 @@ insert_automaton_decl (decl_t automaton_decl)
{
void **entry_ptr;
- entry_ptr = htab_find_slot (automaton_decl_table, automaton_decl, 1);
+ entry_ptr = htab_find_slot (automaton_decl_table, automaton_decl, INSERT);
if (*entry_ptr == NULL)
*entry_ptr = (void *) automaton_decl;
return (decl_t) *entry_ptr;
@@ -1888,7 +1888,7 @@ insert_insn_decl (decl_t insn_decl)
{
void **entry_ptr;
- entry_ptr = htab_find_slot (insn_decl_table, insn_decl, 1);
+ entry_ptr = htab_find_slot (insn_decl_table, insn_decl, INSERT);
if (*entry_ptr == NULL)
*entry_ptr = (void *) insn_decl;
return (decl_t) *entry_ptr;
@@ -1989,7 +1989,7 @@ insert_decl (decl_t decl)
{
void **entry_ptr;
- entry_ptr = htab_find_slot (decl_table, decl, 1);
+ entry_ptr = htab_find_slot (decl_table, decl, INSERT);
if (*entry_ptr == NULL)
*entry_ptr = (void *) decl;
return (decl_t) *entry_ptr;
@@ -3722,7 +3722,7 @@ insert_state (state_t state)
{
void **entry_ptr;
- entry_ptr = htab_find_slot (state_table, (void *) state, 1);
+ entry_ptr = htab_find_slot (state_table, (void *) state, INSERT);
if (*entry_ptr == NULL)
*entry_ptr = (void *) state;
return (state_t) *entry_ptr;
@@ -4078,7 +4078,7 @@ automata_list_finish (void)
if (current_automata_list == NULL)
return NULL;
entry_ptr = htab_find_slot (automata_list_table,
- (void *) current_automata_list, 1);
+ (void *) current_automata_list, INSERT);
if (*entry_ptr == NULL)
*entry_ptr = (void *) current_automata_list;
else
@@ -9411,7 +9411,10 @@ 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");
if (VEC_length (decl_t, decls) > 0)
{
@@ -9419,6 +9422,8 @@ main (int argc, char **argv)
write_automata ();
}
+ puts ("END_TARGET_SPECIFIC");
+
fflush (stdout);
return (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
}
diff --git a/gcc/genchecksum.c b/gcc/genchecksum.c
index ebcd34a29d3..bf9965be8de 100644
--- a/gcc/genchecksum.c
+++ b/gcc/genchecksum.c
@@ -56,6 +56,9 @@ dosum (const char *file)
exit (1);
}
+ puts ("#ifdef __cplusplus");
+ puts ("extern");
+ puts ("#endif");
fputs ("const unsigned char executable_checksum[16] = { ", stdout);
for (i = 0; i < 16; i++)
printf ("%#02x%s", result[i], i == 15 ? " };\n" : ", ");
diff --git a/gcc/genemit.c b/gcc/genemit.c
index d7cbd10b38e..57e3a35276f 100644
--- a/gcc/genemit.c
+++ b/gcc/genemit.c
@@ -858,9 +858,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. */
@@ -904,6 +906,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 c9831105c36..c92bb2f6a08 100644
--- a/gcc/genextract.c
+++ b/gcc/genextract.c
@@ -358,6 +358,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\
@@ -481,7 +484,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 b2c878d0594..4340530535f 100644
--- a/gcc/genflags.c
+++ b/gcc/genflags.c
@@ -250,6 +250,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)
@@ -271,6 +274,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 (ferror (stdout) || fflush (stdout) || fclose (stdout))
diff --git a/gcc/gengtype-lex.l b/gcc/gengtype-lex.l
index d9f1996ccc9..42a8307c5a2 100644
--- a/gcc/gengtype-lex.l
+++ b/gcc/gengtype-lex.l
@@ -34,6 +34,7 @@ along with GCC; see the file COPYING3. If not see
struct fileloc lexer_line;
int lexer_toplevel_done;
+int pp_nest, no_extra_nest;
static void
update_lineno (const char *l, size_t len)
@@ -108,6 +109,7 @@ EOID [^[:alnum:]_]
{WS} { update_lineno (yytext, yyleng); }
\\\n { lexer_line.line++; }
+TARGET_SCOPE/{EOID} |
"const"/{EOID} /* don't care */
"GTY"/{EOID} { return GTY_TOKEN; }
"VEC"/{EOID} { return VEC_TOKEN; }
@@ -157,7 +159,13 @@ EOID [^[:alnum:]_]
"..." { return ELLIPSIS; }
[(){},*:<>;=%|-] { return yytext[0]; }
- /* ignore pp-directives */
+^{HWS}"#"{HWS}ifndef{HWS}EXTRA_TARGET[[:alnum:]_][^\n]* {pp_nest++;}
+^{HWS}"#"{HWS}ifndef{HWS}EXTRA_TARGET[^\n]* {no_extra_nest = ++pp_nest;}
+^{HWS}"#"{HWS}if[^\n]* {pp_nest++;}
+
+^{HWS}"#"{HWS}endif[^\n]* {if (pp_nest-- == no_extra_nest) no_extra_nest = 0;}
+
+ /* ignore other pp-directives */
^{HWS}"#"{HWS}[a-z_]+[^\n]*\n {lexer_line.line++;}
. {
diff --git a/gcc/gengtype-parse.c b/gcc/gengtype-parse.c
index 357981ad3cb..1aa56b82fec 100644
--- a/gcc/gengtype-parse.c
+++ b/gcc/gengtype-parse.c
@@ -46,7 +46,14 @@ token (void)
{
if (!T.valid)
{
- T.code = yylex (&T.value);
+ do
+ {
+ T.code = yylex (&T.value);
+#ifndef EXTRA_TARGET
+ break;
+#endif
+ }
+ while (no_extra_nest);
T.valid = true;
}
return T.code;
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index 02923a952d9..6e49306d2ef 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -964,6 +964,9 @@ write_rtx_next (void)
int i;
oprintf (f, "\n/* Used to implement the RTX_NEXT macro. */\n");
+ oprintf (f, "#ifdef __cplusplus\n");
+ oprintf (f, "extern\n");
+ oprintf (f, "#endif\n");
oprintf (f, "const unsigned char rtx_next[NUM_RTX_CODE] = {\n");
for (i = 0; i < NUM_RTX_CODE; i++)
if (rtx_next_new[i] == -1)
@@ -1524,6 +1527,7 @@ open_base_files (void)
size_t i;
header_file = create_file ("GCC", "gtype-desc.h");
+ oprintf (header_file, "\n#include \"multi-target.h\"\n");
base_files = XNEWVEC (outf_p, num_lang_dirs);
@@ -1541,7 +1545,8 @@ open_base_files (void)
"hard-reg-set.h", "basic-block.h", "cselib.h", "insn-addr.h",
"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", NULL
+ "cfglayout.h", "except.h", "output.h", "gimple.h", "cfgloop.h",
+ "multi-target.h", NULL
};
const char *const *ifp;
outf_p gtype_desc_c;
@@ -2494,6 +2499,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
@@ -3026,9 +3034,14 @@ finish_root_table (struct flist *flp, const char *pfx, const char *lastname,
{
size_t fnum;
for (fnum = 0; fnum < num_lang_dirs; fnum++)
- oprintf (base_files [fnum],
- "const struct %s * const %s[] = {\n",
- tname, name);
+ {
+ oprintf (base_files[fnum], "#ifdef __cplusplus\n");
+ oprintf (base_files[fnum], "extern\n");
+ oprintf (base_files[fnum], "#endif\n");
+ oprintf (base_files [fnum],
+ "const struct %s * const %s[] = {\n",
+ tname, name);
+ }
}
@@ -3038,6 +3051,7 @@ finish_root_table (struct flist *flp, const char *pfx, const char *lastname,
lang_bitmap bitmap = get_lang_bitmap (fli2->name);
int fnum;
+ oprintf (fli2->f, "END_TARGET_SPECIFIC\n");
fli2->started_p = 0;
for (fnum = 0; bitmap != 0; fnum++, bitmap >>= 1)
@@ -3358,6 +3372,10 @@ write_roots (pair_p variables)
{
fli->started_p = 1;
+ oprintf (f, "START_TARGET_SPECIFIC\n");
+ oprintf (f, "#ifdef __cplusplus\n");
+ oprintf (f, "extern\n");
+ oprintf (f, "#endif\n");
oprintf (f, "const struct ggc_root_tab gt_ggc_r_");
put_mangled_filename (f, v->line.file);
oprintf (f, "[] = {\n");
@@ -3392,6 +3410,10 @@ write_roots (pair_p variables)
{
fli->started_p = 1;
+ oprintf (f, "START_TARGET_SPECIFIC\n");
+ oprintf (f, "#ifdef __cplusplus\n");
+ oprintf (f, "extern\n");
+ oprintf (f, "#endif\n");
oprintf (f, "const struct ggc_root_tab gt_ggc_rd_");
put_mangled_filename (f, v->line.file);
oprintf (f, "[] = {\n");
@@ -3436,6 +3458,10 @@ write_roots (pair_p variables)
{
fli->started_p = 1;
+ oprintf (f, "START_TARGET_SPECIFIC\n");
+ oprintf (f, "#ifdef __cplusplus\n");
+ oprintf (f, "extern\n");
+ oprintf (f, "#endif\n");
oprintf (f, "const struct ggc_cache_tab gt_ggc_rc_");
put_mangled_filename (f, v->line.file);
oprintf (f, "[] = {\n");
@@ -3472,6 +3498,10 @@ write_roots (pair_p variables)
{
fli->started_p = 1;
+ oprintf (f, "START_TARGET_SPECIFIC\n");
+ oprintf (f, "#ifdef __cplusplus\n");
+ oprintf (f, "extern\n");
+ oprintf (f, "#endif\n");
oprintf (f, "const struct ggc_root_tab gt_pch_rc_");
put_mangled_filename (f, v->line.file);
oprintf (f, "[] = {\n");
@@ -3508,6 +3538,10 @@ write_roots (pair_p variables)
{
fli->started_p = 1;
+ oprintf (f, "START_TARGET_SPECIFIC\n");
+ oprintf (f, "#ifdef __cplusplus\n");
+ oprintf (f, "extern\n");
+ oprintf (f, "#endif\n");
oprintf (f, "const struct ggc_root_tab gt_pch_rs_");
put_mangled_filename (f, v->line.file);
oprintf (f, "[] = {\n");
diff --git a/gcc/gengtype.h b/gcc/gengtype.h
index 533b508b556..17d80d3c5be 100644
--- a/gcc/gengtype.h
+++ b/gcc/gengtype.h
@@ -36,6 +36,7 @@ typedef struct options *options_p;
/* Variables used to communicate between the lexer and the parser. */
extern int lexer_toplevel_done;
extern struct fileloc lexer_line;
+extern int pp_nest, no_extra_nest;
/* Print an error message. */
extern void error_at_line
diff --git a/gcc/genmodes.c b/gcc/genmodes.c
index 3851aff11e4..0c394c83b0e 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
@@ -97,6 +109,7 @@ struct mode_adjust
struct mode_adjust *next;
struct mode_data *mode;
const char *adjustment;
+ const char *target;
const char *file;
unsigned int line;
@@ -128,7 +141,9 @@ vector_class (enum mode_class cl)
switch (cl)
{
case MODE_INT: return MODE_VECTOR_INT;
+ case MODE_PARTIAL_INT: return MODE_VECTOR_PARTIAL_INT;
case MODE_FLOAT: return MODE_VECTOR_FLOAT;
+ case MODE_CC: return MODE_VECTOR_CC;
case MODE_FRACT: return MODE_VECTOR_FRACT;
case MODE_UFRACT: return MODE_VECTOR_UFRACT;
case MODE_ACCUM: return MODE_VECTOR_ACCUM;
@@ -139,6 +154,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 +163,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 +187,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 +215,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) \
@@ -242,6 +263,7 @@ new_adjust (const char *name,
a = XNEW (struct mode_adjust);
a->mode = mode;
+ a->target = target;
a->adjustment = adjustment;
a->file = file;
a->line = line;
@@ -326,10 +348,15 @@ complete_mode (struct mode_data *m)
case MODE_CC:
/* Again, nothing more need be said. For historical reasons,
- the size of a CC mode is four units. */
- validate_mode (m, UNSET, UNSET, UNSET, UNSET, UNSET);
+ the size of a CC mode defaults to four units. */
+ if (m->bytesize != blank_mode.bytesize)
+ validate_mode (m, UNSET, SET, UNSET, UNSET, UNSET);
+ else
+ {
+ validate_mode (m, UNSET, UNSET, UNSET, UNSET, UNSET);
+ m->bytesize = 4;
+ }
- m->bytesize = 4;
m->ncomponents = 1;
m->component = 0;
break;
@@ -375,7 +402,9 @@ complete_mode (struct mode_data *m)
break;
case MODE_VECTOR_INT:
+ case MODE_VECTOR_PARTIAL_INT:
case MODE_VECTOR_FLOAT:
+ case MODE_VECTOR_CC:
case MODE_VECTOR_FRACT:
case MODE_VECTOR_UFRACT:
case MODE_VECTOR_ACCUM:
@@ -420,6 +449,120 @@ 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);
+ if (old->contained)
+ {
+ 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 || cl == MODE_VECTOR_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 +573,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 +583,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 +618,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 +652,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. */
@@ -530,12 +681,13 @@ make_vector_modes (enum mode_class cl, unsigned int width,
#define _SPECIAL_MODE(C, N) make_special_mode(MODE_##C, #N, __FILE__, __LINE__)
#define RANDOM_MODE(N) _SPECIAL_MODE (RANDOM, N)
#define CC_MODE(N) _SPECIAL_MODE (CC, N)
+#define SIZED_CC_MODE(N, Y) (CC_MODE (N)->bytesize = (Y))
-static void
+static struct mode_data *
make_special_mode (enum mode_class cl, const char *name,
const char *file, unsigned int line)
{
- new_mode (cl, name, file, line);
+ return new_mode (cl, name, file, line);
}
#define INT_MODE(N, Y) FRACTIONAL_INT_MODE (N, -1U, Y)
@@ -647,7 +799,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 +932,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 +976,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 +1005,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 +1044,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 +1096,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 +1114,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 +1171,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 +1218,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 +1235,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 +1291,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 +1346,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);
@@ -1206,6 +1381,8 @@ emit_mode_adjustments (void)
A size adjustment forces us to recalculate the alignment too. */
for (a = adj_bytesize; a; a = a->next)
{
+ if (a->target && a->target != output_target)
+ continue;
printf ("\n /* %s:%d */\n s = %s;\n",
a->file, a->line, a->adjustment);
printf (" mode_size[%smode] = s;\n", a->mode->name);
@@ -1224,6 +1401,7 @@ emit_mode_adjustments (void)
break;
case MODE_VECTOR_INT:
+ case MODE_VECTOR_PARTIAL_INT:
case MODE_VECTOR_FLOAT:
case MODE_VECTOR_FRACT:
case MODE_VECTOR_UFRACT:
@@ -1248,6 +1426,8 @@ emit_mode_adjustments (void)
??? This may not be the right thing for vector modes. */
for (a = adj_alignment; a; a = a->next)
{
+ if (a->target && a->target != output_target)
+ continue;
printf ("\n /* %s:%d */\n s = %s;\n",
a->file, a->line, a->adjustment);
printf (" mode_base_align[%smode] = s;\n", a->mode->name);
@@ -1262,6 +1442,7 @@ emit_mode_adjustments (void)
break;
case MODE_VECTOR_INT:
+ case MODE_VECTOR_PARTIAL_INT:
case MODE_VECTOR_FLOAT:
case MODE_VECTOR_FRACT:
case MODE_VECTOR_UFRACT:
@@ -1283,6 +1464,8 @@ emit_mode_adjustments (void)
/* Ibit adjustments don't have to propagate. */
for (a = adj_ibit; a; a = a->next)
{
+ if (a->target && a->target != output_target)
+ continue;
printf ("\n /* %s:%d */\n s = %s;\n",
a->file, a->line, a->adjustment);
printf (" mode_ibit[%smode] = s;\n", a->mode->name);
@@ -1291,6 +1474,8 @@ emit_mode_adjustments (void)
/* Fbit adjustments don't have to propagate. */
for (a = adj_fbit; a; a = a->next)
{
+ if (a->target && a->target != output_target)
+ continue;
printf ("\n /* %s:%d */\n s = %s;\n",
a->file, a->line, a->adjustment);
printf (" mode_fbit[%smode] = s;\n", a->mode->name);
@@ -1298,8 +1483,12 @@ emit_mode_adjustments (void)
/* Real mode formats don't have to propagate anywhere. */
for (a = adj_format; a; a = a->next)
- printf ("\n /* %s:%d */\n REAL_MODE_FORMAT (%smode) = %s;\n",
- a->file, a->line, a->mode->name, a->adjustment);
+ {
+ if (a->target && a->target != output_target)
+ continue;
+ printf ("\n /* %s:%d */\n REAL_MODE_FORMAT (%smode) = %s;\n",
+ a->file, a->line, a->mode->name, a->adjustment);
+ }
puts ("}");
}
@@ -1312,7 +1501,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 +1519,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 +1548,7 @@ emit_insn_modes_c (void)
emit_mode_adjustments ();
emit_mode_ibit ();
emit_mode_fbit ();
+ puts ("END_TARGET_SPECIFIC");
}
static void
@@ -1369,6 +1559,7 @@ emit_min_insn_modes_c (void)
emit_mode_class ();
emit_mode_wider ();
emit_class_narrowest_mode ();
+ puts ("END_TARGET_SPECIFIC");
}
/* Master control. */
@@ -1397,6 +1588,8 @@ main (int argc, char **argv)
if (have_error)
return FATAL_EXIT_CODE;
+
+ fixup_target_modes ();
calc_wider_mode ();
diff --git a/gcc/genopinit.c b/gcc/genopinit.c
index 1e778bab3ff..df995dbf43f 100644
--- a/gcc/genopinit.c
+++ b/gcc/genopinit.c
@@ -493,6 +493,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");
@@ -525,7 +528,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 39fc590f01f..673e13fa1af 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
@@ -680,19 +683,55 @@ process_template (struct data *d, const char *template_code)
list of assembler code templates, one for each alternative. */
else if (template_code[0] == '@')
{
- d->template_code = 0;
- d->output_format = INSN_OUTPUT_FORMAT_MULTI;
+ int found_star = 0;
- printf ("\nstatic const char * const output_%d[] = {\n", d->code_number);
+ for (cp = &template_code[1]; *cp; )
+ {
+ while (ISSPACE (*cp))
+ cp++;
+ if (*cp == '*')
+ found_star = 1;
+ while (!IS_VSPACE (*cp) && *cp != '\0')
+ ++cp;
+ }
+ d->template_code = 0;
+ if (found_star)
+ {
+ d->output_format = INSN_OUTPUT_FORMAT_FUNCTION;
+ puts ("\nstatic const char *");
+ printf ("output_%d (rtx *operands ATTRIBUTE_UNUSED, "
+ "rtx insn ATTRIBUTE_UNUSED)\n", d->code_number);
+ puts ("{");
+ puts (" switch (which_alternative)\n {");
+ }
+ else
+ {
+ d->output_format = INSN_OUTPUT_FORMAT_MULTI;
+ printf ("\nstatic const char * const output_%d[] = {\n",
+ d->code_number);
+ }
for (i = 0, cp = &template_code[1]; *cp; )
{
- const char *ep, *sp;
+ const char *ep, *sp, *bp;
while (ISSPACE (*cp))
cp++;
- printf (" \"");
+ bp = cp;
+ if (found_star)
+ {
+ printf (" case %d:", i);
+ if (*cp == '*')
+ {
+ printf ("\n ");
+ cp++;
+ }
+ else
+ printf (" return \"");
+ }
+ else
+ printf (" \"");
for (ep = sp = cp; !IS_VSPACE (*ep) && *ep != '\0'; ++ep)
if (!ISSPACE (*ep))
@@ -708,7 +747,18 @@ process_template (struct data *d, const char *template_code)
cp++;
}
- printf ("\",\n");
+ if (!found_star)
+ puts ("\",");
+ else if (*bp != '*')
+ puts ("\";");
+ else
+ {
+ /* The usual action will end with a return.
+ If there is neither break or return at the end, this is
+ assumed to be intentional; this allows to have multiple
+ consecutive alternatives share some code. */
+ puts ("");
+ }
i++;
}
if (i == 1)
@@ -721,7 +771,10 @@ process_template (struct data *d, const char *template_code)
have_error = 1;
}
- printf ("};\n");
+ if (found_star)
+ puts (" default: gcc_unreachable ();\n }\n}");
+ else
+ printf ("};\n");
}
else
{
@@ -1064,6 +1117,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);
@@ -1112,8 +1167,12 @@ strip_whitespace (const char *s)
/* Record just enough information about a constraint to allow checking
of operand constraint strings above, in validate_insn_alternatives.
Does not validate most properties of the constraint itself; does
+ enforce no overlap with MI constraints, and no prefixes.
+ Check for no duplicate names is left to genpreds.c, since only there
+ is enough information to check for overloading.
+ Does not validate most properties of the constraint itself; does
enforce no duplicate names, no overlap with MI constraints, and no
- prefixes. EXP is the define_*constraint form, LINENO the line number
+EXP is the define_*constraint form, LINENO the line number
reported by the reader. */
static void
note_constraint (rtx exp, int lineno)
@@ -1150,12 +1209,7 @@ note_constraint (rtx exp, int lineno)
slot = iter;
if (!strcmp ((*iter)->name, name))
- {
- message_with_line (lineno, "redefinition of constraint '%s'", name);
- message_with_line ((*iter)->lineno, "previous definition is here");
- have_error = 1;
- return;
- }
+ ; /* Ignore here, see more detailed check in genpreds. */
else if (!strncmp ((*iter)->name, name, (*iter)->namelen))
{
message_with_line (lineno, "defining constraint '%s' here", name);
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 a1232e9573f..beae9bbb92b 100644
--- a/gcc/genpreds.c
+++ b/gcc/genpreds.c
@@ -674,6 +674,7 @@ struct constraint_data
unsigned int is_extra : 1;
unsigned int is_memory : 1;
unsigned int is_address : 1;
+ unsigned int is_overloaded : 1; /* Set for all but the first definition. */
};
/* Overview of all constraints beginning with a given letter. */
@@ -757,6 +758,7 @@ add_constraint (const char *name, const char *regclass,
bool is_const_int;
bool is_const_dbl;
size_t namelen;
+ bool is_overloaded = 0;
if (exp && validate_exp (exp, name, lineno))
return;
@@ -816,10 +818,29 @@ add_constraint (const char *name, const char *regclass,
if (!strcmp ((*iter)->name, name))
{
- message_with_line (lineno, "redefinition of constraint '%s'", name);
- message_with_line ((*iter)->lineno, "previous definition is here");
- have_error = 1;
- return;
+ /* An exact match is OK if the purpose is to overload the constraint.
+ */
+ if (is_overloaded)
+ ; /* We've already warned against the 1st definition. */
+ else if ((*iter)->is_register != (regclass != 0)
+ || (*iter)->is_memory != is_memory
+ || (*iter)->is_address != is_address)
+ {
+ message_with_line (lineno,
+ "overloading of constraint '%s'", name);
+ message_with_line ((*iter)->lineno,
+ "previous definition is here");
+ is_overloaded = 1;
+ }
+ else
+ {
+ message_with_line (lineno,
+ "redefinition of constraint '%s'", name);
+ message_with_line ((*iter)->lineno,
+ "previous definition is here");
+ have_error = 1;
+ return;
+ }
}
else if (!strncmp ((*iter)->name, name, (*iter)->namelen))
{
@@ -910,6 +931,7 @@ add_constraint (const char *name, const char *regclass,
c->is_extra = !(regclass || is_const_int || is_const_dbl);
c->is_memory = is_memory;
c->is_address = is_address;
+ c->is_overloaded = is_overloaded;
c->next_this_letter = *slot;
*slot = c;
@@ -958,7 +980,8 @@ write_enum_constraint_num (void)
"{\n"
" CONSTRAINT__UNKNOWN = 0", stdout);
FOR_ALL_CONSTRAINTS (c)
- printf (",\n CONSTRAINT_%s", c->c_name);
+ if (!c->is_overloaded)
+ printf (",\n CONSTRAINT_%s", c->c_name);
puts (",\n CONSTRAINT__LIMIT\n};\n");
}
@@ -987,9 +1010,10 @@ write_lookup_constraint (void)
{
do
{
- printf (" if (!strncmp (str, \"%s\", %lu))\n"
- " return CONSTRAINT_%s;\n",
- c->name, (unsigned long int) c->namelen, c->c_name);
+ if (!c->is_overloaded)
+ printf (" if (!strncmp (str, \"%s\", %lu))\n"
+ " return CONSTRAINT_%s;\n",
+ c->name, (unsigned long int) c->namelen, c->c_name);
c = c->next_this_letter;
}
while (c);
@@ -1084,7 +1108,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)
@@ -1129,7 +1157,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
@@ -1254,6 +1285,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)
@@ -1312,7 +1347,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.
@@ -1351,7 +1388,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);
@@ -1371,6 +1411,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 01177c6de8f..654f118a9fa 100644
--- a/gcc/genrecog.c
+++ b/gcc/genrecog.c
@@ -378,7 +378,7 @@ process_define_predicate (rtx desc)
for (i = 0; i < NUM_RTX_CODE; i++)
if (codes[i] != N)
- add_predicate_code (pred, i);
+ add_predicate_code (pred, (enum rtx_code) i);
add_predicate (pred);
}
@@ -791,8 +791,10 @@ validate_pattern (rtx pattern, rtx insn, rtx set, int set_code)
else if (dmode != smode
&& GET_CODE (dest) != PC
&& GET_CODE (dest) != CC0
+ && GET_MODE_CLASS (dmode) != MODE_CC
&& GET_CODE (src) != PC
&& GET_CODE (src) != CC0
+ && GET_MODE_CLASS (smode) != MODE_CC
&& GET_CODE (src) != CONST_INT)
{
const char *which;
@@ -2478,8 +2480,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\
@@ -2776,6 +2780,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/gensupport.c b/gcc/gensupport.c
index 0851596585b..119a126eef4 100644
--- a/gcc/gensupport.c
+++ b/gcc/gensupport.c
@@ -1401,7 +1401,7 @@ init_predicate_table (void)
if (std_preds[i].allows_const_p)
for (j = 0; j < NUM_RTX_CODE; j++)
if (GET_RTX_CLASS (j) == RTX_CONST_OBJ)
- add_predicate_code (pred, j);
+ add_predicate_code (pred, (enum rtx_code) j);
add_predicate (pred);
}
diff --git a/gcc/gentargtype.cc b/gcc/gentargtype.cc
new file mode 100644
index 00000000000..7144472d400
--- /dev/null
+++ b/gcc/gentargtype.cc
@@ -0,0 +1,29 @@
+#include "system.h"
+#include "coretypes.h"
+#include "target-types.h"
+
+int
+main (void)
+{
+ printf ("typedef union GTY (())\n"
+ " {\n"
+ " CUMULATIVE_ARGS GTY ((tag (\"TARGET_NUM\"))) _ca;\n");
+ printf (" char GTY ((default)) dummy[%d];\n",
+ (int) sizeof (cumulative_args_u));
+ printf (" void *GTY ((skip)) align_dummy[1];\n"
+ " } cumulative_args_u;\n");
+ printf ("\n"
+ "START_TARGET_SPECIFIC\n"
+ "struct machine_function;\n"
+ "END_TARGET_SPECIFIC\n"
+ "\n"
+ "typedef union GTY (())\n"
+ " {\n"
+ " struct TARGET_SCOPE machine_function\n"
+ " *GTY ((tag (\"TARGET_NUM\"), maybe_undef)) _mf;\n");
+ printf (" char (*GTY ((default)) dummy)[%d];\n",
+ (int) sizeof (machine_function_u));
+ printf (" void *(*GTY ((skip)) align_dummy)[1];\n"
+ " } machine_function_u;\n");
+ return 0;
+}
diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c
index 0afe0d815dd..2f13144eda2 100644
--- a/gcc/ggc-page.c
+++ b/gcc/ggc-page.c
@@ -2063,12 +2063,14 @@ ggc_print_statistics (void)
#endif
}
+struct ggc_pch_ondisk
+{
+ unsigned totals[NUM_ORDERS];
+};
+
struct ggc_pch_data
{
- struct ggc_pch_ondisk
- {
- unsigned totals[NUM_ORDERS];
- } d;
+ struct ggc_pch_ondisk d;
size_t base[NUM_ORDERS];
size_t written[NUM_ORDERS];
};
@@ -2158,7 +2160,7 @@ ggc_pch_write_object (struct ggc_pch_data *d ATTRIBUTE_UNUSED,
size_t size, bool is_string ATTRIBUTE_UNUSED)
{
unsigned order;
- static const char emptyBytes[256];
+ static const char emptyBytes[256] = { 0 };
if (size < NUM_SIZE_LOOKUP)
order = size_lookup[size];
diff --git a/gcc/ggc.h b/gcc/ggc.h
index 5b2743b3386..6abfc4891f8 100644
--- a/gcc/ggc.h
+++ b/gcc/ggc.h
@@ -21,6 +21,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. */
@@ -162,12 +163,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. */
@@ -177,11 +180,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 *);
@@ -212,8 +217,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);
@@ -323,4 +330,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-low.c b/gcc/gimple-low.c
index fecc667f6b9..117c7b0c502 100644
--- a/gcc/gimple-low.c
+++ b/gcc/gimple-low.c
@@ -209,7 +209,7 @@ struct gimple_opt_pass pass_lower_cf =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
PROP_gimple_lcf, /* properties_provided */
0, /* properties_destroyed */
@@ -829,7 +829,7 @@ lower_builtin_setjmp (gimple_stmt_iterator *gsi)
/* Build 'goto CONT_LABEL' and insert. */
g = gimple_build_goto (cont_label);
- gsi_insert_before (gsi, g, TSI_SAME_STMT);
+ gsi_insert_before (gsi, g, GSI_SAME_STMT);
/* Build 'NEXT_LABEL:' and insert. */
g = gimple_build_label (next_label);
@@ -950,7 +950,7 @@ struct gimple_opt_pass pass_mark_used_blocks =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 90de9b3ebc5..7641dc5da28 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -45,6 +45,9 @@ const char *const gimple_code_name[] = {
operands vector the size of the structure minus the size of the 1
element tree array at the end (see gimple_ops). */
#define DEFGSCODE(SYM, NAME, STRUCT) (sizeof (STRUCT) - sizeof (tree)),
+#ifdef __cplusplus
+extern
+#endif
const size_t gimple_ops_offset_[] = {
#include "gimple.def"
};
@@ -271,7 +274,7 @@ gimple_build_with_ops_stat (enum gimple_code code, enum tree_code subcode,
gimple
gimple_build_return (tree retval)
{
- gimple s = gimple_build_with_ops (GIMPLE_RETURN, 0, 1);
+ gimple s = gimple_build_with_ops (GIMPLE_RETURN, ERROR_MARK, 1);
if (retval)
gimple_return_set_retval (s, retval);
return s;
@@ -284,7 +287,7 @@ gimple_build_return (tree retval)
static inline gimple
gimple_build_call_1 (tree fn, unsigned nargs)
{
- gimple s = gimple_build_with_ops (GIMPLE_CALL, 0, nargs + 3);
+ gimple s = gimple_build_with_ops (GIMPLE_CALL, ERROR_MARK, nargs + 3);
if (TREE_CODE (fn) == FUNCTION_DECL)
fn = build_fold_addr_expr (fn);
gimple_set_op (s, 1, fn);
@@ -451,7 +454,7 @@ gimple_build_assign_with_ops_stat (enum tree_code subcode, tree lhs, tree op1,
This function returns the newly created GIMPLE_ASSIGN tuple. */
-inline gimple
+gimple
gimplify_assign (tree dst, tree src, gimple_seq *seq_p)
{
tree t = build2 (MODIFY_EXPR, TREE_TYPE (dst), dst, src);
@@ -544,7 +547,7 @@ gimple_cond_set_condition_from_tree (gimple stmt, tree cond)
gimple
gimple_build_label (tree label)
{
- gimple p = gimple_build_with_ops (GIMPLE_LABEL, 0, 1);
+ gimple p = gimple_build_with_ops (GIMPLE_LABEL, ERROR_MARK, 1);
gimple_label_set_label (p, label);
return p;
}
@@ -554,7 +557,7 @@ gimple_build_label (tree label)
gimple
gimple_build_goto (tree dest)
{
- gimple p = gimple_build_with_ops (GIMPLE_GOTO, 0, 1);
+ gimple p = gimple_build_with_ops (GIMPLE_GOTO, ERROR_MARK, 1);
gimple_goto_set_dest (p, dest);
return p;
}
@@ -600,7 +603,8 @@ gimple_build_asm_1 (const char *string, unsigned ninputs, unsigned noutputs,
gimple p;
int size = strlen (string);
- p = gimple_build_with_ops (GIMPLE_ASM, 0, ninputs + noutputs + nclobbers);
+ p = gimple_build_with_ops (GIMPLE_ASM, ERROR_MARK,
+ ninputs + noutputs + nclobbers);
p->gimple_asm.ni = ninputs;
p->gimple_asm.no = noutputs;
@@ -776,7 +780,7 @@ static inline gimple
gimple_build_switch_1 (unsigned nlabels, tree index, tree default_label)
{
/* nlabels + 1 default label + 1 index. */
- gimple p = gimple_build_with_ops (GIMPLE_SWITCH, 0, nlabels + 1 + 1);
+ gimple p = gimple_build_with_ops (GIMPLE_SWITCH, ERROR_MARK, nlabels + 1 + 1);
gimple_switch_set_index (p, index);
gimple_switch_set_default_label (p, default_label);
return p;
@@ -1046,7 +1050,7 @@ gimple_build_omp_single (gimple_seq body, tree clauses)
gimple
gimple_build_cdt (tree type, tree ptr)
{
- gimple p = gimple_build_with_ops (GIMPLE_CHANGE_DYNAMIC_TYPE, 0, 2);
+ gimple p = gimple_build_with_ops (GIMPLE_CHANGE_DYNAMIC_TYPE, ERROR_MARK, 2);
gimple_cdt_set_new_type (p, type);
gimple_cdt_set_location (p, ptr);
@@ -1117,6 +1121,41 @@ gimple_check_failed (const_gimple gs, const char *file, int line,
: "",
function, trim_filename (file), line);
}
+
+/* Similar to gimple_check_failed, except that instead of specifying a
+ dozen codes, use the knowledge that they're all sequential. */
+
+void
+gimple_range_check_failed (const_gimple gs, const char *file, int line,
+ const char *function, enum gimple_code c1,
+ enum gimple_code c2)
+{
+ char *buffer;
+ unsigned length = 0;
+ int c;
+
+ for (c = c1; c <= c2; ++c)
+ length += 4 + strlen (gimple_code_name[c]);
+
+ length += strlen ("expected ");
+ buffer = XALLOCAVAR (char, length);
+ length = 0;
+
+ for (c = c1; c <= c2; ++c)
+ {
+ const char *prefix = length ? " or " : "expected ";
+
+ strcpy (buffer + length, prefix);
+ length += strlen (prefix);
+ strcpy (buffer + length, gimple_code_name[c]);
+ length += strlen (gimple_code_name[c]);
+ }
+
+ internal_error ("gimple check: %s, have %s in %s, at %s:%d",
+ buffer, gimple_code_name[gimple_code (gs)],
+ function, trim_filename (file), line);
+}
+
#endif /* ENABLE_GIMPLE_CHECKING */
diff --git a/gcc/gimple.h b/gcc/gimple.h
index df9bccdc3cd..8f95b3ee9d3 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -65,7 +65,7 @@ extern void gimple_check_failed (const_gimple, const char *, int, \
const_gimple __gs = (GS); \
if (gimple_code (__gs) != (CODE)) \
gimple_check_failed (__gs, __FILE__, __LINE__, __FUNCTION__, \
- (CODE), 0); \
+ (CODE), ERROR_MARK); \
} while (0)
#else /* not ENABLE_GIMPLE_CHECKING */
#define GIMPLE_CHECK(GS, CODE) (void)0
@@ -972,7 +972,7 @@ struct gimplify_ctx
};
extern enum gimplify_status gimplify_expr (tree *, gimple_seq *, gimple_seq *,
- bool (*) (tree), fallback_t);
+ bool (*) (tree), int);
extern void gimplify_type_sizes (tree, gimple_seq *);
extern void gimplify_one_sizepos (tree *, gimple_seq *);
extern bool gimplify_stmt (tree *, gimple_seq *);
@@ -1009,11 +1009,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-operands.c */
extern void gimple_add_to_addresses_taken (gimple, tree);
@@ -2245,7 +2251,7 @@ static inline enum tree_code
gimple_cond_code (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_COND);
- return gs->gsbase.subcode;
+ return (enum tree_code) gs->gsbase.subcode;
}
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 8ed42636642..01b5e97831f 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -1942,7 +1942,7 @@ gimplify_var_or_parm_decl (tree *expr_p)
static enum gimplify_status
gimplify_compound_lval (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
- fallback_t fallback)
+ int fallback)
{
tree *p;
VEC(tree,heap) *stack;
@@ -2819,7 +2819,7 @@ generic_expr_could_trap_p (tree expr)
*EXPR_P should be stored. */
static enum gimplify_status
-gimplify_cond_expr (tree *expr_p, gimple_seq *pre_p, fallback_t fallback)
+gimplify_cond_expr (tree *expr_p, gimple_seq *pre_p, int fallback)
{
tree expr = *expr_p;
tree tmp, type, arm1, arm2;
@@ -3612,7 +3612,7 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
if (size > 0
&& num_nonzero_elements > 1
- && !can_move_by_pieces (size, align))
+ && !can_move_by_pieces (size, align, 1))
{
tree new_tree;
@@ -5790,7 +5790,7 @@ static enum gimplify_status
gimplify_omp_for (tree *expr_p, gimple_seq *pre_p)
{
tree for_stmt, decl, var, t;
- enum gimplify_status ret = GS_OK;
+ enum gimplify_status ret = GS_ALL_DONE;
gimple gfor;
gimple_seq for_body, for_pre_body;
int i;
@@ -5812,6 +5812,8 @@ gimplify_omp_for (tree *expr_p, gimple_seq *pre_p)
== TREE_VEC_LENGTH (OMP_FOR_INCR (for_stmt)));
for (i = 0; i < TREE_VEC_LENGTH (OMP_FOR_INIT (for_stmt)); i++)
{
+ enum gimplify_status gs;
+
t = TREE_VEC_ELT (OMP_FOR_INIT (for_stmt), i);
gcc_assert (TREE_CODE (t) == MODIFY_EXPR);
decl = TREE_OPERAND (t, 0);
@@ -5840,8 +5842,9 @@ gimplify_omp_for (tree *expr_p, gimple_seq *pre_p)
else
var = decl;
- ret |= gimplify_expr (&TREE_OPERAND (t, 1), &for_pre_body, NULL,
- is_gimple_val, fb_rvalue);
+ gs = gimplify_expr (&TREE_OPERAND (t, 1), &for_pre_body, NULL,
+ is_gimple_val, fb_rvalue);
+ ret = MIN (ret, gs);
if (ret == GS_ERROR)
return ret;
@@ -5850,8 +5853,9 @@ gimplify_omp_for (tree *expr_p, gimple_seq *pre_p)
gcc_assert (COMPARISON_CLASS_P (t));
gcc_assert (TREE_OPERAND (t, 0) == decl);
- ret |= gimplify_expr (&TREE_OPERAND (t, 1), &for_pre_body, NULL,
- is_gimple_val, fb_rvalue);
+ gs = gimplify_expr (&TREE_OPERAND (t, 1), &for_pre_body, NULL,
+ is_gimple_val, fb_rvalue);
+ ret = MIN (ret, gs);
/* Handle OMP_FOR_INCR. */
t = TREE_VEC_ELT (OMP_FOR_INCR (for_stmt), i);
@@ -5898,8 +5902,9 @@ gimplify_omp_for (tree *expr_p, gimple_seq *pre_p)
gcc_unreachable ();
}
- ret |= gimplify_expr (&TREE_OPERAND (t, 1), &for_pre_body, NULL,
- is_gimple_val, fb_rvalue);
+ gs = gimplify_expr (&TREE_OPERAND (t, 1), &for_pre_body, NULL,
+ is_gimple_val, fb_rvalue);
+ ret = MIN (ret, gs);
break;
default:
@@ -6190,7 +6195,7 @@ gimplify_omp_atomic (tree *expr_p, gimple_seq *pre_p)
enum gimplify_status
gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
- bool (*gimple_test_f) (tree), fallback_t fallback)
+ bool (*gimple_test_f) (tree), int fallback)
{
tree tmp;
gimple_seq internal_pre = NULL;
@@ -6288,7 +6293,8 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
}
/* Do any language-specific gimplification. */
- ret = lang_hooks.gimplify_expr (expr_p, pre_p, post_p);
+ ret = ((enum gimplify_status)
+ lang_hooks.gimplify_expr (expr_p, pre_p, post_p));
if (ret == GS_OK)
{
if (*expr_p == NULL_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 09dc233c253..e29311c0843 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -147,6 +147,9 @@ along with GCC; see the file COPYING3. If not see
#include "vecprim.h"
#include "dbgcnt.h"
#include "cfgloop.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
#ifdef INSN_SCHEDULING
@@ -601,7 +604,7 @@ static rtx last_scheduled_insn;
/* Compute cost of executing INSN.
This is the number of cycles between instruction issue and
instruction results. */
-HAIFA_INLINE int
+int
insn_cost (rtx insn)
{
int cost;
@@ -1897,7 +1900,7 @@ reemit_notes (rtx insn)
{
if (REG_NOTE_KIND (note) == REG_SAVE_NOTE)
{
- enum insn_note note_type = INTVAL (XEXP (note, 0));
+ enum insn_note note_type = (enum insn_note) INTVAL (XEXP (note, 0));
last = emit_note_before (note_type, last);
remove_note (insn, note);
@@ -2131,7 +2134,8 @@ max_issue (struct ready_list *ready, int privileged_n, state_t state,
{
n = privileged_n;
/* Try to find issued privileged insn. */
- while (n && !ready_try[--n]);
+ while (n && !ready_try[--n])
+ ;
}
if (/* If all insns are equally good... */
@@ -3906,12 +3910,10 @@ sched_create_recovery_edges (basic_block first_bb, basic_block rec,
/* Rewritten from cfgrtl.c. */
if (flag_reorder_blocks_and_partition
&& targetm.have_named_sections)
- /* We don't need the same note for the check because
- any_condjump_p (check) == true. */
{
- REG_NOTES (jump) = gen_rtx_EXPR_LIST (REG_CROSSING_JUMP,
- NULL_RTX,
- REG_NOTES (jump));
+ /* We don't need the same note for the check because
+ any_condjump_p (check) == true. */
+ add_reg_note (jump, REG_CROSSING_JUMP, NULL_RTX);
}
edge_flags = EDGE_CROSSING;
}
@@ -4723,8 +4725,6 @@ check_cfg (rtx head, rtx tail)
#endif /* ENABLE_CHECKING */
-const struct sched_scan_info_def *sched_scan_info;
-
/* Extend per basic block data structures. */
static void
extend_bb (void)
@@ -5009,3 +5009,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 2ee713d204c..926c5334074 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
@@ -679,4 +683,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/hooks.c b/gcc/hooks.c
index 78e0ad22177..4b9a5e1b127 100644
--- a/gcc/hooks.c
+++ b/gcc/hooks.c
@@ -49,13 +49,6 @@ hook_bool_void_true (void)
return true;
}
-/* Generic hook that takes no arguments and returns NO_REGS. */
-int
-hook_int_void_no_regs (void)
-{
- return NO_REGS;
-}
-
/* Generic hook that takes (bool) and returns false. */
bool
hook_bool_bool_false (bool a ATTRIBUTE_UNUSED)
@@ -86,6 +79,14 @@ hook_bool_mode_const_rtx_true (enum machine_mode mode ATTRIBUTE_UNUSED,
return true;
}
+/* Generic hook that takes (rtx, rtx) and returns true. */
+bool
+hook_bool_const_rtx_const_rtx_true (const_rtx follower ATTRIBUTE_UNUSED,
+ const_rtx followee ATTRIBUTE_UNUSED)
+{
+ return true;
+}
+
/* Generic hook that takes (FILE *, const char *) and does nothing. */
void
hook_void_FILEptr_constcharptr (FILE *a ATTRIBUTE_UNUSED, const char *b ATTRIBUTE_UNUSED)
diff --git a/gcc/hooks.h b/gcc/hooks.h
index b47a6d980af..ec8e00b7161 100644
--- a/gcc/hooks.h
+++ b/gcc/hooks.h
@@ -31,6 +31,7 @@ extern bool hook_bool_bool_false (bool);
extern bool hook_bool_mode_false (enum machine_mode);
extern bool hook_bool_mode_const_rtx_false (enum machine_mode, const_rtx);
extern bool hook_bool_mode_const_rtx_true (enum machine_mode, const_rtx);
+extern bool hook_bool_const_rtx_const_rtx_true (const_rtx, const_rtx);
extern bool hook_bool_tree_false (tree);
extern bool hook_bool_const_tree_false (const_tree);
extern bool hook_bool_tree_true (tree);
@@ -62,7 +63,6 @@ extern int hook_int_const_tree_const_tree_1 (const_tree, const_tree);
extern int hook_int_rtx_0 (rtx);
extern int hook_int_rtx_bool_0 (rtx, bool);
extern int hook_int_size_t_constcharptr_int_0 (size_t, const char *, int);
-extern int hook_int_void_no_regs (void);
extern tree hook_tree_tree_tree_null (tree, tree);
extern tree hook_tree_tree_tree_tree_null (tree, tree, tree);
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index fc3cbd65f61..a5390e82c49 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_execution
#define HAVE_conditional_execution 0
@@ -4278,3 +4281,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 791b9266bec..715560c7680 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
@@ -148,7 +151,7 @@ struct rtl_opt_pass pass_initialize_regs =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -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 1fc0737c822..b5de3687754 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 initial_value_struct GTY(()) {
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);
@@ -308,7 +311,7 @@ struct rtl_opt_pass pass_initial_value_sets =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -365,3 +368,5 @@ allocate_initial_values (rtx *reg_equiv_memory_loc)
}
#include "gt-integrate.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index f6864bb43fa..3f326bce1da 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -1368,7 +1368,7 @@ cgraph_gate_cp (void)
return flag_ipa_cp;
}
-struct ipa_opt_pass pass_ipa_cp =
+struct ipa_opt_pass_d pass_ipa_cp =
{
{
IPA_PASS,
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 4ea3ad54393..5d5508d1398 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -1750,7 +1750,7 @@ inline_transform (struct cgraph_node *node)
return todo | execute_fixup_cfg ();
}
-struct ipa_opt_pass pass_ipa_inline =
+struct ipa_opt_pass_d pass_ipa_inline =
{
{
IPA_PASS,
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index c8db7d2bcd6..b2cbd0fae57 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -891,7 +891,7 @@ update_jump_functions_after_inlining (struct cgraph_edge *cs,
/* We must check range due to calls with variable number of arguments: */
if (dst->value.formal_id >= (unsigned) ipa_get_cs_argument_count (top))
{
- dst->type = IPA_BOTTOM;
+ dst->type = IPA_UNKNOWN;
continue;
}
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index f21638f383e..1b16940a41e 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -910,7 +910,7 @@ gate_pure_const (void)
&& !(errorcount || sorrycount));
}
-struct ipa_opt_pass pass_ipa_pure_const =
+struct ipa_opt_pass_d pass_ipa_pure_const =
{
{
IPA_PASS,
diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c
index a9afd457a73..5f9fe8800ba 100644
--- a/gcc/ipa-reference.c
+++ b/gcc/ipa-reference.c
@@ -1257,7 +1257,7 @@ gate_reference (void)
&& !(errorcount || sorrycount));
}
-struct ipa_opt_pass pass_ipa_reference =
+struct ipa_opt_pass_d pass_ipa_reference =
{
{
IPA_PASS,
diff --git a/gcc/ipa-struct-reorg.c b/gcc/ipa-struct-reorg.c
index ab70c98e9b9..99299fc584f 100644
--- a/gcc/ipa-struct-reorg.c
+++ b/gcc/ipa-struct-reorg.c
@@ -1261,7 +1261,8 @@ create_general_new_stmt (struct access_site *acc, tree new_type)
if (is_gimple_assign (new_stmt))
{
lhs = gimple_assign_lhs (new_stmt);
-
+ rhs = NULL_TREE;
+
if (TREE_CODE (lhs) == SSA_NAME)
lhs = SSA_NAME_VAR (lhs);
if (gimple_assign_rhs_code (new_stmt) == SSA_NAME)
diff --git a/gcc/ira-build.c b/gcc/ira-build.c
index eb1cdf5b17b..11eabe92e60 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);
@@ -2275,14 +2278,14 @@ setup_min_max_conflict_allocno_ids (void)
ira_allocno_t a;
live_range_min = (int *) ira_allocate (sizeof (int) * ira_allocnos_num);
- cover_class = -1;
+ cover_class = LIM_REG_CLASSES;
first_not_finished = -1;
for (i = 0; i < ira_allocnos_num; i++)
{
a = ira_conflict_id_allocno_map[i];
if (a == NULL)
continue;
- if (cover_class < 0
+ if (cover_class == LIM_REG_CLASSES
|| (flag_ira_algorithm != IRA_ALGORITHM_PRIORITY
&& cover_class != (int) ALLOCNO_COVER_CLASS (a)))
{
@@ -2311,14 +2314,14 @@ setup_min_max_conflict_allocno_ids (void)
ALLOCNO_MIN (a) = min;
}
last_lived = (int *) ira_allocate (sizeof (int) * ira_max_point);
- cover_class = -1;
+ cover_class = LIM_REG_CLASSES;
filled_area_start = -1;
for (i = ira_allocnos_num - 1; i >= 0; i--)
{
a = ira_conflict_id_allocno_map[i];
if (a == NULL)
continue;
- if (cover_class < 0
+ if (cover_class == LIM_REG_CLASSES
|| (flag_ira_algorithm != IRA_ALGORITHM_PRIORITY
&& cover_class != (int) ALLOCNO_COVER_CLASS (a)))
{
@@ -2394,7 +2397,8 @@ static ira_allocno_t *regno_top_level_allocno_map;
static bool
copy_info_to_removed_store_destinations (int regno)
{
- ira_allocno_t a, parent_a;
+ ira_allocno_t a;
+ ira_allocno_t parent_a = NULL;
ira_loop_tree_node_t parent;
allocno_live_range_t r;
bool merged_p;
@@ -2850,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 a3dfddbbb41..8dc745efdaf 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 05870ab4b16..ac3450e101d 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
@@ -833,3 +835,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 397affd4b1f..969d235330f 100644
--- a/gcc/ira-costs.c
+++ b/gcc/ira-costs.c
@@ -37,10 +37,13 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "params.h"
#include "ira-int.h"
+#include "multi-target.h"
/* The file contains code is similar to one in regclass but the code
works on the allocno basis. */
+START_TARGET_SPECIFIC
+
#ifdef FORBIDDEN_INC_DEC_CLASSES
/* Indexed by n, is TRUE if allocno with number N is used in an
auto-inc or auto-dec context. */
@@ -136,7 +139,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 (ira_register_move_cost[mode] == NULL)
ira_init_register_move_cost (mode);
@@ -686,7 +691,8 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
rclass = cost_classes[k];
if (TEST_HARD_REG_BIT (reg_class_contents[rclass], regno)
&& (reg_class_size[rclass]
- == (unsigned) CLASS_MAX_NREGS (rclass, mode)))
+ == (unsigned) CLASS_MAX_NREGS ((enum reg_class) rclass,
+ mode)))
{
if (reg_class_size[rclass] == 1)
op_costs[i]->cost[k] = -frequency;
@@ -1660,3 +1666,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 df10ea45d62..d05d32c7c9d 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
@@ -1124,3 +1127,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 4cb3928564c..4380bfe56a4 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_. */
@@ -1235,3 +1238,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 7ad903d2e44..e50258e1859 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
@@ -1269,3 +1272,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 3742f0f35c1..7ec948bebef 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;
@@ -504,7 +506,7 @@ static void
setup_class_subset_and_memory_move_costs (void)
{
int cl, cl2;
- enum machine_mode mode;
+ int mode;
HARD_REG_SET temp_hard_regset2;
for (mode = 0; mode < MAX_MACHINE_MODE; mode++)
@@ -515,8 +517,12 @@ setup_class_subset_and_memory_move_costs (void)
if (cl != (int) NO_REGS)
for (mode = 0; mode < MAX_MACHINE_MODE; mode++)
{
- ira_memory_move_cost[mode][cl][0] = MEMORY_MOVE_COST (mode, cl, 0);
- ira_memory_move_cost[mode][cl][1] = MEMORY_MOVE_COST (mode, cl, 1);
+ ira_memory_move_cost[mode][cl][0] =
+ MEMORY_MOVE_COST ((enum machine_mode) mode,
+ (enum reg_class) cl, 0);
+ ira_memory_move_cost[mode][cl][1] =
+ MEMORY_MOVE_COST ((enum machine_mode) mode,
+ (enum reg_class) cl, 1);
/* Costs for NO_REGS are used in cost calculation on the
1st pass when the preferred register classes are not
known yet. In this case we take the best scenario. */
@@ -727,21 +733,21 @@ setup_cover_and_important_classes (void)
{
int i, j, n;
bool set_p, eq_p;
- enum reg_class cl;
- const enum reg_class *cover_classes;
+ int cl;
+ 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
{
for (i = 0; (cl = cover_classes[i]) != LIM_REG_CLASSES; i++)
- classes[i] = cl;
+ classes[i] = (enum reg_class) cl;
classes[i] = LIM_REG_CLASSES;
}
@@ -776,7 +782,7 @@ setup_cover_and_important_classes (void)
break;
}
if (j >= i)
- classes[n++] = i;
+ classes[n++] = (enum reg_class) i;
}
classes[n] = LIM_REG_CLASSES;
}
@@ -786,12 +792,13 @@ setup_cover_and_important_classes (void)
{
for (j = 0; j < i; j++)
if (flag_ira_algorithm != IRA_ALGORITHM_PRIORITY
- && reg_classes_intersect_p (cl, classes[j]))
+ && reg_classes_intersect_p ((enum reg_class) cl, classes[j]))
gcc_unreachable ();
COPY_HARD_REG_SET (temp_hard_regset, reg_class_contents[cl]);
AND_COMPL_HARD_REG_SET (temp_hard_regset, no_unit_alloc_regs);
if (! hard_reg_set_empty_p (temp_hard_regset))
- ira_reg_class_cover[ira_reg_class_cover_size++] = cl;
+ ira_reg_class_cover[ira_reg_class_cover_size++] =
+ (enum reg_class) cl;
}
ira_important_classes_num = 0;
for (cl = 0; cl < N_REG_CLASSES; cl++)
@@ -824,7 +831,8 @@ setup_cover_and_important_classes (void)
if (set_p && ! eq_p)
{
ira_important_class_nums[cl] = ira_important_classes_num;
- ira_important_classes[ira_important_classes_num++] = cl;
+ ira_important_classes[ira_important_classes_num++] =
+ (enum reg_class) cl;
}
}
}
@@ -839,8 +847,8 @@ enum reg_class ira_class_translate[N_REG_CLASSES];
static void
setup_class_translate (void)
{
- enum reg_class cl, cover_class, best_class, *cl_ptr;
- enum machine_mode mode;
+ int cl, mode;
+ enum reg_class cover_class, best_class, *cl_ptr;
int i, cost, min_cost, best_cost;
for (cl = 0; cl < N_REG_CLASSES; cl++)
@@ -981,8 +989,9 @@ setup_reg_class_relations (void)
if (cl3 == LIM_REG_CLASSES)
break;
if (reg_class_subset_p (ira_reg_class_intersect[cl1][cl2],
- cl3))
- ira_reg_class_intersect[cl1][cl2] = cl3;
+ (enum reg_class) cl3))
+ ira_reg_class_intersect[cl1][cl2] =
+ (enum reg_class) cl3;
}
ira_reg_class_union[cl1][cl2] = reg_class_subunion[cl1][cl2];
continue;
@@ -1134,13 +1143,14 @@ static void
setup_reg_class_nregs (void)
{
int m;
- enum reg_class cl;
+ int cl;
ira_max_nregs = -1;
for (cl = 0; cl < N_REG_CLASSES; cl++)
for (m = 0; m < MAX_MACHINE_MODE; m++)
{
- ira_reg_class_nregs[cl][m] = CLASS_MAX_NREGS (cl, m);
+ ira_reg_class_nregs[cl][m] = CLASS_MAX_NREGS ((enum reg_class) cl,
+ (enum machine_mode) m);
if (ira_max_nregs < ira_reg_class_nregs[cl][m])
ira_max_nregs = ira_reg_class_nregs[cl][m];
}
@@ -1169,7 +1179,7 @@ setup_prohibited_class_mode_regs (void)
for (k = ira_class_hard_regs_num[cl] - 1; k >= 0; k--)
{
hard_regno = ira_class_hard_regs[cl][k];
- if (! HARD_REGNO_MODE_OK (hard_regno, j))
+ if (! HARD_REGNO_MODE_OK (hard_regno, (enum machine_mode) j))
SET_HARD_REG_BIT (prohibited_class_mode_regs[cl][j],
hard_regno);
}
@@ -1223,7 +1233,7 @@ ira_init_register_move_cost (enum machine_mode mode)
void
ira_init_once (void)
{
- enum machine_mode mode;
+ int mode;
for (mode = 0; mode < MAX_MACHINE_MODE; mode++)
{
@@ -1239,7 +1249,7 @@ ira_init_once (void)
static void
free_register_move_costs (void)
{
- enum machine_mode mode;
+ int mode;
for (mode = 0; mode < MAX_MACHINE_MODE; mode++)
{
@@ -1306,12 +1316,12 @@ setup_prohibited_mode_move_regs (void)
SET_HARD_REG_SET (ira_prohibited_mode_move_regs[i]);
for (j = 0; j < FIRST_PSEUDO_REGISTER; j++)
{
- if (! HARD_REGNO_MODE_OK (j, i))
+ if (! HARD_REGNO_MODE_OK (j, (enum machine_mode) i))
continue;
SET_REGNO (test_reg1, j);
- PUT_MODE (test_reg1, i);
+ PUT_MODE (test_reg1, (enum machine_mode) i);
SET_REGNO (test_reg2, j);
- PUT_MODE (test_reg2, i);
+ PUT_MODE (test_reg2, (enum machine_mode) i);
INSN_CODE (move_insn) = -1;
recog_memoized (move_insn);
if (INSN_CODE (move_insn) < 0)
@@ -3320,7 +3330,7 @@ struct rtl_opt_pass pass_ira =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -3329,3 +3339,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 0d7bcb87bea..865016a7f2d 100644
--- a/gcc/ira.h
+++ b/gcc/ira.h
@@ -20,10 +20,13 @@ 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"
+
/* True if we have allocno conflicts. It is false for non-optimized
mode or when the conflict table is too big. */
extern bool ira_conflicts_p;
+START_TARGET_SPECIFIC
extern void ira_init_once (void);
extern void ira_init (void);
extern void ira_finish_once (void);
@@ -37,4 +40,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/java/ChangeLog.cxx b/gcc/java/ChangeLog.cxx
new file mode 100644
index 00000000000..764adbd84ca
--- /dev/null
+++ b/gcc/java/ChangeLog.cxx
@@ -0,0 +1,33 @@
+2008-07-04 Tom Tromey <tromey@redhat.com>
+
+ * mangle.c (emit_compression_string): Insert newline.
+ * builtins.c (java_builtins): Cast initializers.
+ * Make-lang.in (jvspec.o): Use ALL_CXXFLAGS.
+ ($(GCJ)$(exeext)): Likewise.
+ (jc1$(exeext)): Likewise.
+ (jcf-dump$(exeext)): Likewise.
+ (jvgenmain$(exeext)): Likewise.
+ (java/jcf-io.o): Likewise.
+ (java/jcf-path.o): Likewise.
+
+2008-07-03 Tom Tromey <tromey@redhat.com>
+
+ * verify.h: Don't use 'extern "C"'.
+ * jcf-parse.c (handle_constant): Cast to cpool_tag.
+ * verify-impl.c (check_class_constant): Initialize with void_type,
+ not 0.
+ (check_constant): Likewise.
+ (check_wide_constant): Likewise.
+ (verify_instructions_0) <op_newarray>: Cast 'atype' to type_val.
+ * Make-lang.in (jvspec.o): Use $(CXX).
+ ($(GCJ)$(exeext)): Likewise.
+ (jc1$(exeext)): Likewise.
+ (jcf-dump$(exeext)): Likewise.
+ (jvgenmain$(exeext)): Likewise.
+ (java/jcf-io.o): Likewise.
+ (java/jcf-path.o): Likewise.
+
+Local Variables:
+mode: change-log
+change-log-default-name: "ChangeLog.cxx"
+End:
diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in
index 605f7e3434c..ab7d8b7a793 100644
--- a/gcc/java/Make-lang.in
+++ b/gcc/java/Make-lang.in
@@ -59,13 +59,13 @@ JAVA_TARGET_INDEPENDENT_BIN_TOOLS = jcf-dump
jvspec.o: $(srcdir)/java/jvspec.c $(SYSTEM_H) coretypes.h $(TM_H) \
$(GCC_H) $(CONFIG_H) java/jcf.h java/javaop.h
(SHLIB_LINK='$(SHLIB_LINK)'; \
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
+ $(CXX) -x c++ -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
$(INCLUDES) $(srcdir)/java/jvspec.c $(OUTPUT_OPTION))
# Create the compiler driver for $(GCJ).
$(GCJ)$(exeext): $(GCC_OBJS) jvspec.o java/jcf-path.o version.o \
prefix.o intl.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GCC_OBJS) jvspec.o \
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ $(GCC_OBJS) jvspec.o \
java/jcf-path.o prefix.o intl.o \
version.o $(EXTRA_GCC_OBJS) $(LIBS)
@@ -100,17 +100,17 @@ jvspec.o-warn = -Wno-error
jc1$(exeext): $(JAVA_OBJS) $(BACKEND) $(LIBDEPS) attribs.o
rm -f $@
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ \
$(JAVA_OBJS) $(BACKEND) $(ZLIB) $(LIBICONV) $(LIBS) attribs.o $(BACKENDLIBS)
jcf-dump$(exeext): $(JCFDUMP_OBJS) $(LIBDEPS)
rm -f $@
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JCFDUMP_OBJS) \
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ $(JCFDUMP_OBJS) \
$(CPPLIBS) $(ZLIB) $(LDEXP_LIB) $(LIBS)
jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS)
rm -f $@
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JVGENMAIN_OBJS) $(LIBS)
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ $(JVGENMAIN_OBJS) $(LIBS)
#
# Build hooks:
@@ -305,13 +305,13 @@ java/java-gimplify.o: java/java-gimplify.c $(CONFIG_H) $(SYSTEM_H) \
# jcf-io.o needs $(ZLIBINC) added to cflags.
java/jcf-io.o: java/jcf-io.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(JAVA_TREE_H) java/zipfile.h
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ZLIBINC) \
- $(srcdir)/java/jcf-io.c $(OUTPUT_OPTION)
+ $(CXX) -x c++ -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) \
+ $(INCLUDES) $(ZLIBINC) $(srcdir)/java/jcf-io.c $(OUTPUT_OPTION)
# jcf-path.o needs a -D.
java/jcf-path.o: java/jcf-path.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
java/jcf.h
- $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+ $(CXX) -xc++ -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DLIBGCJ_ZIP_FILE='"$(datadir)/java/libgcj-$(version).jar"' \
-DDEFAULT_TARGET_VERSION=\"$(version)\" \
$(srcdir)/java/jcf-path.c $(OUTPUT_OPTION)
diff --git a/gcc/java/builtins.c b/gcc/java/builtins.c
index c9f9f4a2a79..7e8cac44cf0 100644
--- a/gcc/java/builtins.c
+++ b/gcc/java/builtins.c
@@ -82,9 +82,9 @@ struct builtin_record GTY(())
static GTY(()) struct builtin_record java_builtins[] =
{
- { { "java.lang.Math" }, { "min" }, min_builtin, 0 },
- { { "java.lang.Math" }, { "max" }, max_builtin, 0 },
- { { "java.lang.Math" }, { "abs" }, abs_builtin, 0 },
+ { { "java.lang.Math" }, { "min" }, min_builtin, (built_in_function) 0 },
+ { { "java.lang.Math" }, { "max" }, max_builtin, (built_in_function) 0 },
+ { { "java.lang.Math" }, { "abs" }, abs_builtin, (built_in_function) 0 },
{ { "java.lang.Math" }, { "acos" }, NULL, BUILT_IN_ACOS },
{ { "java.lang.Math" }, { "asin" }, NULL, BUILT_IN_ASIN },
{ { "java.lang.Math" }, { "atan" }, NULL, BUILT_IN_ATAN },
@@ -98,31 +98,48 @@ static GTY(()) struct builtin_record java_builtins[] =
{ { "java.lang.Math" }, { "sin" }, NULL, BUILT_IN_SIN },
{ { "java.lang.Math" }, { "sqrt" }, NULL, BUILT_IN_SQRT },
{ { "java.lang.Math" }, { "tan" }, NULL, BUILT_IN_TAN },
- { { "java.lang.Float" }, { "intBitsToFloat" }, convert_real, 0 },
- { { "java.lang.Double" }, { "longBitsToDouble" }, convert_real, 0 },
- { { "java.lang.Float" }, { "floatToRawIntBits" }, convert_real, 0 },
- { { "java.lang.Double" }, { "doubleToRawLongBits" }, convert_real, 0 },
- { { "sun.misc.Unsafe" }, { "putInt" }, putObject_builtin, 0},
- { { "sun.misc.Unsafe" }, { "putLong" }, putObject_builtin, 0},
- { { "sun.misc.Unsafe" }, { "putObject" }, putObject_builtin, 0},
+ { { "java.lang.Float" }, { "intBitsToFloat" }, convert_real,
+ (built_in_function) 0 },
+ { { "java.lang.Double" }, { "longBitsToDouble" }, convert_real,
+ (built_in_function) 0 },
+ { { "java.lang.Float" }, { "floatToRawIntBits" }, convert_real,
+ (built_in_function) 0 },
+ { { "java.lang.Double" }, { "doubleToRawLongBits" }, convert_real,
+ (built_in_function) 0 },
+ { { "sun.misc.Unsafe" }, { "putInt" },
+ putObject_builtin, (built_in_function) 0},
+ { { "sun.misc.Unsafe" }, { "putLong" },
+ putObject_builtin, (built_in_function) 0},
+ { { "sun.misc.Unsafe" }, { "putObject" },
+ putObject_builtin, (built_in_function) 0},
{ { "sun.misc.Unsafe" }, { "compareAndSwapInt" },
- compareAndSwapInt_builtin, 0},
+ compareAndSwapInt_builtin, (built_in_function) 0},
{ { "sun.misc.Unsafe" }, { "compareAndSwapLong" },
- compareAndSwapLong_builtin, 0},
+ compareAndSwapLong_builtin, (built_in_function) 0},
{ { "sun.misc.Unsafe" }, { "compareAndSwapObject" },
- compareAndSwapObject_builtin, 0},
- { { "sun.misc.Unsafe" }, { "putOrderedInt" }, putVolatile_builtin, 0},
- { { "sun.misc.Unsafe" }, { "putOrderedLong" }, putVolatile_builtin, 0},
- { { "sun.misc.Unsafe" }, { "putOrderedObject" }, putVolatile_builtin, 0},
- { { "sun.misc.Unsafe" }, { "putIntVolatile" }, putVolatile_builtin, 0},
- { { "sun.misc.Unsafe" }, { "putLongVolatile" }, putVolatile_builtin, 0},
- { { "sun.misc.Unsafe" }, { "putObjectVolatile" }, putVolatile_builtin, 0},
- { { "sun.misc.Unsafe" }, { "getObjectVolatile" }, getVolatile_builtin, 0},
- { { "sun.misc.Unsafe" }, { "getIntVolatile" }, getVolatile_builtin, 0},
- { { "sun.misc.Unsafe" }, { "getLongVolatile" }, getVolatile_builtin, 0},
- { { "sun.misc.Unsafe" }, { "getLong" }, getVolatile_builtin, 0},
+ compareAndSwapObject_builtin, (built_in_function) 0},
+ { { "sun.misc.Unsafe" }, { "putOrderedInt" },
+ putVolatile_builtin, (built_in_function) 0},
+ { { "sun.misc.Unsafe" }, { "putOrderedLong" },
+ putVolatile_builtin, (built_in_function) 0},
+ { { "sun.misc.Unsafe" }, { "putOrderedObject" },
+ putVolatile_builtin, (built_in_function) 0},
+ { { "sun.misc.Unsafe" }, { "putIntVolatile" },
+ putVolatile_builtin, (built_in_function) 0},
+ { { "sun.misc.Unsafe" }, { "putLongVolatile" },
+ putVolatile_builtin, (built_in_function) 0},
+ { { "sun.misc.Unsafe" }, { "putObjectVolatile" },
+ putVolatile_builtin, (built_in_function) 0},
+ { { "sun.misc.Unsafe" }, { "getObjectVolatile" },
+ getVolatile_builtin, (built_in_function) 0},
+ { { "sun.misc.Unsafe" }, { "getIntVolatile" },
+ getVolatile_builtin, (built_in_function) 0},
+ { { "sun.misc.Unsafe" }, { "getLongVolatile" },
+ getVolatile_builtin, (built_in_function) 0},
+ { { "sun.misc.Unsafe" }, { "getLong" },
+ getVolatile_builtin, (built_in_function) 0},
{ { "java.util.concurrent.atomic.AtomicLong" }, { "VMSupportsCS8" },
- VMSupportsCS8_builtin, 0},
+ VMSupportsCS8_builtin, (built_in_function) 0},
{ { NULL }, { NULL }, NULL, END_BUILTINS }
};
diff --git a/gcc/java/jcf-io.c b/gcc/java/jcf-io.c
index b968214e509..e50b6a6f656 100644
--- a/gcc/java/jcf-io.c
+++ b/gcc/java/jcf-io.c
@@ -399,9 +399,8 @@ find_class (const char *classname, int classname_length, JCF *jcf)
/* Remember that this class could not be found so that we do not
have to look again. */
- *(const void **)htab_find_slot_with_hash (memoized_class_lookups,
- classname, hash, INSERT)
- = classname;
+ *htab_find_slot_with_hash (memoized_class_lookups, classname, hash, INSERT)
+ = CONST_CAST (char *, classname);
return NULL;
found:
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index 42b53c824d7..f5d7c24af5f 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -507,7 +507,7 @@ handle_constant (JCF *jcf, int index, enum cpool_tag purpose)
if (! CPOOL_INDEX_IN_RANGE (&jcf->cpool, index))
error ("<constant pool index %d not in range>", index);
- kind = JPOOL_TAG (jcf, index);
+ kind = (cpool_tag) JPOOL_TAG (jcf, index);
if ((kind & ~CONSTANT_ResolvedFlag) != purpose)
{
diff --git a/gcc/java/mangle.c b/gcc/java/mangle.c
index 61594d9b5ed..7132946ff16 100644
--- a/gcc/java/mangle.c
+++ b/gcc/java/mangle.c
@@ -702,7 +702,8 @@ emit_compression_string (int i)
unsigned HOST_WIDE_INT n;
unsigned HOST_WIDE_INT m=1;
/* How many digits for I in base 36? */
- for (n = i; n >= 36; n /= 36, m *=36);
+ for (n = i; n >= 36; n /= 36, m *=36)
+ ;
/* Write the digits out */
while (m > 0)
{
diff --git a/gcc/java/verify-impl.c b/gcc/java/verify-impl.c
index 2e69359913c..65db1c805c7 100644
--- a/gcc/java/verify-impl.c
+++ b/gcc/java/verify-impl.c
@@ -1947,7 +1947,7 @@ check_pool_index (int index)
static type
check_class_constant (int index)
{
- type t = { 0, 0, 0 };
+ type t = { void_type, 0, 0 };
vfy_constants *pool;
check_pool_index (index);
@@ -1964,7 +1964,7 @@ check_class_constant (int index)
static type
check_constant (int index)
{
- type t = { 0, 0, 0 };
+ type t = { void_type, 0, 0 };
vfy_constants *pool;
check_pool_index (index);
@@ -1988,7 +1988,7 @@ check_constant (int index)
static type
check_wide_constant (int index)
{
- type t = { 0, 0, 0 };
+ type t = { void_type, 0, 0 };
vfy_constants *pool;
check_pool_index (index);
@@ -3031,7 +3031,7 @@ verify_instructions_0 (void)
if (atype < boolean_type || atype > long_type)
verify_fail_pc ("type not primitive", vfr->start_PC);
pop_type (int_type);
- init_type_from_class (&t, construct_primitive_array_type (atype));
+ init_type_from_class (&t, construct_primitive_array_type ((type_val) atype));
push_type_t (t);
}
break;
diff --git a/gcc/java/verify.h b/gcc/java/verify.h
index 21fe67254fb..809ce9f2403 100644
--- a/gcc/java/verify.h
+++ b/gcc/java/verify.h
@@ -1,5 +1,5 @@
/* Declarations to interface gcj with bytecode verifier.
- Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of GCC.
@@ -26,11 +26,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#ifndef GCC_VERIFY_H
#define GCC_VERIFY_H
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
#include "system.h"
#include "coretypes.h"
#include "jcf.h"
@@ -155,8 +150,4 @@ typedef enum
int verify_method (vfy_method *meth);
-#ifdef __cplusplus
-}
-#endif
-
#endif /* ! GCC_VERIFY_H */
diff --git a/gcc/jump.c b/gcc/jump.c
index 2b9a9545223..a82371f4951 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. */
@@ -132,7 +135,7 @@ struct rtl_opt_pass pass_cleanup_barriers =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1748,3 +1751,5 @@ reg_or_subregno (const_rtx reg)
gcc_assert (REG_P (reg));
return REGNO (reg);
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index cdf1b6a7623..7a9d56a03af 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -546,9 +546,8 @@ add_builtin_function_common (const char *name,
DECL_EXTERNAL (decl) = 1;
DECL_BUILT_IN_CLASS (decl) = cl;
- DECL_FUNCTION_CODE (decl) = -1;
- gcc_assert (DECL_FUNCTION_CODE (decl) >= function_code);
- DECL_FUNCTION_CODE (decl) = function_code;
+ DECL_FUNCTION_CODE (decl) = (enum built_in_function) function_code;
+ gcc_assert (DECL_FUNCTION_CODE (decl) == function_code);
if (library_name)
{
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index 52f1bb1e59a..b0f572d39b3 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -519,8 +519,11 @@ __ffsSI2 (UWtype u)
{
UWtype count;
- if (u == 0)
- return 0;
+#ifdef COUNT_TRAILING_ZEROS_0
+ if (COUNT_TRAILING_ZEROS_0 != -1)
+#endif
+ if (u == 0)
+ return 0;
count_trailing_zeros (count, u);
return count + 1;
diff --git a/gcc/lists.c b/gcc/lists.c
index 0cfc8609650..44069f1d345 100644
--- a/gcc/lists.c
+++ b/gcc/lists.c
@@ -140,7 +140,7 @@ alloc_EXPR_LIST (int kind, rtx val, rtx next)
PUT_REG_NOTE_KIND (r, kind);
}
else
- r = gen_rtx_EXPR_LIST (kind, val, next);
+ r = gen_rtx_EXPR_LIST ((enum machine_mode) kind, val, next);
return r;
}
diff --git a/gcc/longlong.h b/gcc/longlong.h
index 57308bd9b79..b586ffb68ca 100644
--- a/gcc/longlong.h
+++ b/gcc/longlong.h
@@ -191,6 +191,29 @@ extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype);
"rIJ" ((USItype) (bh)), \
"r" ((USItype) (al)), \
"rIJ" ((USItype) (bl)))
+#ifdef __ARC_NORM__
+#define count_leading_zeros(count, x) \
+ do \
+ { \
+ SItype c_; \
+ \
+ __asm__ ("norm.f\t%0,%1\n\tmov.mi\t%0,-1" : "=r" (c_) : "r" (x) : "cc");\
+ (count) = c_ + 1; \
+ } \
+ while (0)
+#define COUNT_LEADING_ZEROS_0 32
+#endif
+#ifdef __ARC700__
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ( \
+ "mpyu\t%1,%2,%3\n\tmpyhu\t%0,%2,%3" \
+ : "=r" ((USItype)(w1)), \
+ "=&r" ((USItype)(w0)) \
+ : "r" ((USItype)(u)), \
+ "r" ((USItype)(v)))
+#define UMUL_TIME 7
+#define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v)
+#else /* ! __ARC700__ */
/* Call libgcc routine. */
#define umul_ppmm(w1, w0, u, v) \
do { \
@@ -202,6 +225,7 @@ do { \
#define __umulsidi3 __umulsidi3
UDItype __umulsidi3 (USItype, USItype);
#endif
+#endif
#if defined (__arm__) && !defined (__thumb__) && W_TYPE_SIZE == 32
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
@@ -1518,7 +1542,10 @@ UDItype __umulsidi3 (USItype, USItype);
count_leading_zeros (__ctz_c, __ctz_x & -__ctz_x); \
(count) = W_TYPE_SIZE - 1 - __ctz_c; \
} while (0)
-#endif
+#ifdef COUNT_LEADING_ZEROS_0
+#define COUNT_TRAILING_ZEROS_0 (W_TYPE_SIZE - 1 - COUNT_LEADING_ZEROS_0)
+#endif /* COUNT_LEADING_ZEROS_0 */
+#endif /* !defined (count_trailing_zeros) */
#ifndef UDIV_NEEDS_NORMALIZATION
#define UDIV_NEEDS_NORMALIZATION 0
diff --git a/gcc/loop-doloop.c b/gcc/loop-doloop.c
index 1f5856f581b..bca72a18443 100644
--- a/gcc/loop-doloop.c
+++ b/gcc/loop-doloop.c
@@ -34,6 +34,8 @@ along with GCC; see the file COPYING3. If not see
#include "output.h"
#include "params.h"
#include "target.h"
+#include "optabs.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 +66,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
@@ -194,22 +198,92 @@ doloop_condition_get (rtx doloop_pat)
return 0;
}
-/* Return nonzero if the loop specified by LOOP is suitable for
- the use of special low-overhead looping instructions. DESC
- describes the number of iterations of the loop. */
+static bool add_test (rtx cond, edge *e, basic_block dest, edge *);
-static bool
-doloop_valid_p (struct loop *loop, struct niter_desc *desc)
+/* Check if the loop specified by LOOP is suitable for
+ the use of special low-overhead looping instructions.
+ If necessary to properly implement infinite loops, this may cause
+ a new enclosing loop to be formed. Returns the (possible changed)
+ loop structure pointer on success, else NULL.
+ DESC describes the number of iterations of the loop. */
+
+static struct loop *
+validize_doloop (struct loop *loop, struct niter_desc *desc)
{
basic_block *body = get_loop_body (loop), bb;
rtx insn;
unsigned i;
bool result = true;
+ rtx list;
+ edge out_edge;
/* Check for loops that may not terminate under special conditions. */
if (!desc->simple_p
|| desc->assumptions
- || desc->infinite)
+ || (desc->infinite
+ && (EDGE_COUNT (loop->latch->preds) != 1
+ || !optimize_loop_for_speed_p (loop))))
+ result = false;
+ if (desc->infinite)
+ {
+ edge e, latch_in;
+ edge_iterator ei;
+ rtx insn;
+
+ /* We want to set out_edge to the edge that is used to exit the loop
+ if the loop count is exhausted. For now, only handle the case
+ of a single exit. */
+ out_edge = NULL;
+ if (single_pred_p (loop->latch))
+ {
+ latch_in = single_pred_edge (loop->latch);
+ FOR_EACH_EDGE (e, ei, latch_in->src->succs)
+ if (e == latch_in)
+ ; /* do nothing */
+ else if (!out_edge)
+ out_edge = e;
+ else
+ result = false;
+ }
+ if (!out_edge)
+ result = false;
+ else if (dump_file)
+ fprintf (dump_file, "Doloop: considering putting infinite loop"
+ " instructions on edge from %d to %d.\n",
+ out_edge->src->index, out_edge->dest->index);
+ /* The (non-jump) instructions in the current loop latch shoould be
+ copied int othe new loop latch cf. gcc.c-torture/execute/pr27285.c .
+ For now, just punt when we see any insns in the latch. */
+ FOR_BB_INSNS (loop->latch, insn)
+ if (NONJUMP_INSN_P (insn))
+ {
+ result = false;
+ break;
+ }
+
+ }
+ /* check_simple_exit can create conditions that do_compare_and_jump_rtx
+ can't grok. */
+ for (list = desc->infinite; list; list = XEXP (list, 1))
+ {
+ rtx cond = XEXP (list, 0);
+ enum machine_mode mode;
+
+ if (!BINARY_P (cond))
+ {
+ result = false;
+ break;
+ }
+ mode = GET_MODE (XEXP (cond, 0));
+ if (mode == VOIDmode)
+ mode = GET_MODE (XEXP (cond, 1));
+
+ if (GET_MODE_CLASS (mode) == MODE_INT
+ && !can_compare_p (GET_CODE (cond), mode, ccp_jump)
+ && !COMPARISON_P (cond))
+ result = false;
+ }
+ if (!result)
{
/* There are some cases that would require a special attention.
For example if the comparison is LEU and the comparison value
@@ -261,27 +335,84 @@ doloop_valid_p (struct loop *loop, struct niter_desc *desc)
}
}
}
- result = true;
+ if (desc->infinite)
+ {
+ basic_block header = loop->header;
+ basic_block latch;
+ struct loop *new_loop;
+
+ gcc_assert (loops_state_satisfies_p (LOOPS_HAVE_PREHEADERS));
+ {
+ edge latch_edge = single_succ_edge (loop->latch);
+ edge in_edge;
+
+ gcc_assert (EDGE_COUNT (header->preds) == 2);
+ gcc_assert (latch_edge->dest == header);
+ if (dump_file)
+ fprintf (dump_file,
+ "Doloop: infinite loop generation: latch %d header %d\n",
+ loop->latch->index, header->index);
+ in_edge = EDGE_PRED (header, 0);
+ if (in_edge == latch_edge)
+ in_edge = EDGE_PRED (header, 1);
+ else
+ gcc_assert (latch_edge == EDGE_PRED (header, 1));
+ gcc_assert (in_edge != out_edge);
+ header = split_edge (in_edge);
+ set_immediate_dominator (CDI_DOMINATORS, loop->header, header);
+ remove_bb_from_loops (header);
+ add_bb_to_loop (header, loop);
+#if 0 /* For debugging, insert a marker insn. */
+ emit_insn_after (gen_unimp_s (GEN_INT (1)), BB_END (header));
+#endif
+ }
+ for (latch = header, list = desc->infinite; list; list = XEXP (list, 1))
+ {
+ edge new_latch_edge = out_edge;
+
+ add_test (XEXP (list, 0), &out_edge, latch, &new_latch_edge);
+ remove_bb_from_loops (out_edge->src);
+ add_bb_to_loop (out_edge->src, loop);
+ if (latch == header)
+ {
+ latch = split_edge (new_latch_edge);
+ remove_bb_from_loops (latch);
+ add_bb_to_loop (latch, loop);
+#if 0 /* For debugging, insert a marker insn. */
+ emit_insn_after (gen_trap_s (GEN_INT (42)), BB_END (latch));
+#endif
+ }
+ }
+ new_loop = alloc_loop ();
+ new_loop->header = loop->header;
+ new_loop->latch = loop->latch;
+ loop->header = header;
+ loop->latch = latch;
+ add_loop (new_loop, loop);
+ loop = new_loop;
+ }
cleanup:
free (body);
- return result;
+ return result ? loop : 0;
}
/* Adds test of COND jumping to DEST on edge *E and set *E to the new fallthru
edge. If the condition is always false, do not do anything. If it is always
true, redirect E to DEST and return false. In all other cases, true is
- returned. */
+ returned.
+ If EDGEP is non-null, assign the any newly created edge to it. */
static bool
-add_test (rtx cond, edge *e, basic_block dest)
+add_test (rtx cond, edge *e, basic_block dest, edge *edgep)
{
rtx seq, jump, label;
enum machine_mode mode;
rtx op0 = XEXP (cond, 0), op1 = XEXP (cond, 1);
enum rtx_code code = GET_CODE (cond);
basic_block bb;
+ edge new_edge;
mode = GET_MODE (XEXP (cond, 0));
if (mode == VOIDmode)
@@ -325,7 +456,9 @@ add_test (rtx cond, edge *e, basic_block dest)
LABEL_NUSES (label)++;
- make_edge (bb, dest, (*e)->flags & ~EDGE_FALLTHRU);
+ new_edge = make_edge (bb, dest, (*e)->flags & ~EDGE_FALLTHRU);
+ if (edgep)
+ *edgep = new_edge;
return true;
}
@@ -448,7 +581,7 @@ doloop_modify (struct loop *loop, struct niter_desc *desc,
te = single_succ_edge (preheader);
for (; ass; ass = XEXP (ass, 1))
- if (!add_test (XEXP (ass, 0), &te, set_zero))
+ if (!add_test (XEXP (ass, 0), &te, set_zero, NULL))
break;
if (ass)
@@ -497,7 +630,8 @@ doloop_modify (struct loop *loop, struct niter_desc *desc,
init = gen_doloop_begin (counter_reg,
desc->const_iter ? desc->niter_expr : const0_rtx,
GEN_INT (desc->niter_max),
- GEN_INT (level));
+ GEN_INT (level),
+ doloop_seq);
if (init)
{
start_sequence ();
@@ -555,6 +689,7 @@ doloop_optimize (struct loop *loop)
unsigned word_mode_size;
unsigned HOST_WIDE_INT word_mode_max;
bool zero_extend_p = false;
+ int entered_at_top;
if (dump_file)
fprintf (dump_file, "Doloop: Processing loop %d.\n", loop->num);
@@ -565,7 +700,8 @@ doloop_optimize (struct loop *loop)
desc = get_simple_loop_desc (loop);
/* Check that loop is a candidate for a low-overhead looping insn. */
- if (!doloop_valid_p (loop, desc))
+ loop = validize_doloop (loop, desc);
+ if (!loop)
{
if (dump_file)
fprintf (dump_file,
@@ -613,8 +749,10 @@ doloop_optimize (struct loop *loop)
not like. */
start_label = block_label (desc->in_edge->dest);
doloop_reg = gen_reg_rtx (mode);
+ entered_at_top = loop_preheader_edge (loop)->dest == desc->in_edge->dest;
doloop_seq = gen_doloop_end (doloop_reg, iterations, iterations_max,
- GEN_INT (level), start_label);
+ GEN_INT (level), start_label,
+ GEN_INT (entered_at_top));
word_mode_size = GET_MODE_BITSIZE (word_mode);
word_mode_max
@@ -643,7 +781,8 @@ doloop_optimize (struct loop *loop)
}
PUT_MODE (doloop_reg, word_mode);
doloop_seq = gen_doloop_end (doloop_reg, iterations, iterations_max,
- GEN_INT (level), start_label);
+ GEN_INT (level), start_label,
+ GEN_INT (entered_at_top));
}
if (! doloop_seq)
{
@@ -700,3 +839,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 a1a91639dc4..c3db5052012 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 82e18297e20..12f87536025 100644
--- a/gcc/loop-invariant.c
+++ b/gcc/loop-invariant.c
@@ -54,6 +54,9 @@ along with GCC; see the file COPYING3. If not see
#include "hashtab.h"
#include "except.h"
#include "params.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
/* The data stored for the loop. */
@@ -1366,3 +1369,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 e02f1649c64..67fe8f5d97f 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. */
@@ -2859,3 +2862,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 ecd358388bf..bfc157bc32b 100644
--- a/gcc/loop-unroll.c
+++ b/gcc/loop-unroll.c
@@ -34,6 +34,7 @@ along with GCC; see the file COPYING3. If not see
#include "hashtab.h"
#include "recog.h"
#include "highlev-plugin-internal.h"
+#include "multi-target.h"
/* This pass performs loop unrolling and peeling. We only perform these
optimizations on innermost loops (with single exception) because
@@ -70,6 +71,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
@@ -2317,3 +2320,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 513fc643462..7340cd00d87 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 *);
@@ -464,3 +467,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 ea9c6a0d347..73d8258d9d0 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
@@ -1363,3 +1366,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 7d50b466397..904e0eeda00 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]
@@ -41,7 +42,7 @@ enum mode_class { MODE_CLASSES, MAX_MODE_CLASS };
(integer, floating, complex, etc.) */
extern const unsigned char mode_class[NUM_MACHINE_MODES];
-#define GET_MODE_CLASS(MODE) mode_class[MODE]
+#define GET_MODE_CLASS(MODE) ((enum mode_class) mode_class[MODE])
/* Nonzero if MODE is an integral mode. */
#define INTEGRAL_MODE_P(MODE) \
@@ -219,11 +220,12 @@ extern const unsigned char mode_nunits[NUM_MACHINE_MODES];
/* Get the next wider natural mode (eg, QI -> HI -> SI -> DI -> TI). */
extern const unsigned char mode_wider[NUM_MACHINE_MODES];
-#define GET_MODE_WIDER_MODE(MODE) mode_wider[MODE]
+#define GET_MODE_WIDER_MODE(MODE) ((enum machine_mode) mode_wider[MODE])
extern const unsigned char mode_2xwider[NUM_MACHINE_MODES];
-#define GET_MODE_2XWIDER_MODE(MODE) mode_2xwider[MODE]
+#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,13 +253,16 @@ 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)
+START_TARGET_SPECIFIC
/* For each class, get the narrowest mode in that class. */
extern const unsigned char class_narrowest_mode[MAX_MODE_CLASS];
-#define GET_CLASS_NARROWEST_MODE(CLASS) class_narrowest_mode[CLASS]
+#define GET_CLASS_NARROWEST_MODE(CLASS) \
+ ((enum machine_mode) class_narrowest_mode[CLASS])
/* Define the integer modes whose sizes are BITS_PER_UNIT and BITS_PER_WORD
and the mode whose class is Pmode and whose size is POINTER_SIZE. */
@@ -268,5 +273,6 @@ extern enum machine_mode ptr_mode;
/* Target-dependent machine mode initialization - in insn-modes.c. */
extern void init_adjust_machine_modes (void);
+END_TARGET_SPECIFIC
#endif /* not HAVE_MACHINE_MODES */
diff --git a/gcc/main.c b/gcc/main.c
index fc5a4db567f..6c772e701b4 100644
--- a/gcc/main.c
+++ b/gcc/main.c
@@ -32,5 +32,5 @@ int main (int argc, char **argv);
int
main (int argc, char **argv)
{
- return toplev_main (argc, (const char **) argv);
+ return toplev_main (argc, CONST_CAST (const char **, argv));
}
diff --git a/gcc/matrix-reorg.c b/gcc/matrix-reorg.c
index d916f70266c..8f4280b5b02 100644
--- a/gcc/matrix-reorg.c
+++ b/gcc/matrix-reorg.c
@@ -245,6 +245,13 @@ typedef struct access_site_info *access_site_info_p;
DEF_VEC_P (access_site_info_p);
DEF_VEC_ALLOC_P (access_site_info_p, heap);
+/* See 'free_stmts' in struct matrix_info. */
+struct free_info
+{
+ gimple stmt;
+ tree func;
+};
+
/* Information about matrix to flatten. */
struct matrix_info
{
@@ -277,11 +284,7 @@ struct matrix_info
tree allocation_function_decl;
/* The calls to free for each level of indirection. */
- struct free_info
- {
- gimple stmt;
- tree func;
- } *free_stmts;
+ struct free_info *free_stmts;
/* An array which holds for each dimension its size. where
dimension 0 is the outer most (one that contains all the others).
@@ -735,7 +738,8 @@ add_allocation_site (struct matrix_info *mi, gimple stmt, int level)
must be set accordingly. */
for (min_malloc_level = 0;
min_malloc_level < mi->max_malloced_level
- && mi->malloc_for_level[min_malloc_level]; min_malloc_level++);
+ && mi->malloc_for_level[min_malloc_level]; min_malloc_level++)
+ ;
if (level < min_malloc_level)
{
mi->allocation_function_decl = current_function_decl;
@@ -2419,7 +2423,7 @@ struct simple_ipa_opt_pass pass_ipa_matrix_reorg =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
PROP_trees, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/mcf.c b/gcc/mcf.c
index 9d3d7691910..899b5437968 100644
--- a/gcc/mcf.c
+++ b/gcc/mcf.c
@@ -388,8 +388,9 @@ add_edge (fixup_graph_type *fixup_graph, int src, int dest, gcov_type cost)
MAX_CAPACITY to the edge_list in the fixup graph. */
static void
-add_fixup_edge (fixup_graph_type *fixup_graph, int src, int dest, int type,
- gcov_type weight, gcov_type cost, gcov_type max_capacity)
+add_fixup_edge (fixup_graph_type *fixup_graph, int src, int dest,
+ edge_type type, gcov_type weight, gcov_type cost,
+ gcov_type max_capacity)
{
fixup_edge_p curr_edge = add_edge(fixup_graph, src, dest, cost);
curr_edge->type = type;
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-classes.def b/gcc/mode-classes.def
index 83017ec2533..4f472ada791 100644
--- a/gcc/mode-classes.def
+++ b/gcc/mode-classes.def
@@ -32,8 +32,10 @@ along with GCC; see the file COPYING3. If not see
DEF_MODE_CLASS (MODE_COMPLEX_INT), /* complex numbers */ \
DEF_MODE_CLASS (MODE_COMPLEX_FLOAT), \
DEF_MODE_CLASS (MODE_VECTOR_INT), /* SIMD vectors */ \
+ DEF_MODE_CLASS (MODE_VECTOR_PARTIAL_INT), \
DEF_MODE_CLASS (MODE_VECTOR_FRACT), /* SIMD vectors */ \
DEF_MODE_CLASS (MODE_VECTOR_UFRACT), /* SIMD vectors */ \
DEF_MODE_CLASS (MODE_VECTOR_ACCUM), /* SIMD vectors */ \
DEF_MODE_CLASS (MODE_VECTOR_UACCUM), /* SIMD vectors */ \
- DEF_MODE_CLASS (MODE_VECTOR_FLOAT)
+ DEF_MODE_CLASS (MODE_VECTOR_FLOAT), \
+ DEF_MODE_CLASS (MODE_VECTOR_CC)
diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c
index 5df61c890a2..12eb412a973 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 7134bfc0d00..069f8c9c7e2 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
@@ -2897,3 +2900,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..148e291249d
--- /dev/null
+++ b/gcc/multi-target.h
@@ -0,0 +1,35 @@
+#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. */
+#define TARGET_SCOPE TARGET_SCOPE_
+#else /* !EXTRA_TARGET */
+#define START_TARGET_SPECIFIC
+#define END_TARGET_SPECIFIC
+#define TARGET_SCOPE
+#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/objc/Make-lang.in b/gcc/objc/Make-lang.in
index 4f854ea78ae..4af67c2231e 100644
--- a/gcc/objc/Make-lang.in
+++ b/gcc/objc/Make-lang.in
@@ -52,7 +52,7 @@ OBJC_OBJS = objc/objc-lang.o objc/objc-act.o
objc_OBJS = $(OBJC_OBJS) cc1obj-checksum.o
cc1obj-dummy$(exeext): $(OBJC_OBJS) $(C_AND_OBJC_OBJS) dummy-checksum.o $(BACKEND) $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ \
$(OBJC_OBJS) $(C_AND_OBJC_OBJS) dummy-checksum.o \
$(BACKEND) $(LIBS) $(BACKENDLIBS)
@@ -62,7 +62,7 @@ cc1obj-checksum.c : cc1obj-dummy$(exeext) build/genchecksum$(build_exeext)
cc1obj-checksum.o : cc1obj-checksum.c
cc1obj$(exeext): $(OBJC_OBJS) $(C_AND_OBJC_OBJS) cc1obj-checksum.o $(BACKEND) $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
+ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ \
$(OBJC_OBJS) $(C_AND_OBJC_OBJS) cc1obj-checksum.o \
$(BACKEND) $(LIBS) $(BACKENDLIBS)
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index c23fb9ecba2..79c6f3b0e8d 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -9509,7 +9509,7 @@ objc_rewrite_function_call (tree function, tree params)
a function in OBJ_TYPE_REF_EXPR (presumably objc_msgSend or one
of its cousins). */
-enum gimplify_status
+int
objc_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
{
enum gimplify_status r0, r1;
diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h
index 13b32fe6d51..b8c34fe1ff4 100644
--- a/gcc/objc/objc-act.h
+++ b/gcc/objc/objc-act.h
@@ -31,7 +31,7 @@ bool objc_init (void);
const char *objc_printable_name (tree, int);
void objc_finish_file (void);
tree objc_fold_obj_type_ref (tree, tree);
-enum gimplify_status objc_gimplify_expr (tree *, gimple_seq *, gimple_seq *);
+int objc_gimplify_expr (tree *, gimple_seq *, gimple_seq *);
/* NB: The remaining public functions are prototyped in c-common.h, for the
benefit of stub-objc.c and objc-act.c. */
diff --git a/gcc/objcp/objcp-lang.c b/gcc/objcp/objcp-lang.c
index 75cc6f29bc9..925d2bbab45 100644
--- a/gcc/objcp/objcp-lang.c
+++ b/gcc/objcp/objcp-lang.c
@@ -58,7 +58,7 @@ const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
there should be very few (if any) routines below. */
tree
-objcp_tsubst_copy_and_build (tree t, tree args, tsubst_flags_t complain,
+objcp_tsubst_copy_and_build (tree t, tree args, int complain,
tree in_decl, bool function_p ATTRIBUTE_UNUSED)
{
#define RECURSE(NODE) \
diff --git a/gcc/omega.c b/gcc/omega.c
index 8f0470f6dfd..8a3d9c98874 100644
--- a/gcc/omega.c
+++ b/gcc/omega.c
@@ -1306,7 +1306,7 @@ verify_omega_pb (omega_pb pb)
enum omega_result result;
int e;
bool any_color = false;
- omega_pb tmp_problem = XNEW (struct omega_pb);
+ omega_pb tmp_problem = XNEW (struct omega_pb_d);
omega_copy_problem (tmp_problem, pb);
tmp_problem->safe_vars = 0;
@@ -2287,7 +2287,7 @@ omega_eliminate_redundant (omega_pb pb, bool expensive)
if (!expensive)
goto eliminate_redundant_done;
- tmp_problem = XNEW (struct omega_pb);
+ tmp_problem = XNEW (struct omega_pb_d);
conservative++;
for (e = pb->num_geqs - 1; e >= 0; e--)
@@ -2649,7 +2649,7 @@ omega_eliminate_red (omega_pb pb, bool eliminate_all)
return;
conservative++;
- tmp_problem = XNEW (struct omega_pb);
+ tmp_problem = XNEW (struct omega_pb_d);
for (e = pb->num_geqs - 1; e >= 0; e--)
if (pb->geqs[e].color == omega_red)
@@ -3049,7 +3049,8 @@ omega_do_elimination (omega_pb pb, int e, int i)
eqn->coef[j] *= a;
k = eqn->coef[i];
eqn->coef[i] = 0;
- eqn->color |= sub->color;
+ if (sub->color == omega_red)
+ eqn->color = omega_red;
for (j = n_vars; j >= 0; j--)
eqn->coef[j] -= sub->coef[j] * k / c;
}
@@ -3491,7 +3492,7 @@ parallel_splinter (omega_pb pb, int e, int diff,
omega_print_problem (dump_file, pb);
}
- tmp_problem = XNEW (struct omega_pb);
+ tmp_problem = XNEW (struct omega_pb_d);
omega_copy_eqn (&pb->eqs[0], &pb->geqs[e], pb->num_vars);
pb->num_eqs = 1;
@@ -5499,7 +5500,7 @@ omega_alloc_problem (int nvars, int nprot)
omega_initialize ();
/* Allocate and initialize PB. */
- pb = XCNEW (struct omega_pb);
+ pb = XCNEW (struct omega_pb_d);
pb->var = XCNEWVEC (int, OMEGA_MAX_VARS + 2);
pb->forwarding_address = XCNEWVEC (int, OMEGA_MAX_VARS + 2);
pb->geqs = omega_alloc_eqns (0, OMEGA_MAX_GEQS);
diff --git a/gcc/omega.h b/gcc/omega.h
index b97bfc50f21..ed39212d55f 100644
--- a/gcc/omega.h
+++ b/gcc/omega.h
@@ -5,7 +5,7 @@
This code has no license restrictions, and is considered public
domain.
- Changes copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+ Changes copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
Contributed by Sebastian Pop <sebastian.pop@inria.fr>
This file is part of GCC.
@@ -58,7 +58,7 @@ enum omega_eqn_color {
};
/* Structure for equations. */
-typedef struct eqn
+typedef struct eqn_d
{
int key;
int touched;
@@ -72,7 +72,7 @@ typedef struct eqn
int *coef;
} *eqn;
-typedef struct omega_pb
+typedef struct omega_pb_d
{
/* The number of variables in the system of equations. */
int num_vars;
@@ -215,7 +215,7 @@ static inline eqn
omega_alloc_eqns (int s, int n)
{
int i;
- eqn res = (eqn) (xcalloc (n, sizeof (struct eqn)));
+ eqn res = (eqn) (xcalloc (n, sizeof (struct eqn_d)));
for (i = n - 1; i >= 0; i--)
{
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 9843e5e7cdc..c2621606f4b 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -4550,7 +4550,9 @@ expand_omp_for (struct omp_region *region)
next_ix += BUILT_IN_GOMP_LOOP_ULL_STATIC_NEXT
- BUILT_IN_GOMP_LOOP_STATIC_NEXT;
}
- expand_omp_for_generic (region, &fd, start_ix, next_ix);
+ expand_omp_for_generic (region, &fd,
+ (enum built_in_function) start_ix,
+ (enum built_in_function) next_ix);
}
update_ssa (TODO_update_ssa_only_virtuals);
@@ -5457,7 +5459,7 @@ struct gimple_opt_pass pass_expand_omp =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
PROP_gimple_lomp, /* properties_provided */
0, /* properties_destroyed */
@@ -6622,7 +6624,7 @@ struct gimple_opt_pass pass_lower_omp =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
PROP_gimple_lomp, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/optabs.c b/gcc/optabs.c
index f7e44db48c2..c3b111d50ba 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
@@ -54,26 +57,26 @@ along with GCC; see the file COPYING3. If not see
See expr.h for documentation of these optabs. */
-#if GCC_VERSION >= 4000
-__extension__ struct optab optab_table[OTI_MAX]
+#if GCC_VERSION >= 4000 && HAVE_DESIGNATED_INITIALIZERS
+__extension__ struct optab_d optab_table[OTI_MAX]
= { [0 ... OTI_MAX - 1].handlers[0 ... NUM_MACHINE_MODES - 1].insn_code
= CODE_FOR_nothing };
#else
/* init_insn_codes will do runtime initialization otherwise. */
-struct optab optab_table[OTI_MAX];
+struct optab_d optab_table[OTI_MAX];
#endif
rtx libfunc_table[LTI_MAX];
/* Tables of patterns for converting one mode to another. */
-#if GCC_VERSION >= 4000
-__extension__ struct convert_optab convert_optab_table[COI_MAX]
+#if GCC_VERSION >= 4000 && HAVE_DESIGNATED_INITIALIZERS
+__extension__ struct convert_optab_d convert_optab_table[COI_MAX]
= { [0 ... COI_MAX - 1].handlers[0 ... NUM_MACHINE_MODES - 1]
[0 ... NUM_MACHINE_MODES - 1].insn_code
= CODE_FOR_nothing };
#else
/* init_convert_optab will do runtime initialization otherwise. */
-struct convert_optab convert_optab_table[COI_MAX];
+struct convert_optab_d convert_optab_table[COI_MAX];
#endif
/* Contains the optab used for each rtx code. */
@@ -334,13 +337,21 @@ widen_operand (rtx op, enum machine_mode mode, enum machine_mode oldmode,
return result;
}
+#ifndef EXTRA_TARGET
+EXTRA_TARGETS_DECL (optab optab_for_tree_code_1 (enum tree_code, const_tree,
+ enum optab_subtype));
+optab
+ (*optab_for_tree_code_array[]) (enum tree_code, const_tree, enum optab_subtype)
+ = { optab_for_tree_code_1,
+ EXTRA_TARGETS_EXPAND_COMMA (&, optab_for_tree_code_1) };
+#endif
/* Return the optab used for computing the operation given by the tree code,
CODE and the tree EXP. This function is not always usable (for example, it
cannot give complete results for multiplication or division) but probably
ought to be relied on more widely throughout the expander. */
optab
-optab_for_tree_code (enum tree_code code, const_tree type,
- enum optab_subtype subtype)
+optab_for_tree_code_1 (enum tree_code code, const_tree type,
+ enum optab_subtype subtype)
{
bool trapv;
switch (code)
@@ -556,10 +567,10 @@ expand_widen_pattern_expr (tree exp, rtx op0, rtx op1, rtx wide_op, rtx target,
int unsignedp)
{
tree oprnd0, oprnd1, oprnd2;
- enum machine_mode wmode = 0, tmode0, tmode1 = 0;
+ enum machine_mode wmode = VOIDmode, tmode0, tmode1 = VOIDmode;
optab widen_pattern_optab;
int icode;
- enum machine_mode xmode0, xmode1 = 0, wxmode = 0;
+ enum machine_mode xmode0, xmode1 = VOIDmode, wxmode = VOIDmode;
rtx temp;
rtx pat;
rtx xop0, xop1, wxop;
@@ -568,7 +579,7 @@ expand_widen_pattern_expr (tree exp, rtx op0, rtx op1, rtx wide_op, rtx target,
oprnd0 = TREE_OPERAND (exp, 0);
tmode0 = TYPE_MODE (TREE_TYPE (oprnd0));
widen_pattern_optab =
- optab_for_tree_code (TREE_CODE (exp), TREE_TYPE (oprnd0), optab_default);
+ optab_for_tree_code_1 (TREE_CODE (exp), TREE_TYPE (oprnd0), optab_default);
icode = (int) optab_handler (widen_pattern_optab, tmode0)->insn_code;
gcc_assert (icode != CODE_FOR_nothing);
xmode0 = insn_data[icode].operand[1].mode;
@@ -823,7 +834,7 @@ expand_vec_shift_expr (tree vec_shift_expr, rtx target)
gcc_unreachable ();
}
- icode = (int) optab_handler (shift_optab, mode)->insn_code;
+ icode = optab_handler (shift_optab, mode)->insn_code;
gcc_assert (icode != CODE_FOR_nothing);
mode1 = insn_data[icode].operand[1].mode;
@@ -2270,7 +2281,7 @@ sign_expand_binop (enum machine_mode mode, optab uoptab, optab soptab,
{
rtx temp;
optab direct_optab = unsignedp ? uoptab : soptab;
- struct optab wide_soptab;
+ struct optab_d wide_soptab;
/* Do it without widening, if possible. */
temp = expand_binop (mode, direct_optab, op0, op1, target,
@@ -4241,7 +4252,7 @@ emit_cmp_and_jump_insn_1 (rtx x, rtx y, enum machine_mode mode,
}
/* Handle some compares against zero. */
- icode = (int) optab_handler (tst_optab, wider_mode)->insn_code;
+ icode = optab_handler (tst_optab, wider_mode)->insn_code;
if (y == CONST0_RTX (mode) && icode != CODE_FOR_nothing)
{
x = prepare_operand (icode, x, 0, mode, wider_mode, unsignedp);
@@ -4253,7 +4264,7 @@ emit_cmp_and_jump_insn_1 (rtx x, rtx y, enum machine_mode mode,
/* Handle compares for which there is a directly suitable insn. */
- icode = (int) optab_handler (cmp_optab, wider_mode)->insn_code;
+ icode = optab_handler (cmp_optab, wider_mode)->insn_code;
if (icode != CODE_FOR_nothing)
{
x = prepare_operand (icode, x, 0, mode, wider_mode, unsignedp);
@@ -6169,7 +6180,7 @@ init_optabs (void)
vcondu_gen_code[i] = CODE_FOR_nothing;
}
-#if GCC_VERSION >= 4000
+#if GCC_VERSION >= 4000 && HAVE_DESIGNATED_INITIALIZERS
/* We statically initialize the insn_codes with CODE_FOR_nothing. */
if (reinit)
init_insn_codes ();
@@ -6676,7 +6687,7 @@ debug_optab_libfuncs (void)
rtx l;
o = &optab_table[i];
- l = optab_libfunc (o, j);
+ l = optab_libfunc (o, (enum machine_mode) j);
if (l)
{
gcc_assert (GET_CODE (l) == SYMBOL_REF);
@@ -6696,7 +6707,8 @@ debug_optab_libfuncs (void)
rtx l;
o = &convert_optab_table[i];
- l = convert_optab_libfunc (o, j, k);
+ l = convert_optab_libfunc (o, (enum machine_mode) j,
+ (enum machine_mode) k);
if (l)
{
gcc_assert (GET_CODE (l) == SYMBOL_REF);
@@ -7436,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 4d0ce5245ea..f5ce82fcf96 100644
--- a/gcc/optabs.h
+++ b/gcc/optabs.h
@@ -21,7 +21,9 @@ 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"
+#include "target.h"
/* Optabs are tables saying how to generate insn bodies
for various machine modes and numbers of operands.
@@ -44,29 +46,29 @@ struct optab_handlers
enum insn_code insn_code;
};
-struct optab
+struct optab_d
{
enum rtx_code code;
const char *libcall_basename;
char libcall_suffix;
- void (*libcall_gen)(struct optab *, const char *name, char suffix, enum machine_mode);
+ void (*libcall_gen)(struct optab_d *, const char *name, char suffix, enum machine_mode);
struct optab_handlers handlers[NUM_MACHINE_MODES];
};
-typedef struct optab * optab;
+typedef struct optab_d * optab;
/* A convert_optab is for some sort of conversion operation between
modes. The first array index is the destination mode, the second
is the source mode. */
-struct convert_optab
+struct convert_optab_d
{
enum rtx_code code;
const char *libcall_basename;
- void (*libcall_gen)(struct convert_optab *, const char *name,
+ void (*libcall_gen)(struct convert_optab_d *, const char *name,
enum machine_mode,
enum machine_mode);
struct optab_handlers handlers[NUM_MACHINE_MODES][NUM_MACHINE_MODES];
};
-typedef struct convert_optab *convert_optab;
+typedef struct convert_optab_d *convert_optab;
/* Given an enum insn_code, access the function to construct
the body of that kind of insn. */
@@ -372,7 +374,9 @@ enum optab_index
OTI_MAX
};
-extern struct optab optab_table[OTI_MAX];
+START_TARGET_SPECIFIC
+
+extern struct optab_d optab_table[OTI_MAX];
#define ssadd_optab (&optab_table[OTI_ssadd])
#define usadd_optab (&optab_table[OTI_usadd])
@@ -573,7 +577,7 @@ enum convert_optab_index
COI_MAX
};
-extern struct convert_optab convert_optab_table[COI_MAX];
+extern struct convert_optab_d convert_optab_table[COI_MAX];
#define sext_optab (&convert_optab_table[COI_sext])
#define zext_optab (&convert_optab_table[COI_zext])
@@ -728,6 +732,7 @@ extern bool maybe_emit_unop_insn (int, rtx, rtx, enum rtx_code);
extern void emit_cmp_insn (rtx, rtx, enum rtx_code, rtx, enum machine_mode,
int);
+END_TARGET_SPECIFIC
/* An extra flag to control optab_for_tree_code's behavior. This is needed to
distinguish between machines with a vector shift that takes a scalar for the
shift amount vs. machines that take a vector for the shift amount. */
@@ -737,11 +742,26 @@ enum optab_subtype
optab_scalar,
optab_vector
};
+START_TARGET_SPECIFIC
/* 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 */
-extern optab optab_for_tree_code (enum tree_code, const_tree, enum optab_subtype);
+extern optab optab_for_tree_code_1 (enum tree_code, const_tree,
+ enum optab_subtype);
+extern optab (*optab_for_tree_code_array[]) (enum tree_code, const_tree,
+ enum optab_subtype);
+static inline optab
+optab_for_tree_code (enum tree_code code, const_tree type,
+ enum optab_subtype subtype)
+{
+#if NUM_TARGETS > 1
+ return (*optab_for_tree_code_array[targetm.target_arch]) (code, type,
+ subtype);
+#else
+ return optab_for_tree_code_1 (code, type, subtype);
+#endif
+}
/* The various uses that a comparison can have; used by can_compare_p:
jumps, conditional moves, store flag operations. */
@@ -799,4 +819,6 @@ extern rtx optab_libfunc (optab optab, enum machine_mode mode);
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 3e644a571df..17427d657e6 100644
--- a/gcc/optc-gen.awk
+++ b/gcc/optc-gen.awk
@@ -75,10 +75,23 @@ 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 ""
have_save = 0;
+# After sorting, a VarExists can end up earlier than an Init. So look for
+# all variables with Init first, lest we get double definitions for GCC_DRIVER.
+for (i = 0; i < n_opts; i++) {
+ name = var_name(flags[i]);
+ if (name == "")
+ continue;
+ init = opt_args("Init", flags[i])
+ if (init == "")
+ continue;
+ var_seen[name] = 1;
+}
for (i = 0; i < n_opts; i++) {
if (flag_set_p("Save", flags[i]))
have_save = 1;
@@ -531,5 +544,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 b84d1f2c520..1c3886c55f4 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 90f34df1dec..78143608d98 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -42,6 +42,10 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "dbgcnt.h"
#include "debug.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;
@@ -771,12 +775,16 @@ 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_max_aliased_vops;
static int initial_avg_aliased_vops;
static int initial_min_crossjump_insns;
@@ -785,10 +793,14 @@ decode_options (unsigned int argc, const char **argv)
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)
{
@@ -843,9 +855,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. */
@@ -857,10 +870,13 @@ 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;
+#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;
@@ -876,18 +892,23 @@ 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_forward_propagate = 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;
@@ -896,6 +917,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_delete_null_pointer_checks = opt2;
@@ -904,7 +926,7 @@ decode_options (unsigned int argc, const char **argv)
flag_tree_vrp = opt2;
flag_tree_builtin_call_dce = opt2;
flag_tree_pre = opt2;
- flag_tree_switch_conversion = 1;
+ flag_tree_switch_conversion = opt2;
flag_ipa_cp = opt2;
/* Allow more virtual operators to increase alias precision. */
@@ -928,6 +950,7 @@ decode_options (unsigned int argc, const char **argv)
flag_gcse_after_reload = opt3;
flag_tree_vectorize = opt3;
flag_ipa_cp_clone = opt3;
+ flag_tree_pre_partial_partial = opt3;
if (flag_ipa_cp_clone)
flag_ipa_cp = 1;
@@ -937,6 +960,7 @@ decode_options (unsigned int argc, const char **argv)
set_param_value ("max-aliased-vops", 1000);
set_param_value ("avg-aliased-vops", (opt3) ? 3 : initial_avg_aliased_vops);
+#endif /* !EXTRA_TARGET */
/* Just -O1/-O0 optimizations. */
opt1_max = (optimize <= 1);
@@ -945,16 +969,20 @@ 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
being declared inline. */
flag_inline_functions = 1;
- /* Basic optimization options. */
- optimize_size = 1;
+ /* Basic optimization options at -Os are almost the same as -O2. The
+ only difference is that we disable PRE, because it sometimes still
+ increases code size. If the user want to run PRE with -Os, he/she
+ will have to indicate so explicitly. */
if (optimize > 2)
optimize = 2;
+ flag_tree_pre = 0;
/* We want to crossjump as much as possible. */
set_param_value ("min-crossjump-insns", 1);
@@ -962,7 +990,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;
@@ -970,18 +1000,23 @@ 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));
+#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);
@@ -1073,8 +1108,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,
@@ -1082,12 +1118,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)
{
@@ -1097,7 +1136,9 @@ decode_options (unsigned int argc, const char **argv)
PARAM_VALUE (PARAM_STACK_FRAME_GROWTH) = 40;
}
+#endif /* !EXTRA_TARGET */
}
+#ifndef EXTRA_TARGET
#define LEFT_COLUMN 27
@@ -2220,15 +2261,17 @@ set_debug_level (enum debug_info_type type, int extended, const char *arg)
if (*arg == '\0')
{
if (!debug_info_level)
- debug_info_level = 2;
+ debug_info_level = DINFO_LEVEL_NORMAL;
}
else
{
- debug_info_level = integral_argument (arg);
- if (debug_info_level == (unsigned int) -1)
+ int argval = integral_argument (arg);
+ if (argval == -1)
error ("unrecognised debug output level \"%s\"", arg);
- else if (debug_info_level > 3)
+ else if (argval > 3)
error ("debug output level %s is too high", arg);
+ else
+ debug_info_level = (enum debug_info_level) argval;
}
}
@@ -2314,7 +2357,7 @@ enable_warning_as_error (const char *arg, int value, unsigned int lang_mask)
}
else
{
- int kind = value ? DK_ERROR : DK_WARNING;
+ diagnostic_t kind = value ? DK_ERROR : DK_WARNING;
diagnostic_classify_diagnostic (global_dc, option_index, kind);
/* -Werror=foo implies -Wfoo. */
@@ -2325,3 +2368,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 79b628fd338..a3fef0de160 100644
--- a/gcc/output.h
+++ b/gcc/output.h
@@ -22,6 +22,12 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_OUTPUT_H
#define GCC_OUTPUT_H
+#include "multi-target.h"
+
+struct gcc_target;
+
+START_TARGET_SPECIFIC
+
/* Initialize data in final at the beginning of a compilation. */
extern void init_final (const char *);
@@ -108,6 +114,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. */
@@ -121,6 +128,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);
@@ -324,11 +332,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;
@@ -390,12 +400,19 @@ extern int compute_reloc_for_constant (tree);
/* User label prefix in effect for this compilation. */
extern const char *user_label_prefix;
+/* Output any directives needed for a change of target architecture,
+ and/or switch output files. */
+extern void default_target_new_arch (FILE *,
+ struct gcc_target *, struct gcc_target *);
+
/* Default target function prologue and epilogue assembler output. */
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 */
@@ -491,8 +508,13 @@ struct named_section GTY(()) {
section. The argument provides callback-specific data. */
typedef void (*unnamed_section_callback) (const void *);
-/* Information about a SECTION_UNNAMED section. */
-struct unnamed_section GTY(()) {
+/* Information about a SECTION_UNNAMED section.
+ WARNING: this struct is unsuitable for garbage collection, because
+ the DATA member can point to malloced memory, which will change between
+ a pch-generating and a pch-using compilation, and the callback member
+ points to a function, which can change between a pch-generating and a
+ pch-using compilation when address space randomization is in effect. */
+struct unnamed_section GTY((skip)) {
struct section_common common;
/* The callback used to switch to the section, and the data that
@@ -530,8 +552,8 @@ union section GTY ((desc ("SECTION_STYLE (&(%h))")))
{
struct section_common GTY ((skip)) common;
struct named_section GTY ((tag ("SECTION_NAMED"))) named;
- struct unnamed_section GTY ((tag ("SECTION_UNNAMED"))) unnamed;
- struct noswitch_section GTY ((tag ("SECTION_NOSWITCH"))) noswitch;
+ struct unnamed_section GTY ((tag ("SECTION_UNNAMED"),skip)) unnamed;
+ struct noswitch_section GTY ((tag ("SECTION_NOSWITCH"),skip)) noswitch;
};
/* Return the style of section SECT. */
@@ -539,23 +561,26 @@ union section GTY ((desc ("SECTION_STYLE (&(%h))")))
struct object_block;
+START_TARGET_SPECIFIC
+
/* Special well-known sections. */
-extern GTY(()) section *text_section;
-extern GTY(()) section *data_section;
-extern GTY(()) section *readonly_data_section;
-extern GTY(()) section *sdata_section;
-extern GTY(()) section *ctors_section;
-extern GTY(()) section *dtors_section;
-extern GTY(()) section *bss_section;
-extern GTY(()) section *sbss_section;
+/* Don't GTY the unnamed / noswitch sections, see PR31634. */
+extern /* unnamed */ section *text_section;
+extern /* unnamed */ section *data_section;
+extern /* unnamed */ section *readonly_data_section;
+extern /* unnamed */ section *sdata_section;
+extern /* unnamed */ section *ctors_section;
+extern /* unnamed */ section *dtors_section;
+extern /* unnamed */ section *bss_section;
+extern /* unnamed */ section *sbss_section;
extern GTY(()) section *exception_section;
extern GTY(()) section *eh_frame_section;
-extern GTY(()) section *tls_comm_section;
-extern GTY(()) section *comm_section;
-extern GTY(()) section *lcomm_section;
-extern GTY(()) section *bss_noswitch_section;
+extern /* noswitch */ section *tls_comm_section;
+extern /* noswitch */ section *comm_section;
+extern /* noswitch */ section *lcomm_section;
+extern /* noswitch */ section *bss_noswitch_section;
-extern GTY(()) section *in_section;
+extern /* unknown */ section *in_section;
extern GTY(()) bool in_cold_section_p;
extern section *get_unnamed_section (unsigned int, void (*) (const void *),
@@ -606,6 +631,8 @@ extern section *default_select_rtx_section (enum machine_mode, rtx,
extern section *default_elf_select_rtx_section (enum machine_mode, rtx,
unsigned HOST_WIDE_INT);
extern void default_encode_section_info (tree, rtx, int);
+extern void pickle_in_section (void);
+extern void unpickle_in_section (void);
extern const char *default_strip_name_encoding (const char *);
extern void default_asm_output_anchor (rtx);
extern bool default_use_anchors_for_symbol_p (const_rtx);
@@ -644,6 +671,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/params.def b/gcc/params.def
index 3f7b2e77ed6..97cc973b8eb 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -282,6 +282,15 @@ DEFPARAM(PARAM_MAX_COMPLETELY_PEELED_INSNS,
"max-completely-peeled-insns",
"The maximum number of insns of a completely peeled loop",
400, 0, 0)
+/* Completely peeling a loop in couter-productive if that leads to
+ increased icache misses. Therefore, we want there to be an outer
+ loop of a size that fits into the icache which rolls sufficiently
+ to amortize the icache misses when the peeled loop is fetched. */
+/* The maximum number of insns in the outer loop of a peeled loop. */
+DEFPARAM(PARAM_MAX_COMPLETELY_PEELED_OUTER_INSNS,
+ "max-completely-peeled-outer-insns",
+ "The maximum number of insns of the outer loopp of a completely peeled loop",
+ 4000, 0, 0)
/* The maximum number of peelings of a single loop that is peeled completely. */
DEFPARAM(PARAM_MAX_COMPLETELY_PEEL_TIMES,
"max-completely-peel-times",
diff --git a/gcc/passes.c b/gcc/passes.c
index c945b6491e1..c5615b829d2 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -84,6 +84,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-dump.h"
#include "df.h"
#include "predict.h"
+#include "multi-target.h"
#if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
#include "dwarf2out.h"
@@ -105,6 +106,7 @@ along with GCC; see the file COPYING3. If not see
#include "highlev-plugin-internal.h"
#include "pass-manager.h"
+#ifndef EXTRA_TARGET
/* This is used for debugging. It allows the current pass to printed
from anywhere in compilation. */
struct opt_pass *current_pass;
@@ -254,7 +256,7 @@ rest_of_type_compilation (tree type, int toplev)
void
finish_optimization_passes (void)
{
- enum tree_dump_index i;
+ int i;
struct dump_file_info *dfi;
char *name;
@@ -290,7 +292,9 @@ finish_optimization_passes (void)
timevar_pop (TV_DUMP);
}
+#endif /* !EXTRA_TARGET */
+START_TARGET_SPECIFIC
static bool
gate_rest_of_compilation (void)
{
@@ -334,7 +338,7 @@ struct rtl_opt_pass pass_postreload =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_rtl, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -515,6 +519,8 @@ next_pass_1 (struct opt_pass **list, struct opt_pass *pass)
tree_rest_of_compilation (DECL (N)) -> all_passes
*/
+EXTRA_TARGETS_DECL (void init_optimization_passes (void))
+
void
init_optimization_passes (void)
{
@@ -522,6 +528,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
@@ -730,6 +737,10 @@ init_optimization_passes (void)
NEXT_PASS (pass_mudflap_2);
NEXT_PASS (pass_free_cfg_annotations);
+ 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);
{
@@ -835,6 +846,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);
all_lowering_passes->todo_flags_start |= TODO_set_props;
@@ -844,8 +856,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. */
@@ -1164,14 +1178,14 @@ update_properties_after_pass (void *data)
static void
add_ipa_transform_pass (void *data)
{
- struct ipa_opt_pass *ipa_pass = (struct ipa_opt_pass *) data;
+ struct ipa_opt_pass_d *ipa_pass = (struct ipa_opt_pass_d *) data;
VEC_safe_push (ipa_opt_pass, heap, cfun->ipa_transforms_to_apply, ipa_pass);
}
/* Execute summary generation for all of the passes in IPA_PASS. */
static void
-execute_ipa_summary_passes (struct ipa_opt_pass *ipa_pass)
+execute_ipa_summary_passes (struct ipa_opt_pass_d *ipa_pass)
{
while (ipa_pass)
{
@@ -1185,7 +1199,7 @@ execute_ipa_summary_passes (struct ipa_opt_pass *ipa_pass)
ipa_pass->generate_summary ();
pass_fini_dump_file (pass);
}
- ipa_pass = (struct ipa_opt_pass *)ipa_pass->pass.next;
+ ipa_pass = (struct ipa_opt_pass_d *)ipa_pass->pass.next;
}
}
@@ -1193,7 +1207,7 @@ execute_ipa_summary_passes (struct ipa_opt_pass *ipa_pass)
static void
execute_one_ipa_transform_pass (struct cgraph_node *node,
- struct ipa_opt_pass *ipa_pass)
+ struct ipa_opt_pass_d *ipa_pass)
{
struct opt_pass *pass = &ipa_pass->pass;
unsigned int todo_after = 0;
@@ -1211,16 +1225,14 @@ execute_one_ipa_transform_pass (struct cgraph_node *node,
/* Run pre-pass verification. */
execute_todo (ipa_pass->function_transform_todo_flags_start);
- /* If a timevar is present, start it. */
- if (pass->tv_id)
- timevar_push (pass->tv_id);
+ /* Start the timevar. */
+ timevar_push (pass->tv_id);
/* Do it! */
todo_after = ipa_pass->function_transform (node);
/* Stop timevar. */
- if (pass->tv_id)
- timevar_pop (pass->tv_id);
+ timevar_pop (pass->tv_id);
/* Run post-pass cleanup and verification. */
execute_todo (todo_after);
@@ -1302,9 +1314,8 @@ execute_one_pass (struct opt_pass *pass)
initializing_dump = pass_init_dump_file (pass);
- /* If a timevar is present, start it. */
- if (pass->tv_id)
- timevar_push (pass->tv_id);
+ /* Start the timevar. */
+ timevar_push (pass->tv_id);
/* Do it! */
if (pass->execute)
@@ -1314,8 +1325,7 @@ execute_one_pass (struct opt_pass *pass)
}
/* Stop timevar. */
- if (pass->tv_id)
- timevar_pop (pass->tv_id);
+ timevar_pop (pass->tv_id);
do_per_function (update_properties_after_pass, pass);
@@ -1358,6 +1368,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;
@@ -1382,7 +1399,7 @@ execute_ipa_pass_list (struct opt_pass *pass)
{
if (!quiet_flag && !cfun)
fprintf (stderr, " <summary generate>");
- execute_ipa_summary_passes ((struct ipa_opt_pass *) pass);
+ execute_ipa_summary_passes ((struct ipa_opt_pass_d *) pass);
}
summaries_generated = true;
}
@@ -1405,3 +1422,6 @@ execute_ipa_pass_list (struct opt_pass *pass)
}
#include "gt-passes.h"
+
+#endif /* !EXTRA_TARGET */
+END_TARGET_SPECIFIC
diff --git a/gcc/postreload-gcse.c b/gcc/postreload-gcse.c
index 57be7a5c39c..443816f5bce 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
{
@@ -1128,7 +1129,8 @@ eliminate_partially_redundant_load (basic_block bb, rtx insn,
discover additional redundancies, so mark it for later deletion. */
for (a_occr = get_bb_avail_insn (bb, expr->avail_occr);
a_occr && (a_occr->insn != insn);
- a_occr = get_bb_avail_insn (bb, a_occr->next));
+ a_occr = get_bb_avail_insn (bb, a_occr->next))
+ ;
if (!a_occr)
{
@@ -1338,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 8abc90f83d9..98205a16f91 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);
@@ -569,7 +572,8 @@ reload_cse_simplify_operands (rtx insn, rtx testreg)
alternative yet and the operand being replaced is not
a cheap CONST_INT. */
if (op_alt_regno[i][j] == -1
- && reg_fits_class_p (testreg, rclass, 0, mode)
+ && reg_fits_class_p (testreg, (enum reg_class) rclass,
+ 0, mode)
&& (GET_CODE (recog_data.operand[i]) != CONST_INT
|| (rtx_cost (recog_data.operand[i], SET,
optimize_bb_for_speed_p (BLOCK_FOR_INSN (insn)))
@@ -906,6 +910,42 @@ reload_combine (void)
}
}
}
+ /* Look for (set (REGX) (CONST A))
+ ... (MEM (PLUS (REGX) (const_int)))...
+ and convert it to
+ ... (MEM (CONST B))... . */
+ if (set != NULL_RTX
+ && REG_P (SET_DEST (set))
+ && (hard_regno_nregs[REGNO (SET_DEST (set))]
+ [GET_MODE (SET_DEST (set))]
+ == 1)
+ && CONSTANT_P (SET_SRC (set))
+ && last_label_ruid < reg_state[REGNO (SET_DEST (set))].use_ruid
+ /* One use maximum - otherwise we'd de-cse. */
+ && (reg_state[REGNO (SET_DEST (set))].use_index
+ == RELOAD_COMBINE_MAX_USES - 1))
+ {
+ rtx reg = SET_DEST (set);
+ unsigned int regno = REGNO (reg);
+ rtx sum
+ = plus_constant (SET_SRC (set), INTVAL (reg_state[regno].offset));
+
+ if (GET_CODE (sum) == PLUS)
+ sum = gen_rtx_CONST (Pmode, sum);
+ i = RELOAD_COMBINE_MAX_USES - 1;
+ /* If we wanted to handle JUMP_INSNS, we'd have to fix up JUMP_LABEL.
+ (e.g. pr21728.c -Os). Doesn't seem worth the hassle. */
+ if (!JUMP_P (reg_state[regno].reg_use[i].insn)
+ && validate_change (reg_state[regno].reg_use[i].insn,
+ reg_state[regno].reg_use[i].usep, sum, 0))
+ {
+ /* Delete the reg set. */
+ delete_insn (insn);
+
+ reg_state[regno].use_index = RELOAD_COMBINE_MAX_USES;
+ continue;
+ }
+ }
note_stores (PATTERN (insn), reload_combine_note_store, NULL);
@@ -1611,3 +1651,4 @@ struct rtl_opt_pass pass_postreload_cse =
}
};
+END_TARGET_SPECIFIC
diff --git a/gcc/predict.c b/gcc/predict.c
index d2c70d9cf91..03308428055 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. */
@@ -726,7 +729,8 @@ combine_predictions_for_insn (rtx insn, basic_block bb)
int predictor = INTVAL (XEXP (XEXP (*pnote, 0), 0));
int probability = INTVAL (XEXP (XEXP (*pnote, 0), 1));
- dump_prediction (dump_file, predictor, probability, bb,
+ dump_prediction (dump_file, (enum br_predictor) predictor,
+ probability, bb,
!first_match || best_predictor == predictor);
*pnote = XEXP (*pnote, 1);
}
@@ -888,12 +892,13 @@ combine_predictions_for_bb (basic_block bb)
{
for (pred = (struct edge_prediction *) *preds; pred; pred = pred->ep_next)
{
- int predictor = pred->ep_predictor;
+ int predictor = (int) pred->ep_predictor;
int probability = pred->ep_probability;
if (pred->ep_edge != EDGE_SUCC (bb, 0))
probability = REG_BR_PROB_BASE - probability;
- dump_prediction (dump_file, predictor, probability, bb,
+ dump_prediction (dump_file, (enum br_predictor) predictor,
+ probability, bb,
!first_match || best_predictor == predictor);
}
}
@@ -2185,7 +2190,7 @@ build_predict_expr (enum br_predictor predictor, enum prediction taken)
{
tree t = build1 (PREDICT_EXPR, void_type_node,
build_int_cst (NULL, predictor));
- PREDICT_EXPR_OUTCOME (t) = taken;
+ SET_PREDICT_EXPR_OUTCOME (t, taken);
return t;
}
@@ -2232,3 +2237,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 e115bb511f8..c96450b81df 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 393ffe94e20..85ebe6be4c7 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. */
@@ -42,6 +43,8 @@ along with GCC; see the file COPYING3. If not see
#include "basic-block.h"
#endif
+START_TARGET_SPECIFIC
+
static FILE *outfile;
static int sawclose = 0;
@@ -769,3 +772,5 @@ print_simple_rtl (FILE *outf, const_rtx x)
print_rtl (outf, x);
flag_simple = 0;
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/profile.c b/gcc/profile.c
index c4c7276ffe0..05fd0ca3cdb 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -741,7 +741,7 @@ compute_branch_probabilities (void)
if (bb->index >= NUM_FIXED_BLOCKS
&& block_ends_with_condjump_p (bb)
&& EDGE_COUNT (bb->succs) >= 2)
- num_branches++, num_never_executed;
+ num_branches++;
}
}
counts_to_freqs ();
diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c
index 5c65e26b02d..c5123906bad 100644
--- a/gcc/read-rtl.c
+++ b/gcc/read-rtl.c
@@ -1593,7 +1593,7 @@ read_rtx_1 (FILE *infile, struct map_value **mode_maps)
/* Add expressions to a list, while keeping a count. */
obstack_init (&vector_stack);
- while ((c = read_skip_spaces (infile)) && c != ']')
+ while ((c = read_skip_spaces (infile)) && c != ']' && c != EOF)
{
ungetc (c, infile);
list_counter++;
diff --git a/gcc/real.c b/gcc/real.c
index 29fee8305e1..a40fcc0e4da 100644
--- a/gcc/real.c
+++ b/gcc/real.c
@@ -997,10 +997,10 @@ bool
real_arithmetic (REAL_VALUE_TYPE *r, int icode, const REAL_VALUE_TYPE *op0,
const REAL_VALUE_TYPE *op1)
{
- enum tree_code code = icode;
+ enum tree_code code = (enum tree_code) icode;
if (op0->decimal || (op1 && op1->decimal))
- return decimal_real_arithmetic (r, icode, op0, op1);
+ return decimal_real_arithmetic (r, (enum tree_code) icode, op0, op1);
switch (code)
{
@@ -1069,7 +1069,7 @@ bool
real_compare (int icode, const REAL_VALUE_TYPE *op0,
const REAL_VALUE_TYPE *op1)
{
- enum tree_code code = icode;
+ enum tree_code code = (enum tree_code) icode;
switch (code)
{
diff --git a/gcc/recog.c b/gcc/recog.c
index 70370e3ad81..44c60b5398e 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
@@ -3474,7 +3477,7 @@ struct rtl_opt_pass pass_split_all_insns =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -3504,7 +3507,7 @@ struct rtl_opt_pass pass_split_after_reload =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -3548,7 +3551,7 @@ struct rtl_opt_pass pass_split_before_regstack =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -3586,7 +3589,7 @@ struct rtl_opt_pass pass_split_before_sched2 =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -3618,7 +3621,7 @@ struct rtl_opt_pass pass_split_for_shorten_branches =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -3627,4 +3630,4 @@ struct rtl_opt_pass pass_split_for_shorten_branches =
}
};
-
+END_TARGET_SPECIFIC
diff --git a/gcc/recog.h b/gcc/recog.h
index f2b1f6e4404..1ebd25b9c47 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,
@@ -287,3 +291,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 d4da8d9e55f..5f02762e12f 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
@@ -3268,3 +3271,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 e579c281aa3..b730ce84f63 100644
--- a/gcc/reginfo.c
+++ b/gcc/reginfo.c
@@ -53,10 +53,15 @@ 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
+
+#ifndef EXTRA_TARGET
/* Maximum register number used in this function, plus one. */
int max_regno;
+#endif /* !EXTRA_TARGET */
/* Register tables used by many passes. */
@@ -228,6 +233,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
@@ -257,6 +263,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. */
@@ -277,7 +284,8 @@ init_move_cost (enum machine_mode m)
cost = 65535;
else
{
- cost = REGISTER_MOVE_COST (m, i, j);
+ cost = REGISTER_MOVE_COST (m, (enum reg_class) i,
+ (enum reg_class) j);
gcc_assert (cost < 65535);
}
all_match &= (last_move_cost[i][j] == cost);
@@ -316,23 +324,23 @@ init_move_cost (enum machine_mode m)
for (p2 = &reg_class_subclasses[j][0];
*p2 != LIM_REG_CLASSES; p2++)
- if (*p2 != i && contains_reg_of_mode[*p2][m])
+ if ((unsigned int) *p2 != i && contains_reg_of_mode[*p2][m])
cost = MAX (cost, move_cost[m][i][*p2]);
for (p1 = &reg_class_subclasses[i][0];
*p1 != LIM_REG_CLASSES; p1++)
- if (*p1 != j && contains_reg_of_mode[*p1][m])
+ if ((unsigned int) *p1 != j && contains_reg_of_mode[*p1][m])
cost = MAX (cost, move_cost[m][*p1][j]);
gcc_assert (cost <= 65535);
move_cost[m][i][j] = cost;
- if (reg_class_subset_p (i, j))
+ if (reg_class_subset_p ((enum reg_class) i, (enum reg_class) j))
may_move_in_cost[m][i][j] = 0;
else
may_move_in_cost[m][i][j] = cost;
- if (reg_class_subset_p (j, i))
+ if (reg_class_subset_p ((enum reg_class) j, (enum reg_class) i))
may_move_out_cost[m][i][j] = 0;
else
may_move_out_cost[m][i][j] = cost;
@@ -589,11 +597,13 @@ init_reg_sets_1 (void)
HARD_REG_SET ok_regs;
CLEAR_HARD_REG_SET (ok_regs);
for (j = 0; j < FIRST_PSEUDO_REGISTER; j++)
- if (!fixed_regs [j] && HARD_REGNO_MODE_OK (j, m))
+ if (!fixed_regs [j] && HARD_REGNO_MODE_OK (j, (enum machine_mode) m))
SET_HARD_REG_BIT (ok_regs, j);
for (i = 0; i < N_REG_CLASSES; i++)
- if ((unsigned) CLASS_MAX_NREGS (i, m) <= reg_class_size[i]
+ if (((unsigned) CLASS_MAX_NREGS ((enum reg_class) i,
+ (enum machine_mode) m)
+ <= reg_class_size[i])
&& hard_reg_set_intersect_p (ok_regs, reg_class_contents[i]))
{
contains_reg_of_mode [i][m] = 1;
@@ -678,7 +688,7 @@ init_fake_stack_mems (void)
int i;
for (i = 0; i < MAX_MACHINE_MODE; i++)
- top_of_stack[i] = gen_rtx_MEM (i, stack_pointer_rtx);
+ top_of_stack[i] = gen_rtx_MEM ((enum machine_mode) i, stack_pointer_rtx);
}
@@ -948,7 +958,7 @@ struct rtl_opt_pass pass_reginfo_init =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1319,9 +1329,8 @@ cannot_change_mode_set_regs (HARD_REG_SET *used, enum machine_mode from,
unsigned int regno)
{
struct subregs_of_mode_node dummy, *node;
- enum machine_mode to;
unsigned char mask;
- unsigned int i;
+ unsigned int to, i;
gcc_assert (subregs_of_mode);
dummy.block = regno & -8;
@@ -1331,11 +1340,11 @@ cannot_change_mode_set_regs (HARD_REG_SET *used, enum machine_mode from,
return;
mask = 1 << (regno & 7);
- for (to = VOIDmode; to < NUM_MACHINE_MODES; to++)
+ for (to = 0; to < NUM_MACHINE_MODES; to++)
if (node->modes[to] & mask)
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (!TEST_HARD_REG_BIT (*used, i)
- && REG_CANNOT_CHANGE_MODE_P (i, from, to))
+ && REG_CANNOT_CHANGE_MODE_P (i, from, (enum machine_mode) to))
SET_HARD_REG_BIT (*used, i);
}
@@ -1347,7 +1356,7 @@ invalid_mode_change_p (unsigned int regno,
enum machine_mode from)
{
struct subregs_of_mode_node dummy, *node;
- enum machine_mode to;
+ unsigned int to;
unsigned char mask;
gcc_assert (subregs_of_mode);
@@ -1360,7 +1369,7 @@ invalid_mode_change_p (unsigned int regno,
mask = 1 << (regno & 7);
for (to = VOIDmode; to < NUM_MACHINE_MODES; to++)
if (node->modes[to] & mask)
- if (CANNOT_CHANGE_MODE_CLASS (from, to, rclass))
+ if (CANNOT_CHANGE_MODE_CLASS (from, (enum machine_mode) to, rclass))
return true;
return false;
@@ -1407,7 +1416,7 @@ struct rtl_opt_pass pass_subregs_of_mode_init =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1426,7 +1435,7 @@ struct rtl_opt_pass pass_subregs_of_mode_finish =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1437,3 +1446,5 @@ struct rtl_opt_pass pass_subregs_of_mode_finish =
#include "gt-reginfo.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/regmove.c b/gcc/regmove.c
index 8ce0ea00da7..291ca5f75fe 100644
--- a/gcc/regmove.c
+++ b/gcc/regmove.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
static int perhaps_ends_bb_p (rtx);
static int optimize_reg_copy_1 (rtx, rtx, rtx);
@@ -51,21 +54,26 @@ static void optimize_reg_copy_2 (rtx, rtx, rtx);
static void optimize_reg_copy_3 (rtx, rtx, rtx);
static void copy_src_to_dest (rtx, rtx, rtx);
+enum match_use_kinds {
+ READ,
+ WRITE,
+ READWRITE
+};
+
struct match {
int with[MAX_RECOG_OPERANDS];
- enum { READ, WRITE, READWRITE } use[MAX_RECOG_OPERANDS];
+ enum match_use_kinds use[MAX_RECOG_OPERANDS];
int commutative[MAX_RECOG_OPERANDS];
int early_clobber[MAX_RECOG_OPERANDS];
};
static int find_matches (rtx, struct match *);
-static int regclass_compatible_p (int, int);
static int fixup_match_2 (rtx, rtx, rtx, rtx);
/* Return nonzero if registers with CLASS1 and CLASS2 can be merged without
causing too much register allocation problems. */
static int
-regclass_compatible_p (int class0, int class1)
+regclass_compatible_p (enum reg_class class0, enum reg_class class1)
{
return (class0 == class1
|| (reg_class_subset_p (class0, class1)
@@ -190,7 +198,7 @@ try_auto_increment (rtx insn, rtx inc_insn, rtx inc_insn_set, rtx reg,
changed. */
rtx note = find_reg_note (insn, REG_DEAD, reg);
if (note)
- PUT_MODE (note, REG_UNUSED);
+ PUT_REG_NOTE_KIND (note, REG_UNUSED);
add_reg_note (insn, REG_INC, reg);
@@ -1365,3 +1373,4 @@ struct rtl_opt_pass pass_regmove =
}
};
+END_TARGET_SPECIFIC
diff --git a/gcc/regrename.c b/gcc/regrename.c
index c678a093ca9..3d4f040a876 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -39,6 +39,9 @@
#include "timevar.h"
#include "tree-pass.h"
#include "df.h"
+#include "multi-target.h"
+
+START_TARGET_SPECIFIC
struct du_chain
{
@@ -2005,3 +2008,5 @@ struct rtl_opt_pass pass_cprop_hardreg =
TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/regs.h b/gcc/regs.h
index 00be997695f..04e57015363 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)]
@@ -100,7 +101,11 @@ REG_N_SETS (int regno)
/* Functions defined in reg-stat.c. */
extern void regstat_init_n_sets_and_refs (void);
extern void regstat_free_n_sets_and_refs (void);
+START_TARGET_SPECIFIC
+/* This one uses FIRST_PSEUDO_REGISTER, and hookifying that would at least
+ increase register pressure. */
extern void regstat_compute_ri (void);
+END_TARGET_SPECIFIC
extern void regstat_free_ri (void);
extern bitmap regstat_get_setjmp_crosses (void);
extern void regstat_compute_calls_crossed (void);
@@ -211,6 +216,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 +236,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 +269,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 +374,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 383201e4b57..6f46b5b7f6a 100644
--- a/gcc/regstat.c
+++ b/gcc/regstat.c
@@ -34,9 +34,13 @@ along with GCC; see the file COPYING3. If not see
#include "basic-block.h"
#include "timevar.h"
#include "df.h"
+#include "multi-target.h"
+/* Local to this file but global across targets. */
+extern bitmap setjmp_crosses;
+
+#ifndef EXTRA_TARGET
-struct regstat_n_sets_and_refs_t *regstat_n_sets_and_refs;
struct regstat_n_sets_and_refs_t *regstat_n_sets_and_refs;
/*----------------------------------------------------------------------------
@@ -91,12 +95,15 @@ regstat_free_n_sets_and_refs (void)
----------------------------------------------------------------------------*/
-static bitmap setjmp_crosses;
+bitmap setjmp_crosses;
+
struct reg_info_t *reg_info_p;
/* The number allocated elements of reg_info_p. */
size_t reg_info_p_size;
+#endif /* !EXTRA_TARGET */
+START_TARGET_SPECIFIC
/* Compute register info: lifetime, bb, and number of defs and uses
for basic block BB. The three bitvectors are scratch regs used
here. */
@@ -367,8 +374,9 @@ regstat_compute_ri (void)
BITMAP_FREE (local_processed);
timevar_pop (TV_REG_STATS);
}
+END_TARGET_SPECIFIC
-
+#ifndef EXTRA_TARGET
/* Free all storage associated with the problem. */
void
@@ -511,3 +519,4 @@ regstat_free_calls_crossed (void)
reg_info_p = NULL;
}
+#endif /* !EXTRA_TARGET */
diff --git a/gcc/reload.c b/gcc/reload.c
index a7e9309f63c..36c6396bf0c 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -112,6 +112,7 @@ a register with any other reload. */
#include "params.h"
#include "target.h"
#include "df.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) \
@@ -126,6 +127,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;
@@ -362,8 +365,10 @@ 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);
- icode = sri.icode;
+ 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. */
if (rclass == NO_REGS && icode == CODE_FOR_nothing)
@@ -524,8 +529,9 @@ 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);
- icode = sri.icode;
+ 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.
If an intermediate register is needed, we return its class. */
@@ -685,15 +691,16 @@ find_valid_class (enum machine_mode outer ATTRIBUTE_UNUSED,
if (bad || !good)
continue;
- cost = REGISTER_MOVE_COST (outer, rclass, dest_class);
+ cost = REGISTER_MOVE_COST (outer, (enum reg_class) rclass, dest_class);
if ((reg_class_size[rclass] > best_size
&& (best_cost < 0 || best_cost >= cost))
|| best_cost > cost)
{
- best_class = rclass;
+ best_class = (enum reg_class) rclass;
best_size = reg_class_size[rclass];
- best_cost = REGISTER_MOVE_COST (outer, rclass, dest_class);
+ best_cost = REGISTER_MOVE_COST (outer, (enum reg_class) rclass,
+ dest_class);
}
}
@@ -916,6 +923,8 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
enum insn_code secondary_in_icode = CODE_FOR_nothing;
enum insn_code secondary_out_icode = CODE_FOR_nothing;
+ if (in != 0 && !out && targetm.preserve_reload_p (in))
+ type = RELOAD_OTHER;
/* INMODE and/or OUTMODE could be VOIDmode if no mode
has been specified for the operand. In that case,
use the operand's mode as the mode to reload. */
@@ -1516,7 +1525,7 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
value for the incoming operand (same as outgoing one). */
if (rld[i].reg_rtx == out
&& (REG_P (in) || CONSTANT_P (in))
- && 0 != find_equiv_reg (in, this_insn, 0, REGNO (out),
+ && 0 != find_equiv_reg (in, this_insn, NO_REGS, REGNO (out),
static_reload_reg_p, i, inmode))
rld[i].in = out;
}
@@ -3186,7 +3195,8 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
recog_data.operand_loc[loc1],
recog_data.operand_loc[loc2],
operand_mode[i], operand_mode[m],
- this_alternative[m], -1,
+ (enum reg_class) this_alternative[m],
+ -1,
this_alternative_earlyclobber[m]);
if (value != 0)
@@ -3438,7 +3448,8 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
break;
winreg = 1;
if (REG_P (operand)
- && reg_fits_class_p (operand, this_alternative[i],
+ && reg_fits_class_p (operand,
+ (enum reg_class) this_alternative[i],
offset, GET_MODE (recog_data.operand[i])))
win = 1;
break;
@@ -3573,7 +3584,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
&& reg_class_size [(int) preferred_class[i]] > 0
&& ! SMALL_REGISTER_CLASS_P (preferred_class[i]))
{
- if (! reg_class_subset_p (this_alternative[i],
+ if (! reg_class_subset_p ((enum reg_class) this_alternative[i],
preferred_class[i]))
{
/* Since we don't have a way of forming the intersection,
@@ -3581,7 +3592,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
is a subset of the class we have; that's the most
common case anyway. */
if (reg_class_subset_p (preferred_class[i],
- this_alternative[i]))
+ (enum reg_class) this_alternative[i]))
this_alternative[i] = (int) preferred_class[i];
else
reject += (2 + 2 * pref_or_nothing[i]);
@@ -4564,7 +4575,8 @@ alternative_allows_const_pool_ref (rtx mem, const char *constraint, int altnum)
/* Skip alternatives before the one requested. */
while (altnum > 0)
{
- while (*constraint++ != ',');
+ while (*constraint++ != ',')
+ ;
altnum--;
}
/* Scan the requested alternative for TARGET_MEM_CONSTRAINT or 'o'.
@@ -4767,7 +4779,8 @@ make_memloc (rtx ad, int regno)
/* We must rerun eliminate_regs, in case the elimination
offsets have changed. */
rtx tem
- = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], 0, NULL_RTX), 0);
+ = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], VOIDmode, NULL_RTX),
+ 0);
/* If TEM might contain a pseudo, we must copy it to avoid
modifying it when we do the substitution for the reload. */
@@ -7368,3 +7381,5 @@ debug_reload (void)
{
debug_reload_to_stream (stderr);
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/reload.h b/gcc/reload.h
index 3789680f7ca..8d4471ad29e 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 fcf0bd3fc4d..a1ea1a7c2cc 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;
@@ -997,7 +1000,8 @@ reload (rtx first, int global)
for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
if (reg_renumber[i] < 0 && reg_equiv_memory_loc[i])
{
- rtx x = eliminate_regs (reg_equiv_memory_loc[i], 0, NULL_RTX);
+ rtx x = eliminate_regs (reg_equiv_memory_loc[i], VOIDmode,
+ NULL_RTX);
if (strict_memory_address_p (GET_MODE (regno_reg_rtx[i]),
XEXP (x, 0)))
@@ -2686,7 +2690,7 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
? eliminate_regs_1 (XEXP (x, 1), mem_mode, insn, true)
: NULL_RTX);
- x = gen_rtx_EXPR_LIST (REG_NOTE_KIND (x), new_rtx, XEXP (x, 1));
+ x = alloc_reg_note (REG_NOTE_KIND (x), new_rtx, XEXP (x, 1));
}
}
@@ -2809,7 +2813,7 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
case USE:
/* Handle insn_list USE that a call to a pure function may generate. */
- new_rtx = eliminate_regs_1 (XEXP (x, 0), 0, insn, false);
+ new_rtx = eliminate_regs_1 (XEXP (x, 0), VOIDmode, insn, false);
if (new_rtx != XEXP (x, 0))
return gen_rtx_USE (GET_MODE (x), new_rtx);
return x;
@@ -3050,8 +3054,8 @@ elimination_effects (rtx x, enum machine_mode mem_mode)
}
}
- elimination_effects (SET_DEST (x), 0);
- elimination_effects (SET_SRC (x), 0);
+ elimination_effects (SET_DEST (x), VOIDmode);
+ elimination_effects (SET_SRC (x), VOIDmode);
return;
case MEM:
@@ -3349,7 +3353,7 @@ eliminate_regs_in_insn (rtx insn, int replace)
}
/* Determine the effects of this insn on elimination offsets. */
- elimination_effects (old_body, 0);
+ elimination_effects (old_body, VOIDmode);
/* Eliminate all eliminable registers occurring in operands that
can be handled by reload. */
@@ -3390,7 +3394,7 @@ eliminate_regs_in_insn (rtx insn, int replace)
in_plus = true;
substed_operand[i]
- = eliminate_regs_1 (recog_data.operand[i], 0,
+ = eliminate_regs_1 (recog_data.operand[i], VOIDmode,
replace ? insn : NULL_RTX,
is_set_src || in_plus);
if (substed_operand[i] != orig_operand[i])
@@ -3520,7 +3524,7 @@ eliminate_regs_in_insn (rtx insn, int replace)
the pre-passes. */
if (val && REG_NOTES (insn) != 0)
REG_NOTES (insn)
- = eliminate_regs_1 (REG_NOTES (insn), 0, REG_NOTES (insn), true);
+ = eliminate_regs_1 (REG_NOTES (insn), VOIDmode, REG_NOTES (insn), true);
return val;
}
@@ -7088,16 +7092,22 @@ 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;
else if (new_class == NO_REGS)
{
if (reload_adjust_reg_for_icode (&second_reload_reg,
- third_reload_reg, sri.icode))
- icode = sri.icode, third_reload_reg = 0;
+ third_reload_reg,
+ (enum insn_code) sri.icode))
+ {
+ icode = (enum insn_code) sri.icode;
+ third_reload_reg = 0;
+ }
else
oldequiv = old, real_oldequiv = real_old;
}
@@ -7108,14 +7118,19 @@ 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,
third_reload_reg,
new_class, mode))
- third_reload_reg = 0, tertiary_icode = sri2.icode;
+ {
+ third_reload_reg = 0;
+ tertiary_icode = (enum insn_code) sri2.icode;
+ }
else
oldequiv = old, real_oldequiv = real_old;
}
@@ -7126,10 +7141,11 @@ emit_input_reload_insns (struct insn_chain *chain, struct reload *rl,
if (reload_adjust_reg_for_temp (&intermediate, NULL,
new_class, mode)
&& reload_adjust_reg_for_icode (&third_reload_reg, NULL,
- sri2.icode))
+ ((enum insn_code)
+ sri2.icode)))
{
second_reload_reg = intermediate;
- tertiary_icode = sri2.icode;
+ tertiary_icode = (enum insn_code) sri2.icode;
}
else
oldequiv = old, real_oldequiv = real_old;
@@ -7144,7 +7160,7 @@ emit_input_reload_insns (struct insn_chain *chain, struct reload *rl,
new_t_class, mode))
{
second_reload_reg = intermediate;
- tertiary_icode = sri2.icode;
+ tertiary_icode = (enum insn_code) sri2.icode;
}
else
oldequiv = old, real_oldequiv = real_old;
@@ -8423,7 +8439,7 @@ delete_output_reload (rtx insn, int j, int last_reload_reg, rtx new_reload_reg)
reg, 0);
if (substed)
n_occurrences += count_occurrences (PATTERN (insn),
- eliminate_regs (substed, 0,
+ eliminate_regs (substed, VOIDmode,
NULL_RTX), 0);
for (i1 = reg_equiv_alt_mem_list[REGNO (reg)]; i1; i1 = XEXP (i1, 1))
{
@@ -8949,3 +8965,5 @@ fixup_abnormal_edges (void)
verify_flow_info ();
#endif
}
+
+END_TARGET_SPECIFIC
diff --git a/gcc/reorg.c b/gcc/reorg.c
index 0bbe031f8c1..5714a06c4f8 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
@@ -174,7 +177,7 @@ static int max_uid;
static int stop_search_p (rtx, int);
static int resource_conflicts_p (struct resources *, struct resources *);
static int insn_references_resource_p (rtx, struct resources *, int);
-static int insn_sets_resource_p (rtx, struct resources *, int);
+static int insn_sets_resource_p (rtx, struct resources *, bool);
static rtx find_end_label (void);
static rtx emit_delay_sequence (rtx, rtx, int);
static rtx add_to_delay_list (rtx, rtx);
@@ -313,12 +316,14 @@ insn_references_resource_p (rtx insn, struct resources *res,
static int
insn_sets_resource_p (rtx insn, struct resources *res,
- int include_delayed_effects)
+ bool include_delayed_effects)
{
struct resources insn_sets;
CLEAR_RESOURCE (&insn_sets);
- mark_set_resources (insn, &insn_sets, 0, include_delayed_effects);
+ mark_set_resources (insn, &insn_sets, 0,
+ (include_delayed_effects
+ ? MARK_SRC_DEST_CALL : MARK_SRC_DEST));
return resource_conflicts_p (&insn_sets, res);
}
@@ -2494,21 +2499,25 @@ fill_simple_delay_slots (int non_jumps_p)
#endif
}
-/* Follow any unconditional jump at LABEL;
+/* Follow any unconditional jump at LABEL, for the purpose of refirecting JUMP;
return the ultimate label reached by any such chain of jumps.
Return null if the chain ultimately leads to a return instruction.
If LABEL is not followed by a jump, return LABEL.
If the chain loops or we can't find end, return LABEL,
- since that tells caller to avoid changing the insn. */
+ since that tells caller to avoid changing the insn.
+ If the returned label is obtained by following a REG_CROSSING_JUMP
+ jump, set *cp to (one of) the note(s), otherwise set it to NULL_RTX. */
static rtx
-follow_jumps (rtx label)
+follow_jumps (rtx label, rtx jump, rtx *cp)
{
rtx insn;
rtx next;
rtx value = label;
int depth;
+ rtx crossing = NULL_RTX;
+ *cp = 0;
for (depth = 0;
(depth < 10
&& (insn = next_active_insn (value)) != 0
@@ -2531,10 +2540,15 @@ follow_jumps (rtx label)
|| GET_CODE (PATTERN (tem)) == ADDR_DIFF_VEC))
break;
+ if (!targetm.can_follow_jump (jump, insn))
+ break;
+ if (!crossing)
+ crossing = find_reg_note (insn, REG_CROSSING_JUMP, NULL_RTX);
value = JUMP_LABEL (insn);
}
if (depth == 10)
return label;
+ *cp = crossing;
return value;
}
@@ -2974,6 +2988,7 @@ fill_slots_from_thread (rtx insn, rtx condition, rtx thread,
if (new_thread != thread)
{
rtx label;
+ rtx crossing = NULL_RTX;
gcc_assert (thread_if_true);
@@ -2983,7 +2998,7 @@ fill_slots_from_thread (rtx insn, rtx condition, rtx thread,
&& redirect_with_delay_list_safe_p (insn,
JUMP_LABEL (new_thread),
delay_list))
- new_thread = follow_jumps (JUMP_LABEL (new_thread));
+ new_thread = follow_jumps (JUMP_LABEL (new_thread), insn, &crossing);
if (new_thread == 0)
label = find_end_label ();
@@ -2993,7 +3008,11 @@ fill_slots_from_thread (rtx insn, rtx condition, rtx thread,
label = get_label_before (new_thread);
if (label)
- reorg_redirect_jump (insn, label);
+ {
+ reorg_redirect_jump (insn, label);
+ if (crossing)
+ set_unique_reg_note (insn, REG_CROSSING_JUMP, NULL_RTX);
+ }
}
return delay_list;
@@ -3327,6 +3346,7 @@ relax_delay_slots (rtx first)
for (insn = first; insn; insn = next)
{
rtx other;
+ rtx crossing;
next = next_active_insn (insn);
@@ -3337,7 +3357,9 @@ relax_delay_slots (rtx first)
&& (condjump_p (insn) || condjump_in_parallel_p (insn))
&& (target_label = JUMP_LABEL (insn)) != 0)
{
- target_label = skip_consecutive_labels (follow_jumps (target_label));
+ target_label
+ = skip_consecutive_labels (follow_jumps (target_label, insn,
+ &crossing));
if (target_label == 0)
target_label = find_end_label ();
@@ -3349,7 +3371,11 @@ relax_delay_slots (rtx first)
}
if (target_label && target_label != JUMP_LABEL (insn))
- reorg_redirect_jump (insn, target_label);
+ {
+ reorg_redirect_jump (insn, target_label);
+ if (crossing)
+ set_unique_reg_note (insn, REG_CROSSING_JUMP, NULL_RTX);
+ }
/* See if this jump conditionally branches around an unconditional
jump. If so, invert this jump and point it to the target of the
@@ -3486,7 +3512,11 @@ relax_delay_slots (rtx first)
{
/* If this jump goes to another unconditional jump, thread it, but
don't convert a jump into a RETURN here. */
- trial = skip_consecutive_labels (follow_jumps (target_label));
+ rtx crossing;
+
+ trial
+ = skip_consecutive_labels (follow_jumps (target_label, delay_insn,
+ &crossing));
if (trial == 0)
trial = find_end_label ();
@@ -3495,6 +3525,8 @@ relax_delay_slots (rtx first)
{
reorg_redirect_jump (delay_insn, trial);
target_label = trial;
+ if (crossing)
+ set_unique_reg_note (insn, REG_CROSSING_JUMP, NULL_RTX);
}
/* If the first insn at TARGET_LABEL is redundant with a previous
@@ -4117,3 +4149,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 2f9a71bc651..45d3605ac8c 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
@@ -530,26 +533,40 @@ find_dead_or_set_registers (rtx target, struct resources *res,
filled by instructions from the target. This is correct
if the branch is not taken. Since we are following both
paths from the branch, we must also compute correct info
- if the branch is taken. We do this by inverting all of
- the INSN_FROM_TARGET_P bits, calling mark_set_resources,
- and then inverting the INSN_FROM_TARGET_P bits again. */
+ if the branch is taken. We do this by inlining the loop
+ for processing the sequence, and inverting the sense of
+ the INSN_FROM_TARGET_P test for the target. */
if (GET_CODE (PATTERN (insn)) == SEQUENCE
&& INSN_ANNULLED_BRANCH_P (this_jump_insn))
{
- for (i = 1; i < XVECLEN (PATTERN (insn), 0); i++)
- INSN_FROM_TARGET_P (XVECEXP (PATTERN (insn), 0, i))
- = ! INSN_FROM_TARGET_P (XVECEXP (PATTERN (insn), 0, i));
+ rtx x = PATTERN (insn);
+ int i;
target_set = set;
- mark_set_resources (insn, &target_set, 0,
- MARK_SRC_DEST_CALL);
-
- for (i = 1; i < XVECLEN (PATTERN (insn), 0); i++)
- INSN_FROM_TARGET_P (XVECEXP (PATTERN (insn), 0, i))
- = ! INSN_FROM_TARGET_P (XVECEXP (PATTERN (insn), 0, i));
+ for (i = 0; i < XVECLEN (x, 0); i++)
+ if ((i == 0 || INSN_FROM_TARGET_P (XVECEXP (x, 0, i)))
+ && (GET_CODE (PATTERN (XVECEXP (x, 0, i)))
+ != COND_EXEC))
+ mark_set_resources (XVECEXP (x, 0, i), &target_set,
+ 0, MARK_SRC_DEST_CALL);
+ for (i = 0; i < XVECLEN (x, 0); i++)
+ if ((i == 0 || !INSN_FROM_TARGET_P (XVECEXP (x, 0, i)))
+ && (GET_CODE (PATTERN (XVECEXP (x, 0, i)))
+ != COND_EXEC))
+ mark_set_resources (XVECEXP (x, 0, i), &set,
+ 0, MARK_SRC_DEST_CALL);
+ }
+ else if (GET_CODE (PATTERN (insn)) == SEQUENCE)
+ {
+ rtx x = PATTERN (insn);
+ int i;
- mark_set_resources (insn, &set, 0, MARK_SRC_DEST_CALL);
+ for (i = 0; i < XVECLEN (x, 0); i++)
+ if (GET_CODE (PATTERN (XVECEXP (x, 0, i))) != COND_EXEC)
+ mark_set_resources (XVECEXP (x, 0, i), &set,
+ 0, MARK_SRC_DEST_CALL);
+ target_set = set;
}
else
{
@@ -591,7 +608,8 @@ find_dead_or_set_registers (rtx target, struct resources *res,
}
mark_referenced_resources (insn, &needed, 1);
- mark_set_resources (insn, &set, 0, MARK_SRC_DEST_CALL);
+ if (GET_CODE (PATTERN (insn)) != COND_EXEC)
+ mark_set_resources (insn, &set, 0, MARK_SRC_DEST_CALL);
COPY_HARD_REG_SET (scratch, set.regs);
AND_COMPL_HARD_REG_SET (scratch, needed.regs);
@@ -1262,3 +1280,5 @@ mark_end_of_function_resources (rtx trial, int 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 26cd294946b..6df72204567 100644
--- a/gcc/resource.h
+++ b/gcc/resource.h
@@ -22,6 +22,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) \
@@ -55,4 +58,6 @@ extern void mark_end_of_function_resources (rtx, int);
extern void init_resource_info (rtx);
extern void free_resource_info (void);
+END_TARGET_SPECIFIC
+
#endif /* GCC_RESOURCE_H */
diff --git a/gcc/rtl-factoring.c b/gcc/rtl-factoring.c
index 4c879691e9f..18e251bc2f8 100644
--- a/gcc/rtl-factoring.c
+++ b/gcc/rtl-factoring.c
@@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see
#include "output.h"
#include "df.h"
#include "addresses.h"
+#include "multi-target.h"
/* Sequence abstraction:
@@ -253,6 +254,8 @@ typedef struct hash_elem_def
} *p_hash_elem;
typedef const struct hash_elem_def *const_p_hash_elem;
+START_TARGET_SPECIFIC
+
/* The list of same sequence candidates. */
static htab_t hash_buckets;
@@ -352,6 +355,16 @@ compute_rtx_cost (rtx insn)
return cost != 0 ? cost : COSTS_N_INSNS (1);
}
+/* Like compute_rtx_cost, but is passed a raw insn with uninitialized
+ PREV and NEXT fields. We must zero them first lest context checks in
+ ADJUST_INSN_LENGTH segfault. */
+static int
+compute_dummy_rtx_cost (rtx insn)
+{
+ PREV_INSN (insn) = NULL_RTX;
+ NEXT_INSN (insn) = NULL_RTX;
+ return compute_rtx_cost (insn);
+}
/* Determines the number of common insns in the sequences ending in INSN1 and
INSN2. Returns with LEN number of common insns and COST cost of sequence.
*/
@@ -1379,13 +1392,14 @@ compute_init_costs (void)
rtx_return = gen_jump (label);
/* The cost of jump. */
- seq_jump_cost = compute_rtx_cost (make_jump_insn_raw (rtx_jump));
+ seq_jump_cost = compute_dummy_rtx_cost (make_jump_insn_raw (rtx_jump));
/* The cost of calling sequence. */
- seq_call_cost = seq_jump_cost + compute_rtx_cost (make_insn_raw (rtx_store));
+ seq_call_cost
+ = seq_jump_cost + compute_dummy_rtx_cost (make_insn_raw (rtx_store));
/* The cost of return. */
- seq_return_cost = compute_rtx_cost (make_jump_insn_raw (rtx_return));
+ seq_return_cost = compute_dummy_rtx_cost (make_jump_insn_raw (rtx_return));
/* Simple heuristic for minimal sequence cost. */
seq_call_cost = (int)(seq_call_cost * (double)SEQ_CALL_COST_MULTIPLIER);
@@ -1472,3 +1486,5 @@ struct rtl_opt_pass pass_rtl_seqabstr =
TODO_ggc_collect /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/rtl.c b/gcc/rtl.c
index c275091ad77..ac8297489b8 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). */
@@ -589,3 +592,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 e8d42c8cc61..97bb9183564 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. */
@@ -883,8 +884,8 @@ extern const char * const reg_note_name[];
/* Initialization status of the variable in the location. Status
can be unknown, uninitialized or initialized. See enumeration
type below. */
-#define NOTE_VAR_LOCATION_STATUS(INSN) (XCINT (XCEXP (INSN, 4, NOTE), \
- 2, VAR_LOCATION))
+#define NOTE_VAR_LOCATION_STATUS(INSN) \
+ ((enum var_init_status) (XCINT (XCEXP (INSN, 4, NOTE), 2, VAR_LOCATION)))
/* Possible initialization status of a variable. When requested
by the user, this information is tracked and recorded in the DWARF
@@ -1063,6 +1064,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
@@ -1092,6 +1094,7 @@ extern unsigned HOST_WIDE_INT nonzero_bits (const_rtx, enum machine_mode);
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);
+END_TARGET_SPECIFIC
/* 1 if RTX is a subreg containing a reg that is already known to be
@@ -1117,7 +1120,7 @@ do { \
} while (0)
#define SUBREG_PROMOTED_UNSIGNED_P(RTX) \
((RTL_FLAG_CHECK1("SUBREG_PROMOTED_UNSIGNED_P", (RTX), SUBREG)->volatil) \
- ? -1 : (RTX)->unchanging)
+ ? -1 : (int) (RTX)->unchanging)
/* Access various components of an ASM_OPERANDS rtx. */
@@ -1477,6 +1480,8 @@ extern int currently_expanding_to_rtl;
/* Generally useful functions. */
+START_TARGET_SPECIFIC
+
/* In expmed.c */
extern int ceil_log2 (unsigned HOST_WIDE_INT);
@@ -1565,7 +1570,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);
@@ -1662,7 +1666,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 */
@@ -1704,6 +1708,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. */
@@ -1721,6 +1727,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);
@@ -1750,6 +1757,7 @@ extern int refers_to_regno_p (unsigned int, unsigned int, const_rtx, rtx *);
extern int reg_overlap_mentioned_p (const_rtx, const_rtx);
extern const_rtx set_of (const_rtx, const_rtx);
extern void note_stores (const_rtx, void (*) (rtx, const_rtx, void *), void *);
+extern void walk_stores (rtx, void (*) (rtx, rtx, void *), void *);
extern void note_uses (rtx *, void (*) (rtx *, void *), void *);
extern int dead_or_set_p (const_rtx, const_rtx);
extern int dead_or_set_regno_p (const_rtx, unsigned int);
@@ -1760,6 +1768,7 @@ extern rtx find_constant_src (const_rtx);
extern int find_reg_fusage (const_rtx, enum rtx_code, const_rtx);
extern int find_regno_fusage (const_rtx, enum rtx_code, unsigned int);
extern void add_reg_note (rtx, enum reg_note, rtx);
+extern rtx alloc_reg_note (enum reg_note, rtx, rtx);
extern void remove_note (rtx, const_rtx);
extern void remove_reg_equal_equiv_notes (rtx);
extern int side_effects_p (const_rtx);
@@ -1805,6 +1814,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
/* lists.c */
@@ -1820,6 +1830,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. */
@@ -1842,6 +1853,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];
@@ -1850,10 +1862,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. */
@@ -1874,6 +1890,7 @@ extern GTY(()) rtx const_tiny_rtx[3][(int) MAX_MACHINE_MODE];
#define HARD_FRAME_POINTER_REGNUM FRAME_POINTER_REGNUM
#endif
+START_TARGET_SPECIFIC
/* Index labels for global_rtl. */
enum global_rtl_index
{
@@ -1927,6 +1944,7 @@ extern GTY(()) rtx pic_offset_table_rtx;
extern GTY(()) rtx static_chain_rtx;
extern GTY(()) rtx static_chain_incoming_rtx;
extern GTY(()) rtx return_address_pointer_rtx;
+END_TARGET_SPECIFIC
/* Include the RTL generation functions. */
@@ -1943,12 +1961,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))
@@ -2016,6 +2036,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);
@@ -2050,6 +2071,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
@@ -2057,6 +2079,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);
@@ -2124,7 +2147,6 @@ 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);
@@ -2132,7 +2154,9 @@ extern rtx unlink_insn_chain (rtx, rtx);
extern rtx delete_insn_and_edges (rtx);
extern void delete_insn_chain_and_edges (rtx, 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,
@@ -2197,6 +2221,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 *);
@@ -2305,6 +2330,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);
@@ -2344,16 +2370,19 @@ 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);
extern void set_curr_insn_source_location (location_t);
extern void set_curr_insn_block (tree);
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 b35d774859c..06da3ec18f0 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -38,6 +38,7 @@ along with GCC; see the file COPYING3. If not see
#include "function.h"
#include "df.h"
#include "tree.h"
+#include "multi-target.h"
/* Information about a subreg of a hard register. */
struct subreg_info
@@ -51,6 +52,8 @@ struct subreg_info
bool representable_p;
};
+START_TARGET_SPECIFIC
+
/* Forward declarations */
static void set_of_1 (rtx, const_rtx, void *);
static bool covers_regno_p (const_rtx, unsigned int);
@@ -1481,6 +1484,55 @@ note_stores (const_rtx x, void (*fun) (rtx, const_rtx, void *), void *data)
note_stores (XVECEXP (x, 0, i), fun, data);
}
+/* Call FUN on each register or MEM that is stored into or clobbered by X.
+ (X would be the pattern of an insn). DATA is an arbitrary pointer,
+ ignored by note_stores, but passed to FUN.
+ FUN may alter parts of the RTL.
+
+ FUN receives three arguments:
+ 1. the REG, MEM, CC0 or PC being stored in or clobbered,
+ 2. the SET or CLOBBER rtx that does the store,
+ 3. the pointer DATA provided to note_stores.
+
+ If the item being stored in or clobbered is a SUBREG of a hard register,
+ the SUBREG will be passed. */
+
+void
+walk_stores (rtx x, void (*fun) (rtx, rtx, void *), void *data)
+{
+ int i;
+
+ if (GET_CODE (x) == COND_EXEC)
+ x = COND_EXEC_CODE (x);
+
+ if (GET_CODE (x) == SET || GET_CODE (x) == CLOBBER)
+ {
+ rtx dest = SET_DEST (x);
+
+ while ((GET_CODE (dest) == SUBREG
+ && (!REG_P (SUBREG_REG (dest))
+ || REGNO (SUBREG_REG (dest)) >= FIRST_PSEUDO_REGISTER))
+ || GET_CODE (dest) == ZERO_EXTRACT
+ || GET_CODE (dest) == STRICT_LOW_PART)
+ dest = XEXP (dest, 0);
+
+ /* If we have a PARALLEL, SET_DEST is a list of EXPR_LIST expressions,
+ each of whose first operand is a register. */
+ if (GET_CODE (dest) == PARALLEL)
+ {
+ for (i = XVECLEN (dest, 0) - 1; i >= 0; i--)
+ if (XEXP (XVECEXP (dest, 0, i), 0) != 0)
+ (*fun) (XEXP (XVECEXP (dest, 0, i), 0), x, data);
+ }
+ else
+ (*fun) (dest, x, data);
+ }
+
+ else if (GET_CODE (x) == PARALLEL)
+ for (i = XVECLEN (x, 0) - 1; i >= 0; i--)
+ walk_stores (XVECEXP (x, 0, i), fun, data);
+}
+
/* Like notes_stores, but call FUN for each expression that is being
referenced in PBODY, a pointer to the PATTERN of an insn. We only call
FUN for each expression, not any interior subexpressions. FUN receives a
@@ -1880,10 +1932,11 @@ find_regno_fusage (const_rtx insn, enum rtx_code code, unsigned int regno)
}
-/* Add register note with kind KIND and datum DATUM to INSN. */
+/* Allocate a register note with kind KIND and datum DATUM. NEXT is
+ stored as the pointer to the next register note. */
-void
-add_reg_note (rtx insn, enum reg_note kind, rtx datum)
+rtx
+alloc_reg_note (enum reg_note kind, rtx datum, rtx list)
{
rtx note;
@@ -1893,19 +1946,24 @@ add_reg_note (rtx insn, enum reg_note kind, rtx datum)
case REG_CC_USER:
case REG_LABEL_TARGET:
case REG_LABEL_OPERAND:
- /* These types of register notes use an INSN_LIST rather than an
- EXPR_LIST, so that copying is done right and dumps look
- better. */
- note = alloc_INSN_LIST (datum, REG_NOTES (insn));
+ note = alloc_INSN_LIST (datum, list);
PUT_REG_NOTE_KIND (note, kind);
break;
default:
- note = alloc_EXPR_LIST (kind, datum, REG_NOTES (insn));
+ note = alloc_EXPR_LIST (kind, datum, list);
break;
}
- REG_NOTES (insn) = note;
+ return note;
+}
+
+/* Add register note with kind KIND and datum DATUM to INSN. */
+
+void
+add_reg_note (rtx insn, enum reg_note kind, rtx datum)
+{
+ REG_NOTES (insn) = alloc_reg_note (kind, datum, REG_NOTES (insn));
}
/* Remove register note NOTE from the REG_NOTES of INSN. */
@@ -5041,3 +5099,4 @@ constant_pool_constant_p (rtx x)
return GET_CODE (x) == CONST_DOUBLE;
}
+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 4cf757d829d..b1d459ea48e 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
@@ -166,3 +168,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 8175ac06fea..6389c3200a5 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see
#include "sched-int.h"
#include "params.h"
#include "cselib.h"
+#include "multi-target.h"
#ifdef INSN_SCHEDULING
@@ -50,6 +51,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;
@@ -3515,4 +3518,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 2773a36d1bd..c9362316a6e 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. */
@@ -703,3 +706,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 f7a54b67127..44a38ce5031 100644
--- a/gcc/sched-int.h
+++ b/gcc/sched-int.h
@@ -22,6 +22,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. */
@@ -61,6 +63,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 *,
@@ -76,6 +80,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
{
@@ -107,6 +113,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;
@@ -174,6 +182,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.
@@ -189,6 +199,8 @@ struct ready_list
int n_ready;
};
+START_TARGET_SPECIFIC
+
extern char *ready_try;
extern struct ready_list ready;
@@ -211,15 +223,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
{
@@ -238,6 +248,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;
@@ -246,12 +261,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;
@@ -425,6 +442,25 @@ enum reg_pending_barrier_mode
TRUE_BARRIER
};
+/* See 'reg_last' in struct deps. */
+struct deps_reg
+{
+ rtx uses;
+ rtx sets;
+ rtx clobbers;
+ int uses_length;
+ int clobbers_length;
+};
+
+/* Used to keep post-call pseudo/hard reg movements together with
+ the call. */
+enum post_call_value
+{
+ not_post_call,
+ post_call,
+ post_call_initial
+};
+
/* Describe state of dependencies used during sched_analyze phase. */
struct deps
{
@@ -488,7 +524,7 @@ struct deps
/* Used to keep post-call pseudo/hard reg movements together with
the call. */
- enum { not_post_call, post_call, post_call_initial } in_post_call_group_p;
+ enum post_call_value in_post_call_group_p;
/* The maximum register number for the following arrays. Before reload
this is max_reg_num; after reload it is FIRST_PSEUDO_REGISTER. */
@@ -498,14 +534,7 @@ struct deps
N within the current basic block; or zero, if there is no
such insn. Needed for new registers which may be introduced
by splitting insns. */
- struct deps_reg
- {
- rtx uses;
- rtx sets;
- rtx clobbers;
- int uses_length;
- int clobbers_length;
- } *reg_last;
+ struct deps_reg *reg_last;
/* Element N is set for each register that has any nonzero element
in reg_last[N].{uses,sets,clobbers}. */
@@ -616,6 +645,7 @@ struct spec_info_def
int flags;
};
typedef struct spec_info_def *spec_info_t;
+START_TARGET_SPECIFIC
extern spec_info_t spec_info;
@@ -1359,12 +1389,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 004064ecf42..e824b01e07e 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
@@ -3336,7 +3339,8 @@ rgn_add_block (basic_block bb, basic_block after)
/* Now POS is the index of the last block in the region. */
/* Find index of basic block AFTER. */
- for (; rgn_bb_table[pos] != after->index; pos--);
+ for (; rgn_bb_table[pos] != after->index; pos--)
+ ;
pos++;
gcc_assert (pos > ebb_head[i - 1]);
@@ -3383,12 +3387,14 @@ rgn_fix_recovery_cfg (int bbi, int check_bbi, int check_bb_nexti)
for (old_pos = ebb_head[BLOCK_TO_BB (check_bbi) + 1] - 1;
rgn_bb_table[old_pos] != check_bb_nexti;
- old_pos--);
+ old_pos--)
+ ;
gcc_assert (old_pos > ebb_head[BLOCK_TO_BB (check_bbi)]);
for (new_pos = ebb_head[BLOCK_TO_BB (bbi) + 1] - 1;
rgn_bb_table[new_pos] != bbi;
- new_pos--);
+ new_pos--)
+ ;
new_pos++;
gcc_assert (new_pos > ebb_head[BLOCK_TO_BB (bbi)]);
@@ -3519,3 +3525,4 @@ struct rtl_opt_pass pass_sched2 =
}
};
+END_TARGET_SPECIFIC
diff --git a/gcc/sched-vis.c b/gcc/sched-vis.c
index a3d5e8c8373..4c0e0dd1ce9 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 *);
@@ -785,3 +788,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 1b64a50f7ca..9b8f3f51051 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;
@@ -1695,8 +1698,38 @@ sdbout_init (const char *input_file_name ATTRIBUTE_UNUSED)
#else /* SDB_DEBUGGING_INFO */
/* This should never be used, but its address is needed for comparisons. */
-const struct gcc_debug_hooks sdb_debug_hooks;
+const struct gcc_debug_hooks sdb_debug_hooks =
+{
+ 0, /* init */
+ 0, /* finish */
+ 0, /* define */
+ 0, /* undef */
+ 0, /* start_source_file */
+ 0, /* end_source_file */
+ 0, /* begin_block */
+ 0, /* end_block */
+ 0, /* ignore_block */
+ 0, /* source_line */
+ 0, /* begin_prologue */
+ 0, /* end_prologue */
+ 0, /* end_epilogue */
+ 0, /* begin_function */
+ 0, /* end_function */
+ 0, /* function_decl */
+ 0, /* global_decl */
+ 0, /* type_decl */
+ 0, /* imported_module_or_decl */
+ 0, /* deferred_inline_function */
+ 0, /* outlining_inline_function */
+ 0, /* label */
+ 0, /* handle_pch */
+ 0, /* var_location */
+ 0, /* switch_text_section */
+ 0 /* start_end_main_source_file */
+};
#endif /* SDB_DEBUGGING_INFO */
#include "gt-sdbout.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/see.c b/gcc/see.c
index 27e70216f05..5964d2fcaf9 100644
--- a/gcc/see.c
+++ b/gcc/see.c
@@ -479,6 +479,7 @@ The implementation consists of four data structures:
#include "timevar.h"
#include "tree-pass.h"
#include "dce.h"
+#include "multi-target.h"
/* Used to classify defs and uses according to relevancy. */
enum entry_type {
@@ -611,6 +612,8 @@ struct see_mentioned_reg_data
bool mentioned;
};
+START_TARGET_SPECIFIC
+
/* An array of web_entries. The i'th definition in the df object is associated
with def_entry[i] */
static struct web_entry *def_entry = NULL;
@@ -3892,3 +3895,5 @@ struct rtl_opt_pass pass_see =
TODO_dump_func /* todo_flags_finish */
}
};
+
+END_TARGET_SPECIFIC
diff --git a/gcc/sel-sched-dump.c b/gcc/sel-sched-dump.c
index 5fce7cf6b9e..c30b8dd6d14 100644
--- a/gcc/sel-sched-dump.c
+++ b/gcc/sel-sched-dump.c
@@ -38,7 +38,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;
@@ -943,5 +945,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 70750f9cdcd..a96ad084288 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 6f16d751bee..6794f00994e 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;
@@ -1108,7 +1111,7 @@ hash_with_unspec_callback (const_rtx x, enum machine_mode mode ATTRIBUTE_UNUSED,
&& targetm.sched.skip_rtx_p (x))
{
*nx = XVECEXP (x, 0 ,0);
- *nmode = 0;
+ *nmode = VOIDmode;
return 1;
}
@@ -6048,4 +6051,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 4bf21b21263..4c80bfa3942 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. */
@@ -1616,12 +1619,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 a75ed04fe1d..da7b8555f55 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;
@@ -448,7 +451,7 @@ struct code_motion_path_driver_info_def *code_motion_path_driver_info;
/* Set of hooks for performing move_op and find_used_regs routines with
code_motion_path_driver. */
-struct code_motion_path_driver_info_def move_op_hooks, fur_hooks;
+extern struct code_motion_path_driver_info_def move_op_hooks, fur_hooks;
/* True if/when we want to emulate Haifa scheduler in the common code.
This is used in sched_rgn_local_init and in various places in
@@ -1169,7 +1172,7 @@ static void
init_hard_regs_data (void)
{
int cur_reg = 0;
- enum machine_mode cur_mode = 0;
+ int cur_mode = 0;
CLEAR_HARD_REG_SET (sel_hrd.regs_ever_used);
for (cur_reg = 0; cur_reg < FIRST_PSEUDO_REGISTER; cur_reg++)
@@ -7331,4 +7334,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 6fe480f5dc7..a067320b242 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);
@@ -5376,3 +5379,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 91c58f05672..6d809fb7f5e 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. */
@@ -101,7 +104,7 @@ struct rtl_opt_pass pass_stack_ptr_mod =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -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 96e63fa88f1..f1aabcfbf38 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -50,6 +50,7 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "regs.h"
#include "alloc-pool.h"
+#include "multi-target.h"
/* Functions and data structures for expanding case statements. */
@@ -93,6 +94,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. */
@@ -3174,3 +3177,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 581cb89d3c6..6af45482a05 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -37,6 +37,11 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "regs.h"
#include "params.h"
+#include "multi-target.h"
+
+extern enum machine_mode (*vector_type_mode_array[]) (const_tree);
+
+START_TARGET_SPECIFIC
/* Data type for the expressions representing sizes of data types.
It is the first integer type laid out. */
@@ -1909,6 +1914,9 @@ vector_type_mode (const_tree t)
{
enum machine_mode mode;
+ if (&targetm != &this_targetm)
+ return (*vector_type_mode_array[targetm.target_arch]) (t);
+
gcc_assert (TREE_CODE (t) == VECTOR_TYPE);
mode = t->type.mode;
@@ -1933,6 +1941,12 @@ vector_type_mode (const_tree t)
return mode;
}
+
+#ifndef EXTRA_TARGET
+EXTRA_TARGETS_DECL (enum machine_mode vector_type_mode (const_tree));
+enum machine_mode (*vector_type_mode_array[]) (const_tree)
+ = { &vector_type_mode, EXTRA_TARGETS_EXPAND_COMMA (&, vector_type_mode) };
+#endif /* !EXTRA_TARGET */
/* Create and return a type for signed integers of PRECISION bits. */
@@ -2319,3 +2333,5 @@ get_mode_bounds (enum machine_mode mode, int sign,
}
#include "gt-stor-layout.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/stringpool.c b/gcc/stringpool.c
index d8d66f2418f..219c4b5f9a1 100644
--- a/gcc/stringpool.c
+++ b/gcc/stringpool.c
@@ -47,7 +47,7 @@ const char digit_vector[] = {
struct ht *ident_hash;
-static hashnode alloc_node (hash_table *);
+static hashnode alloc_node (cpp_hash_table *);
static int mark_ident (struct cpp_reader *, hashnode, const void *);
static void *
@@ -68,7 +68,7 @@ init_stringpool (void)
/* Allocate a hash node. */
static hashnode
-alloc_node (hash_table *table ATTRIBUTE_UNUSED)
+alloc_node (cpp_hash_table *table ATTRIBUTE_UNUSED)
{
return GCC_IDENT_TO_HT_IDENT (make_node (IDENTIFIER_NODE));
}
diff --git a/gcc/system.h b/gcc/system.h
index 80bfe619c3d..3c091d80f5b 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -450,10 +450,15 @@ extern int vsnprintf(char *, size_t, const char *, va_list);
#endif
/* 1 if we have C99 designated initializers. */
+#ifdef __cplusplus
+#undef HAVE_DESIGNATED_INITIALIZERS
+#define HAVE_DESIGNATED_INITIALIZERS 0
+#else
#if !defined(HAVE_DESIGNATED_INITIALIZERS)
#define HAVE_DESIGNATED_INITIALIZERS \
((GCC_VERSION >= 2007) || (__STDC_VERSION__ >= 199901L))
#endif
+#endif
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
@@ -786,6 +791,9 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
change after the fact). Beyond these uses, most other cases of
using this macro should be viewed with extreme caution. */
+#ifdef __cplusplus
+#define CONST_CAST2(TOTYPE,FROMTYPE,X) (const_cast<TOTYPE> (X))
+#else
#if defined(__GNUC__) && GCC_VERSION > 4000
/* GCC 4.0.x has a bug where it may ICE on this expression,
so does GCC 3.4.x (PR17436). */
@@ -793,6 +801,7 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
#else
#define CONST_CAST2(TOTYPE,FROMTYPE,X) ((TOTYPE)(FROMTYPE)(X))
#endif
+#endif
#define CONST_CAST(TYPE,X) CONST_CAST2(TYPE, const TYPE, (X))
#define CONST_CAST_TREE(X) CONST_CAST(union tree_node *, (X))
#define CONST_CAST_RTX(X) CONST_CAST(struct rtx_def *, (X))
diff --git a/gcc/target-def.h b/gcc/target-def.h
index e19cde3f0a2..d5579c87865 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 "("
@@ -92,6 +94,7 @@
#define TARGET_ASM_ASSEMBLE_VISIBILITY default_assemble_visibility
#endif
+#define TARGET_ASM_NEW_ARCH default_target_new_arch
#define TARGET_ASM_FUNCTION_PROLOGUE default_function_pro_epilogue
#define TARGET_ASM_FUNCTION_EPILOGUE default_function_pro_epilogue
#define TARGET_ASM_FUNCTION_END_PROLOGUE no_asm_to_stream
@@ -269,6 +272,7 @@
TARGET_ASM_INTERNAL_LABEL, \
TARGET_ASM_TTYPE, \
TARGET_ASM_ASSEMBLE_VISIBILITY, \
+ TARGET_ASM_NEW_ARCH, \
TARGET_ASM_FUNCTION_PROLOGUE, \
TARGET_ASM_FUNCTION_END_PROLOGUE, \
TARGET_ASM_FUNCTION_BEGIN_EPILOGUE, \
@@ -372,6 +376,8 @@
TARGET_SCHED_SKIP_RTX_P, \
TARGET_SCHED_SMS_RES_MII}
+#define TARGET_VECTORIZE_VECTYPE_FOR_SCALAR_TYPE \
+ default_vectype_for_scalar_type
#define TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD 0
#define TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION \
default_builtin_vectorized_function
@@ -386,6 +392,7 @@
#define TARGET_VECTORIZE \
{ \
+ TARGET_VECTORIZE_VECTYPE_FOR_SCALAR_TYPE, \
TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD, \
TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION, \
TARGET_VECTORIZE_BUILTIN_CONVERSION, \
@@ -479,7 +486,8 @@
/* In hooks.c. */
#define TARGET_CANNOT_MODIFY_JUMPS_P hook_bool_void_false
-#define TARGET_BRANCH_TARGET_REGISTER_CLASS hook_int_void_no_regs
+#define TARGET_CAN_FOLLOW_JUMP hook_bool_const_rtx_const_rtx_true
+#define TARGET_BRANCH_TARGET_REGISTER_CLASS default_branch_target_register_class
#define TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED hook_bool_bool_false
#define TARGET_CANNOT_FORCE_CONST_MEM hook_bool_rtx_false
#define TARGET_CANNOT_COPY_INSN_P NULL
@@ -641,6 +649,10 @@
#define TARGET_SECONDARY_RELOAD default_secondary_reload
#endif
+#ifndef TARGET_PRESERVE_RELOAD_P
+#define TARGET_PRESERVE_RELOAD_P hook_bool_rtx_false
+#endif
+
#ifndef TARGET_EXPAND_TO_RTL_HOOK
#define TARGET_EXPAND_TO_RTL_HOOK hook_void_void
#endif
@@ -814,6 +826,10 @@
#define TARGET_OPTION_CAN_INLINE_P default_target_option_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, \
@@ -822,11 +838,15 @@
TARGET_OPTION_PRINT, \
TARGET_OPTION_PRAGMA_PARSE, \
TARGET_OPTION_CAN_INLINE_P, \
+ TARGET_OVERRIDE_OPTIONS, \
}
/* The whole shebang. */
#define TARGET_INITIALIZER \
{ \
+ TARGET_NAME, \
+ TARGET_NUM, \
+ &ptr_mode, \
TARGET_ASM_OUT, \
TARGET_SCHED, \
TARGET_VECTORIZE, \
@@ -858,6 +878,7 @@
TARGET_INIT_LIBFUNCS, \
TARGET_SECTION_TYPE_FLAGS, \
TARGET_CANNOT_MODIFY_JUMPS_P, \
+ TARGET_CAN_FOLLOW_JUMP, \
TARGET_BRANCH_TARGET_REGISTER_CLASS, \
TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED, \
TARGET_CANNOT_FORCE_CONST_MEM, \
@@ -915,6 +936,7 @@
TARGET_INVALID_BINARY_OP, \
TARGET_IRA_COVER_CLASSES, \
TARGET_SECONDARY_RELOAD, \
+ TARGET_PRESERVE_RELOAD_P, \
TARGET_EXPAND_TO_RTL_HOOK, \
TARGET_INSTANTIATE_DECLS, \
TARGET_HARD_REGNO_SCRATCH_OK, \
diff --git a/gcc/target.h b/gcc/target.h
index 4fb379465cf..50f3eb67a09 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
@@ -91,389 +92,627 @@ struct _dep;
/* This is defined in ddg.h . */
struct ddg;
+/* See 'aligned_op' in struct asm_out. */
+struct asm_int_op
+{
+ const char *hi;
+ const char *si;
+ const char *di;
+ const char *ti;
+};
+
+/* Functions that output assembler for the target. */
+struct asm_out
+{
+ /* Opening and closing parentheses for asm expression grouping. */
+ const char *open_paren, *close_paren;
+
+ /* Assembler instructions for creating various kinds of integer object. */
+ const char *byte_op;
+ struct asm_int_op aligned_op, unaligned_op;
+
+ /* Try to output the assembler code for an integer object whose
+ value is given by X. SIZE is the size of the object in bytes and
+ ALIGNED_P indicates whether it is aligned. Return true if
+ successful. Only handles cases for which BYTE_OP, ALIGNED_OP
+ and UNALIGNED_OP are NULL. */
+ bool (* integer) (rtx x, unsigned int size, int aligned_p);
+
+ /* Output code that will globalize a label. */
+ void (* globalize_label) (FILE *, const char *);
+
+ /* Output code that will globalize a declaration. */
+ void (* globalize_decl_name) (FILE *, tree);
+
+ /* Output code that will emit a label for unwind info, if this
+ target requires such labels. Second argument is the decl the
+ unwind info is associated with, third is a boolean: true if
+ this is for exception handling, fourth is a boolean: true if
+ this is only a placeholder for an omitted FDE. */
+ void (* unwind_label) (FILE *, tree, int, int);
+
+ /* Output code that will emit a label to divide up the exception
+ table. */
+ void (* except_table_label) (FILE *);
+
+ /* Emit any directives required to unwind this instruction. */
+ void (* unwind_emit) (FILE *, rtx);
+
+ /* Output an internal label. */
+ void (* internal_label) (FILE *, const char *, unsigned long);
+
+ /* Emit a ttype table reference to a typeinfo object. */
+ bool (* ttype) (rtx);
+
+ /* Emit an assembler directive to set visibility for the symbol
+ associated with the tree decl. */
+ void (* visibility) (tree, int);
+
+ /* Output assembler code when changing architectures. */
+ void (* new_arch) (FILE *, struct gcc_target *, struct gcc_target *);
+
+ /* Output the assembler code for entry to a function. */
+ void (* function_prologue) (FILE *, HOST_WIDE_INT);
+
+ /* Output the assembler code for end of prologue. */
+ void (* function_end_prologue) (FILE *);
+
+ /* Output the assembler code for start of epilogue. */
+ void (* function_begin_epilogue) (FILE *);
+
+ /* Output the assembler code for function exit. */
+ void (* function_epilogue) (FILE *, HOST_WIDE_INT);
+
+ /* Initialize target-specific sections. */
+ void (* init_sections) (void);
+
+ /* Tell assembler to change to section NAME with attributes FLAGS.
+ If DECL is non-NULL, it is the VAR_DECL or FUNCTION_DECL with
+ which this section is associated. */
+ void (* named_section) (const char *name, unsigned int flags, tree decl);
+
+ /* Return a mask describing how relocations should be treated when
+ selecting sections. Bit 1 should be set if global relocations
+ should be placed in a read-write section; bit 0 should be set if
+ local relocations should be placed in a read-write section. */
+ int (*reloc_rw_mask) (void);
+
+ /* Return a section for EXP. It may be a DECL or a constant. RELOC
+ is nonzero if runtime relocations must be applied; bit 1 will be
+ set if the runtime relocations require non-local name resolution.
+ ALIGN is the required alignment of the data. */
+ section *(* select_section) (tree, int, unsigned HOST_WIDE_INT);
+
+ /* Return a section for X. MODE is X's mode and ALIGN is its
+ alignment in bits. */
+ section *(* select_rtx_section) (enum machine_mode, rtx,
+ unsigned HOST_WIDE_INT);
+
+ /* Select a unique section name for DECL. RELOC is the same as
+ for SELECT_SECTION. */
+ void (* unique_section) (tree, int);
+
+ /* Return the readonly data section associated with function DECL. */
+ section *(* function_rodata_section) (tree);
+
+ /* Output a constructor for a symbol with a given priority. */
+ void (* constructor) (rtx, int);
+
+ /* Output a destructor for a symbol with a given priority. */
+ void (* destructor) (rtx, int);
+
+ /* Output the assembler code for a thunk function. THUNK_DECL is the
+ declaration for the thunk function itself, FUNCTION is the decl for
+ the target function. DELTA is an immediate constant offset to be
+ added to THIS. If VCALL_OFFSET is nonzero, the word at
+ *(*this + vcall_offset) should be added to THIS. */
+ void (* output_mi_thunk) (FILE *file, tree thunk_decl,
+ HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset,
+ tree function_decl);
+
+ /* Determine whether output_mi_thunk would succeed. */
+ /* ??? Ideally, this hook would not exist, and success or failure
+ would be returned from output_mi_thunk directly. But there's
+ too much undo-able setup involved in invoking output_mi_thunk.
+ Could be fixed by making output_mi_thunk emit rtl instead of
+ text to the output file. */
+ bool (* can_output_mi_thunk) (const_tree thunk_decl, HOST_WIDE_INT delta,
+ HOST_WIDE_INT vcall_offset,
+ const_tree function_decl);
+
+ /* Output any boilerplate text needed at the beginning of a
+ translation unit. */
+ void (*file_start) (void);
+
+ /* Output any boilerplate text needed at the end of a
+ translation unit. */
+ void (*file_end) (void);
+
+ /* Output an assembler pseudo-op to declare a library function name
+ external. */
+ void (*external_libcall) (rtx);
+
+ /* Output an assembler directive to mark decl live. This instructs
+ linker to not dead code strip this symbol. */
+ void (*mark_decl_preserved) (const char *);
+
+ /* Output a record of the command line switches that have been passed. */
+ print_switch_fn_type record_gcc_switches;
+ /* The name of the section that the example ELF implementation of
+ record_gcc_switches will use to store the information. Target
+ specific versions of record_gcc_switches may or may not use
+ this information. */
+ const char * record_gcc_switches_section;
+
+ /* Output the definition of a section anchor. */
+ void (*output_anchor) (rtx);
+
+ /* Output a DTP-relative reference to a TLS symbol. */
+ void (*output_dwarf_dtprel) (FILE *file, int size, rtx x);
+};
+
+/* Functions relating to instruction scheduling. */
+struct sched
+{
+ /* Given the current cost, COST, of an insn, INSN, calculate and
+ return a new cost based on its relationship to DEP_INSN through
+ the dependence LINK. The default is to make no adjustment. */
+ int (* adjust_cost) (rtx insn, rtx link, rtx dep_insn, int cost);
+
+ /* Adjust the priority of an insn as you see fit. Returns the new
+ priority. */
+ int (* adjust_priority) (rtx, int);
+
+ /* Function which returns the maximum number of insns that can be
+ scheduled in the same machine cycle. This must be constant
+ over an entire compilation. The default is 1. */
+ int (* issue_rate) (void);
+
+ /* Calculate how much this insn affects how many more insns we
+ can emit this cycle. Default is they all cost the same. */
+ int (* variable_issue) (FILE *, int, rtx, int);
+
+ /* Initialize machine-dependent scheduling code. */
+ void (* md_init) (FILE *, int, int);
+
+ /* Finalize machine-dependent scheduling code. */
+ void (* md_finish) (FILE *, int);
+
+ /* Initialize machine-dependent function wide scheduling code. */
+ void (* md_init_global) (FILE *, int, int);
+
+ /* Finalize machine-dependent function wide scheduling code. */
+ void (* md_finish_global) (FILE *, int);
+
+ /* Reorder insns in a machine-dependent fashion, in two different
+ places. Default does nothing. */
+ int (* reorder) (FILE *, int, rtx *, int *, int);
+ int (* reorder2) (FILE *, int, rtx *, int *, int);
+
+ /* The following member value is a pointer to a function called
+ after evaluation forward dependencies of insns in chain given
+ by two parameter values (head and tail correspondingly). */
+ void (* dependencies_evaluation_hook) (rtx, rtx);
+
+ /* The values of the following four members are pointers to
+ functions used to simplify the automaton descriptions.
+ dfa_pre_cycle_insn and dfa_post_cycle_insn give functions
+ returning insns which are used to change the pipeline hazard
+ recognizer state when the new simulated processor cycle
+ correspondingly starts and finishes. The function defined by
+ init_dfa_pre_cycle_insn and init_dfa_post_cycle_insn are used
+ to initialize the corresponding insns. The default values of
+ the members result in not changing the automaton state when
+ the new simulated processor cycle correspondingly starts and
+ finishes. */
+ void (* init_dfa_pre_cycle_insn) (void);
+ rtx (* dfa_pre_cycle_insn) (void);
+ void (* init_dfa_post_cycle_insn) (void);
+ rtx (* dfa_post_cycle_insn) (void);
+
+ /* The values of the following two members are pointers to
+ functions used to simplify the automaton descriptions.
+ dfa_pre_advance_cycle and dfa_post_advance_cycle are getting called
+ immediately before and after cycle is advanced. */
+ void (* dfa_pre_advance_cycle) (void);
+ void (* dfa_post_advance_cycle) (void);
+
+ /* The following member value is a pointer to a function returning value
+ which defines how many insns in queue `ready' will we try for
+ multi-pass scheduling. If the member value is nonzero and the
+ function returns positive value, the DFA based scheduler will make
+ multi-pass scheduling for the first cycle. In other words, we will
+ try to choose ready insn which permits to start maximum number of
+ insns on the same cycle. */
+ int (* first_cycle_multipass_dfa_lookahead) (void);
+
+ /* The following member value is pointer to a function controlling
+ what insns from the ready insn queue will be considered for the
+ multipass insn scheduling. If the hook returns zero for insn
+ passed as the parameter, the insn will be not chosen to be
+ issued. */
+ int (* first_cycle_multipass_dfa_lookahead_guard) (rtx);
+
+ /* The following member value is pointer to a function called by
+ the insn scheduler before issuing insn passed as the third
+ parameter on given cycle. If the hook returns nonzero, the
+ insn is not issued on given processors cycle. Instead of that,
+ the processor cycle is advanced. If the value passed through
+ the last parameter is zero, the insn ready queue is not sorted
+ on the new cycle start as usually. The first parameter passes
+ file for debugging output. The second one passes the scheduler
+ verbose level of the debugging output. The forth and the fifth
+ parameter values are correspondingly processor cycle on which
+ the previous insn has been issued and the current processor
+ cycle. */
+ int (* dfa_new_cycle) (FILE *, int, rtx, int, int, int *);
+
+ /* The following member value is a pointer to a function called by the
+ insn scheduler. It should return true if there exists a dependence
+ which is considered costly by the target, between the insn
+ DEP_PRO (&_DEP), and the insn DEP_CON (&_DEP). The first parameter is
+ the dep that represents the dependence between the two insns. The
+ second argument is the cost of the dependence as estimated by
+ the scheduler. The last argument is the distance in cycles
+ between the already scheduled insn (first parameter) and the
+ second insn (second parameter). */
+ bool (* is_costly_dependence) (struct _dep *_dep, int, int);
+
+ /* Given the current cost, COST, of an insn, INSN, calculate and
+ return a new cost based on its relationship to DEP_INSN through the
+ dependence of type DEP_TYPE. The default is to make no adjustment. */
+ int (* adjust_cost_2) (rtx insn, int, rtx dep_insn, int cost, int dw);
+
+ /* The following member value is a pointer to a function called
+ by the insn scheduler. This hook is called to notify the backend
+ that new instructions were emitted. */
+ void (* h_i_d_extended) (void);
+
+ /* Next 5 functions are for multi-point scheduling. */
+
+ /* Allocate memory for scheduler context. */
+ void *(* alloc_sched_context) (void);
+
+ /* Fills the context from the local machine scheduler context. */
+ void (* init_sched_context) (void *, bool);
+
+ /* Sets local machine scheduler context to a saved value. */
+ void (* set_sched_context) (void *);
+
+ /* Clears a scheduler context so it becomes like after init. */
+ void (* clear_sched_context) (void *);
+
+ /* Frees the scheduler context. */
+ void (* free_sched_context) (void *);
+
+ /* The following member value is a pointer to a function called
+ by the insn scheduler.
+ The first parameter is an instruction, the second parameter is the type
+ of the requested speculation, and the third parameter is a pointer to the
+ speculative pattern of the corresponding type (set if return value == 1).
+ It should return
+ -1, if there is no pattern, that will satisfy the requested speculation
+ type,
+ 0, if current pattern satisfies the requested speculation type,
+ 1, if pattern of the instruction should be changed to the newly
+ generated one. */
+ int (* speculate_insn) (rtx, int, rtx *);
+
+ /* The following member value is a pointer to a function called
+ by the insn scheduler. It should return true if the check instruction
+ passed as the parameter needs a recovery block. */
+ bool (* needs_block_p) (int);
+
+ /* The following member value is a pointer to a function called
+ by the insn scheduler. It should return a pattern for the check
+ instruction.
+ The first parameter is a speculative instruction, the second parameter
+ is the label of the corresponding recovery block (or null, if it is a
+ simple check). If the mutation of the check is requested (e.g. from
+ ld.c to chk.a), the third parameter is true - in this case the first
+ parameter is the previous check. */
+ rtx (* gen_spec_check) (rtx, rtx, int);
+
+ /* The following member value is a pointer to a function controlling
+ what insns from the ready insn queue will be considered for the
+ multipass insn scheduling. If the hook returns zero for the insn
+ passed as the parameter, the insn will not be chosen to be
+ issued. This hook is used to discard speculative instructions,
+ that stand at the first position of the ready list. */
+ bool (* first_cycle_multipass_dfa_lookahead_guard_spec) (const_rtx);
+
+ /* The following member value is a pointer to a function that provides
+ information about the speculation capabilities of the target.
+ The parameter is a pointer to spec_info variable. */
+ void (* set_sched_flags) (struct spec_info_def *);
+
+ /* Return speculation types of the instruction passed as the parameter. */
+ int (* get_insn_spec_ds) (rtx);
+
+ /* Return speculation types that are checked for the instruction passed as
+ the parameter. */
+ int (* get_insn_checked_ds) (rtx);
+
+ /* Return bool if rtx scanning should just skip current layer and
+ advance to the inner rtxes. */
+ bool (* skip_rtx_p) (const_rtx);
+
+ /* The following member value is a pointer to a function that provides
+ information about the target resource-based lower bound which is
+ used by the swing modulo scheduler. The parameter is a pointer
+ to ddg variable. */
+ int (* sms_res_mii) (struct ddg *);
+};
+
+/* Functions relating to vectorization. */
+struct vectorize
+{
+ /* Return a vector type for SCALAR_TYPE. */
+ tree (* vectype_for_scalar_type) (tree scalar_type, FILE *vect_dump);
+
+ /* The following member value is a pointer to a function called
+ by the vectorizer, and return the decl of the target builtin
+ function. */
+ tree (* builtin_mask_for_load) (void);
+
+ /* Returns a code for builtin that realizes vectorized version of
+ function, or NULL_TREE if not available. */
+ tree (* builtin_vectorized_function) (unsigned, tree, tree);
+
+ /* Returns a code for builtin that realizes vectorized version of
+ conversion, or NULL_TREE if not available. */
+ tree (* builtin_conversion) (unsigned, tree);
+
+ /* Target builtin that implements vector widening multiplication.
+ builtin_mul_widen_eve computes the element-by-element products
+ for the even elements, and builtin_mul_widen_odd computes the
+ element-by-element products for the odd elements. */
+ tree (* builtin_mul_widen_even) (tree);
+ tree (* builtin_mul_widen_odd) (tree);
+
+ /* Returns the cost to be added to the overheads involved with
+ executing the vectorized version of a loop. */
+ int (*builtin_vectorization_cost) (bool);
+
+ /* Return true if vector alignment is reachable (by peeling N
+ iterations) for the given type. */
+ bool (* vector_alignment_reachable) (const_tree, bool);
+
+ /* Target builtin that implements vector permute. */
+ tree (* builtin_vec_perm) (tree, tree*);
+};
+
+/* Functions relating to calls - argument passing, returns, etc. */
+struct calls
+{
+ bool (*promote_function_args) (const_tree fntype);
+ bool (*promote_function_return) (const_tree fntype);
+ bool (*promote_prototypes) (const_tree fntype);
+ rtx (*struct_value_rtx) (tree fndecl, int incoming);
+ bool (*return_in_memory) (const_tree type, const_tree fndecl);
+ bool (*return_in_msb) (const_tree type);
+
+ /* Return true if a parameter must be passed by reference. TYPE may
+ be null if this is a libcall. CA may be null if this query is
+ from __builtin_va_arg. */
+ bool (*pass_by_reference) (CUMULATIVE_ARGS *ca, enum machine_mode mode,
+ const_tree type, bool named_arg);
+
+ rtx (*expand_builtin_saveregs) (void);
+ /* Returns pretend_argument_size. */
+ void (*setup_incoming_varargs) (CUMULATIVE_ARGS *ca, enum machine_mode mode,
+ tree type, int *pretend_arg_size,
+ int second_time);
+ bool (*strict_argument_naming) (CUMULATIVE_ARGS *ca);
+ /* Returns true if we should use
+ targetm.calls.setup_incoming_varargs() and/or
+ targetm.calls.strict_argument_naming(). */
+ bool (*pretend_outgoing_varargs_named) (CUMULATIVE_ARGS *ca);
+
+ /* Given a complex type T, return true if a parameter of type T
+ should be passed as two scalars. */
+ bool (* split_complex_arg) (const_tree type);
+
+ /* Return true if type T, mode MODE, may not be passed in registers,
+ but must be passed on the stack. */
+ /* ??? This predicate should be applied strictly after pass-by-reference.
+ Need audit to verify that this is the case. */
+ bool (* must_pass_in_stack) (enum machine_mode mode, const_tree t);
+
+ /* Return true if type TYPE, mode MODE, which is passed by reference,
+ should have the object copy generated by the callee rather than
+ the caller. It is never called for TYPE requiring constructors. */
+ bool (* callee_copies) (CUMULATIVE_ARGS *ca, enum machine_mode mode,
+ const_tree type, bool named);
+
+ /* Return zero for arguments passed entirely on the stack or entirely
+ in registers. If passed in both, return the number of bytes passed
+ in registers; the balance is therefore passed on the stack. */
+ int (* arg_partial_bytes) (CUMULATIVE_ARGS *ca, enum machine_mode mode,
+ tree type, bool named);
+
+ /* Return the diagnostic message string if function without a prototype
+ is not allowed for this 'val' argument; NULL otherwise. */
+ const char *(*invalid_arg_for_unprototyped_fn) (const_tree typelist,
+ const_tree funcdecl,
+ const_tree val);
+
+ /* Return an rtx for the return value location of the function
+ specified by FN_DECL_OR_TYPE with a return type of RET_TYPE. */
+ rtx (*function_value) (const_tree ret_type, const_tree fn_decl_or_type,
+ bool outgoing);
+
+ /* Return an rtx for the argument pointer incoming to the
+ current function. */
+ rtx (*internal_arg_pointer) (void);
+
+ /* Update the current function stack boundary if needed. */
+ void (*update_stack_boundary) (void);
+
+ /* Handle stack alignment and return an rtx for Dynamic Realign
+ Argument Pointer if necessary. */
+ rtx (*get_drap_rtx) (void);
+
+ /* Return true if all function parameters should be spilled to the
+ stack. */
+ bool (*allocate_stack_slots_for_args) (void);
+
+};
+
+/* Functions specific to the C family of frontends. */
+struct c
+{
+ /* Return machine mode for non-standard suffix
+ or VOIDmode if non-standard suffixes are unsupported. */
+ enum machine_mode (*mode_for_suffix) (char);
+};
+
+/* Functions specific to the C++ frontend. */
+struct cxx
+{
+ /* Return the integer type used for guard variables. */
+ tree (*guard_type) (void);
+ /* Return true if only the low bit of the guard should be tested. */
+ bool (*guard_mask_bit) (void);
+ /* Returns the size of the array cookie for an array of type. */
+ tree (*get_cookie_size) (tree);
+ /* Returns true if the element size should be stored in the
+ array cookie. */
+ bool (*cookie_has_size) (void);
+ /* Allows backends to perform additional processing when
+ deciding if a class should be exported or imported. */
+ int (*import_export_class) (tree, int);
+ /* Returns true if constructors and destructors return "this". */
+ bool (*cdtor_returns_this) (void);
+ /* Returns true if the key method for a class can be an inline
+ function, so long as it is not declared inline in the class
+ itself. Returning true is the behavior required by the Itanium
+ C++ ABI. */
+ bool (*key_method_may_be_inline) (void);
+ /* DECL is a virtual table, virtual table table, typeinfo object,
+ or other similar implicit class data object that will be
+ emitted with external linkage in this translation unit. No ELF
+ visibility has been explicitly specified. If the target needs
+ to specify a visibility other than that of the containing class,
+ use this hook to set DECL_VISIBILITY and
+ DECL_VISIBILITY_SPECIFIED. */
+ void (*determine_class_data_visibility) (tree decl);
+ /* Returns true (the default) if virtual tables and other
+ similar implicit class data objects are always COMDAT if they
+ have external linkage. If this hook returns false, then
+ class data for classes whose virtual table will be emitted in
+ only one translation unit will not be COMDAT. */
+ bool (*class_data_always_comdat) (void);
+ /* Returns true (the default) if the RTTI for the basic types,
+ which is always defined in the C++ runtime, should be COMDAT;
+ false if it should not be COMDAT. */
+ bool (*library_rtti_comdat) (void);
+ /* Returns true if __aeabi_atexit should be used to register static
+ destructors. */
+ bool (*use_aeabi_atexit) (void);
+ /* Returns true if target may use atexit in the same manner as
+ __cxa_atexit to register static destructors. */
+ bool (*use_atexit_for_cxa_atexit) (void);
+ /* TYPE is a C++ class (i.e., RECORD_TYPE or UNION_TYPE) that
+ has just been defined. Use this hook to make adjustments to the
+ class (eg, tweak visibility or perform any other required
+ target modifications). */
+ void (*adjust_class_at_definition) (tree type);
+};
+
+/* Functions and data for emulated TLS support. */
+struct emutls
+{
+ /* Name of the address and common functions. */
+ const char *get_address;
+ const char *register_common;
+
+ /* Prefixes for proxy variable and template. */
+ const char *var_section;
+ const char *tmpl_section;
+
+ /* Prefixes for proxy variable and template. */
+ const char *var_prefix;
+ const char *tmpl_prefix;
+
+ /* Function to generate field definitions of the proxy variable. */
+ tree (*var_fields) (tree, tree *);
+
+ /* Function to initialize a proxy variable. */
+ tree (*var_init) (tree, tree, tree);
+
+ /* Whether we are allowed to alter the usual alignment of the
+ proxy variable. */
+ bool var_align_fixed;
+
+ /* Whether we can emit debug information for TLS vars. */
+ bool debug_form_tls_address;
+};
+
+struct target_option_hooks
+{
+ /* Function to validate the attribute((option(...))) strings or NULL. If
+ the option is validated, it is assumed that DECL_FUNCTION_SPECIFIC will
+ be filled in in the function decl node. */
+ bool (*valid_attribute_p) (tree, tree, tree, int);
+
+ /* Function to save any extra target state in the target options
+ structure. */
+ void (*save) (struct cl_target_option *);
+
+ /* Function to restore any extra target state from the target options
+ structure. */
+ void (*restore) (struct cl_target_option *);
+
+ /* Function to print any extra target state from the target options
+ structure. */
+ void (*print) (FILE *, int, struct cl_target_option *);
+
+ /* Function to parse arguments to be validated for #pragma option, and to
+ change the state if the options are valid. If the first argument is
+ NULL, the second argument specifies the default options to use. Return
+ true if the options are valid, and set the current state. */
+ bool (*pragma_parse) (tree, tree);
+
+ /* 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);
+};
+
+/* ??? 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;
+
+ /* Position of this target vector in targetm_array.
+ Initialized with the Makefile-generated TARGET_NUM. */
+ int target_arch;
+
+ /* Points to the ptr_mode variable for this target. */
+ enum machine_mode *ptr_mode;
+
/* Functions that output assembler for the target. */
- struct asm_out
- {
- /* Opening and closing parentheses for asm expression grouping. */
- const char *open_paren, *close_paren;
-
- /* Assembler instructions for creating various kinds of integer object. */
- const char *byte_op;
- struct asm_int_op
- {
- const char *hi;
- const char *si;
- const char *di;
- const char *ti;
- } aligned_op, unaligned_op;
-
- /* Try to output the assembler code for an integer object whose
- value is given by X. SIZE is the size of the object in bytes and
- ALIGNED_P indicates whether it is aligned. Return true if
- successful. Only handles cases for which BYTE_OP, ALIGNED_OP
- and UNALIGNED_OP are NULL. */
- bool (* integer) (rtx x, unsigned int size, int aligned_p);
-
- /* Output code that will globalize a label. */
- void (* globalize_label) (FILE *, const char *);
-
- /* Output code that will globalize a declaration. */
- void (* globalize_decl_name) (FILE *, tree);
-
- /* Output code that will emit a label for unwind info, if this
- target requires such labels. Second argument is the decl the
- unwind info is associated with, third is a boolean: true if
- this is for exception handling, fourth is a boolean: true if
- this is only a placeholder for an omitted FDE. */
- void (* unwind_label) (FILE *, tree, int, int);
-
- /* Output code that will emit a label to divide up the exception
- table. */
- void (* except_table_label) (FILE *);
-
- /* Emit any directives required to unwind this instruction. */
- void (* unwind_emit) (FILE *, rtx);
-
- /* Output an internal label. */
- void (* internal_label) (FILE *, const char *, unsigned long);
-
- /* Emit a ttype table reference to a typeinfo object. */
- bool (* ttype) (rtx);
-
- /* Emit an assembler directive to set visibility for the symbol
- associated with the tree decl. */
- void (* visibility) (tree, int);
-
- /* Output the assembler code for entry to a function. */
- void (* function_prologue) (FILE *, HOST_WIDE_INT);
-
- /* Output the assembler code for end of prologue. */
- void (* function_end_prologue) (FILE *);
-
- /* Output the assembler code for start of epilogue. */
- void (* function_begin_epilogue) (FILE *);
-
- /* Output the assembler code for function exit. */
- void (* function_epilogue) (FILE *, HOST_WIDE_INT);
-
- /* Initialize target-specific sections. */
- void (* init_sections) (void);
-
- /* Tell assembler to change to section NAME with attributes FLAGS.
- If DECL is non-NULL, it is the VAR_DECL or FUNCTION_DECL with
- which this section is associated. */
- void (* named_section) (const char *name, unsigned int flags, tree decl);
-
- /* Return a mask describing how relocations should be treated when
- selecting sections. Bit 1 should be set if global relocations
- should be placed in a read-write section; bit 0 should be set if
- local relocations should be placed in a read-write section. */
- int (*reloc_rw_mask) (void);
-
- /* Return a section for EXP. It may be a DECL or a constant. RELOC
- is nonzero if runtime relocations must be applied; bit 1 will be
- set if the runtime relocations require non-local name resolution.
- ALIGN is the required alignment of the data. */
- section *(* select_section) (tree, int, unsigned HOST_WIDE_INT);
-
- /* Return a section for X. MODE is X's mode and ALIGN is its
- alignment in bits. */
- section *(* select_rtx_section) (enum machine_mode, rtx,
- unsigned HOST_WIDE_INT);
-
- /* Select a unique section name for DECL. RELOC is the same as
- for SELECT_SECTION. */
- void (* unique_section) (tree, int);
-
- /* Return the readonly data section associated with function DECL. */
- section *(* function_rodata_section) (tree);
-
- /* Output a constructor for a symbol with a given priority. */
- void (* constructor) (rtx, int);
-
- /* Output a destructor for a symbol with a given priority. */
- void (* destructor) (rtx, int);
-
- /* Output the assembler code for a thunk function. THUNK_DECL is the
- declaration for the thunk function itself, FUNCTION is the decl for
- the target function. DELTA is an immediate constant offset to be
- added to THIS. If VCALL_OFFSET is nonzero, the word at
- *(*this + vcall_offset) should be added to THIS. */
- void (* output_mi_thunk) (FILE *file, tree thunk_decl,
- HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset,
- tree function_decl);
-
- /* Determine whether output_mi_thunk would succeed. */
- /* ??? Ideally, this hook would not exist, and success or failure
- would be returned from output_mi_thunk directly. But there's
- too much undo-able setup involved in invoking output_mi_thunk.
- Could be fixed by making output_mi_thunk emit rtl instead of
- text to the output file. */
- bool (* can_output_mi_thunk) (const_tree thunk_decl, HOST_WIDE_INT delta,
- HOST_WIDE_INT vcall_offset,
- const_tree function_decl);
-
- /* Output any boilerplate text needed at the beginning of a
- translation unit. */
- void (*file_start) (void);
-
- /* Output any boilerplate text needed at the end of a
- translation unit. */
- void (*file_end) (void);
-
- /* Output an assembler pseudo-op to declare a library function name
- external. */
- void (*external_libcall) (rtx);
-
- /* Output an assembler directive to mark decl live. This instructs
- linker to not dead code strip this symbol. */
- void (*mark_decl_preserved) (const char *);
-
- /* Output a record of the command line switches that have been passed. */
- print_switch_fn_type record_gcc_switches;
- /* The name of the section that the example ELF implementation of
- record_gcc_switches will use to store the information. Target
- specific versions of record_gcc_switches may or may not use
- this information. */
- const char * record_gcc_switches_section;
-
- /* Output the definition of a section anchor. */
- void (*output_anchor) (rtx);
-
- /* Output a DTP-relative reference to a TLS symbol. */
- void (*output_dwarf_dtprel) (FILE *file, int size, rtx x);
-
- } asm_out;
+ struct asm_out asm_out;
/* Functions relating to instruction scheduling. */
- struct sched
- {
- /* Given the current cost, COST, of an insn, INSN, calculate and
- return a new cost based on its relationship to DEP_INSN through
- the dependence LINK. The default is to make no adjustment. */
- int (* adjust_cost) (rtx insn, rtx link, rtx dep_insn, int cost);
-
- /* Adjust the priority of an insn as you see fit. Returns the new
- priority. */
- int (* adjust_priority) (rtx, int);
-
- /* Function which returns the maximum number of insns that can be
- scheduled in the same machine cycle. This must be constant
- over an entire compilation. The default is 1. */
- int (* issue_rate) (void);
-
- /* Calculate how much this insn affects how many more insns we
- can emit this cycle. Default is they all cost the same. */
- int (* variable_issue) (FILE *, int, rtx, int);
-
- /* Initialize machine-dependent scheduling code. */
- void (* md_init) (FILE *, int, int);
-
- /* Finalize machine-dependent scheduling code. */
- void (* md_finish) (FILE *, int);
-
- /* Initialize machine-dependent function wide scheduling code. */
- void (* md_init_global) (FILE *, int, int);
-
- /* Finalize machine-dependent function wide scheduling code. */
- void (* md_finish_global) (FILE *, int);
-
- /* Reorder insns in a machine-dependent fashion, in two different
- places. Default does nothing. */
- int (* reorder) (FILE *, int, rtx *, int *, int);
- int (* reorder2) (FILE *, int, rtx *, int *, int);
-
- /* The following member value is a pointer to a function called
- after evaluation forward dependencies of insns in chain given
- by two parameter values (head and tail correspondingly). */
- void (* dependencies_evaluation_hook) (rtx, rtx);
-
- /* The values of the following four members are pointers to
- functions used to simplify the automaton descriptions.
- dfa_pre_cycle_insn and dfa_post_cycle_insn give functions
- returning insns which are used to change the pipeline hazard
- recognizer state when the new simulated processor cycle
- correspondingly starts and finishes. The function defined by
- init_dfa_pre_cycle_insn and init_dfa_post_cycle_insn are used
- to initialize the corresponding insns. The default values of
- the members result in not changing the automaton state when
- the new simulated processor cycle correspondingly starts and
- finishes. */
- void (* init_dfa_pre_cycle_insn) (void);
- rtx (* dfa_pre_cycle_insn) (void);
- void (* init_dfa_post_cycle_insn) (void);
- rtx (* dfa_post_cycle_insn) (void);
-
- /* The values of the following two members are pointers to
- functions used to simplify the automaton descriptions.
- dfa_pre_advance_cycle and dfa_post_advance_cycle are getting called
- immediately before and after cycle is advanced. */
- void (* dfa_pre_advance_cycle) (void);
- void (* dfa_post_advance_cycle) (void);
-
- /* The following member value is a pointer to a function returning value
- which defines how many insns in queue `ready' will we try for
- multi-pass scheduling. If the member value is nonzero and the
- function returns positive value, the DFA based scheduler will make
- multi-pass scheduling for the first cycle. In other words, we will
- try to choose ready insn which permits to start maximum number of
- insns on the same cycle. */
- int (* first_cycle_multipass_dfa_lookahead) (void);
-
- /* The following member value is pointer to a function controlling
- what insns from the ready insn queue will be considered for the
- multipass insn scheduling. If the hook returns zero for insn
- passed as the parameter, the insn will be not chosen to be
- issued. */
- int (* first_cycle_multipass_dfa_lookahead_guard) (rtx);
-
- /* The following member value is pointer to a function called by
- the insn scheduler before issuing insn passed as the third
- parameter on given cycle. If the hook returns nonzero, the
- insn is not issued on given processors cycle. Instead of that,
- the processor cycle is advanced. If the value passed through
- the last parameter is zero, the insn ready queue is not sorted
- on the new cycle start as usually. The first parameter passes
- file for debugging output. The second one passes the scheduler
- verbose level of the debugging output. The forth and the fifth
- parameter values are correspondingly processor cycle on which
- the previous insn has been issued and the current processor
- cycle. */
- int (* dfa_new_cycle) (FILE *, int, rtx, int, int, int *);
-
- /* The following member value is a pointer to a function called by the
- insn scheduler. It should return true if there exists a dependence
- which is considered costly by the target, between the insn
- DEP_PRO (&_DEP), and the insn DEP_CON (&_DEP). The first parameter is
- the dep that represents the dependence between the two insns. The
- second argument is the cost of the dependence as estimated by
- the scheduler. The last argument is the distance in cycles
- between the already scheduled insn (first parameter) and the
- second insn (second parameter). */
- bool (* is_costly_dependence) (struct _dep *_dep, int, int);
-
- /* Given the current cost, COST, of an insn, INSN, calculate and
- return a new cost based on its relationship to DEP_INSN through the
- dependence of type DEP_TYPE. The default is to make no adjustment. */
- int (* adjust_cost_2) (rtx insn, int, rtx dep_insn, int cost, int dw);
-
- /* The following member value is a pointer to a function called
- by the insn scheduler. This hook is called to notify the backend
- that new instructions were emitted. */
- void (* h_i_d_extended) (void);
-
- /* Next 5 functions are for multi-point scheduling. */
-
- /* Allocate memory for scheduler context. */
- void *(* alloc_sched_context) (void);
-
- /* Fills the context from the local machine scheduler context. */
- void (* init_sched_context) (void *, bool);
-
- /* Sets local machine scheduler context to a saved value. */
- void (* set_sched_context) (void *);
-
- /* Clears a scheduler context so it becomes like after init. */
- void (* clear_sched_context) (void *);
-
- /* Frees the scheduler context. */
- void (* free_sched_context) (void *);
-
- /* The following member value is a pointer to a function called
- by the insn scheduler.
- The first parameter is an instruction, the second parameter is the type
- of the requested speculation, and the third parameter is a pointer to the
- speculative pattern of the corresponding type (set if return value == 1).
- It should return
- -1, if there is no pattern, that will satisfy the requested speculation
- type,
- 0, if current pattern satisfies the requested speculation type,
- 1, if pattern of the instruction should be changed to the newly
- generated one. */
- int (* speculate_insn) (rtx, int, rtx *);
-
- /* The following member value is a pointer to a function called
- by the insn scheduler. It should return true if the check instruction
- passed as the parameter needs a recovery block. */
- bool (* needs_block_p) (int);
-
- /* The following member value is a pointer to a function called
- by the insn scheduler. It should return a pattern for the check
- instruction.
- The first parameter is a speculative instruction, the second parameter
- is the label of the corresponding recovery block (or null, if it is a
- simple check). If the mutation of the check is requested (e.g. from
- ld.c to chk.a), the third parameter is true - in this case the first
- parameter is the previous check. */
- rtx (* gen_spec_check) (rtx, rtx, int);
-
- /* The following member value is a pointer to a function controlling
- what insns from the ready insn queue will be considered for the
- multipass insn scheduling. If the hook returns zero for the insn
- passed as the parameter, the insn will not be chosen to be
- issued. This hook is used to discard speculative instructions,
- that stand at the first position of the ready list. */
- bool (* first_cycle_multipass_dfa_lookahead_guard_spec) (const_rtx);
-
- /* The following member value is a pointer to a function that provides
- information about the speculation capabilities of the target.
- The parameter is a pointer to spec_info variable. */
- void (* set_sched_flags) (struct spec_info_def *);
-
- /* Return speculation types of the instruction passed as the parameter. */
- int (* get_insn_spec_ds) (rtx);
-
- /* Return speculation types that are checked for the instruction passed as
- the parameter. */
- int (* get_insn_checked_ds) (rtx);
-
- /* Return bool if rtx scanning should just skip current layer and
- advance to the inner rtxes. */
- bool (* skip_rtx_p) (const_rtx);
-
- /* The following member value is a pointer to a function that provides
- information about the target resource-based lower bound which is
- used by the swing modulo scheduler. The parameter is a pointer
- to ddg variable. */
- int (* sms_res_mii) (struct ddg *);
- } sched;
+ struct sched sched;
/* Functions relating to vectorization. */
- struct vectorize
- {
- /* The following member value is a pointer to a function called
- by the vectorizer, and return the decl of the target builtin
- function. */
- tree (* builtin_mask_for_load) (void);
-
- /* Returns a code for builtin that realizes vectorized version of
- function, or NULL_TREE if not available. */
- tree (* builtin_vectorized_function) (unsigned, tree, tree);
-
- /* Returns a code for builtin that realizes vectorized version of
- conversion, or NULL_TREE if not available. */
- tree (* builtin_conversion) (unsigned, tree);
-
- /* Target builtin that implements vector widening multiplication.
- builtin_mul_widen_eve computes the element-by-element products
- for the even elements, and builtin_mul_widen_odd computes the
- element-by-element products for the odd elements. */
- tree (* builtin_mul_widen_even) (tree);
- tree (* builtin_mul_widen_odd) (tree);
-
- /* Returns the cost to be added to the overheads involved with
- executing the vectorized version of a loop. */
- int (*builtin_vectorization_cost) (bool);
-
- /* Return true if vector alignment is reachable (by peeling N
- iterations) for the given type. */
- bool (* vector_alignment_reachable) (const_tree, bool);
-
- /* Target builtin that implements vector permute. */
- tree (* builtin_vec_perm) (tree, tree*);
-} vectorize;
+ struct vectorize vectorize;
/* The initial value of target_flags. */
int default_target_flags;
@@ -580,9 +819,12 @@ struct gcc_target
not, at the current point in the compilation. */
bool (* cannot_modify_jumps_p) (void);
+ /* True if FOLLOWER may be modified to follow FOLLOWEE. */
+ bool (*can_follow_jump) (const_rtx follower, const_rtx followee);
+
/* Return a register class for which branch target register
optimizations should be applied. */
- int (* 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
@@ -812,80 +1054,7 @@ struct gcc_target
bool (* valid_dllimport_attribute_p) (const_tree decl);
/* Functions relating to calls - argument passing, returns, etc. */
- struct calls {
- bool (*promote_function_args) (const_tree fntype);
- bool (*promote_function_return) (const_tree fntype);
- bool (*promote_prototypes) (const_tree fntype);
- rtx (*struct_value_rtx) (tree fndecl, int incoming);
- bool (*return_in_memory) (const_tree type, const_tree fndecl);
- bool (*return_in_msb) (const_tree type);
-
- /* Return true if a parameter must be passed by reference. TYPE may
- be null if this is a libcall. CA may be null if this query is
- from __builtin_va_arg. */
- bool (*pass_by_reference) (CUMULATIVE_ARGS *ca, enum machine_mode mode,
- const_tree type, bool named_arg);
-
- rtx (*expand_builtin_saveregs) (void);
- /* Returns pretend_argument_size. */
- void (*setup_incoming_varargs) (CUMULATIVE_ARGS *ca, enum machine_mode mode,
- tree type, int *pretend_arg_size,
- int second_time);
- bool (*strict_argument_naming) (CUMULATIVE_ARGS *ca);
- /* Returns true if we should use
- targetm.calls.setup_incoming_varargs() and/or
- targetm.calls.strict_argument_naming(). */
- bool (*pretend_outgoing_varargs_named) (CUMULATIVE_ARGS *ca);
-
- /* Given a complex type T, return true if a parameter of type T
- should be passed as two scalars. */
- bool (* split_complex_arg) (const_tree type);
-
- /* Return true if type T, mode MODE, may not be passed in registers,
- but must be passed on the stack. */
- /* ??? This predicate should be applied strictly after pass-by-reference.
- Need audit to verify that this is the case. */
- bool (* must_pass_in_stack) (enum machine_mode mode, const_tree t);
-
- /* Return true if type TYPE, mode MODE, which is passed by reference,
- should have the object copy generated by the callee rather than
- the caller. It is never called for TYPE requiring constructors. */
- bool (* callee_copies) (CUMULATIVE_ARGS *ca, enum machine_mode mode,
- const_tree type, bool named);
-
- /* Return zero for arguments passed entirely on the stack or entirely
- in registers. If passed in both, return the number of bytes passed
- in registers; the balance is therefore passed on the stack. */
- int (* arg_partial_bytes) (CUMULATIVE_ARGS *ca, enum machine_mode mode,
- tree type, bool named);
-
- /* Return the diagnostic message string if function without a prototype
- is not allowed for this 'val' argument; NULL otherwise. */
- const char *(*invalid_arg_for_unprototyped_fn) (const_tree typelist,
- const_tree funcdecl,
- const_tree val);
-
- /* Return an rtx for the return value location of the function
- specified by FN_DECL_OR_TYPE with a return type of RET_TYPE. */
- rtx (*function_value) (const_tree ret_type, const_tree fn_decl_or_type,
- bool outgoing);
-
- /* Return an rtx for the argument pointer incoming to the
- current function. */
- rtx (*internal_arg_pointer) (void);
-
- /* Update the current function stack boundary if needed. */
- void (*update_stack_boundary) (void);
-
- /* Handle stack alignment and return an rtx for Dynamic Realign
- Argument Pointer if necessary. */
- rtx (*get_drap_rtx) (void);
-
- /* Return true if all function parameters should be spilled to the
- stack. */
- bool (*allocate_stack_slots_for_args) (void);
-
- } calls;
+ struct calls calls;
/* Return the diagnostic message string if conversion from FROMTYPE
to TOTYPE is not allowed, NULL otherwise. */
@@ -900,12 +1069,15 @@ struct gcc_target
const char *(*invalid_binary_op) (int op, const_tree type1, const_tree type2);
/* 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,
struct secondary_reload_info *);
+ /* Return true if a reload loading IN should share a reload register
+ with an unrelated output reload. */
+ bool (*preserve_reload_p) (rtx in);
/* This target hook allows the backend to perform additional
processing while initializing for variable expansion. */
@@ -921,119 +1093,15 @@ struct gcc_target
bool (* hard_regno_scratch_ok) (unsigned int regno);
/* Functions specific to the C family of frontends. */
- struct c {
- /* Return machine mode for non-standard suffix
- or VOIDmode if non-standard suffixes are unsupported. */
- enum machine_mode (*mode_for_suffix) (char);
- } c;
+ struct c c;
/* Functions specific to the C++ frontend. */
- struct cxx {
- /* Return the integer type used for guard variables. */
- tree (*guard_type) (void);
- /* Return true if only the low bit of the guard should be tested. */
- bool (*guard_mask_bit) (void);
- /* Returns the size of the array cookie for an array of type. */
- tree (*get_cookie_size) (tree);
- /* Returns true if the element size should be stored in the
- array cookie. */
- bool (*cookie_has_size) (void);
- /* Allows backends to perform additional processing when
- deciding if a class should be exported or imported. */
- int (*import_export_class) (tree, int);
- /* Returns true if constructors and destructors return "this". */
- bool (*cdtor_returns_this) (void);
- /* Returns true if the key method for a class can be an inline
- function, so long as it is not declared inline in the class
- itself. Returning true is the behavior required by the Itanium
- C++ ABI. */
- bool (*key_method_may_be_inline) (void);
- /* DECL is a virtual table, virtual table table, typeinfo object,
- or other similar implicit class data object that will be
- emitted with external linkage in this translation unit. No ELF
- visibility has been explicitly specified. If the target needs
- to specify a visibility other than that of the containing class,
- use this hook to set DECL_VISIBILITY and
- DECL_VISIBILITY_SPECIFIED. */
- void (*determine_class_data_visibility) (tree decl);
- /* Returns true (the default) if virtual tables and other
- similar implicit class data objects are always COMDAT if they
- have external linkage. If this hook returns false, then
- class data for classes whose virtual table will be emitted in
- only one translation unit will not be COMDAT. */
- bool (*class_data_always_comdat) (void);
- /* Returns true (the default) if the RTTI for the basic types,
- which is always defined in the C++ runtime, should be COMDAT;
- false if it should not be COMDAT. */
- bool (*library_rtti_comdat) (void);
- /* Returns true if __aeabi_atexit should be used to register static
- destructors. */
- bool (*use_aeabi_atexit) (void);
- /* Returns true if target may use atexit in the same manner as
- __cxa_atexit to register static destructors. */
- bool (*use_atexit_for_cxa_atexit) (void);
- /* TYPE is a C++ class (i.e., RECORD_TYPE or UNION_TYPE) that
- has just been defined. Use this hook to make adjustments to the
- class (eg, tweak visibility or perform any other required
- target modifications). */
- void (*adjust_class_at_definition) (tree type);
- } cxx;
+ struct cxx cxx;
/* Functions and data for emulated TLS support. */
- struct emutls {
- /* Name of the address and common functions. */
- const char *get_address;
- const char *register_common;
-
- /* Prefixes for proxy variable and template. */
- const char *var_section;
- const char *tmpl_section;
-
- /* Prefixes for proxy variable and template. */
- const char *var_prefix;
- const char *tmpl_prefix;
-
- /* Function to generate field definitions of the proxy variable. */
- tree (*var_fields) (tree, tree *);
-
- /* Function to initialize a proxy variable. */
- tree (*var_init) (tree, tree, tree);
-
- /* Whether we are allowed to alter the usual alignment of the
- proxy variable. */
- bool var_align_fixed;
-
- /* Whether we can emit debug information for TLS vars. */
- bool debug_form_tls_address;
- } emutls;
-
- struct target_option_hooks {
- /* Function to validate the attribute((option(...))) strings or NULL. If
- the option is validated, it is assumed that DECL_FUNCTION_SPECIFIC will
- be filled in in the function decl node. */
- bool (*valid_attribute_p) (tree, tree, tree, int);
-
- /* Function to save any extra target state in the target options
- structure. */
- void (*save) (struct cl_target_option *);
-
- /* Function to restore any extra target state from the target options
- structure. */
- void (*restore) (struct cl_target_option *);
-
- /* Function to print any extra target state from the target options
- structure. */
- void (*print) (FILE *, int, struct cl_target_option *);
-
- /* Function to parse arguments to be validated for #pragma option, and to
- change the state if the options are valid. If the first argument is
- NULL, the second argument specifies the default options to use. Return
- true if the options are valid, and set the current state. */
- bool (*pragma_parse) (tree, tree);
+ struct emutls emutls;
- /* Function to determine if one function can inline another function. */
- bool (*can_inline_p) (tree, tree);
- } target_option;
+ struct target_option_hooks target_option;
/* For targets that need to mark extra registers as live on entry to
the function, they should define this target hook and set their
@@ -1091,7 +1159,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 5b7b8751ba6..a268a140594 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -65,7 +65,13 @@ along with GCC; see the file COPYING3. If not see
#include "reload.h"
#include "optabs.h"
#include "recog.h"
+#include "diagnostic.h"
+#include "tree-pass.h"
+#include "multi-target.h"
+extern GTY(()) tree stack_chk_fail_decl;
+
+START_TARGET_SPECIFIC
void
default_external_libcall (rtx fun ATTRIBUTE_UNUSED)
@@ -95,6 +101,8 @@ default_unspec_may_trap_p (const_rtx x, unsigned flags)
return 0;
}
+#ifndef EXTRA_TARGET
+
enum machine_mode
default_cc_modes_compatible (enum machine_mode m1, enum machine_mode m2)
{
@@ -117,6 +125,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,
@@ -126,6 +138,8 @@ default_setup_incoming_varargs (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
{
}
+#ifndef EXTRA_TARGET
+
/* The default implementation of TARGET_BUILTIN_SETJMP_FRAME_VALUE. */
rtx
@@ -134,6 +148,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
@@ -149,12 +165,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)
{
@@ -189,6 +209,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
@@ -198,6 +220,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
@@ -206,6 +230,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
@@ -221,6 +247,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
@@ -268,6 +295,8 @@ hook_callee_copies_named (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
return named;
}
+#ifndef EXTRA_TARGET
+
/* Emit any directives required to unwind this instruction. */
void
@@ -278,6 +307,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.
@@ -347,6 +378,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.
@@ -374,7 +407,7 @@ default_invalid_within_doloop (const_rtx insn)
/* Mapping of builtin functions to vectorized variants. */
tree
-default_builtin_vectorized_function (enum built_in_function fn ATTRIBUTE_UNUSED,
+default_builtin_vectorized_function (unsigned /*enum built_in_function*/ fn ATTRIBUTE_UNUSED,
tree type_out ATTRIBUTE_UNUSED,
tree type_in ATTRIBUTE_UNUSED)
{
@@ -384,7 +417,7 @@ default_builtin_vectorized_function (enum built_in_function fn ATTRIBUTE_UNUSED,
/* Vectorized conversion. */
tree
-default_builtin_vectorized_conversion (enum tree_code code ATTRIBUTE_UNUSED,
+default_builtin_vectorized_conversion (unsigned /*enum tree_code code*/ ATTRIBUTE_UNUSED,
tree type ATTRIBUTE_UNUSED)
{
return NULL_TREE;
@@ -393,13 +426,15 @@ default_builtin_vectorized_conversion (enum tree_code code ATTRIBUTE_UNUSED,
/* Reciprocal. */
tree
-default_builtin_reciprocal (enum built_in_function fn ATTRIBUTE_UNUSED,
+default_builtin_reciprocal (unsigned /*enum built_in_function*/ fn ATTRIBUTE_UNUSED,
bool md_fn ATTRIBUTE_UNUSED,
bool sqrt ATTRIBUTE_UNUSED)
{
return NULL_TREE;
}
+#endif /* !EXTRA_TARGET */
+
bool
hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false (
CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
@@ -427,6 +462,8 @@ hook_int_CUMULATIVE_ARGS_mode_tree_bool_0 (
return 0;
}
+#ifndef EXTRA_TARGET
+
void
hook_void_bitmap (bitmap regs ATTRIBUTE_UNUSED)
{
@@ -444,7 +481,7 @@ hook_invalid_arg_for_unprototyped_fn (
/* Initialize the stack protection decls. */
/* Stack protection related decls living in libgcc. */
-static GTY(()) tree stack_chk_guard_decl;
+tree stack_chk_guard_decl;
tree
default_stack_protect_guard (void)
@@ -469,7 +506,7 @@ default_stack_protect_guard (void)
return t;
}
-static GTY(()) tree stack_chk_fail_decl;
+tree stack_chk_fail_decl;
tree
default_external_stack_protect_fail (void)
@@ -497,6 +534,8 @@ default_external_stack_protect_fail (void)
return build_call_expr (t, 0);
}
+#endif /* !EXTRA_TARGET */
+
tree
default_hidden_stack_protect_fail (void)
{
@@ -531,6 +570,12 @@ default_hidden_stack_protect_fail (void)
#endif
}
+int /*enum reg_class*/
+default_branch_target_register_class (void)
+{
+ return (int) NO_REGS;
+}
+
bool
hook_bool_const_rtx_commutative_p (const_rtx x,
int outer_code ATTRIBUTE_UNUSED)
@@ -576,26 +621,27 @@ default_internal_arg_pointer (void)
}
#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)
@@ -669,10 +715,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)
@@ -765,4 +825,55 @@ default_target_option_can_inline_p (tree caller, tree callee)
return ret;
}
+#endif /* !EXTRA_TARGET */
+
+/* Used by the function get_vectype_for_scalar_type.
+
+ Returns the vector type corresponding to SCALAR_TYPE as supported
+ by the target. */
+
+tree
+default_vectype_for_scalar_type (tree scalar_type, FILE *vect_dump)
+{
+ enum machine_mode inner_mode = TYPE_MODE (scalar_type);
+ int nbytes = GET_MODE_SIZE (inner_mode);
+ int nunits;
+ tree vectype;
+
+ if (nbytes == 0 || nbytes >= UNITS_PER_SIMD_WORD (inner_mode))
+ return NULL_TREE;
+
+ /* FORNOW: Only a single vector size per mode (UNITS_PER_SIMD_WORD)
+ is expected. */
+ nunits = UNITS_PER_SIMD_WORD (inner_mode) / nbytes;
+
+ vectype = build_vector_type (scalar_type, nunits);
+ if (vect_dump)
+ {
+ fprintf (vect_dump, "get vectype with %d units of type ", nunits);
+ print_generic_expr (vect_dump, scalar_type, TDF_SLIM);
+ }
+
+ if (!vectype)
+ return NULL_TREE;
+
+ if (vect_dump)
+ {
+ fprintf (vect_dump, "vectype: ");
+ print_generic_expr (vect_dump, vectype, TDF_SLIM);
+ }
+
+ if (!VECTOR_MODE_P (TYPE_MODE (vectype))
+ && !INTEGRAL_MODE_P (TYPE_MODE (vectype)))
+ {
+ if (vect_dump)
+ fprintf (vect_dump, "mode not supported by target.");
+ return NULL_TREE;
+ }
+
+ return vectype;
+}
+
#include "gt-targhooks.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/targhooks.h b/gcc/targhooks.h
index 07ade39a769..6f71ab085d5 100644
--- a/gcc/targhooks.h
+++ b/gcc/targhooks.h
@@ -17,9 +17,13 @@ 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
extern void default_external_libcall (rtx);
extern int default_unspec_may_trap_p (const_rtx, unsigned);
+END_TARGET_SPECIFIC
extern enum machine_mode default_cc_modes_compatible (enum machine_mode,
enum machine_mode);
@@ -27,53 +31,68 @@ 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);
extern tree default_builtin_vectorized_function
- (enum built_in_function, tree, tree);
+ (unsigned /*enum built_in_function */, tree, tree);
-extern tree default_builtin_vectorized_conversion (enum tree_code, tree);
+//extern tree default_builtin_vectorized_conversion (enum tree_code, tree);
+extern tree default_builtin_vectorized_conversion (unsigned, tree);
-extern tree default_builtin_reciprocal (enum built_in_function, bool, bool);
+//extern tree default_builtin_reciprocal (enum built_in_function, bool, bool);
+extern tree default_builtin_reciprocal (unsigned, bool, bool);
extern bool default_builtin_vector_alignment_reachable (const_tree, bool);
/* 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 *);
@@ -83,17 +102,24 @@ extern bool hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true
(CUMULATIVE_ARGS *, enum machine_mode, const_tree, bool);
extern int hook_int_CUMULATIVE_ARGS_mode_tree_bool_0
(CUMULATIVE_ARGS *, enum machine_mode, tree, bool);
+END_TARGET_SPECIFIC
extern const char *hook_invalid_arg_for_unprototyped_fn
(const_tree, const_tree, const_tree);
+START_TARGET_SPECIFIC
+extern int /*enum reg_class*/ default_branch_target_register_class (void);
extern bool hook_bool_const_rtx_commutative_p (const_rtx, int);
extern rtx default_function_value (const_tree, const_tree, bool);
extern rtx default_internal_arg_pointer (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);
+extern tree default_vectype_for_scalar_type (tree, FILE *);
+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/testsuite/ChangeLog.ARC b/gcc/testsuite/ChangeLog.ARC
new file mode 100644
index 00000000000..efa9e196e83
--- /dev/null
+++ b/gcc/testsuite/ChangeLog.ARC
@@ -0,0 +1,72 @@
+2008-12-10 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * gcc.target/arc/add_f.c: Use -O2.
+ Allow mov.lo as alternative to mov.hs.
+ * lib/scanasm.exp (scan-assembler-times):
+ Translate control characters for printing.
+ Fix regexp count in the presence of subexpressions.
+
+2008-12-08 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * gcc.dg/torture/pr37868.c: Skip for ARC.
+
+2008-11-24 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * gcc.dg/pr28243.c: Only for target pic.
+ * gcc/dg/pr35044.c: Don't put -mA7 into dg-options.
+
+2008-11-24 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * gcc.target/arc: New directory.
+ * gcc.target/arc/arc.exp: New driver.
+ * gcc.target/arc/adc.c: New test.
+ * gcc.target/arc/add_f.c: New test.
+ * gcc.target/arc/sbc.c: New test.
+
+2008-09-16 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * gcc.dg/tree-ssa/ssa-store-ccp-2.c (dg-options): Add -fcommon.
+
+2008-07-15 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * gcc.c-torture/compile/20000804-1.c: Skip for mxp.
+ * gcc.c-torture/compile/20010327-1.c: Likewise.
+ * gcc.c-torture/compile/920501-4.c: Likewise.
+ * gcc.c-torture/compile/20020604-1.c: Likewise.
+ * gcc.c-torture/compile/20010518-2.c: Likewise.
+ * gcc.c-torture/compile/920501-12.c: Likewise.
+ * gcc.c-torture/compile/limits-blockid.c: Likewise.
+ * gcc.c-torture/compile/20001226-1.c: Likewise.
+ * gcc.c-torture/compile/961203-1.c: Likewise.
+ * gcc.c-torture/compile/930506-2.c:
+ * gcc.c-torture/compile/20050622-1.c: Likewise.
+ Use dg-require-effective-target trampolines.
+ * gcc.c-torture/compile/limits-fndefn.c: Use STACK_SIZE.
+ * gcc.c-torture/compile/limits-fnargs.c: Likewise.
+
+2008-04-04 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * gcc.c-torture/execute/ieee/denorm-rand.c: New file.
+ * gcc.dg/torture/fp-int-convert.h: Avoid undefined behaviour.
+
+2008-01-31 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * gcc.dg/pr35044.c: New file.
+
+2007-04-25 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * gcc.dg/sibcall-3.c: Don't XFAIL.
+ * gcc.dg/sibcall-4.c: Likewise.
+
+2007-04-25 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * g++.dg/cpp/_Pragma1.c: Disable for arc-*-elf*.
+
+2007-04-25 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * gcc.dg/cpp/_Pragma6.c: Disable for arc-*-elf*.
+
+2007-04-24 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * gcc.dg/builtin-apply2.c (main): Make sure we have 64 bytes of
+ stack to copy.
diff --git a/gcc/testsuite/g++.dg/cpp/_Pragma1.C b/gcc/testsuite/g++.dg/cpp/_Pragma1.C
index e44709b4570..7cb151cf3e6 100644
--- a/gcc/testsuite/g++.dg/cpp/_Pragma1.C
+++ b/gcc/testsuite/g++.dg/cpp/_Pragma1.C
@@ -2,7 +2,7 @@
// This is supposed to succeed only if
// the target defines HANDLE_PRAGMA_PACK_PUSH_POP
// and doesn't define HANDLE_PRAGMA_PACK_WITH_EXPANSION.
-// { dg-do compile { target { ! { powerpc-ibm-aix* *-*-solaris2* fido-*-* m68k-*-* sh*-[us]*-elf m32c-*-* } } } }
+// { dg-do compile { target { ! { arc-*-elf* powerpc-ibm-aix* *-*-solaris2* fido-*-* m68k-*-* sh*-[us]*-elf m32c-*-* } } } }
#define push bar
#define foo _Pragma ("pack(push)")
diff --git a/gcc/testsuite/gcc.c-torture/compile/20000804-1.c b/gcc/testsuite/gcc.c-torture/compile/20000804-1.c
index 68db6d36aed..56b14c3e50d 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20000804-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20000804-1.c
@@ -4,6 +4,7 @@
/* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && ilp32 } { "-fpic" "-fPIC" } { "" } } */
/* { dg-skip-if "PIC default" { i?86-*-darwin* } { "*" } { "" } } */
/* { dg-skip-if "No 64-bit registers" { m32c-*-* } { "*" } { "" } } */
+/* { dg-skip-if "Wrong constraint" { mxp-*-* } { "*" } { "" } } */
/* { dg-xfail-if "" { m6811-*-* m6812-*-* h8300-*-* } { "*" } { "" } } */
/* Copyright (C) 2000, 2003 Free Software Foundation */
diff --git a/gcc/testsuite/gcc.c-torture/compile/20001226-1.c b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
index 7cf963f0ac7..23eed77be20 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
@@ -3,6 +3,7 @@
/* { dg-do assemble } */
/* { dg-xfail-if "function larger than 64K" { m6811-*-* } { "*" } { "" } } */
/* { dg-skip-if "too much code for avr" { "avr-*-*" } { "*" } { "" } } */
+/* { dg-skip-if "too much code for mxp" { "mxp-*-*" } { "*" } { "" } } */
/* { dg-xfail-if "jump beyond 128K not supported" { xtensa*-*-* } { "-O0" } { "" } } */
/* { dg-xfail-if "PR36698" { spu-*-* } { "-O0" } { "" } } */
/* { dg-skip-if "" { m32c-*-* } { "*" } { "" } } */
diff --git a/gcc/testsuite/gcc.c-torture/compile/20010327-1.c b/gcc/testsuite/gcc.c-torture/compile/20010327-1.c
index f20e3a3e2dc..9839fe58d3f 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20010327-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20010327-1.c
@@ -1,5 +1,6 @@
/* { dg-skip-if "non-SI pointers" { m32c-*-* } { "*" } { "" } } */
/* { dg-skip-if "HI mode pointer for avr" { "avr-*-*" } { "*" } { "" } } */
+/* { dg-skip-if "HI mode pointer for mxp" { "mxp-*-*" } { "*" } { "" } } */
/* { dg-skip-if "non-SI pointers for w64" { "x86_64-*-mingw*" } { "*" } { "" } } */
/* This testcase tests whether GCC can produce static initialized data
diff --git a/gcc/testsuite/gcc.c-torture/compile/20010518-2.c b/gcc/testsuite/gcc.c-torture/compile/20010518-2.c
index f35d7c6b96d..f74ae263bdd 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20010518-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20010518-2.c
@@ -4,6 +4,7 @@
the array is too large (INT_MAX/2 > 64K). Force to use 16-bit ints
for it. */
/* { dg-options "-w -mshort" { target m6811-*-* m6812-*-* } } */
+/* { dg-skip-if "HI mode pointer for mxp" { "mxp-*-*" } { "*" } { "" } } */
/* Large static storage. */
diff --git a/gcc/testsuite/gcc.c-torture/compile/20020604-1.c b/gcc/testsuite/gcc.c-torture/compile/20020604-1.c
index 17b9b2165ba..cba87fa39c1 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20020604-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20020604-1.c
@@ -1,6 +1,7 @@
/* { dg-do assemble } */
/* { dg-xfail-if "The array is too big" { "m6811-*-* m6812-*-*" } { "*" } { "" } } */
/* { dg-skip-if "The array is too big" { "avr-*-*" } { "*" } { "" } } */
+/* { dg-skip-if "The array is too big" { "mxp-*-*" } { "*" } { "" } } */
/* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" "-mn" } { "" } } */
/* { dg-skip-if "" { m32c-*-* } { } { } } */
diff --git a/gcc/testsuite/gcc.c-torture/compile/20050622-1.c b/gcc/testsuite/gcc.c-torture/compile/20050622-1.c
index db183909f40..bc26592e8fc 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20050622-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20050622-1.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "The array is too big" { "mxp-*-*" } { "*" } { "" } } */
#if __SCHAR_MAX__ == 127 && __INT_MAX__ >= 2147483647
struct S { char buf[72*1024*1024]; };
#else
diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-12.c b/gcc/testsuite/gcc.c-torture/compile/920501-12.c
index 7eac9724677..d78562e5587 100644
--- a/gcc/testsuite/gcc.c-torture/compile/920501-12.c
+++ b/gcc/testsuite/gcc.c-torture/compile/920501-12.c
@@ -2,6 +2,7 @@
the stack arrays are too large. Force to use 16-bit ints for it. */
/* { dg-do assemble } */
/* { dg-xfail-if "" { m6811-*-* m6812-*-* } { "*" } { "-mshort" } } */
+/* { dg-skip-if "The array is too big" { "mxp-*-*" } { "*" } { "" } } */
x(x){ return 3 + x;}
a(x){int y[994]; return 3 + x;}
diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-4.c b/gcc/testsuite/gcc.c-torture/compile/920501-4.c
index 3481deefedb..edfbdd9b09a 100644
--- a/gcc/testsuite/gcc.c-torture/compile/920501-4.c
+++ b/gcc/testsuite/gcc.c-torture/compile/920501-4.c
@@ -2,6 +2,7 @@
the 'r0' array is too large. Force to use 16-bit ints for it. */
/* { dg-do assemble } */
/* { dg-xfail-if "" { m6811-*-* m6812-*-* } { "*" } { "-mshort" } } */
+/* { dg-skip-if "total size of local objects too large" { "mxp-*-*" } { "*" } { "" } } */
foo ()
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/930506-2.c b/gcc/testsuite/gcc.c-torture/compile/930506-2.c
index e11e62f026f..ca16a3d99d1 100644
--- a/gcc/testsuite/gcc.c-torture/compile/930506-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/930506-2.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target trampolines } */
#ifndef NO_TRAMPOLINES
int f1()
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/961203-1.c b/gcc/testsuite/gcc.c-torture/compile/961203-1.c
index 98908584333..a27378ba7f6 100644
--- a/gcc/testsuite/gcc.c-torture/compile/961203-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/961203-1.c
@@ -1,6 +1,7 @@
/* The structure is too large for the xstormy16 - won't fit in 16
bits. */
/* { dg-do assemble } */
+/* { dg-skip-if "The array is too big" { "mxp-*-*" } { "*" } { "" } } */
#if __INT_MAX__ >= 2147483647L
struct s {
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-blockid.c b/gcc/testsuite/gcc.c-torture/compile/limits-blockid.c
index 545dfe4dcb7..c7cbc788786 100644
--- a/gcc/testsuite/gcc.c-torture/compile/limits-blockid.c
+++ b/gcc/testsuite/gcc.c-torture/compile/limits-blockid.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "total size of local objects too large" { "mxp-*-*" } { "*" } { "" } } */
#define LIM1(x) x##0; x##1; x##2; x##3; x##4; x##5; x##6; x##7; x##8; x##9;
#define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
LIM1(x##5) LIM1(x##6) LIM1(x##7) LIM1(x##8) LIM1(x##9)
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-fnargs.c b/gcc/testsuite/gcc.c-torture/compile/limits-fnargs.c
index 6640d1a7472..bbc0f55c65e 100644
--- a/gcc/testsuite/gcc.c-torture/compile/limits-fnargs.c
+++ b/gcc/testsuite/gcc.c-torture/compile/limits-fnargs.c
@@ -1,5 +1,10 @@
/* { dg-timeout-factor 4.0 } */
+#ifndef STACK_SIZE
+#define STACK_SIZE 99999
+#endif
+#if STACK_SIZE >= 40004
+
#define PAR1 int, int, int, int, int, int, int, int, int, int
#define PAR2 PAR1, PAR1, PAR1, PAR1, PAR1, PAR1, PAR1, PAR1, PAR1, PAR1
#define PAR3 PAR2, PAR2, PAR2, PAR2, PAR2, PAR2, PAR2, PAR2, PAR2, PAR2
@@ -20,3 +25,4 @@ void caller(void)
{
func (ARG4);
}
+#endif /* STACK_SIZE */
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c b/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c
index 10f8714414f..7e43e7cfedf 100644
--- a/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c
+++ b/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c
@@ -1,4 +1,9 @@
/* { dg-skip-if "too complex for avr and picochip" { picochip-*-* avr-*-* } { "*" } { "" } } */
+#ifndef STACK_SIZE
+#define STACK_SIZE 999999
+#endif
+#if STACK_SIZE >= 400004
+
#define LIM1(x) x##0, x##1, x##2, x##3, x##4, x##5, x##6, x##7, x##8, x##9,
#define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
LIM1(x##5) LIM1(x##6) LIM1(x##7) LIM1(x##8) LIM1(x##9)
@@ -16,3 +21,4 @@
void func1 (LIM5(int p) int t)
{
}
+#endif /* STACK_SIZE */
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/denorm-rand.c b/gcc/testsuite/gcc.c-torture/execute/ieee/denorm-rand.c
new file mode 100644
index 00000000000..5ec9a767564
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/denorm-rand.c
@@ -0,0 +1,199 @@
+/* Test proper rounding for division when generating subnormal numbers. */
+/* x86 needs "-mfpmath=sse -msse2" to pass this test. */
+
+/* The debug code is only meant to run on linux with long double support. */
+#define dEBUG
+
+long long
+simple_rand ()
+{
+ static unsigned long long seed = 47114711;
+ unsigned long long this = seed * 1103515245 + 12345;
+ seed = this;
+ return this >> 8;
+}
+
+unsigned long long int
+random_bitstring (int *lenp)
+{
+ unsigned long long int x;
+ int n_bits;
+ int tot_bits = 0;
+ int len = 0;
+ int limit = *lenp;
+
+ x = 0;
+ for (;;)
+ {
+ long long ran = simple_rand ();
+ int ones_p = ran & 1;
+ n_bits = (ran >> 1) % 16;
+ if (x || ones_p)
+ {
+ if (n_bits > limit - len)
+ n_bits = limit - len;
+ *lenp = len += n_bits;
+ }
+ tot_bits += n_bits;
+
+ if (n_bits == 0 && len)
+ return x;
+ else if (n_bits)
+ {
+ x <<= n_bits;
+ if (ones_p)
+ x |= (1 << n_bits) - 1;
+
+ if (len == limit
+ || (len && tot_bits > 8 * sizeof (long long) + 6))
+ return x;
+ }
+ }
+}
+
+main ()
+{
+ int i;
+ double e0, e1, ie1, i2e1;
+ /* Hack to get x86 math to work. */
+ volatile double eval_tmp;
+#define EVAL(x) (eval_tmp = (x))
+
+ for (i = 0, e1 = 0.5; EVAL (1. + e1) > 1.; e1 *= 0.5, i++);
+ e1 *= 2.;
+ ie1 = 1./e1;
+ i2e1 = 2./e1;
+ if (i < 52 || (sizeof (double) == 8 && i > 52))
+ abort ();
+ for (i = 1, e0 = 0.5; EVAL (e0 * e0); e0 *= e0, i <<= 1);
+ for (;EVAL (e0 * 0.5); e0 *= 0.5, i++);
+ if (i < 0x3ff + 51 || (sizeof (double) == 8 && i > 0x3ff + 51))
+ abort ();
+
+ /* First, check that a quotient that can be computed exactly is properly
+ rounded, and try variantions on the fraction to do some simple
+ round-to-nearest checks for inexact results. */
+ for (i = 0; i < 1000; i++)
+ {
+ unsigned long long x, y;
+ int xlen, ylen;
+ long long ran;
+ double xd, xr, yd, yd2, e2y, pd, ep;
+
+ xlen = 53;
+ x = random_bitstring (&xlen);
+ ylen = 54-xlen;
+ y = random_bitstring (&ylen);
+ y |= 1;
+ if (x > 2 &&
+ (double) (x|3) * y >= (double) (1LL << 53))
+ {
+ x >>= 1;
+ xlen--;
+ }
+ x |= 1;
+ ran = simple_rand ();
+ if (xlen > 1)
+ x ^= ran & 2;
+ xd = (double)x * e0;
+ yd = (double)y * ie1;
+ yd2 = yd * 2.;
+ e2y = (double) (1LL << ylen);
+ if (EVAL (yd2 + e2y) == yd2)
+ abort ();
+ if ((yd2 + e2y) / yd2 > (1.+e1)/1.)
+ abort ();
+ pd = xd * yd;
+ ep = e0 * (1LL << xlen-1) * (1LL << ylen-1);
+ if (EVAL (pd + ep) == pd)
+ ep += ep;
+ if (pd + ep == pd)
+ abort ();
+ if (EVAL((pd + ep) / pd) > EVAL (1 + e1))
+ abort ();
+ if (EVAL (pd / yd) != x * e0)
+ abort ();
+ /* Round to even. */
+ xr = ((x & 2) + x) >> 1;
+ if (EVAL (pd / yd2) != xr * e0)
+ abort ();
+ /* Round to nearest - upwards. */
+ xr = x+1 >> 1;
+ if (EVAL (pd / (yd2-e2y)) < xr * e0)
+ abort ();
+ if (EVAL ((pd + ep) / yd2) < xr * e0)
+ abort ();
+ /* Round to nearest - downwards. */
+ xr = x >> 1;
+ if (EVAL (pd / (yd2+e2y)) > xr * e0)
+ abort ();
+ if (EVAL ((pd - ep) / yd2) > xr * e0)
+ abort ();
+ }
+ /* Now generate a set of 53 bit random numbers, calculate a fractional
+ approximation which is likely to be hard to distinguish from the
+ exact result, and check for proper rounding. */
+ for (i = 0; i < 1000; i++)
+ {
+ unsigned long long x, y, x0, y0, x1, y1, x2, y2, x3, tmp;
+ int rest_sign;
+ long long ran;
+ int xlen;
+ long long a[20];
+ int j, k;
+
+ do
+ {
+ xlen = 53;
+ x = random_bitstring (&xlen);
+ }
+ while (xlen < 10);
+ x |= 1;
+ x0 = x;
+ /* Look for a close, but inexact approximation that fits in 53 bits
+ numerator / denominator. */
+ y = 1LL << xlen - 1;
+ y0 = y;
+ rest_sign = 0;
+ for (j = 0; j < 20; j++)
+ {
+ a[j] = x/y;
+ x1 = a[j], y1 = 1;
+ for (k = j - 1; k >= 0; k--)
+ {
+ tmp = a[k] * x1 + y1;
+ if (tmp >= 1LL << 53 || tmp/a[k] < x1)
+ goto end_approx;
+ y1 = x1;
+ x1 = tmp;
+ }
+ tmp = x - a[j] * y;
+ if (!tmp)
+ break;
+ rest_sign = j & 1 ? -1 : 1;
+ x2 = x1, y2 = y1;
+ x = y;
+ y = tmp;
+ }
+ end_approx:
+ if (!rest_sign)
+ continue;
+#ifdef DEBUG
+ printf ("%d %d %f %f %e\n", j, rest_sign,
+ (double)x0/y0, (double)x2/y2,
+ (double)((long double)x0/y0-((long double)x2/y2)));
+#endif
+ x3 = EVAL (x2*e0*y0/(2.*y2)) / e0 * 2.;
+#ifdef DEBUG
+ printf ("%llx %llx\n", x0, x3);
+#endif
+ if (rest_sign > 0 ? x3 >= x0 : x3 <= x0)
+#ifdef DEBUG
+ printf("ERROR!\n");
+#else
+ abort ();
+#endif
+ }
+
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/builtin-apply2.c b/gcc/testsuite/gcc.dg/builtin-apply2.c
index bc49a645809..66fb8d4412e 100644
--- a/gcc/testsuite/gcc.dg/builtin-apply2.c
+++ b/gcc/testsuite/gcc.dg/builtin-apply2.c
@@ -26,6 +26,7 @@ void bar(char *name, ...)
int main(void)
{
+ char dummy[64]; /* Make sure we have 64 bytes of stack to copy. */
bar("eeee", 5.444567, 8.90765, 4.567789, INTEGER_ARG);
return 0;
diff --git a/gcc/testsuite/gcc.dg/cpp/_Pragma6.c b/gcc/testsuite/gcc.dg/cpp/_Pragma6.c
index 74511a10066..34a4d31185f 100644
--- a/gcc/testsuite/gcc.dg/cpp/_Pragma6.c
+++ b/gcc/testsuite/gcc.dg/cpp/_Pragma6.c
@@ -2,7 +2,7 @@
/* This is supposed to succeed only if
the target defines HANDLE_PRAGMA_PACK_PUSH_POP
and doesn't define HANDLE_PRAGMA_PACK_WITH_EXPANSION. */
-/* { dg-do compile { target { ! { powerpc-ibm-aix* *-*-solaris2* fido-*-* m68k-*-* sh*-[us]*-elf m32c-*-* } } } } */
+/* { dg-do compile { target { ! { arc-*-elf* powerpc-ibm-aix* *-*-solaris2* fido-*-* m68k-*-* sh*-[us]*-elf m32c-*-* } } } } */
#define push bar
#define foo _Pragma ("pack(push)")
diff --git a/gcc/testsuite/gcc.dg/func-ptr-prof.c b/gcc/testsuite/gcc.dg/func-ptr-prof.c
new file mode 100644
index 00000000000..7122347eeac
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/func-ptr-prof.c
@@ -0,0 +1,18 @@
+/* { dg-require-profiling "-pg" } */
+/* { dg-options "-pg" } */
+
+extern void exit (int);
+
+void
+f (void)
+{
+}
+
+void (*fp) (void) = &f;
+
+int
+main (int argc, char **argv)
+{
+ fp ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/pr28243.c b/gcc/testsuite/gcc.dg/pr28243.c
index 12447a1c3d3..c02c4037213 100644
--- a/gcc/testsuite/gcc.dg/pr28243.c
+++ b/gcc/testsuite/gcc.dg/pr28243.c
@@ -1,7 +1,7 @@
/* PR rtl-optimization/28243 */
/* Reported by Mike Frysinger <vapier@gentoo.org> */
-/* { dg-do compile } */
+/* { dg-do compile { target fpic } } */
/* { dg-require-effective-target fpic } */
/* { dg-options "-O2 -ftracer -fPIC" } */
/* { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } } */
diff --git a/gcc/testsuite/gcc.dg/pr35044.c b/gcc/testsuite/gcc.dg/pr35044.c
new file mode 100644
index 00000000000..aede8ec323a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr35044.c
@@ -0,0 +1,235 @@
+/* { dg-do run } */
+/* We want to test this with -mA7 in particular, but don't add it explicitly
+ to dg-options since this clashes with automatic multi-subtarget testing. */
+/* { dg-options "-O2 -mlong-calls -fomit-frame-pointer" { target arc*-*-* } } */
+
+typedef signed long long s64;
+typedef unsigned long long u64;
+
+struct restart_block
+{
+ long (*fn) (struct restart_block *);
+ unsigned long arg0, arg1, arg2, arg3;
+};
+
+typedef unsigned long mm_segment_t;
+
+typedef struct
+{
+ int counter;
+} atomic_t;
+
+struct thread_info
+{
+ void *task;
+ struct exec_domain *exec_domain;
+ unsigned long flags;
+ unsigned long tp_value;
+ unsigned cpu;
+ int preempt_count;
+
+ mm_segment_t addr_limit;
+
+ struct restart_block restart_block;
+};
+
+static inline __attribute__ ((always_inline))
+ struct thread_info *current_thread_info (void)
+ __attribute__ ((__const__));
+
+ static inline __attribute__ ((always_inline))
+ struct thread_info *current_thread_info (void)
+{
+ register unsigned long sp asm ("sp");
+ return (struct thread_info *) (sp & ~((1UL << 13) - 1));
+}
+
+
+typedef struct
+{
+} raw_rwlock_t;
+
+typedef struct
+{
+ raw_rwlock_t raw_lock;
+} rwlock_t;
+
+struct list_head
+{
+ struct list_head *next, *prev;
+};
+
+struct rcu_head
+{
+ struct rcu_head *next;
+ void (*func) (struct rcu_head * head);
+};
+
+enum pid_type
+{
+ PIDTYPE_PID,
+ PIDTYPE_PGID,
+ PIDTYPE_SID,
+ PIDTYPE_MAX
+};
+
+struct fown_struct
+{
+ rwlock_t lock;
+ struct pid *pid;
+ enum pid_type pid_type;
+ unsigned uid, euid;
+ int signum;
+};
+
+struct file_ra_state
+{
+ unsigned long start;
+ unsigned long size;
+ unsigned long flags;
+ unsigned long cache_hit;
+ unsigned long prev_page;
+ unsigned long ahead_start;
+ unsigned long ahead_size;
+ unsigned long ra_pages;
+ unsigned long mmap_hit;
+ unsigned long mmap_miss;
+};
+
+struct file
+{
+ union
+ {
+ struct list_head fu_list;
+ struct rcu_head fu_rcuhead;
+ } f_u;
+ struct dentry *f_dentry;
+ struct vfsmount *f_vfsmnt;
+ const struct file_operations *f_op;
+ atomic_t f_count;
+ unsigned int f_flags;
+ unsigned short f_mode;
+ s64 f_pos;
+ struct fown_struct f_owner;
+ unsigned int f_uid, f_gid;
+ struct file_ra_state f_ra;
+ unsigned long f_version;
+ void *private_data;
+ struct address_space *f_mapping;
+};
+typedef int (*filldir_t) (void *, const char *, int, s64, u64, unsigned);
+extern int __attribute__((noinline)) vfs_readdir (struct file *, filldir_t, void *);
+extern void __attribute__((noinline)) fput (struct file *);
+extern struct file * __attribute__((noinline)) fget (unsigned int fd);
+
+struct linux_dirent64
+{
+ u64 d_ino;
+ s64 d_off;
+ unsigned short d_reclen;
+ unsigned char d_type;
+ char d_name[0];
+};
+
+long __attribute__((noinline)) sys_getdents64 (unsigned int fd,
+ struct linux_dirent64 *dirent, unsigned int count);
+
+struct getdents_callback64
+{
+ struct linux_dirent64 *current_dir;
+ struct linux_dirent64 *previous;
+ int count;
+ int error;
+};
+
+extern void abort (void);
+
+struct file *
+fget (unsigned int fd)
+{
+ static struct file dummy;
+
+ asm volatile ("");
+ return &dummy;
+}
+
+extern int __attribute__((noinline)) filldir64 (void *__buf, const char *name,
+ int namlen, s64 offset, u64 ino, unsigned int d_type);
+
+int
+filldir64 (void *vp, const char *cp, int i, s64 o, u64 ull, unsigned u)
+{
+ return 0;
+}
+
+int
+vfs_readdir (struct file *f, filldir_t fun, void *buf)
+{
+ struct getdents_callback64 *cb = buf;
+
+ asm volatile ("");
+ return (long) cb->current_dir < 0 ? -1 : 0;
+}
+
+void
+fput (struct file *f)
+{
+ asm volatile ("");
+}
+
+int
+main (void)
+{
+ if (sys_getdents64 (0, 0, 0))
+ abort ();
+ return 0;
+}
+
+long
+sys_getdents64 (unsigned int fd,
+ struct linux_dirent64 *dirent, unsigned int count)
+{
+
+ register struct file *file;
+ register struct linux_dirent64 *lastdirent;
+ struct getdents_callback64 buf;
+ register int error;
+ error = -14;
+ if (!(current_thread_info ()->addr_limit == (mm_segment_t) 0xFFFFFFFF
+ || (count <= 0x60000000UL
+ && (unsigned long) dirent <= 0x60000000UL - count)))
+ goto out;
+ error = -9;
+ file = fget (fd);
+ if (!file)
+ goto out;
+ buf.current_dir = dirent;
+ buf.previous = ((void *) 0);
+ buf.count = count;
+ buf.error = 0;
+ error = vfs_readdir (file, filldir64, &buf);
+ if (error < 0)
+ goto out_putf;
+ error = buf.error;
+ lastdirent = buf.previous;
+ if (lastdirent)
+ {
+ s64 d_off = file->f_pos;
+ error = -14;
+ {
+ long __pu_err = 0;
+ s64 *__pu_addr = &lastdirent->d_off;
+ __asm__ __volatile__ ("": "=r" (__pu_err):"r" (d_off),
+ "r" (__pu_addr), "i" (-14),
+ "0" (__pu_err));
+ if ((__pu_err))
+ goto out_putf;
+ }
+ error = count - buf.count;
+ }
+
+out_putf:
+ fput (file);
+out:
+ return (error);
+}
diff --git a/gcc/testsuite/gcc.dg/sibcall-3.c b/gcc/testsuite/gcc.dg/sibcall-3.c
index e085bfbc7a3..0246a9d32dd 100644
--- a/gcc/testsuite/gcc.dg/sibcall-3.c
+++ b/gcc/testsuite/gcc.dg/sibcall-3.c
@@ -5,7 +5,7 @@
Copyright (C) 2002 Free Software Foundation Inc.
Contributed by Hans-Peter Nilsson <hp@bitrange.com> */
-/* { dg-do run { xfail { { arc-*-* avr-*-* cris-*-* crisv32-*-* h8300-*-* hppa*64*-*-* m32r-*-* m68hc1?-*-* mcore-*-* mn10300-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa*-*-* } || { arm*-*-* && { ! arm32 } } } } } */
+/* { dg-do run { xfail { { avr-*-* cris-*-* crisv32-*-* h8300-*-* hppa*64*-*-* m32r-*-* m68hc1?-*-* mcore-*-* mn10300-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa*-*-* } || { arm*-*-* && { ! arm32 } } } } } */
/* -mlongcall disables sibcall patterns. */
/* { dg-skip-if "" { powerpc*-*-* } { "-mlongcall" } { "" } } */
/* { dg-options "-O2 -foptimize-sibling-calls" } */
diff --git a/gcc/testsuite/gcc.dg/sibcall-4.c b/gcc/testsuite/gcc.dg/sibcall-4.c
index 11b09d0791b..43698e77620 100644
--- a/gcc/testsuite/gcc.dg/sibcall-4.c
+++ b/gcc/testsuite/gcc.dg/sibcall-4.c
@@ -5,7 +5,7 @@
Copyright (C) 2002 Free Software Foundation Inc.
Contributed by Hans-Peter Nilsson <hp@bitrange.com> */
-/* { dg-do run { xfail { { arc-*-* avr-*-* cris-*-* crisv32-*-* h8300-*-* hppa*64*-*-* m32r-*-* m68hc1?-*-* mcore-*-* mn10300-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa*-*-* } || { arm*-*-* && { ! arm32 } } } } } */
+/* { dg-do run { xfail { { avr-*-* cris-*-* crisv32-*-* h8300-*-* hppa*64*-*-* m32r-*-* m68hc1?-*-* mcore-*-* mn10300-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa*-*-* } || { arm*-*-* && { ! arm32 } } } } } */
/* -mlongcall disables sibcall patterns. */
/* { dg-skip-if "" { powerpc*-*-* } { "-mlongcall" } { "" } } */
/* { dg-options "-O2 -foptimize-sibling-calls" } */
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert.h b/gcc/testsuite/gcc.dg/torture/fp-int-convert.h
index 8c1968e9be2..e8742598be3 100644
--- a/gcc/testsuite/gcc.dg/torture/fp-int-convert.h
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert.h
@@ -80,7 +80,9 @@ do { \
ivin = (VAL); \
fv1 = (VAL); \
fv2 = ivin; \
- ivout = fv2; \
+ /* (unsigned long long)(double)~0ULL invokes undefined behaviour. */\
+ if (PREC_OK) \
+ ivout = fv2; \
if (ivin != (VAL) \
|| ((PREC_OK) && ivout != ivin) \
|| ((PREC_OK) && ivout != (VAL)) \
diff --git a/gcc/testsuite/gcc.dg/torture/pr37868.c b/gcc/testsuite/gcc.dg/torture/pr37868.c
index 50fa903008f..04d6f5d0e25 100644
--- a/gcc/testsuite/gcc.dg/torture/pr37868.c
+++ b/gcc/testsuite/gcc.dg/torture/pr37868.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-options "-fno-strict-aliasing" } */
-/* { dg-skip-if "unaligned access" { sparc*-*-* } "*" "" } */
+/* { dg-skip-if "unaligned access" { sparc*-*-* arc-*-* } "*" "" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c
index be37a21d415..091106d3bc3 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fdump-tree-optimized -fcommon" } */
const int conststaticvariable;
diff --git a/gcc/testsuite/gcc.target/arc/adc.c b/gcc/testsuite/gcc.target/arc/adc.c
new file mode 100644
index 00000000000..691a4e76de7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/adc.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int
+f (unsigned a, unsigned b, unsigned c, unsigned d)
+{
+ int s = 0;
+ a ^= 1;
+ if (a + b < a)
+ s = 1;
+ s += c + d;
+ return s;
+}
+
+int s0;
+
+int
+g (unsigned a, unsigned b, unsigned c, unsigned d)
+{
+ int s = 0;
+ if (a + b < a)
+ s = 1;
+ s0 = a+b;
+ s += c + d;
+ return s;
+}
+/* { dg-final { scan-assembler "add\.f\[ \t\]+0," } } */
+/* { dg-final { scan-assembler "add\.f\[ \t\]+r" } } */
+/* { dg-final { scan-assembler-times "adc\[ \t\]r\[0-9\]+, *r\[0-9\]+ *,r" 2 } } */
diff --git a/gcc/testsuite/gcc.target/arc/add_f.c b/gcc/testsuite/gcc.target/arc/add_f.c
new file mode 100644
index 00000000000..ebda0468a0b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/add_f.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+int
+f (int a, int b, int c)
+{
+ if (a+b)
+ c = 1;
+ return c;
+}
+
+int
+g (unsigned a, unsigned b)
+{
+ if (a + b < a)
+ return 43;
+ return 42;
+}
+
+int
+h (unsigned a, unsigned b)
+{
+ if (a + b < b)
+ return 43;
+ return 42;
+}
+/* { dg-final { scan-assembler-times "add\.f\[ \t\]+0," 3 } } */
+/* { dg-final { scan-assembler "mov\.eq\[ \t\]" } } */
+/* { dg-final { scan-assembler-times "mov\.(hs|lo)\[ \t\]" 2 } } */
+/* { dg-final { scan-assembler "mov\.(hs|lo)\[ \t\]" } } */
diff --git a/gcc/testsuite/gcc.target/arc/arc.exp b/gcc/testsuite/gcc.target/arc/arc.exp
new file mode 100644
index 00000000000..3b2e386c00f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/arc.exp
@@ -0,0 +1,41 @@
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Exit immediately if this isn't an ARC target.
+if ![istarget arc*-*-*] then {
+ return
+}
+
+# Load support procs.
+load_lib gcc-dg.exp
+
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CFLAGS
+if ![info exists DEFAULT_CFLAGS] then {
+ set DEFAULT_CFLAGS " -ansi -pedantic-errors"
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
+ "" $DEFAULT_CFLAGS
+
+# All done.
+dg-finish
diff --git a/gcc/testsuite/gcc.target/arc/sbc.c b/gcc/testsuite/gcc.target/arc/sbc.c
new file mode 100644
index 00000000000..7549579680b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/sbc.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int s0;
+
+int
+f(a, b, c, d)
+ unsigned a, b, c, d;
+{
+ s0 = a - b;
+ return c - d - (a < b);
+}
+
+/* { dg-final { scan-assembler "sub\.f\[ \t\]+r" } } */
+/* { dg-final { scan-assembler "sbc\[ \t\]+r\[0-9\]+, *r\[0-9\]+ *,r" } } */
diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp
index 24de1871b6a..5c07f8d4fd6 100644
--- a/gcc/testsuite/lib/scanasm.exp
+++ b/gcc/testsuite/lib/scanasm.exp
@@ -181,10 +181,15 @@ proc scan-assembler-times { args } {
set text [read $fd]
close $fd
- if { [llength [regexp -inline -all -- [lindex $args 0] $text]] == [lindex $args 1]} {
- pass "$testcase scan-assembler-times [lindex $args 0] [lindex $args 1]"
+ set pattern [lindex $args 0]
+ set printable_pattern [string map {\t \\t \n \\n \r \\r \\ \\\\} $pattern]
+
+ # don't use regexp -inline - that gives bogus results with alternative
+ # subexpressions (e.g. "operation\.(this|that)" ).
+ if { [regexp -all -- $pattern $text] == [lindex $args 1]} {
+ pass "$testcase scan-assembler-times $printable_pattern [lindex $args 1]"
} else {
- fail "$testcase scan-assembler-times [lindex $args 0] [lindex $args 1]"
+ fail "$testcase scan-assembler-times $printable_pattern [lindex $args 1]"
}
}
diff --git a/gcc/timevar.c b/gcc/timevar.c
index d0aa15b5ca1..336037fd72d 100644
--- a/gcc/timevar.c
+++ b/gcc/timevar.c
@@ -1,5 +1,5 @@
/* Timing variables for measuring compiler performance.
- Copyright (C) 2000, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
Contributed by Alex Samuel <samuel@codesourcery.com>
This file is part of GCC.
@@ -266,6 +266,10 @@ timevar_push_1 (timevar_id_t timevar)
struct timevar_stack_def *context;
struct timevar_time_def now;
+ /* Completely ignore TV_NONE. */
+ if (timevar == TV_NONE)
+ return;
+
/* Mark this timing variable as used. */
tv->used = 1;
@@ -312,6 +316,10 @@ timevar_pop_1 (timevar_id_t timevar)
struct timevar_time_def now;
struct timevar_stack_def *popped = stack;
+ /* Completely ignore TV_NONE. */
+ if (timevar == TV_NONE)
+ return;
+
gcc_assert (&timevars[timevar] == stack->timevar);
/* What time is it? */
@@ -418,6 +426,9 @@ timevar_print (FILE *fp)
end. */
if ((timevar_id_t) id == TV_TOTAL)
continue;
+ /* Always ignore TV_NONE. */
+ if ((timevar_id_t) id == TV_NONE)
+ continue;
/* Don't print timing variables that were never used. */
if (!tv->used)
diff --git a/gcc/timevar.def b/gcc/timevar.def
index c27ee161849..4c868fceef9 100644
--- a/gcc/timevar.def
+++ b/gcc/timevar.def
@@ -202,3 +202,8 @@ DEFTIMEVAR (TV_TREE_IFCOMBINE , "tree if-combine")
/* Everything else in rest_of_compilation not included above. */
DEFTIMEVAR (TV_REST_OF_COMPILATION , "rest of compilation")
+
+/* A special value used to indicate that no timevar is specified.
+ This is used by optimization passes. timevar_push and friends
+ ignore this value. */
+DEFTIMEVAR (TV_NONE , "special ignored value")
diff --git a/gcc/toplev.c b/gcc/toplev.c
index a88f9e37bac..80717675755 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -84,6 +84,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-mudflap.h"
#include "tree-pass.h"
#include "gimple.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
#include "highlev-plugin-internal.h"
-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;
@@ -159,6 +166,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. */
@@ -340,6 +356,8 @@ int align_labels_log;
int align_labels_max_skip;
int align_functions_log;
+#ifndef EXTRA_TARGET
+
typedef struct
{
const char *const string;
@@ -351,6 +369,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;
@@ -365,11 +385,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
@@ -463,7 +487,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;
@@ -645,6 +669,8 @@ strip_off_ending (char *name, int len)
}
}
+#endif /* !EXTRA_TARGET */
+
/* Output a quoted string. */
void
@@ -704,6 +730,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. */
@@ -1160,6 +1188,8 @@ print_version (FILE *file, const char *indent)
PARAM_VALUE (GGC_MIN_EXPAND), PARAM_VALUE (GGC_MIN_HEAPSIZE));
}
+#endif /* !EXTRA_TARGET */
+
#ifdef ASM_COMMENT_START
static int
print_to_asm_out_file (print_switch_type type, const char * text)
@@ -1544,8 +1574,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);
@@ -1600,6 +1631,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 ();
@@ -1653,49 +1685,60 @@ init_alignments (void)
}
/* Process the options that have been parsed. */
-static void
+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;
-
- /* 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;
+
+ /* 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)
{
@@ -1707,7 +1750,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
@@ -1718,27 +1761,29 @@ 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)
@@ -1860,10 +1905,10 @@ process_options (void)
flag_rename_registers = default_debug_hooks->var_location
!= do_nothing_debug_hooks.var_location;
- if (flag_var_tracking == AUTODETECT_VALUE)
+ if (main_target && flag_var_tracking == AUTODETECT_VALUE)
flag_var_tracking = optimize >= 1;
- if (flag_tree_cselim == AUTODETECT_VALUE)
+ if (main_target && flag_tree_cselim == AUTODETECT_VALUE)
#ifdef HAVE_conditional_move
flag_tree_cselim = 1;
#else
@@ -1873,13 +1918,13 @@ 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 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)
@@ -1906,14 +1951,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;
@@ -1922,29 +1971,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
@@ -1973,7 +2023,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. */
@@ -2012,11 +2062,13 @@ 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)
{
+ targetm_pnt = &this_targetm;
init_emit_once (debug_info_level == DINFO_LEVEL_NORMAL
|| debug_info_level == DINFO_LEVEL_VERBOSE
#ifdef VMS_DEBUGGING_INFO
@@ -2025,6 +2077,9 @@ backend_init (void)
#endif
|| flag_test_coverage);
+ EXTRA_TARGETS_CALL (backend_init ());
+ targetm_pnt = &this_targetm;
+
init_rtlanal ();
init_inline_once ();
init_varasm_once ();
@@ -2037,7 +2092,7 @@ backend_init (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 creates various _DECL nodes, so needs to be called after the
@@ -2060,11 +2115,17 @@ 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)
{
- location_t save_loc = input_location;
+ location_t save_loc ATTRIBUTE_UNUSED;
+
+ targetm_pnt = &this_targetm;
+#ifndef EXTRA_TARGET
+ save_loc = input_location;
if (dump_base_name == 0)
dump_base_name = name && name[0] ? name : "gccdump";
@@ -2073,8 +2134,11 @@ lang_dependent_init (const char *name)
if (lang_hooks.init () == 0)
return 0;
input_location = save_loc;
+ EXTRA_TARGETS_CALL (lang_dependent_init (name));
+ targetm_pnt = &this_targetm;
init_asm_output (name);
+#endif /* !EXTRA_TARGET */
/* This creates various _DECL nodes, so needs to be called after the
front end is initialized. */
@@ -2101,12 +2165,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 ();
@@ -2166,6 +2233,8 @@ finalize (void)
lang_hooks.finish ();
}
+#ifndef EXTRA_TARGET
+
/* Initialize the compiler, and compile the input file. */
static void
do_compile (void)
@@ -2177,6 +2246,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)
@@ -2244,3 +2314,7 @@ toplev_main (unsigned int argc, const char **argv)
return (SUCCESS_EXIT_CODE);
}
+
+#endif /* !EXTRA_TARGET */
+
+END_TARGET_SPECIFIC
diff --git a/gcc/toplev.h b/gcc/toplev.h
index 2324b068f77..95ac01696f5 100644
--- a/gcc/toplev.h
+++ b/gcc/toplev.h
@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_TOPLEV_H
#define GCC_TOPLEV_H
#include "input.h"
+#include "multi-target.h"
/* If non-NULL, return one past-the-end of the matching SUBPART of
the WHOLE string. */
@@ -86,10 +87,12 @@ extern void warning_for_asm (const_rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,
extern void warn_deprecated_use (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
@@ -113,7 +116,17 @@ extern void target_reinit (void);
/* A unique local time stamp, might be zero if none is available. */
extern unsigned local_tick;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* This is used by cpplib and libiberty. */
extern const char *progname;
+
+#ifdef __cplusplus
+}
+#endif
+
extern const char *dump_base_name;
extern const char *aux_base_name;
extern const char *aux_info_file_name;
@@ -167,11 +180,13 @@ extern void decode_d_option (const char *);
extern bool fast_math_flags_set_p (void);
extern bool fast_math_flags_struct_set_p (struct cl_optimization *);
+#ifndef __cplusplus
/* Return log2, or -1 if not exact. */
extern int exact_log2 (unsigned HOST_WIDE_INT);
/* Return floor of log2, with -1 for zero. */
extern int floor_log2 (unsigned HOST_WIDE_INT);
+#endif
/* Inline versions of the above for speed. */
#if GCC_VERSION >= 3004
@@ -186,13 +201,19 @@ extern int floor_log2 (unsigned HOST_WIDE_INT);
# define CTZ_HWI __builtin_ctz
# endif
-extern inline int
+#ifndef __cplusplus
+extern
+#endif
+inline int
floor_log2 (unsigned HOST_WIDE_INT x)
{
return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1;
}
-extern inline int
+#ifndef __cplusplus
+extern
+#endif
+inline int
exact_log2 (unsigned HOST_WIDE_INT x)
{
return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1;
@@ -207,6 +228,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-cfg.c b/gcc/tree-cfg.c
index 711dbb053de..28f7bf82504 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -895,7 +895,7 @@ static struct label_record
/* Callback for for_each_eh_region. Helper for cleanup_dead_labels. */
static void
-update_eh_label (struct eh_region *region)
+update_eh_label (struct eh_region_d *region)
{
tree old_label = get_eh_region_tree_label (region);
if (old_label)
@@ -2075,7 +2075,7 @@ struct gimple_opt_pass pass_remove_useless_stmts =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -4737,7 +4737,7 @@ gimple_redirect_edge_and_branch (edge e, basic_block dest)
gsi = gsi_last_bb (bb);
stmt = gsi_end_p (gsi) ? NULL : gsi_stmt (gsi);
- switch (stmt ? gimple_code (stmt) : ERROR_MARK)
+ switch (stmt ? gimple_code (stmt) : GIMPLE_ERROR_MARK)
{
case GIMPLE_COND:
/* For COND_EXPR, we only need to redirect the edge. */
@@ -7126,7 +7126,7 @@ struct gimple_opt_pass pass_warn_function_return =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -7160,7 +7160,7 @@ struct gimple_opt_pass pass_warn_function_noreturn =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c
index 5a3cb74d391..3af10f30a22 100644
--- a/gcc/tree-complex.c
+++ b/gcc/tree-complex.c
@@ -37,13 +37,17 @@ along with GCC; see the file COPYING3. If not see
out whether a complex number is degenerate in some way, having only real
or only complex parts. */
-typedef enum
+enum
{
UNINITIALIZED = 0,
ONLY_REAL = 1,
ONLY_IMAG = 2,
VARYING = 3
-} complex_lattice_t;
+};
+
+/* The type complex_lattice_t holds combinations of the above
+ constants. */
+typedef int complex_lattice_t;
#define PAIR(a, b) ((a) << 2 | (b))
@@ -963,9 +967,11 @@ expand_complex_libcall (gimple_stmt_iterator *gsi, tree ar, tree ai,
gcc_assert (GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT);
if (code == MULT_EXPR)
- bcode = BUILT_IN_COMPLEX_MUL_MIN + mode - MIN_MODE_COMPLEX_FLOAT;
+ bcode = ((enum built_in_function)
+ (BUILT_IN_COMPLEX_MUL_MIN + mode - MIN_MODE_COMPLEX_FLOAT));
else if (code == RDIV_EXPR)
- bcode = BUILT_IN_COMPLEX_DIV_MIN + mode - MIN_MODE_COMPLEX_FLOAT;
+ bcode = ((enum built_in_function)
+ (BUILT_IN_COMPLEX_DIV_MIN + mode - MIN_MODE_COMPLEX_FLOAT));
else
gcc_unreachable ();
fn = built_in_decls[bcode];
@@ -1624,7 +1630,7 @@ struct gimple_opt_pass pass_lower_complex =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1675,7 +1681,7 @@ struct gimple_opt_pass pass_lower_complex_O0 =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index ea67f1d00b4..3d9379334e4 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -284,7 +284,8 @@ print_direction_vector (FILE *outf,
for (eq = 0; eq < length; eq++)
{
- enum data_dependence_direction dir = dirv[eq];
+ enum data_dependence_direction dir =
+ (enum data_dependence_direction) dirv[eq];
switch (dir)
{
diff --git a/gcc/tree-dump.c b/gcc/tree-dump.c
index ffac189f449..ed54d1b0388 100644
--- a/gcc/tree-dump.c
+++ b/gcc/tree-dump.c
@@ -859,11 +859,11 @@ dump_register (const char *suffix, const char *swtch, const char *glob,
/* Return the dump_file_info for the given phase. */
struct dump_file_info *
-get_dump_file_info (enum tree_dump_index phase)
+get_dump_file_info (int phase)
{
if (phase < TDI_end)
return &dump_files[phase];
- else if (phase - TDI_end >= extra_dump_files_in_use)
+ else if ((size_t) (phase - TDI_end) >= extra_dump_files_in_use)
return NULL;
else
return extra_dump_files + (phase - TDI_end);
@@ -874,7 +874,7 @@ get_dump_file_info (enum tree_dump_index phase)
If the dump is not enabled, returns NULL. */
char *
-get_dump_file_name (enum tree_dump_index phase)
+get_dump_file_name (int phase)
{
char dump_id[10];
struct dump_file_info *dfi;
@@ -911,7 +911,7 @@ get_dump_file_name (enum tree_dump_index phase)
Multiple calls will reopen and append to the dump file. */
FILE *
-dump_begin (enum tree_dump_index phase, int *flag_ptr)
+dump_begin (int phase, int *flag_ptr)
{
char *name;
struct dump_file_info *dfi;
@@ -939,7 +939,7 @@ dump_begin (enum tree_dump_index phase, int *flag_ptr)
TDI_tree_all, return nonzero if any dump is enabled. */
int
-dump_enabled_p (enum tree_dump_index phase)
+dump_enabled_p (int phase)
{
if (phase == TDI_tree_all)
{
@@ -962,7 +962,7 @@ dump_enabled_p (enum tree_dump_index phase)
/* Returns nonzero if tree dump PHASE has been initialized. */
int
-dump_initialized_p (enum tree_dump_index phase)
+dump_initialized_p (int phase)
{
struct dump_file_info *dfi = get_dump_file_info (phase);
return dfi->state > 0;
@@ -971,7 +971,7 @@ dump_initialized_p (enum tree_dump_index phase)
/* Returns the switch name of PHASE. */
const char *
-dump_flag_name (enum tree_dump_index phase)
+dump_flag_name (int phase)
{
struct dump_file_info *dfi = get_dump_file_info (phase);
return dfi->swtch;
@@ -981,7 +981,7 @@ dump_flag_name (enum tree_dump_index phase)
dump_begin. */
void
-dump_end (enum tree_dump_index phase ATTRIBUTE_UNUSED, FILE *stream)
+dump_end (int phase ATTRIBUTE_UNUSED, FILE *stream)
{
fclose (stream);
}
@@ -1102,7 +1102,7 @@ dump_switch_p (const char *arg)
/* Dump FUNCTION_DECL FN as tree dump PHASE. */
void
-dump_function (enum tree_dump_index phase, tree fn)
+dump_function (int phase, tree fn)
{
FILE *stream;
int flags;
diff --git a/gcc/tree-dump.h b/gcc/tree-dump.h
index ba1b4a4ca26..86017e942dd 100644
--- a/gcc/tree-dump.h
+++ b/gcc/tree-dump.h
@@ -89,7 +89,7 @@ extern void dump_string_field (dump_info_p, const char *, const char *);
extern void dump_stmt (dump_info_p, const_tree);
extern void queue_and_dump_index (dump_info_p, const char *, const_tree, int);
extern void queue_and_dump_type (dump_info_p, const_tree);
-extern void dump_function (enum tree_dump_index, tree);
+extern void dump_function (int, tree);
extern void dump_function_to_file (tree, FILE *, int);
extern void debug_function (tree, int);
extern int dump_flag (dump_info_p, int, const_tree);
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index adff6ba850b..a11f3496013 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -87,7 +87,7 @@ struct_ptr_hash (const void *a)
of space by only allocating memory for those that can throw. */
static void
-record_stmt_eh_region (struct eh_region *region, gimple t)
+record_stmt_eh_region (struct eh_region_d *region, gimple t)
{
if (!region)
return;
@@ -351,8 +351,8 @@ struct leh_state
/* What's "current" while constructing the eh region tree. These
correspond to variables of the same name in cfun->eh, which we
don't have easy access to. */
- struct eh_region *cur_region;
- struct eh_region *prev_try;
+ struct eh_region_d *cur_region;
+ struct eh_region_d *prev_try;
/* Processing of TRY_FINALLY requires a bit more state. This is
split out into a separate structure so that we don't have to
@@ -360,6 +360,18 @@ struct leh_state
struct leh_tf_state *tf;
};
+/* See 'goto_queue' in struct leh_tf_state. */
+struct goto_queue_node
+{
+ treemple stmt;
+ gimple_seq repl_stmt;
+ gimple cont_stmt;
+ int index;
+ /* this is used when index >= 0 to indicate that stmt is a label(as
+ opposed to a goto stmt) */
+ int is_label;
+};
+
struct leh_tf_state
{
/* Pointer to the GIMPLE_TRY_FINALLY node under discussion. The
@@ -376,7 +388,7 @@ struct leh_tf_state
struct leh_state *outer;
/* The exception region created for it. */
- struct eh_region *region;
+ struct eh_region_d *region;
/* The GOTO_QUEUE is is an array of GIMPLE_GOTO and GIMPLE_RETURN statements
that are seen to escape this GIMPLE_TRY_FINALLY node.
@@ -386,15 +398,7 @@ struct leh_tf_state
REPL_STMT is the sequence used to replace the goto/return statement.
CONT_STMT is used to store the statement that allows the return/goto to
jump to the original destination. */
- struct goto_queue_node {
- treemple stmt;
- gimple_seq repl_stmt;
- gimple cont_stmt;
- int index;
- /* this is used when index >= 0 to indicate that stmt is a label(as
- opposed to a goto stmt) */
- int is_label;
- } *goto_queue;
+ struct goto_queue_node *goto_queue;
size_t goto_queue_size;
size_t goto_queue_active;
@@ -1643,7 +1647,7 @@ lower_try_finally (struct leh_state *state, gimple tp)
static gimple_seq
lower_catch (struct leh_state *state, gimple tp)
{
- struct eh_region *try_region;
+ struct eh_region_d *try_region;
struct leh_state this_state;
gimple_stmt_iterator gsi;
tree out_label;
@@ -1663,7 +1667,7 @@ lower_catch (struct leh_state *state, gimple tp)
out_label = NULL;
for (gsi = gsi_start (gimple_try_cleanup (tp)); !gsi_end_p (gsi); )
{
- struct eh_region *catch_region;
+ struct eh_region_d *catch_region;
tree eh_label;
gimple x, gcatch;
@@ -1706,7 +1710,7 @@ static gimple_seq
lower_eh_filter (struct leh_state *state, gimple tp)
{
struct leh_state this_state;
- struct eh_region *this_region;
+ struct eh_region_d *this_region;
gimple inner;
tree eh_label;
@@ -1747,7 +1751,7 @@ static gimple_seq
lower_cleanup (struct leh_state *state, gimple tp)
{
struct leh_state this_state;
- struct eh_region *this_region;
+ struct eh_region_d *this_region;
struct leh_tf_state fake_tf;
gimple_seq result;
@@ -1931,7 +1935,7 @@ struct gimple_opt_pass pass_lower_eh =
/* Construct EH edges for STMT. */
static void
-make_eh_edge (struct eh_region *region, void *data)
+make_eh_edge (struct eh_region_d *region, void *data)
{
gimple stmt;
tree lab;
@@ -1974,7 +1978,7 @@ static bool mark_eh_edge_found_error;
field, output error if something goes wrong. */
static void
-mark_eh_edge (struct eh_region *region, void *data)
+mark_eh_edge (struct eh_region_d *region, void *data)
{
gimple stmt;
tree lab;
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index 40829675b84..230b1e836c5 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-ssa-operands.h"
#include "cgraph.h"
#include "ipa-reference.h"
+#include "multi-target.h"
/* Forward declare structures for the garbage collector GTY markers. */
#ifndef GCC_BASIC_BLOCK_H
@@ -231,8 +232,10 @@ typedef struct
/* Aliasing information for SSA_NAMEs representing pointer variables. */
struct ptr_info_def GTY(())
{
- /* Mask of reasons this pointer's value escapes the function. */
- ENUM_BITFIELD (escape_type) escape_mask : 9;
+ /* Mask of reasons this pointer's value escapes the function. This
+ actually holds enum escape_type values, or'd together. So, it
+ must be wide enough to hold all values from the enum. */
+ unsigned int escape_mask : 9;
/* Nonzero if points-to analysis couldn't determine where this pointer
is pointing to. */
@@ -380,8 +383,10 @@ struct var_ann_d GTY(())
ENUM_BITFIELD (noalias_state) noalias_state : 2;
/* Mask of values saying the reasons why this variable has escaped
- the function. */
- ENUM_BITFIELD (escape_type) escape_mask : 9;
+ the function. This actually holds enum escape_type values, or'd
+ together. So, it must be wide enough to hold all values from the
+ enum. */
+ unsigned int escape_mask : 9;
/* Memory partition tag assigned to this symbol. */
tree mpt;
@@ -975,7 +980,6 @@ struct tree_niter_desc
/* In tree-vectorizer.c */
unsigned vectorize_loops (void);
extern bool vect_can_force_dr_alignment_p (const_tree, unsigned int);
-extern tree get_vectype_for_scalar_type (tree);
/* In tree-ssa-phiopt.c */
bool empty_block_p (basic_block);
@@ -1024,6 +1028,7 @@ bool gimple_duplicate_loop_to_header_edge (struct loop *, edge,
unsigned int, sbitmap,
edge, VEC (edge, heap) **,
int);
+bool gimple_can_duplicate_loop_to_header_edge (struct loop *);
struct loop *slpeel_tree_duplicate_loop_to_edge_cfg (struct loop *, edge);
void rename_variables_in_loop (struct loop *);
void rename_variables_in_bb (basic_block bb);
@@ -1165,11 +1170,13 @@ struct mem_address
};
struct affine_tree_combination;
+START_TARGET_SPECIFIC
tree create_mem_ref (gimple_stmt_iterator *, tree,
struct affine_tree_combination *, bool);
rtx addr_for_mem_ref (struct mem_address *, bool);
-void get_address_description (tree, struct mem_address *);
tree maybe_fold_tmr (tree);
+END_TARGET_SPECIFIC
+void get_address_description (tree, struct mem_address *);
void init_alias_heapvars (void);
void delete_alias_heapvars (void);
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index 0e41d5fa679..3d828edd7a7 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -1162,7 +1162,7 @@ struct gimple_opt_pass pass_if_conversion =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg | PROP_ssa | PROP_alias, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-inline.h b/gcc/tree-inline.h
index 2a4e38b1657..280079eb8b2 100644
--- a/gcc/tree-inline.h
+++ b/gcc/tree-inline.h
@@ -25,6 +25,14 @@ along with GCC; see the file COPYING3. If not see
#include "pointer-set.h"
+/* Possible desired behaviors wrt call graph edges. */
+
+enum copy_body_cge_which {
+ CB_CGE_DUPLICATE,
+ CB_CGE_MOVE,
+ CB_CGE_MOVE_CLONES
+};
+
/* Data required for function body duplication. */
typedef struct copy_body_data
@@ -79,11 +87,7 @@ typedef struct copy_body_data
/* Indicate the desired behavior wrt call graph edges. We can either
duplicate the edge (inlining, cloning), move the edge (versioning,
parallelization), or move the edges of the clones (saving). */
- enum copy_body_cge_which {
- CB_CGE_DUPLICATE,
- CB_CGE_MOVE,
- CB_CGE_MOVE_CLONES
- } transform_call_graph_edges;
+ enum copy_body_cge_which transform_call_graph_edges;
/* True if a new CFG should be created. False for inlining, true for
everything else. */
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c
index 928333ba4ba..2c0605dd886 100644
--- a/gcc/tree-into-ssa.c
+++ b/gcc/tree-into-ssa.c
@@ -325,7 +325,7 @@ get_ssa_name_ann (tree name)
info = VEC_index (ssa_name_info_p, info_for_ssa_name, ver);
if (info->age < current_info_for_ssa_name_age)
{
- info->need_phi_state = 0;
+ info->need_phi_state = NEED_PHI_STATE_UNKNOWN;
info->current_def = NULL_TREE;
info->age = current_info_for_ssa_name_age;
}
@@ -2287,7 +2287,7 @@ struct gimple_opt_pass pass_build_ssa =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg | PROP_referenced_vars, /* properties_required */
PROP_ssa, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index 219d17e7002..f6b39bb7bbe 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -818,7 +818,8 @@ rdg_flag_similar_memory_accesses (struct graph *rdg, bitmap partition,
/* If the node I has two uses, then keep these together in the
same PARTITION. */
- for (n = 0, e = rdg->vertices[i].succ; e; e = e->succ_next, n++);
+ for (n = 0, e = rdg->vertices[i].succ; e; e = e->succ_next, n++)
+ ;
if (n > 1)
rdg_flag_all_uses (rdg, i, partition, loops, processed, &foo);
diff --git a/gcc/tree-mudflap.c b/gcc/tree-mudflap.c
index 831fcc1791a..fe10cd1023b 100644
--- a/gcc/tree-mudflap.c
+++ b/gcc/tree-mudflap.c
@@ -1341,7 +1341,7 @@ struct gimple_opt_pass pass_mudflap_1 =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_gimple_any, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1360,7 +1360,7 @@ struct gimple_opt_pass pass_mudflap_2 =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_gimple_leh, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-nomudflap.c b/gcc/tree-nomudflap.c
index 3d1c7eb1d6e..0774a1966b5 100644
--- a/gcc/tree-nomudflap.c
+++ b/gcc/tree-nomudflap.c
@@ -100,7 +100,7 @@ struct gimple_opt_pass pass_mudflap_1 =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -119,7 +119,7 @@ struct gimple_opt_pass pass_mudflap_2 =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -133,6 +133,9 @@ struct gimple_opt_pass pass_mudflap_2 =
We prepare a little dummy struct here.
*/
+#ifdef __cplusplus
+extern
+#endif
const struct ggc_root_tab gt_ggc_r_gt_tree_mudflap_h[] = {
LAST_GGC_ROOT_TAB
};
diff --git a/gcc/tree-nrv.c b/gcc/tree-nrv.c
index 7e811cf8c9d..bf4b429e37f 100644
--- a/gcc/tree-nrv.c
+++ b/gcc/tree-nrv.c
@@ -349,7 +349,7 @@ struct gimple_opt_pass pass_return_slot =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_ssa | PROP_alias, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-object-size.c b/gcc/tree-object-size.c
index 7e346a9f55d..4e0157ec605 100644
--- a/gcc/tree-object-size.c
+++ b/gcc/tree-object-size.c
@@ -1111,7 +1111,7 @@ struct gimple_opt_pass pass_object_sizes =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg | PROP_ssa | PROP_alias, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c
index 6c324e16c50..482caf1a361 100644
--- a/gcc/tree-optimize.c
+++ b/gcc/tree-optimize.c
@@ -73,7 +73,7 @@ struct gimple_opt_pass pass_all_optimizations =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -101,7 +101,7 @@ struct simple_ipa_opt_pass pass_early_local_passes =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -142,7 +142,7 @@ struct gimple_opt_pass pass_all_early_optimizations =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -173,7 +173,7 @@ struct gimple_opt_pass pass_cleanup_cfg =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -208,7 +208,7 @@ struct gimple_opt_pass pass_cleanup_cfg_post_optimizing =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -242,7 +242,7 @@ struct gimple_opt_pass pass_free_datastructures =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -271,7 +271,7 @@ struct gimple_opt_pass pass_free_cfg_annotations =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -355,7 +355,7 @@ struct gimple_opt_pass pass_init_datastructures =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index 4e9b102973a..8d4b3a5524c 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -1156,7 +1156,7 @@ create_loads_and_stores_for_name (void **slot, void *data)
static void
separate_decls_in_region (edge entry, edge exit, htab_t reduction_list,
tree *arg_struct, tree *new_arg_struct,
- struct clsn_data *ld_st_data)
+ struct clsn_data *ld_st_data, unsigned new_target)
{
basic_block bb1 = split_edge (entry);
@@ -1220,7 +1220,10 @@ separate_decls_in_region (edge entry, edge exit, htab_t reduction_list,
/* Create the loads and stores. */
*arg_struct = create_tmp_var (type, ".paral_data_store");
add_referenced_var (*arg_struct);
- nvar = create_tmp_var (build_pointer_type (type), ".paral_data_load");
+ nvar = create_tmp_var (build_pointer_type_for_mode
+ (type, *targetm_array[new_target]->ptr_mode,
+ false),
+ ".paral_data_load");
add_referenced_var (nvar);
*new_arg_struct = make_ssa_name (nvar, NULL);
@@ -1270,7 +1273,7 @@ parallelized_function_p (tree fn)
a parallelized loop. */
static tree
-create_loop_fn (void)
+create_loop_fn (unsigned int target_arch)
{
char buf[100];
char *tname;
@@ -1312,6 +1315,15 @@ create_loop_fn (void)
TREE_USED (t) = 1;
DECL_ARGUMENTS (decl) = t;
+ if (target_arch)
+ {
+ const char *target_name = targetm_array[target_arch]->name;
+
+ tree value = build_string (strlen (target_name), target_name);
+ decl_attributes (&decl, build_tree_list (get_identifier ("target_arch"),
+ build_tree_list (NULL, value)),
+ 0);
+ }
allocate_struct_function (decl, false);
/* The call to allocate_struct_function clobbers CFUN, so we need to restore
@@ -1791,11 +1803,15 @@ gen_parallel_loop (struct loop *loop, htab_t reduction_list,
/* In the old loop, move all variables non-local to the loop to a structure
and back, and create separate decls for the variables used in loop. */
separate_decls_in_region (entry, exit, reduction_list, &arg_struct,
- &new_arg_struct, &clsn_data);
+ &new_arg_struct, &clsn_data, loop->target_arch);
/* Create the parallel constructs. */
- parallel_head = create_parallel_loop (loop, create_loop_fn (), arg_struct,
- new_arg_struct, n_threads);
+ parallel_head
+ = create_parallel_loop (loop, create_loop_fn (loop->target_arch),
+ arg_struct, new_arg_struct, n_threads);
+ /* ??? for loop->target_arch != cfun->target_arch, should create another
+ function so that a small slice of the loop can be run on the main
+ processor. */
if (htab_elements (reduction_list) > 0)
create_call_for_reduction (loop, reduction_list, &clsn_data);
@@ -1871,9 +1887,13 @@ parallelize_loops (void)
/* And of course, the loop must be parallelizable. */
|| !can_duplicate_loop_p (loop)
|| loop_has_blocks_with_irreducible_flag (loop)
- /* FIXME: the check for vector phi nodes could be removed. */
- || loop_has_vector_phi_nodes (loop)
- || !loop_parallel_p (loop, reduction_list, &niter_desc))
+ || (loop->target_arch != cfun->target_arch
+ ? !number_of_iterations_exit (loop, single_dom_exit (loop),
+ &niter_desc, false)
+ /* FIXME: the check for vector phi nodes could be removed. */
+ : (loop_has_vector_phi_nodes (loop)
+ || flag_tree_parallelize_loops <= 1
+ || !loop_parallel_p (loop, reduction_list, &niter_desc))))
continue;
changed = true;
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h
index 9c74f2b7d06..e488dba4862 100644
--- a/gcc/tree-pass.h
+++ b/gcc/tree-pass.h
@@ -23,6 +23,9 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_TREE_PASS_H
#define GCC_TREE_PASS_H 1
+#include "timevar.h"
+#include "multi-target.h"
+
/* In tree-dump.c */
/* Different tree dump places. When you add new tree dump places,
@@ -76,14 +79,14 @@ enum tree_dump_index
#define TDF_RHS_ONLY (1 << 17) /* a flag to only print the RHS of
a gimple stmt. */
-extern char *get_dump_file_name (enum tree_dump_index);
-extern int dump_enabled_p (enum tree_dump_index);
-extern int dump_initialized_p (enum tree_dump_index);
-extern FILE *dump_begin (enum tree_dump_index, int *);
-extern void dump_end (enum tree_dump_index, FILE *);
+extern char *get_dump_file_name (int);
+extern int dump_enabled_p (int);
+extern int dump_initialized_p (int);
+extern FILE *dump_begin (int, int *);
+extern void dump_end (int, FILE *);
extern void dump_node (const_tree, int, FILE *);
extern int dump_switch_p (const char *);
-extern const char *dump_flag_name (enum tree_dump_index);
+extern const char *dump_flag_name (int);
/* Global variables used to communicate with passes. */
extern FILE *dump_file;
@@ -91,19 +94,22 @@ extern int dump_flags;
extern const char *dump_file_name;
/* Return the dump_file_info for the given phase. */
-extern struct dump_file_info *get_dump_file_info (enum tree_dump_index);
+extern struct dump_file_info *get_dump_file_info (int);
+
+/* The possible types of optimization pass. */
+enum opt_pass_type {
+ GIMPLE_PASS,
+ RTL_PASS,
+ SIMPLE_IPA_PASS,
+ IPA_PASS
+};
/* Describe one pass; this is the common part shared across different pass
types. */
struct opt_pass
{
/* Optimization pass type. */
- enum opt_pass_type {
- GIMPLE_PASS,
- RTL_PASS,
- SIMPLE_IPA_PASS,
- IPA_PASS
- } type;
+ enum opt_pass_type type;
/* Terse name of the pass used as a fragment of the dump file
name. If the name starts with a star, no dump happens. */
const char *name;
@@ -128,7 +134,7 @@ struct opt_pass
/* The timevar id associated with this pass. */
/* ??? Ideally would be dynamically assigned. */
- unsigned int tv_id;
+ timevar_id_t tv_id;
/* Sets of properties input and output from this pass. */
unsigned int properties_required;
@@ -152,12 +158,22 @@ 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;
/* Description of IPA pass with generate summary, write, execute, read and
transform stages. */
-struct ipa_opt_pass
+struct ipa_opt_pass_d
{
struct opt_pass pass;
@@ -220,12 +236,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. */
@@ -375,7 +392,9 @@ extern struct gimple_opt_pass pass_simple_dse;
extern struct gimple_opt_pass pass_nrv;
extern struct gimple_opt_pass pass_mark_used_blocks;
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;
@@ -393,10 +412,10 @@ extern struct gimple_opt_pass pass_reset_cc_flags;
extern struct gimple_opt_pass pass_ml_feat;
/* IPA Passes */
-extern struct ipa_opt_pass pass_ipa_inline;
-extern struct ipa_opt_pass pass_ipa_cp;
-extern struct ipa_opt_pass pass_ipa_reference;
-extern struct ipa_opt_pass pass_ipa_pure_const;
+extern struct ipa_opt_pass_d pass_ipa_inline;
+extern struct ipa_opt_pass_d pass_ipa_cp;
+extern struct ipa_opt_pass_d pass_ipa_reference;
+extern struct ipa_opt_pass_d pass_ipa_pure_const;
extern struct simple_ipa_opt_pass pass_ipa_matrix_reorg;
extern struct simple_ipa_opt_pass pass_ipa_early_inline;
@@ -414,7 +433,10 @@ extern struct gimple_opt_pass pass_free_datastructures;
extern struct gimple_opt_pass pass_init_datastructures;
extern struct gimple_opt_pass pass_fixup_cfg;
-extern struct rtl_opt_pass pass_expand;
+extern struct gimple_opt_pass pass_tracer;
+
+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;
@@ -436,7 +458,6 @@ extern struct rtl_opt_pass pass_gcse;
extern struct rtl_opt_pass pass_jump_bypass;
extern struct rtl_opt_pass pass_profiling;
extern struct rtl_opt_pass pass_rtl_ifcvt;
-extern struct gimple_opt_pass pass_tracer;
extern struct rtl_opt_pass pass_into_cfg_layout_mode;
extern struct rtl_opt_pass pass_outof_cfg_layout_mode;
@@ -508,6 +529,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-predcom.c b/gcc/tree-predcom.c
index bd82a8016fb..6abb25bd9ba 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -210,7 +210,7 @@ along with GCC; see the file COPYING3. If not see
/* Data references (or phi nodes that carry data reference values across
loop iterations). */
-typedef struct dref
+typedef struct dref_d
{
/* The reference itself. */
struct data_reference *ref;
@@ -775,7 +775,7 @@ split_data_refs_to_components (struct loop *loop,
comps[ca] = comp;
}
- dataref = XCNEW (struct dref);
+ dataref = XCNEW (struct dref_d);
dataref->ref = dr;
dataref->stmt = DR_STMT (dr);
dataref->offset = double_int_zero;
@@ -1126,7 +1126,7 @@ find_looparound_phi (struct loop *loop, dref ref, dref root)
static void
insert_looparound_copy (chain_p chain, dref ref, gimple phi)
{
- dref nw = XCNEW (struct dref), aref;
+ dref nw = XCNEW (struct dref_d), aref;
unsigned i;
nw->stmt = phi;
@@ -2362,7 +2362,7 @@ combine_chains (chain_p ch1, chain_p ch2)
for (i = 0; (VEC_iterate (dref, ch1->refs, i, r1)
&& VEC_iterate (dref, ch2->refs, i, r2)); i++)
{
- nw = XCNEW (struct dref);
+ nw = XCNEW (struct dref_d);
nw->stmt = stmt_combining_refs (r1, r2);
nw->distance = r1->distance;
diff --git a/gcc/tree-scalar-evolution.h b/gcc/tree-scalar-evolution.h
index 06324972ca5..5c24bacef4d 100644
--- a/gcc/tree-scalar-evolution.h
+++ b/gcc/tree-scalar-evolution.h
@@ -38,6 +38,7 @@ unsigned int scev_const_prop (void);
bool expression_expensive_p (tree);
extern bool simple_iv (struct loop *, struct loop *, tree, affine_iv *, bool);
+#ifndef EXTRA_TARGET
/* Returns the basic block preceding LOOP or ENTRY_BLOCK_PTR when the
loop is function's body. */
@@ -65,5 +66,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-ssa-address.c b/gcc/tree-ssa-address.c
index 6c81b09febf..ed6afdd935f 100644
--- a/gcc/tree-ssa-address.c
+++ b/gcc/tree-ssa-address.c
@@ -42,6 +42,7 @@ along with GCC; see the file COPYING3. If not see
#include "expr.h"
#include "ggc.h"
#include "tree-affine.h"
+#include "multi-target.h"
/* TODO -- handling of symbols (according to Richard Hendersons
comments, http://gcc.gnu.org/ml/gcc-patches/2005-04/msg00949.html):
@@ -79,6 +80,8 @@ struct mem_addr_template GTY (())
be filled in. */
};
+START_TARGET_SPECIFIC
+
/* The templates. Each of the five bits of the index corresponds to one
component of TARGET_MEM_REF being present, see TEMPL_IDX. */
@@ -243,6 +246,7 @@ addr_for_mem_ref (struct mem_address *addr, bool really_expand)
return address;
}
+#ifndef EXTRA_TARGET
/* Returns address of MEM_REF in TYPE. */
tree
@@ -301,6 +305,7 @@ tree_mem_ref_addr (tree type, tree mem_ref)
return addr;
}
+#endif /* !EXTRA_TARGET */
/* Returns true if a memory reference in MODE and with parameters given by
ADDR is valid on the current target. */
@@ -692,6 +697,7 @@ create_mem_ref (gimple_stmt_iterator *gsi, tree type, aff_tree *addr,
gcc_unreachable ();
}
+#ifndef EXTRA_TARGET
/* Copies components of the address from OP to ADDR. */
void
@@ -715,6 +721,7 @@ copy_mem_ref_info (tree to, tree from)
/* And the info about the original reference. */
TMR_ORIGINAL (to) = TMR_ORIGINAL (from);
}
+#endif /* !EXTRA_TARGET */
/* Move constants in target_mem_ref REF to offset. Returns the new target
mem ref if anything changes, NULL_TREE otherwise. */
@@ -774,6 +781,7 @@ maybe_fold_tmr (tree ref)
return ret;
}
+#ifndef EXTRA_TARGET
/* Dump PARTS to FILE. */
extern void dump_mem_address (FILE *, struct mem_address *);
@@ -811,5 +819,8 @@ dump_mem_address (FILE *file, struct mem_address *parts)
fprintf (file, "\n");
}
}
+#endif /* EXTRA_TARGET */
#include "gt-tree-ssa-address.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index 6502f85657f..a7500d68aa7 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -547,7 +547,7 @@ set_initial_properties (struct alias_info *ai)
tree var;
tree ptr;
bool any_pt_anything = false;
- enum escape_type pt_anything_mask = 0;
+ int pt_anything_mask = 0;
FOR_EACH_REFERENCED_VAR (var, rvi)
{
@@ -3767,7 +3767,7 @@ struct gimple_opt_pass pass_reset_cc_flags =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_referenced_vars |PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -3789,7 +3789,7 @@ struct gimple_opt_pass pass_build_alias =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
PROP_alias, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index c87707eeec6..b0e52432541 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -3304,7 +3304,7 @@ struct gimple_opt_pass pass_fold_builtins =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c
index a340c5e2103..94d96874f36 100644
--- a/gcc/tree-ssa-dse.c
+++ b/gcc/tree-ssa-dse.c
@@ -772,7 +772,7 @@ struct gimple_opt_pass pass_simple_dse =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-ssa-loop-ch.c b/gcc/tree-ssa-loop-ch.c
index 9f1f4c3d040..bfc2d237d53 100644
--- a/gcc/tree-ssa-loop-ch.c
+++ b/gcc/tree-ssa-loop-ch.c
@@ -132,7 +132,7 @@ copy_loop_headers (void)
loop_iterator li;
struct loop *loop;
basic_block header;
- edge exit, entry;
+ edge exit, new_exit, entry;
basic_block *bbs, *copied_bbs;
unsigned n_bbs;
unsigned bbs_size;
@@ -180,9 +180,41 @@ copy_loop_headers (void)
/* Find a successor of header that is inside a loop; i.e. the new
header after the condition is copied. */
if (flow_bb_inside_loop_p (loop, EDGE_SUCC (header, 0)->dest))
- exit = EDGE_SUCC (header, 0);
+ new_exit = EDGE_SUCC (header, 0);
else
- exit = EDGE_SUCC (header, 1);
+ new_exit = EDGE_SUCC (header, 1);
+ /* If we already have copied a header that tests a variable,
+ and all that we'd have left is an in/decrement of that variable,
+ that variable is most likely the biv, and the 'header' we are
+ currently looking at is the actual loop body. This happens
+ for instance with libgcc2.c:__gcc_bcmp . */
+ if (header != loop->header
+ && single_succ_p (new_exit->dest)
+ && EDGE_SUCC (new_exit->dest, 0)->dest == loop->header)
+ {
+ gimple cond = last_and_only_stmt (loop->header);
+ gimple modify = last_stmt (new_exit->dest);
+
+ if (cond && modify && gimple_code (modify) == GIMPLE_ASSIGN
+ && modify == gsi_stmt (gsi_after_labels (new_exit->dest)))
+ {
+ /* We checked earlier that cond is a GIMPLE_COND. */
+ tree var;
+ tree m_var = gimple_get_lhs (modify);
+
+ if (truth_value_p (gimple_cond_code (cond)))
+ var = gimple_cond_lhs (cond);
+ else
+ /* If variable is used as dircetly condition, use that. */
+ /* Abort so that we can use gdb to inspect this point live. */
+ gcc_unreachable ();
+ if (TREE_CODE (var) == SSA_NAME
+ && TREE_CODE (m_var) == SSA_NAME
+ && SSA_NAME_VAR (var) == SSA_NAME_VAR (m_var))
+ break;
+ }
+ }
+ exit = new_exit;
bbs[n_bbs++] = header;
gcc_assert (bbs_size > n_bbs);
header = exit->dest;
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c
index e278c55b08b..cc2a795a6d6 100644
--- a/gcc/tree-ssa-loop-ivcanon.c
+++ b/gcc/tree-ssa-loop-ivcanon.c
@@ -62,6 +62,7 @@ enum unroll_level
iteration. */
UL_NO_GROWTH, /* Only loops whose unrolling will not cause increase
of code size. */
+ UL_ESTIMATE_GROWTH, /* Estimate size increase for UL_ALL. */
UL_ALL /* All suitable loops. */
};
@@ -156,14 +157,20 @@ estimated_unrolled_size (unsigned HOST_WIDE_INT ninsns,
/* Tries to unroll LOOP completely, i.e. NITER times.
UL determines which loops we are allowed to unroll.
- EXIT is the exit of the loop that should be eliminated. */
+ EXIT is the exit of the loop that should be eliminated.
+ If UL is UL_ESTIMATE_GROWTH, we set loop->lpt_decision.times to
+ the number of instructions that the loop is estimated to grow by
+ when completely or ordinarily unrolling; we do both these estimations
+ here rather than spread them further around in order to keep the number
+ of times we recompute the number of instructions in the loop down. */
static bool
try_unroll_loop_completely (struct loop *loop,
edge exit, tree niter,
enum unroll_level ul)
{
- unsigned HOST_WIDE_INT n_unroll, ninsns, max_unroll, unr_insns;
+ unsigned HOST_WIDE_INT n_unroll, e_unroll, max_unroll, unr_insns;
+ unsigned HOST_WIDE_INT ninsns = 0;
gimple cond;
if (loop->inner)
@@ -173,6 +180,21 @@ try_unroll_loop_completely (struct loop *loop,
return false;
n_unroll = tree_low_cst (niter, 1);
+ /* In case we don't completely unroll the loop, estimate its size increase
+ from normal unrolling. */
+ if (ul == UL_ESTIMATE_GROWTH && n_unroll)
+ {
+ ninsns = tree_num_loop_insns (loop, &eni_size_weights);
+ e_unroll = n_unroll + 1;
+ max_unroll = PARAM_VALUE (PARAM_MAX_UNROLL_TIMES);
+ if (e_unroll > max_unroll)
+ e_unroll = max_unroll;
+ max_unroll = PARAM_VALUE (PARAM_MAX_UNROLLED_INSNS) / ninsns;
+ if (e_unroll > max_unroll)
+ e_unroll = max_unroll;
+ if (e_unroll > 1)
+ loop->lpt_decision.times = ninsns * (e_unroll - 1);
+ }
max_unroll = PARAM_VALUE (PARAM_MAX_COMPLETELY_PEEL_TIMES);
if (n_unroll > max_unroll)
return false;
@@ -182,7 +204,8 @@ try_unroll_loop_completely (struct loop *loop,
if (ul == UL_SINGLE_ITER)
return false;
- ninsns = tree_num_loop_insns (loop, &eni_size_weights);
+ if (!ninsns)
+ ninsns = tree_num_loop_insns (loop, &eni_size_weights);
unr_insns = estimated_unrolled_size (ninsns, n_unroll);
if (dump_file && (dump_flags & TDF_DETAILS))
@@ -212,6 +235,20 @@ try_unroll_loop_completely (struct loop *loop,
}
}
+ if (ul == UL_ESTIMATE_GROWTH)
+ {
+ if (n_unroll && gimple_can_duplicate_loop_to_header_edge (loop))
+ {
+ int unroll_cost = unr_insns - ninsns;
+
+ if (unroll_cost < 0)
+ unroll_cost = 0;
+ loop->lpt_decision.times = unroll_cost;
+ return true;
+ }
+ else
+ return false;
+ }
if (n_unroll)
{
sbitmap wont_exit;
@@ -274,6 +311,8 @@ canonicalize_loop_induction_variables (struct loop *loop,
edge exit = NULL;
tree niter;
+ if (ul == UL_ESTIMATE_GROWTH)
+ loop->lpt_decision.times = 0;
niter = number_of_latch_executions (loop);
if (TREE_CODE (niter) == INTEGER_CST)
{
@@ -352,23 +391,77 @@ tree_unroll_loops_completely (bool may_increase_size, bool unroll_outer)
struct loop *loop;
bool changed;
enum unroll_level ul;
+ sbitmap changed_loops;
+ int nloops;
+ nloops = number_of_loops ();
+ changed_loops = sbitmap_alloc (nloops);
do
{
+ int last_outer = -1;
+ unsigned outer_size = 0;
+
changed = false;
- FOR_EACH_LOOP (li, loop, LI_ONLY_INNERMOST)
+ sbitmap_zero (changed_loops);
+ FOR_EACH_LOOP (li, loop, LI_REALLY_FROM_INNERMOST)
{
+ int outer = loop_outer (loop)->num;
+
+ gcc_assert (loop->num < nloops);
+ gcc_assert (outer < nloops);
+ /* By propagating up the changed bit piecemeal, we avoid
+ n^3 behaviour for deeply nested loops. */
+ if (TEST_BIT (changed_loops, loop->num))
+ {
+
+ SET_BIT (changed_loops, outer);
+ continue;
+ }
+ if (loop->inner)
+ continue;
if (may_increase_size && optimize_loop_for_speed_p (loop)
/* Unroll outermost loops only if asked to do so or they do
not cause code growth. */
- && (unroll_outer
- || loop_outer (loop_outer (loop))))
- ul = UL_ALL;
+ && (unroll_outer || loop_outer (loop_outer (loop))))
+ {
+ unsigned max_outer
+ = PARAM_VALUE (PARAM_MAX_COMPLETELY_PEELED_OUTER_INSNS);
+
+ if (outer != last_outer)
+ {
+ struct loop *oloop, *sloop;
+
+ oloop = loop_outer (loop);
+ outer_size = tree_num_loop_insns (oloop, &eni_size_weights);
+ /* Sum up the size growth for unrolling to be done on
+ all the sibling loops.
+ If a loop is not an inner loop, we won't actually unroll
+ it, but we'd likely unroll its leaf loops, so assuming
+ that we unroll the outer loop gives an estimate of the
+ growth of the inner loops. */
+ for (sloop = oloop->inner;
+ outer_size <= max_outer && sloop;
+ sloop = sloop->next)
+ {
+ sloop->lpt_decision.times = 0;
+ canonicalize_loop_induction_variables
+ (sloop, false, UL_ESTIMATE_GROWTH,
+ !flag_tree_loop_ivcanon);
+ outer_size += sloop->lpt_decision.times;
+ }
+ last_outer = outer;
+ }
+ ul = outer_size <= max_outer ? UL_ALL : UL_NO_GROWTH;
+ }
else
ul = UL_NO_GROWTH;
- changed |= canonicalize_loop_induction_variables
- (loop, false, ul, !flag_tree_loop_ivcanon);
+ if (canonicalize_loop_induction_variables
+ (loop, false, ul, !flag_tree_loop_ivcanon))
+ {
+ SET_BIT (changed_loops, outer);
+ changed |= true;
+ }
}
if (changed)
@@ -385,6 +478,7 @@ tree_unroll_loops_completely (bool may_increase_size, bool unroll_outer)
}
}
while (changed);
+ sbitmap_free (changed_loops);
return 0;
}
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index fcaf7846458..286d88ed778 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -152,11 +152,14 @@ struct cost_pair
comp_cost cost; /* The cost. */
bitmap depends_on; /* The list of invariants that have to be
preserved. */
- tree value; /* For final value elimination, the expression for
- the final value of the iv. For iv elimination,
- the new bound to compare with. */
+ tree value; /* For iv elimination, the new bound to compare
+ with. For addresses, the amound by that the
+ candidate can be increased in an autoincrement
+ (int casted to pointer, not a tree). */
};
+#define CP_AUTOINC_OFFSET(CP) ((HOST_WIDE_INT) (size_t) (CP)->value)
+
/* Use. */
struct iv_use
{
@@ -270,6 +273,10 @@ struct iv_ca
/* Number of times each candidate is used. */
unsigned *n_cand_uses;
+ /* For each candidate, the total offset of all autoincrements applied
+ to it. */
+ HOST_WIDE_INT *cand_autoinc_distance;
+
/* The candidates used. */
bitmap cands;
@@ -2993,20 +3000,24 @@ multiplier_allowed_in_address_p (HOST_WIDE_INT ratio, enum machine_mode mode)
variable is omitted. Compute the cost for a memory reference that accesses
a memory location of mode MEM_MODE.
+ MAY_AUTOINC is set to true if the autoincrement (increasing index by
+ size of MEM_MODE / RATIO) is available.
+
TODO -- there must be some better way. This all is quite crude. */
static comp_cost
get_address_cost (bool symbol_present, bool var_present,
unsigned HOST_WIDE_INT offset, HOST_WIDE_INT ratio,
enum machine_mode mem_mode,
- bool speed)
+ bool speed, bool *may_autoinc)
{
static bool initialized[MAX_MACHINE_MODE];
static HOST_WIDE_INT rat[MAX_MACHINE_MODE], off[MAX_MACHINE_MODE];
static HOST_WIDE_INT min_offset[MAX_MACHINE_MODE], max_offset[MAX_MACHINE_MODE];
static unsigned costs[MAX_MACHINE_MODE][2][2][2][2];
+ static bool has_autoinc[MAX_MACHINE_MODE][2][2][2][2];
unsigned cost, acost, complexity;
- bool offset_p, ratio_p;
+ bool offset_p, ratio_p, autoinc;
HOST_WIDE_INT s_offset;
unsigned HOST_WIDE_INT mask;
unsigned bits;
@@ -3016,7 +3027,7 @@ get_address_cost (bool symbol_present, bool var_present,
HOST_WIDE_INT i;
HOST_WIDE_INT start = BIGGEST_ALIGNMENT / BITS_PER_UNIT;
int old_cse_not_expected;
- unsigned sym_p, var_p, off_p, rat_p, add_c;
+ unsigned sym_p, var_p, off_p, rat_p, add_c, ainc_p;
rtx seq, addr, base;
rtx reg0, reg1;
@@ -3066,14 +3077,21 @@ get_address_cost (bool symbol_present, bool var_present,
reg0 = gen_raw_REG (Pmode, LAST_VIRTUAL_REGISTER + 1);
reg1 = gen_raw_REG (Pmode, LAST_VIRTUAL_REGISTER + 2);
- for (i = 0; i < 16; i++)
+ for (i = 0; i < 32; i++)
{
sym_p = i & 1;
var_p = (i >> 1) & 1;
off_p = (i >> 2) & 1;
rat_p = (i >> 3) & 1;
+ ainc_p = (i >> 4) & 1;
addr = reg0;
+ if (ainc_p)
+ {
+ if (!(flag_ivopts_post_inc && HAVE_POST_INCREMENT))
+ continue;
+ addr = gen_rtx_POST_INC (Pmode, addr);
+ }
if (rat_p)
addr = gen_rtx_fmt_ee (MULT, Pmode, addr,
gen_int_mode (rat[mem_mode], Pmode));
@@ -3104,7 +3122,15 @@ get_address_cost (bool symbol_present, bool var_present,
if (base)
addr = gen_rtx_fmt_ee (PLUS, Pmode, addr, base);
-
+
+ /* Try detecting presence of autoincrement instructions. */
+ if (ainc_p)
+ {
+ has_autoinc[mem_mode][sym_p][var_p][off_p][rat_p]
+ = memory_address_p (mem_mode, addr);
+ continue;
+ }
+
start_sequence ();
/* To avoid splitting addressing modes, pretend that no cse will
follow. */
@@ -3149,11 +3175,11 @@ get_address_cost (bool symbol_present, bool var_present,
if (acost < costs[mem_mode][1][var_p][off_p][rat_p])
costs[mem_mode][1][var_p][off_p][rat_p] = acost;
}
-
+
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, "Address costs:\n");
-
+
for (i = 0; i < 16; i++)
{
sym_p = i & 1;
@@ -3172,7 +3198,9 @@ get_address_cost (bool symbol_present, bool var_present,
fprintf (dump_file, "rat * ");
acost = costs[mem_mode][sym_p][var_p][off_p][rat_p];
- fprintf (dump_file, "index costs %d\n", acost);
+ autoinc = has_autoinc[mem_mode][sym_p][var_p][off_p][rat_p];
+ fprintf (dump_file, "index costs %d%s\n", acost,
+ autoinc ? " (may include autoinc/dec)" : "");
}
fprintf (dump_file, "\n");
}
@@ -3185,6 +3213,8 @@ get_address_cost (bool symbol_present, bool var_present,
offset |= ~mask;
s_offset = offset;
+ autoinc = has_autoinc[mem_mode][symbol_present][var_present][offset != 0][ratio != 1];
+
cost = 0;
offset_p = (s_offset != 0
&& min_offset[mem_mode] <= s_offset
@@ -3193,11 +3223,22 @@ get_address_cost (bool symbol_present, bool var_present,
&& multiplier_allowed_in_address_p (ratio, mem_mode));
if (ratio != 1 && !ratio_p)
- cost += multiply_by_cost (ratio, Pmode, speed);
+ {
+ cost += multiply_by_cost (ratio, Pmode, speed);
+
+ /* If we have to do the multiplication of index separately, we cannot
+ use autoincrement. */
+ autoinc = false;
+ }
if (s_offset && !offset_p && !symbol_present)
- cost += add_cost (Pmode, speed);
+ {
+ cost += add_cost (Pmode, speed);
+ autoinc = false;
+ }
+ if (may_autoinc)
+ *may_autoinc = autoinc;
acost = costs[mem_mode][symbol_present][var_present][offset_p][ratio_p];
complexity = (symbol_present != 0) + (var_present != 0) + offset_p + ratio_p;
return new_cost (cost + acost, complexity);
@@ -3493,29 +3534,71 @@ difference_cost (struct ivopts_data *data,
return cost;
}
+/* Returns the offset by that CAND will be incremented in a postincrement,
+ when it is used (after multiplication by RATIO) to access a memory
+ location whose mode is MMODE. Zero is returned if using autoincrement
+ is not possible. */
+
+static int
+autoincrement_distance (struct iv_cand *cand, HOST_WIDE_INT ratio,
+ enum machine_mode mmode)
+{
+ HOST_WIDE_INT step, delta, size;
+ bool negate = false;
+
+ if (!cst_and_fits_in_hwi (cand->iv->step))
+ return 0;
+ step = int_cst_value (cand->iv->step);
+
+ if (step < 0)
+ {
+ if (!HAVE_POST_DECREMENT)
+ return 0;
+
+ step = -step;
+ negate = true;
+ }
+
+ size = GET_MODE_SIZE (mmode);
+ if (size % ratio != 0)
+ return 0;
+
+ delta = size / ratio;
+ if (delta > step)
+ return 0;
+
+ return negate ? -delta : delta;
+}
+
+static GTY(()) rtx post_modify_addr;
/* Determines the cost of the computation by that USE is expressed
from induction variable CAND. If ADDRESS_P is true, we just need
to create an address from it, otherwise we want to get it into
register. A set of invariants we depend on is stored in
- DEPENDS_ON. AT is the statement at that the value is computed. */
+ DEPENDS_ON. AT is the statement at that the value is computed.
+ If autoincrement of CAND can be used in the computation,
+ AUTOINC_DISTANCE is set to the amount by that it can be incremented. */
static comp_cost
get_computation_cost_at (struct ivopts_data *data,
struct iv_use *use, struct iv_cand *cand,
- bool address_p, bitmap *depends_on, gimple at)
+ bool address_p, bitmap *depends_on, gimple at,
+ HOST_WIDE_INT *autoinc_distance)
{
tree ubase = use->iv->base, ustep = use->iv->step;
tree cbase, cstep;
tree utype = TREE_TYPE (ubase), ctype;
unsigned HOST_WIDE_INT cstepi, offset = 0;
HOST_WIDE_INT ratio, aratio;
- bool var_present, symbol_present;
+ bool var_present, symbol_present, autoinc;
comp_cost cost;
unsigned n_sums;
double_int rat;
bool speed = optimize_bb_for_speed_p (gimple_bb (at));
*depends_on = NULL;
+ if (autoinc_distance)
+ *autoinc_distance = 0;
/* Only consider real candidates. */
if (!cand->iv)
@@ -3611,9 +3694,38 @@ get_computation_cost_at (struct ivopts_data *data,
(symbol/var/const parts may be omitted). If we are looking for an address,
find the cost of addressing this. */
if (address_p)
- return add_costs (cost, get_address_cost (symbol_present, var_present,
- offset, ratio,
- TYPE_MODE (TREE_TYPE (*use->op_p)), speed));
+ {
+ enum machine_mode mmode = TYPE_MODE (TREE_TYPE (*use->op_p));
+
+ cost = add_costs (cost, get_address_cost (symbol_present, var_present,
+ offset, ratio, mmode, speed, &autoinc));
+ if (autoinc && autoinc_distance)
+ *autoinc_distance = autoincrement_distance (cand, ratio, mmode);
+ /* ??? We could use PRE / POST modify in the presence of an offset -
+ if we'd arrange for the iv to be adjusted accordingly. */
+ /* ??? could we use POST_MODIFY_REG? compile/pr35043.i provides a
+ testcase with variable step. */
+ if (flag_ivopts_post_modify && HAVE_POST_MODIFY_DISP
+ && cst_and_fits_in_hwi (cand->iv->step)
+ && !symbol_present && !var_present && !offset && ratio == 1)
+ {
+ rtx offset = GEN_INT (int_cst_value (cand->iv->step));
+ rtx addr = post_modify_addr;
+
+ if (!addr)
+ {
+ rtx reg = gen_raw_REG (Pmode, LAST_VIRTUAL_REGISTER + 1);
+ addr = gen_rtx_PLUS (Pmode, reg, const0_rtx);
+ addr = gen_rtx_POST_MODIFY (Pmode, reg, addr);
+ post_modify_addr = addr;
+ }
+ XEXP (XEXP (addr, 1), 1) = offset;
+ if (memory_address_p (mmode, addr))
+ *autoinc_distance = int_cst_value (cand->iv->step);
+ }
+
+ return cost;
+ }
/* Otherwise estimate the costs for computing the expression. */
aratio = ratio > 0 ? ratio : -ratio;
@@ -3666,10 +3778,11 @@ fallback:
static comp_cost
get_computation_cost (struct ivopts_data *data,
struct iv_use *use, struct iv_cand *cand,
- bool address_p, bitmap *depends_on)
+ bool address_p, bitmap *depends_on,
+ HOST_WIDE_INT *autoinc_distance)
{
- return get_computation_cost_at (data,
- use, cand, address_p, depends_on, use->stmt);
+ return get_computation_cost_at (data, use, cand, address_p, depends_on,
+ use->stmt, autoinc_distance);
}
/* Determines cost of basing replacement of USE on CAND in a generic
@@ -3693,7 +3806,7 @@ determine_use_iv_cost_generic (struct ivopts_data *data,
return true;
}
- cost = get_computation_cost (data, use, cand, false, &depends_on);
+ cost = get_computation_cost (data, use, cand, false, &depends_on, NULL);
set_use_iv_cost (data, use, cand, cost, depends_on, NULL_TREE);
return !infinite_cost_p (cost);
@@ -3706,9 +3819,12 @@ determine_use_iv_cost_address (struct ivopts_data *data,
struct iv_use *use, struct iv_cand *cand)
{
bitmap depends_on;
- comp_cost cost = get_computation_cost (data, use, cand, true, &depends_on);
+ HOST_WIDE_INT autoinc_distance;
+ comp_cost cost = get_computation_cost (data, use, cand, true, &depends_on,
+ &autoinc_distance);
- set_use_iv_cost (data, use, cand, cost, depends_on, NULL_TREE);
+ set_use_iv_cost (data, use, cand, cost, depends_on,
+ (tree) (size_t) autoinc_distance);
return !infinite_cost_p (cost);
}
@@ -3887,7 +4003,7 @@ determine_use_iv_cost_condition (struct ivopts_data *data,
gcc_assert (ok);
express_cost = get_computation_cost (data, use, cand, false,
- &depends_on_express);
+ &depends_on_express, NULL);
fd_ivopts_data = data;
walk_tree (&cmp_iv->base, find_depends, &depends_on_express, NULL);
@@ -4229,6 +4345,42 @@ iv_ca_set_remove_invariants (struct iv_ca *ivs, bitmap invs)
}
}
+/* Returns true if the candidate CAND is autoincremented according to
+ iv usage assignment IVS. */
+
+static bool
+cand_autoincremented_p (struct iv_ca *ivs, struct iv_cand *cand)
+{
+ if (!cst_and_fits_in_hwi (cand->iv->step))
+ return false;
+
+ /* TODO: this misses the cases where only some of the memory references
+ expressed by CAND are used for the autoincrements. */
+ return (int_cst_value (cand->iv->step)
+ == ivs->cand_autoinc_distance[cand->id]);
+}
+
+/* Adds (if ADD is true) or removes (if ADD is false) a bonus for using
+ autoincrements to express candidate CAND to costs in IVS. */
+
+static void
+recompute_autoinc_bonus (struct iv_ca *ivs, struct iv_cand *cand, bool add,
+ bool speed)
+{
+ unsigned bonus;
+
+ if (!cand_autoincremented_p (ivs, cand))
+ return;
+
+ /* If the candidate is autoincremented, we do not need to count its increment
+ cost. */
+ bonus = add_cost (TYPE_MODE (TREE_TYPE (cand->iv->base)), speed);
+ if (add)
+ ivs->cand_cost -= bonus;
+ else
+ ivs->cand_cost += bonus;
+}
+
/* Set USE not to be expressed by any candidate in IVS. */
static void
@@ -4237,6 +4389,7 @@ iv_ca_set_no_cp (struct ivopts_data *data, struct iv_ca *ivs,
{
unsigned uid = use->id, cid;
struct cost_pair *cp;
+ bool speed = optimize_loop_for_speed_p (data->current_loop);
cp = ivs->cand_for_use[uid];
if (!cp)
@@ -4247,6 +4400,13 @@ iv_ca_set_no_cp (struct ivopts_data *data, struct iv_ca *ivs,
ivs->cand_for_use[uid] = NULL;
ivs->n_cand_uses[cid]--;
+ if (use->type == USE_ADDRESS)
+ {
+ recompute_autoinc_bonus (ivs, cp->cand, false, speed);
+ ivs->cand_autoinc_distance[cid] -= CP_AUTOINC_OFFSET (cp);
+ recompute_autoinc_bonus (ivs, cp->cand, true, speed);
+ }
+
if (ivs->n_cand_uses[cid] == 0)
{
bitmap_clear_bit (ivs->cands, cid);
@@ -4291,6 +4451,7 @@ iv_ca_set_cp (struct ivopts_data *data, struct iv_ca *ivs,
struct iv_use *use, struct cost_pair *cp)
{
unsigned uid = use->id, cid;
+ bool speed = optimize_loop_for_speed_p (data->current_loop);
if (ivs->cand_for_use[uid] == cp)
return;
@@ -4316,6 +4477,13 @@ iv_ca_set_cp (struct ivopts_data *data, struct iv_ca *ivs,
iv_ca_set_add_invariants (ivs, cp->cand->depends_on);
}
+
+ if (use->type == USE_ADDRESS)
+ {
+ recompute_autoinc_bonus (ivs, cp->cand, false, speed);
+ ivs->cand_autoinc_distance[cid] += CP_AUTOINC_OFFSET (cp);
+ recompute_autoinc_bonus (ivs, cp->cand, true, speed);
+ }
ivs->cand_use_cost = add_costs (ivs->cand_use_cost, cp->cost);
iv_ca_set_add_invariants (ivs, cp->depends_on);
@@ -4522,6 +4690,7 @@ iv_ca_new (struct ivopts_data *data)
nw->bad_uses = 0;
nw->cand_for_use = XCNEWVEC (struct cost_pair *, n_iv_uses (data));
nw->n_cand_uses = XCNEWVEC (unsigned, n_iv_cands (data));
+ nw->cand_autoinc_distance = XCNEWVEC (HOST_WIDE_INT, n_iv_cands (data));
nw->cands = BITMAP_ALLOC (NULL);
nw->n_cands = 0;
nw->n_regs = 0;
@@ -4540,6 +4709,7 @@ iv_ca_free (struct iv_ca **ivs)
{
free ((*ivs)->cand_for_use);
free ((*ivs)->n_cand_uses);
+ free ((*ivs)->cand_autoinc_distance);
BITMAP_FREE ((*ivs)->cands);
free ((*ivs)->n_invariant_uses);
free (*ivs);
@@ -4554,9 +4724,18 @@ iv_ca_dump (struct ivopts_data *data, FILE *file, struct iv_ca *ivs)
const char *pref = " invariants ";
unsigned i;
comp_cost cost = iv_ca_cost (ivs);
+ struct iv_cand *cand;
fprintf (file, " cost %d (complexity %d)\n", cost.cost, cost.complexity);
- bitmap_print (file, ivs->cands, " candidates ","\n");
+ fprintf (file, " candidates");
+ for (i = 0; i < n_iv_cands (data); i++)
+ {
+ cand = iv_cand (data, i);
+ if (iv_ca_cand_used_p (ivs, cand))
+ fprintf (file, " %d%s", i,
+ cand_autoincremented_p (ivs, cand) ? "(autoincremented)" : "");
+ }
+ fprintf (file, "\n");
for (i = 1; i <= data->max_inv_id; i++)
if (ivs->n_invariant_uses[i])
@@ -5611,3 +5790,5 @@ tree_ssa_iv_optimize (void)
tree_ssa_iv_optimize_finalize (&data);
}
+
+#include "gt-tree-ssa-loop-ivopts.h"
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index 7ebe680871d..57929a150c3 100644
--- a/gcc/tree-ssa-loop-manip.c
+++ b/gcc/tree-ssa-loop-manip.c
@@ -623,6 +623,21 @@ gimple_duplicate_loop_to_header_edge (struct loop *loop, edge e,
return true;
}
+/* Return true if gimple_duplicate_loop_to_header_edge would return true,
+ without actually altering any trees. */
+bool
+gimple_can_duplicate_loop_to_header_edge (struct loop *loop)
+{
+ basic_block *bbs;
+
+ if (!loops_state_satisfies_p (LOOPS_HAVE_SIMPLE_LATCHES))
+ return false;
+ if (!loops_state_satisfies_p (LOOPS_HAVE_PREHEADERS))
+ return false;
+ bbs = get_loop_body_in_dom_order (loop);
+ return can_copy_bbs_p (bbs, loop->num_nodes);
+}
+
/* Returns true if we can unroll LOOP FACTOR times. Number
of iterations of the loop is returned in NITER. */
diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c
index 37f378a796b..cd9aa947dc4 100644
--- a/gcc/tree-ssa-loop.c
+++ b/gcc/tree-ssa-loop.c
@@ -243,7 +243,7 @@ struct gimple_opt_pass pass_vectorize =
0, /* properties_provided */
0, /* properties_destroyed */
TODO_verify_loops, /* todo_flags_start */
- TODO_dump_func | TODO_update_ssa
+ TODO_dump_func | TODO_update_ssa | TODO_rebuild_alias
| TODO_ggc_collect /* todo_flags_finish */
}
};
@@ -587,7 +587,15 @@ struct gimple_opt_pass pass_complete_unrolli =
static bool
gate_tree_parallelize_loops (void)
{
- return flag_tree_parallelize_loops > 1;
+ struct loop *loop;
+ loop_iterator li;
+
+ if (flag_tree_parallelize_loops > 1)
+ return true;
+ FOR_EACH_LOOP (li, loop, 0)
+ if (loop->target_arch != cfun->target_arch)
+ return true;
+ return false;
}
static unsigned
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c
index c568cf0e53a..a26efa1c05f 100644
--- a/gcc/tree-ssa-math-opts.c
+++ b/gcc/tree-ssa-math-opts.c
@@ -564,7 +564,7 @@ struct gimple_opt_pass pass_cse_reciprocals =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -778,7 +778,7 @@ struct gimple_opt_pass pass_cse_sincos =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -870,7 +870,7 @@ struct gimple_opt_pass pass_convert_to_rsqrt =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 9d931c496e8..d73d0a6991c 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -104,6 +104,10 @@ along with GCC; see the file COPYING3. If not see
In order to make it fully redundant, we insert the expression into
the predecessors where it is not available, but is ANTIC.
+ When optimizing for size, we only eliminate the partial redundancy
+ if we need to insert in only one predecessor. This avoids almost
+ completely the code size increase that PRE usually causes.
+
For the partial anticipation case, we only perform insertion if it
is partially anticipated in some block, and fully available in all
of the predecessors.
@@ -429,6 +433,7 @@ static pre_expr bitmap_find_leader (bitmap_set_t, unsigned int, gimple);
static void bitmap_value_insert_into_set (bitmap_set_t, pre_expr);
static void bitmap_value_replace_in_set (bitmap_set_t, pre_expr);
static void bitmap_set_copy (bitmap_set_t, bitmap_set_t);
+static void bitmap_set_and (bitmap_set_t, bitmap_set_t);
static bool bitmap_set_contains_value (bitmap_set_t, unsigned int);
static void bitmap_insert_into_set (bitmap_set_t, pre_expr);
static void bitmap_insert_into_set_1 (bitmap_set_t, pre_expr, bool);
@@ -2988,13 +2993,6 @@ insert_into_preds_of_block (basic_block block, unsigned int exprnum,
tree temp;
gimple phi;
- if (dump_file && (dump_flags & TDF_DETAILS))
- {
- fprintf (dump_file, "Found partial redundancy for expression ");
- print_pre_expr (dump_file, expr);
- fprintf (dump_file, " (%04d)\n", val);
- }
-
/* Make sure we aren't creating an induction variable. */
if (block->loop_depth > 0 && EDGE_COUNT (block->preds) == 2
&& expr->kind != REFERENCE)
@@ -3192,6 +3190,47 @@ insert_into_preds_of_block (basic_block block, unsigned int exprnum,
}
+/* Indicate if, when optimizing for speed, it is appropriate to make
+ INSERTS_NEEDED insertions in order to make EXPR in BLOCK redundant. */
+static bool
+ppre_n_insert_for_speed_p (pre_expr expr, basic_block block,
+ unsigned int inserts_needed)
+{
+ /* The more expensive EXPR is, the more we should be prepared to insert
+ in the predecessors of BLOCK to make EXPR fully redundant.
+ For now, only recognize AND, OR, XOR, PLUS and MINUS of a multiple-use
+ SSA_NAME with a constant as cheap. */
+ int cost;
+
+ if (flag_tree_pre_partial_partial_obliviously)
+ return true;
+ if (expr->kind == NARY)
+ {
+ vn_nary_op_t nary = PRE_EXPR_NARY (expr);
+ switch (nary->opcode)
+ {
+ tree name, cnst;
+ case BIT_AND_EXPR: case BIT_IOR_EXPR: case BIT_XOR_EXPR:
+ case PLUS_EXPR: case MINUS_EXPR:
+
+ gcc_assert (nary->length == 2);
+ name = nary->op[0];
+ cnst = nary->op[1];
+ if (TREE_CODE (name) != SSA_NAME || has_single_use (name))
+ return true;
+ if (!is_gimple_min_invariant (cnst))
+ return true;
+ cost = 1;
+ break;
+ default:
+ return true;
+ }
+ }
+ else
+ return true;
+ return EDGE_COUNT (block->preds) * cost >= inserts_needed;
+
+}
/* Perform insertion of partially redundant values.
For BLOCK, do the following:
@@ -3226,6 +3265,7 @@ do_regular_insertion (basic_block block, basic_block dom)
pre_expr *avail;
unsigned int val;
bool by_some = false;
+ unsigned int inserts_needed = 0;
bool cant_insert = false;
bool all_same = true;
pre_expr first_s = NULL;
@@ -3280,6 +3320,7 @@ do_regular_insertion (basic_block block, basic_block dom)
{
avail[bprime->index] = eprime;
all_same = false;
+ inserts_needed++;
}
else
{
@@ -3289,6 +3330,11 @@ do_regular_insertion (basic_block block, basic_block dom)
first_s = edoubleprime;
else if (!pre_expr_eq (first_s, edoubleprime))
all_same = false;
+ /* If the available value is not a NAME, PREing this
+ value will probably result in a copy on the edge
+ to assign the expression to a register. */
+ if (edoubleprime->kind != NAME)
+ inserts_needed++;
}
}
/* If we can insert it, it's not the same value
@@ -3297,9 +3343,28 @@ do_regular_insertion (basic_block block, basic_block dom)
partially redundant. */
if (!cant_insert && !all_same && by_some && dbg_cnt (treepre_insert))
{
- if (insert_into_preds_of_block (block, get_expression_id (expr),
- avail))
- new_stuff = true;
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file,
+ "Found partial redundancy for expression ");
+ print_pre_expr (dump_file, expr);
+ fprintf (dump_file, " (%04d)\n", get_expr_value_id (expr));
+ }
+
+ /* If optimizing for size, insert at most one
+ new expression to avoid increasing code size. */
+ if (optimize_function_for_speed_p (cfun)
+ ? (1 || ppre_n_insert_for_speed_p (expr, block, inserts_needed))
+ : EDGE_COUNT (block->preds) - inserts_needed == 1)
+ new_stuff |=
+ insert_into_preds_of_block (block,
+ get_expression_id (expr),
+ avail);
+ else if (dump_file && (dump_flags & TDF_DETAILS))
+ fprintf (dump_file, "Not inserting (optimizing for %s)\n",
+ optimize_function_for_speed_p (cfun)
+ ? "speed" : "size");
+
}
/* If all edges produce the same value and that value is
an invariant, then the PHI has the same value on all
@@ -3428,9 +3493,28 @@ do_partial_partial_insertion (basic_block block, basic_block dom)
if (!cant_insert && by_all && dbg_cnt (treepre_insert))
{
pre_stats.pa_insert++;
- if (insert_into_preds_of_block (block, get_expression_id (expr),
- avail))
- new_stuff = true;
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file,
+ "Found partial redundancy for expression ");
+ print_pre_expr (dump_file, expr);
+ fprintf (dump_file, " (%04d)\n", get_expr_value_id (expr));
+ }
+ /* Assuming the expression is 50% anticipatable, we have to
+ multiply the number of insertions needed by two for a cost
+ comparison. */
+ if (!optimize_function_for_speed_p (cfun)
+ || ppre_n_insert_for_speed_p (expr, block,
+ 2 * EDGE_COUNT (block->preds)))
+ new_stuff |=
+ insert_into_preds_of_block (block,
+ get_expression_id (expr),
+ avail);
+ else if (dump_file && (dump_flags & TDF_DETAILS))
+ fprintf (dump_file, "Not inserting (optimizing for %s)\n",
+ optimize_function_for_speed_p (cfun)
+ ? "speed" : "size");
+
}
free (avail);
}
@@ -3471,7 +3555,9 @@ insert_aux (basic_block block)
if (!single_pred_p (block))
{
new_stuff |= do_regular_insertion (block, dom);
- if (do_partial_partial)
+ /* Don't bother with partial-partial redundancies when
+ optimizing for size. */
+ if (do_partial_partial && ! optimize_function_for_size_p (cfun))
new_stuff |= do_partial_partial_insertion (block, dom);
}
}
@@ -4220,11 +4306,11 @@ fini_pre (bool do_fre)
only wants to do full redundancy elimination. */
static unsigned int
-execute_pre (bool do_fre ATTRIBUTE_UNUSED)
+execute_pre (bool do_fre)
{
unsigned int todo = 0;
- do_partial_partial = optimize > 2;
+ do_partial_partial = flag_tree_pre_partial_partial;
/* This has to happen before SCCVN runs because
loop_optimizer_init may create new phis, etc. */
@@ -4297,19 +4383,20 @@ execute_pre (bool do_fre ATTRIBUTE_UNUSED)
return todo;
}
-/* Gate and execute functions for PRE. */
+/* Gate and execute functions for FRE/PRE. */
static unsigned int
do_pre (void)
{
- return TODO_rebuild_alias | execute_pre (false);
+ return TODO_rebuild_alias
+ | execute_pre (! flag_tree_pre);
}
static bool
gate_pre (void)
{
- /* PRE tends to generate bigger code. */
- return flag_tree_pre != 0 && optimize_function_for_speed_p (cfun);
+ /* Run FRE even if we don't run PRE. */
+ return (flag_tree_fre || flag_tree_pre);
}
struct gimple_opt_pass pass_pre =
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index 7d7236e2966..7cbf2fdf69f 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -1151,7 +1151,7 @@ vn_reference_insert_pieces (VEC (tree, gc) *vuses,
/* Compute and return the hash value for nary operation VBO1. */
-inline hashval_t
+hashval_t
vn_nary_op_compute_hash (const vn_nary_op_t vno1)
{
hashval_t hash = 0;
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index 168a6c02524..62c8cd15cf4 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -1644,7 +1644,7 @@ struct gimple_opt_pass pass_early_warn_uninitialized =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1663,7 +1663,7 @@ struct gimple_opt_pass pass_late_warn_uninitialized =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1807,7 +1807,7 @@ struct gimple_opt_pass pass_update_address_taken =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c
index f02bbe6e123..41f4782b803 100644
--- a/gcc/tree-ssanames.c
+++ b/gcc/tree-ssanames.c
@@ -353,7 +353,7 @@ struct gimple_opt_pass pass_release_ssa_names =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c
index 00fce82e750..cab2d085a0a 100644
--- a/gcc/tree-stdarg.c
+++ b/gcc/tree-stdarg.c
@@ -905,7 +905,7 @@ struct gimple_opt_pass pass_stdarg =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg | PROP_ssa | PROP_alias, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c
index 061d6c95a4e..9199e07c6d1 100644
--- a/gcc/tree-tailcall.c
+++ b/gcc/tree-tailcall.c
@@ -1003,7 +1003,7 @@ struct gimple_opt_pass pass_tail_recursion =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg | PROP_ssa, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -1022,7 +1022,7 @@ struct gimple_opt_pass pass_tail_calls =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg | PROP_ssa | PROP_alias, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c
index e753ccbabf4..b2b52bd1c96 100644
--- a/gcc/tree-vect-analyze.c
+++ b/gcc/tree-vect-analyze.c
@@ -2750,8 +2750,9 @@ vect_build_slp_tree (loop_vec_info loop_vinfo, slp_tree *node,
unsigned int i;
VEC (gimple, heap) *stmts = SLP_TREE_SCALAR_STMTS (*node);
gimple stmt = VEC_index (gimple, stmts, 0);
- enum vect_def_type first_stmt_dt0 = 0, first_stmt_dt1 = 0;
- enum tree_code first_stmt_code = 0, rhs_code;
+ enum vect_def_type first_stmt_dt0 = vect_unknown_def_type;
+ enum vect_def_type first_stmt_dt1 = vect_unknown_def_type;
+ enum tree_code first_stmt_code = ERROR_MARK, rhs_code;
tree first_stmt_def1_type = NULL_TREE, first_stmt_def0_type = NULL_TREE;
tree lhs;
bool stop_recursion = false, need_same_oprnds = false;
@@ -4576,7 +4577,13 @@ vect_analyze_loop (struct loop *loop)
loop_vec_info loop_vinfo;
if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "===== analyze_loop_nest =====");
+ {
+ if (targetm_pnt == &this_targetm)
+ fprintf (vect_dump, "===== analyze_loop_nest =====");
+ else
+ fprintf (vect_dump, "===== analyze_loop_nest for target %s =====",
+ targetm.name);
+ }
if (loop_outer (loop)
&& loop_vec_info_for_loop (loop_outer (loop))
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c
index 13138ddd464..5dd153c93a2 100644
--- a/gcc/tree-vect-generic.c
+++ b/gcc/tree-vect-generic.c
@@ -555,7 +555,7 @@ struct gimple_opt_pass pass_lower_vector =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
@@ -575,7 +575,7 @@ struct gimple_opt_pass pass_lower_vector_ssa =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
PROP_cfg, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c
index 8486775ab77..b4c496cc49b 100644
--- a/gcc/tree-vect-patterns.c
+++ b/gcc/tree-vect-patterns.c
@@ -697,7 +697,7 @@ vect_pattern_recog_1 (
}
else
{
- enum tree_code vec_mode;
+ enum machine_mode vec_mode;
enum insn_code icode;
optab optab;
diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c
index 46fcb1fea63..1ccd059c9af 100644
--- a/gcc/tree-vect-transform.c
+++ b/gcc/tree-vect-transform.c
@@ -53,7 +53,7 @@ static tree vect_create_destination_var (tree, tree);
static tree vect_create_data_ref_ptr
(gimple, struct loop*, tree, tree *, gimple *, bool, bool *, tree);
static tree vect_create_addr_base_for_vector_ref
- (gimple, gimple_seq *, tree, struct loop *);
+ (gimple, gimple_seq *, tree, struct loop *, alias_set_type);
static tree vect_get_new_vect_var (tree, enum vect_var_kind, const char *);
static tree vect_get_vec_def_for_operand (tree, gimple, tree *);
static tree vect_init_vector (gimple, tree, tree, gimple_stmt_iterator *);
@@ -875,7 +875,8 @@ static tree
vect_create_addr_base_for_vector_ref (gimple stmt,
gimple_seq *new_stmt_list,
tree offset,
- struct loop *loop)
+ struct loop *loop,
+ alias_set_type ptr_alias_set)
{
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
@@ -944,10 +945,18 @@ vect_create_addr_base_for_vector_ref (gimple stmt,
/* addr_expr = addr_base */
addr_expr = vect_get_new_vect_var (vect_ptr_type, vect_pointer_var,
get_name (base_name));
+ if (ptr_alias_set)
+ DECL_POINTER_ALIAS_SET (addr_expr) = ptr_alias_set;
+ /* FIXME: as addr_expr has no memory tag, alias analysis thinks it
+ 'points-to anything' . */
add_referenced_var (addr_expr);
vec_stmt = fold_convert (vect_ptr_type, addr_base);
addr_expr2 = vect_get_new_vect_var (vect_ptr_type, vect_pointer_var,
get_name (base_name));
+ if (ptr_alias_set)
+ DECL_POINTER_ALIAS_SET (addr_expr2) = ptr_alias_set;
+ /* FIXME: as addr_expr2 has no memory tag, alias analysis thinks it
+ 'points-to anything' . */
add_referenced_var (addr_expr2);
vec_stmt = force_gimple_operand (vec_stmt, &seq, false, addr_expr2);
gimple_seq_add_seq (new_stmt_list, seq);
@@ -1034,6 +1043,7 @@ vect_create_data_ref_ptr (gimple stmt, struct loop *at_loop,
tree indx_before_incr, indx_after_incr;
gimple incr;
tree step;
+ alias_set_type ptr_alias_set = 0;
/* Check the step (evolution) of the load in LOOP, and record
whether it's invariant. */
@@ -1082,7 +1092,7 @@ vect_create_data_ref_ptr (gimple stmt, struct loop *at_loop,
&& TYPE_RESTRICT (TREE_TYPE (DR_BASE_ADDRESS (dr))))
{
get_alias_set (base_name);
- DECL_POINTER_ALIAS_SET (vect_ptr)
+ DECL_POINTER_ALIAS_SET (vect_ptr) = ptr_alias_set
= DECL_POINTER_ALIAS_SET (SSA_NAME_VAR (DR_BASE_ADDRESS (dr)));
}
@@ -1141,7 +1151,7 @@ vect_create_data_ref_ptr (gimple stmt, struct loop *at_loop,
/* Create: (&(base[init_val+offset]) in the loop preheader. */
new_temp = vect_create_addr_base_for_vector_ref (stmt, &new_stmt_list,
- offset, loop);
+ offset, loop, ptr_alias_set);
pe = loop_preheader_edge (loop);
if (new_stmt_list)
{
@@ -2560,7 +2570,7 @@ vect_create_epilog_for_reduction (tree vect_def, gimple stmt,
}
else
{
- enum tree_code shift_code = 0;
+ enum tree_code shift_code = ERROR_MARK;
bool have_whole_vector_shift = true;
int bit_offset;
int element_bitsize = tree_low_cst (bitsize, 1);
@@ -2828,7 +2838,7 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi,
tree vectype = STMT_VINFO_VECTYPE (stmt_info);
loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- enum tree_code code, orig_code, epilog_reduc_code = 0;
+ enum tree_code code, orig_code, epilog_reduc_code = ERROR_MARK;
enum machine_mode vec_mode;
int op_type;
optab optab, reduc_optab;
@@ -3064,13 +3074,13 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi,
{
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "no optab for reduction.");
- epilog_reduc_code = NUM_TREE_CODES;
+ epilog_reduc_code = (enum tree_code) NUM_TREE_CODES;
}
if (optab_handler (reduc_optab, vec_mode)->insn_code == CODE_FOR_nothing)
{
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "reduc op not supported by target.");
- epilog_reduc_code = NUM_TREE_CODES;
+ epilog_reduc_code = (enum tree_code) NUM_TREE_CODES;
}
if (!vec_stmt) /* transformation not required. */
@@ -5659,7 +5669,7 @@ vect_setup_realignment (gimple stmt, gimple_stmt_iterator *gsi,
{
/* Generate the INIT_ADDR computation outside LOOP. */
init_addr = vect_create_addr_base_for_vector_ref (stmt, &stmts,
- NULL_TREE, loop);
+ NULL_TREE, loop, 0);
pe = loop_preheader_edge (loop);
new_bb = gsi_insert_seq_on_edge_immediate (pe, stmts);
gcc_assert (!new_bb);
@@ -7621,7 +7631,7 @@ vect_gen_niters_for_prolog_loop (loop_vec_info loop_vinfo, tree loop_niters)
{
gimple_seq new_stmts = NULL;
tree start_addr = vect_create_addr_base_for_vector_ref (dr_stmt,
- &new_stmts, NULL_TREE, loop);
+ &new_stmts, NULL_TREE, loop, 0);
tree ptr_type = TREE_TYPE (start_addr);
tree size = TYPE_SIZE (ptr_type);
tree type = lang_hooks.types.type_for_size (tree_low_cst (size, 1), 1);
@@ -7859,7 +7869,7 @@ vect_create_cond_for_align_checks (loop_vec_info loop_vinfo,
/* create: addr_tmp = (int)(address_of_first_vector) */
addr_base =
vect_create_addr_base_for_vector_ref (ref_stmt, &new_stmt_list,
- NULL_TREE, loop);
+ NULL_TREE, loop, 0);
if (new_stmt_list != NULL)
gimple_seq_add_seq (cond_expr_stmt_list, new_stmt_list);
@@ -8024,10 +8034,10 @@ vect_create_cond_for_alias_checks (loop_vec_info loop_vinfo,
addr_base_a =
vect_create_addr_base_for_vector_ref (stmt_a, cond_expr_stmt_list,
- NULL_TREE, loop);
+ NULL_TREE, loop, 0);
addr_base_b =
vect_create_addr_base_for_vector_ref (stmt_b, cond_expr_stmt_list,
- NULL_TREE, loop);
+ NULL_TREE, loop, 0);
segment_length_a = vect_vfa_segment_size (dr_a, vect_factor);
segment_length_b = vect_vfa_segment_size (dr_b, vect_factor);
@@ -8328,6 +8338,7 @@ vect_transform_loop (loop_vec_info loop_vinfo)
bool strided_store;
bool slp_scheduled = false;
unsigned int nunits;
+ bool arch_change = loop->target_arch != cfun->target_arch;
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "=== vec_transform_loop ===");
@@ -8343,7 +8354,7 @@ vect_transform_loop (loop_vec_info loop_vinfo)
/* Peel the loop if there are data refs with unknown alignment.
Only one data ref with unknown store is allowed. */
- if (LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo))
+ if (!arch_change && LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo))
vect_do_peeling_for_alignment (loop_vinfo);
/* If the loop has a symbolic number of iterations 'n' (i.e. it's not a
@@ -8369,6 +8380,8 @@ vect_transform_loop (loop_vec_info loop_vinfo)
split_edge (loop_preheader_edge (loop));
+ targetm_pnt = targetm_array[loop->target_arch];
+
/* FORNOW: the vectorizer supports only loops which body consist
of one basic block (header + empty latch). When the vectorizer will
support more involved loop forms, the order by which the BBs are
@@ -8508,6 +8521,8 @@ vect_transform_loop (loop_vec_info loop_vinfo)
until all the loops have been transformed? */
update_ssa (TODO_update_ssa);
+ targetm_pnt = targetm_array[cfun->target_arch];
+
if (vect_print_dump_info (REPORT_VECTORIZED_LOOPS))
fprintf (vect_dump, "LOOP VECTORIZED.");
if (loop->inner && vect_print_dump_info (REPORT_VECTORIZED_LOOPS))
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index 2c5d9cca136..d3791690f3d 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -520,7 +520,7 @@ slpeel_update_phi_nodes_for_guard1 (edge guard_edge, struct loop *loop,
update_phi = gsi_stmt (gsi_update);
/* Virtual phi; Mark it for renaming. We actually want to call
- mar_sym_for_renaming, but since all ssa renaming datastructures
+ mark_sym_for_renaming, but since all ssa renaming datastructures
are going to be freed before we get to call ssa_update, we just
record this name for now in a bitmap, and will mark it for
renaming later. */
@@ -1450,9 +1450,9 @@ vect_set_verbosity_level (const char *val)
vl = atoi (val);
if (vl < MAX_VERBOSITY_LEVEL)
- vect_verbosity_level = vl;
+ vect_verbosity_level = (enum verbosity_levels) vl;
else
- vect_verbosity_level = MAX_VERBOSITY_LEVEL - 1;
+ vect_verbosity_level = (enum verbosity_levels) (MAX_VERBOSITY_LEVEL - 1);
}
@@ -1533,7 +1533,7 @@ new_stmt_vec_info (gimple stmt, loop_vec_info loop_vinfo)
STMT_VINFO_TYPE (res) = undef_vec_info_type;
STMT_VINFO_STMT (res) = stmt;
STMT_VINFO_LOOP_VINFO (res) = loop_vinfo;
- STMT_VINFO_RELEVANT (res) = 0;
+ STMT_VINFO_RELEVANT (res) = vect_unused_in_loop;
STMT_VINFO_LIVE_P (res) = false;
STMT_VINFO_VECTYPE (res) = NULL;
STMT_VINFO_VEC_STMT (res) = NULL;
@@ -1555,7 +1555,7 @@ new_stmt_vec_info (gimple stmt, loop_vec_info loop_vinfo)
STMT_VINFO_SAME_ALIGN_REFS (res) = VEC_alloc (dr_p, heap, 5);
STMT_VINFO_INSIDE_OF_LOOP_COST (res) = 0;
STMT_VINFO_OUTSIDE_OF_LOOP_COST (res) = 0;
- STMT_SLP_TYPE (res) = 0;
+ STMT_SLP_TYPE (res) = loop_vect;
DR_GROUP_FIRST_DR (res) = NULL;
DR_GROUP_NEXT_DR (res) = NULL;
DR_GROUP_SIZE (res) = 0;
@@ -1836,54 +1836,6 @@ vect_can_force_dr_alignment_p (const_tree decl, unsigned int alignment)
}
-/* Function get_vectype_for_scalar_type.
-
- Returns the vector type corresponding to SCALAR_TYPE as supported
- by the target. */
-
-tree
-get_vectype_for_scalar_type (tree scalar_type)
-{
- enum machine_mode inner_mode = TYPE_MODE (scalar_type);
- int nbytes = GET_MODE_SIZE (inner_mode);
- int nunits;
- tree vectype;
-
- if (nbytes == 0 || nbytes >= UNITS_PER_SIMD_WORD (inner_mode))
- return NULL_TREE;
-
- /* FORNOW: Only a single vector size per mode (UNITS_PER_SIMD_WORD)
- is expected. */
- nunits = UNITS_PER_SIMD_WORD (inner_mode) / nbytes;
-
- vectype = build_vector_type (scalar_type, nunits);
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "get vectype with %d units of type ", nunits);
- print_generic_expr (vect_dump, scalar_type, TDF_SLIM);
- }
-
- if (!vectype)
- return NULL_TREE;
-
- if (vect_print_dump_info (REPORT_DETAILS))
- {
- fprintf (vect_dump, "vectype: ");
- print_generic_expr (vect_dump, vectype, TDF_SLIM);
- }
-
- if (!VECTOR_MODE_P (TYPE_MODE (vectype))
- && !INTEGRAL_MODE_P (TYPE_MODE (vectype)))
- {
- if (vect_print_dump_info (REPORT_DETAILS))
- fprintf (vect_dump, "mode not supported by target.");
- return NULL_TREE;
- }
-
- return vectype;
-}
-
-
/* Function vect_supportable_dr_alignment
Return whether the data reference DR is supported with respect to its
@@ -1895,7 +1847,7 @@ vect_supportable_dr_alignment (struct data_reference *dr)
gimple stmt = DR_STMT (dr);
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
tree vectype = STMT_VINFO_VECTYPE (stmt_info);
- enum machine_mode mode = (int) TYPE_MODE (vectype);
+ enum machine_mode mode = TYPE_MODE (vectype);
struct loop *vect_loop = LOOP_VINFO_LOOP (STMT_VINFO_LOOP_VINFO (stmt_info));
bool nested_in_vect_loop = nested_in_vect_loop_p (vect_loop, stmt);
bool invariant_in_outerloop = false;
@@ -2157,7 +2109,7 @@ supportable_widening_operation (enum tree_code code, gimple stmt, tree vectype,
struct loop *vect_loop = LOOP_VINFO_LOOP (loop_info);
bool ordered_p;
enum machine_mode vec_mode;
- enum insn_code icode1 = 0, icode2 = 0;
+ enum insn_code icode1 = (enum insn_code) 0, icode2 = (enum insn_code) 0;
optab optab1, optab2;
tree type = gimple_expr_type (stmt);
tree wide_vectype = get_vectype_for_scalar_type (type);
@@ -2808,15 +2760,71 @@ vectorize_loops (void)
FOR_EACH_LOOP (li, loop, 0)
if (optimize_loop_nest_for_speed_p (loop))
{
- loop_vec_info loop_vinfo;
+ loop_vec_info loop_vinfo = 0;
+ int best_factor = -1;
+ int target_arch, best_arch = -1;
vect_loop_location = find_loop_location (loop);
- loop_vinfo = vect_analyze_loop (loop);
+ for (target_arch = -1; targetm_pnt = targetm_array[++target_arch]; )
+ {
+ if (loop_vinfo)
+ destroy_loop_vec_info (loop_vinfo, true);
+ loop_vinfo = vect_analyze_loop (loop);
+ if (!loop_vinfo)
+ continue;
+ /* FIXME: insert some machine learning heuristic here to
+ better compare the targets. */
+ if (LOOP_VINFO_VECTORIZABLE_P (loop_vinfo)
+ && LOOP_VINFO_VECT_FACTOR (loop_vinfo) > best_factor)
+ {
+ best_arch = target_arch;
+ best_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
+ }
+ }
+ if (best_arch >= 0 && target_arch != best_arch)
+ {
+ if (loop_vinfo)
+ {
+ destroy_loop_vec_info (loop_vinfo, true);
+ loop_vinfo = 0;
+ }
+ targetm_pnt = targetm_array[best_arch];
+ loop_vinfo = vect_analyze_loop (loop);
+ target_arch = best_arch;
+ }
+ targetm_pnt = targetm_array[cfun->target_arch];
loop->aux = loop_vinfo;
- if (!loop_vinfo || !LOOP_VINFO_VECTORIZABLE_P (loop_vinfo))
+ if (best_arch < 0)
continue;
+ if (best_arch != (int) cfun->target_arch)
+ {
+ /* This loop should be vectorized for another target.
+ We do the vectorization now because, if required, alias checks
+ and a loop version for the aliased case should run on the main
+ target (saving code space on the extra target).
+ Likewise, peeling to obtain the vectorization factor
+ (vect_do_peeling_for_loop_bound) should be done for the main
+ target. ??? We might want to extend this peeling to do
+ a bit of looping to work concurrently with the extra target.
+ ??? This is good for arc-mxp or ppc-spu, but h8300-sh64 would
+ be better off (at least if power is no object once we activate
+ the sh64) doing more work on the sh64.
+ Alignment checks will not be necessary because alignment
+ mismatch is taken care of during data transfer.
+ (Might need to modify this aspect if the DMA mechanism for
+ some target architecture pair as alignment restrictions).
+ Since we might to have more than one thread on this other
+ target, but do the reduction on the main processor, we leave
+ the outlining parallelize_loops.
+ As parallelize_loops will see the vectorized loop, there should
+ be no trouble with a thread other than on the main target
+ gettingvector subunits not making up a full vector.
+ An additional task that vectorization the will have to do now
+ is to translate pointers to use the appropriate ptr_mode. */
+ loop->target_arch = best_arch;
+ }
vect_transform_loop (loop_vinfo);
num_vectorized_loops++;
}
@@ -2909,7 +2917,7 @@ struct simple_ipa_opt_pass pass_ipa_increase_alignment =
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
- 0, /* tv_id */
+ TV_NONE, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 84bd8ccd04d..53ebbea2ed3 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -21,6 +21,8 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_TREE_VECTORIZER_H
#define GCC_TREE_VECTORIZER_H
+#include "target.h"
+
typedef source_location LOC;
#define UNKNOWN_LOC UNKNOWN_LOCATION
#define EXPR_LOC(e) EXPR_LOCATION(e)
@@ -70,7 +72,7 @@ enum verbosity_levels {
REPORT_DR_DETAILS,
REPORT_BAD_FORM_LOOPS,
REPORT_OUTER_LOOPS,
- REPORT_SLP,
+ REPORT_SLP, /* report Superword Level Parallelism analysis details. */
REPORT_DETAILS,
/* New verbosity levels should be added before this one. */
MAX_VERBOSITY_LEVEL
@@ -722,7 +724,6 @@ extern void slpeel_verify_cfg_after_peeling (struct loop *, struct loop *);
General Vectorization Utilities
*************************************************************************/
/** In tree-vectorizer.c **/
-extern tree get_vectype_for_scalar_type (tree);
extern bool vect_is_simple_use (tree, loop_vec_info, gimple *, tree *,
enum vect_def_type *);
extern bool vect_is_simple_iv_evolution (unsigned, tree, tree *, tree *);
@@ -802,4 +803,14 @@ extern bool vect_print_dump_info (enum verbosity_levels);
extern void vect_set_verbosity_level (const char *);
extern LOC find_loop_location (struct loop *);
+
+/* Return a vector type for SCALAR_TYPE. */
+static inline tree
+get_vectype_for_scalar_type (tree scalar_type)
+{
+ FILE *dump_file = vect_print_dump_info (REPORT_DETAILS) ? vect_dump : 0;
+
+ return targetm.vectorize.vectype_for_scalar_type (scalar_type, dump_file);
+}
+
#endif /* GCC_TREE_VECTORIZER_H */
diff --git a/gcc/tree.c b/gcc/tree.c
index d0117a0a4fe..eb4c19f2135 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4834,7 +4834,8 @@ attribute_list_contained (const_tree l1, const_tree l2)
t1 != 0 && t2 != 0
&& TREE_PURPOSE (t1) == TREE_PURPOSE (t2)
&& TREE_VALUE (t1) == TREE_VALUE (t2);
- t1 = TREE_CHAIN (t1), t2 = TREE_CHAIN (t2));
+ t1 = TREE_CHAIN (t1), t2 = TREE_CHAIN (t2))
+ ;
/* Maybe the lists are equal. */
if (t1 == 0 && t2 == 0)
@@ -7121,7 +7122,7 @@ tree_range_check_failed (const_tree node, const char *file, int line,
{
char *buffer;
unsigned length = 0;
- enum tree_code c;
+ int c;
for (c = c1; c <= c2; ++c)
length += 4 + strlen (tree_code_name[c]);
@@ -7182,7 +7183,7 @@ omp_clause_range_check_failed (const_tree node, const char *file, int line,
{
char *buffer;
unsigned length = 0;
- enum omp_clause_code c;
+ int c;
for (c = c1; c <= c2; ++c)
length += 4 + strlen (omp_clause_code_name[c]);
@@ -7785,7 +7786,7 @@ build_common_builtin_nodes (void)
complex. Further, we can do slightly better with folding these
beasties if the real and complex parts of the arguments are separate. */
{
- enum machine_mode mode;
+ int mode;
for (mode = MIN_MODE_COMPLEX_FLOAT; mode <= MAX_MODE_COMPLEX_FLOAT; ++mode)
{
@@ -7794,7 +7795,7 @@ build_common_builtin_nodes (void)
enum built_in_function mcode, dcode;
tree type, inner_type;
- type = lang_hooks.types.type_for_mode (mode, 0);
+ type = lang_hooks.types.type_for_mode ((enum machine_mode) mode, 0);
if (type == NULL)
continue;
inner_type = TREE_TYPE (type);
@@ -7805,8 +7806,10 @@ build_common_builtin_nodes (void)
tmp = tree_cons (NULL_TREE, inner_type, tmp);
ftype = build_function_type (type, tmp);
- mcode = BUILT_IN_COMPLEX_MUL_MIN + mode - MIN_MODE_COMPLEX_FLOAT;
- dcode = BUILT_IN_COMPLEX_DIV_MIN + mode - MIN_MODE_COMPLEX_FLOAT;
+ mcode = ((enum built_in_function)
+ (BUILT_IN_COMPLEX_MUL_MIN + mode - MIN_MODE_COMPLEX_FLOAT));
+ dcode = ((enum built_in_function)
+ (BUILT_IN_COMPLEX_DIV_MIN + mode - MIN_MODE_COMPLEX_FLOAT));
for (p = GET_MODE_NAME (mode), q = mode_name_buf; *p; p++, q++)
*q = TOLOWER (*p);
diff --git a/gcc/tree.h b/gcc/tree.h
index e1c52e135b3..18ecaf79a88 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 */
@@ -1130,7 +1131,9 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
(CASE_LABEL_EXPR_CHECK (NODE)->base.addressable_flag)
#define PREDICT_EXPR_OUTCOME(NODE) \
- (PREDICT_EXPR_CHECK(NODE)->base.addressable_flag)
+ ((enum prediction) PREDICT_EXPR_CHECK(NODE)->base.addressable_flag)
+#define SET_PREDICT_EXPR_OUTCOME(NODE, OUTCOME) \
+ (PREDICT_EXPR_CHECK(NODE)->base.addressable_flag = (int) OUTCOME)
#define PREDICT_EXPR_PREDICTOR(NODE) \
((enum br_predictor)tree_low_cst (TREE_OPERAND (PREDICT_EXPR_CHECK (NODE), 0), 0))
@@ -4064,11 +4067,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.
@@ -4213,6 +4218,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. */
@@ -4224,6 +4230,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
@@ -4260,6 +4267,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);
@@ -4271,6 +4279,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.
@@ -4279,6 +4288,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.
@@ -4300,6 +4310,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. */
@@ -4347,9 +4358,11 @@ extern tree size_diffop (tree, tree);
extern tree round_up (tree, int);
extern tree round_down (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
/* Type for sizes of data-type. */
@@ -4400,6 +4413,7 @@ extern bool initializer_zerop (const_tree);
extern tree ctor_to_list (tree);
+START_TARGET_SPECIFIC
/* Examine CTOR to discover:
* how many scalar fields are set to nonzero values,
and place it in *P_NZ_ELTS;
@@ -4413,6 +4427,7 @@ extern tree ctor_to_list (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);
@@ -4512,6 +4527,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
@@ -4519,6 +4535,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
@@ -4550,6 +4567,7 @@ extern tree get_narrower (tree, int *);
extern int handled_component_p (const_tree);
+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. */
@@ -4557,6 +4575,7 @@ extern int handled_component_p (const_tree);
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
@@ -4706,6 +4725,7 @@ extern bool auto_var_in_fn_p (const_tree, const_tree);
/* In gimplify.c */
extern tree unshare_expr (tree);
+START_TARGET_SPECIFIC
/* In stmt.c */
extern void expand_expr_stmt (tree);
@@ -4716,6 +4736,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);
@@ -4863,6 +4884,7 @@ truth_value_p (enum tree_code code)
}
+START_TARGET_SPECIFIC
/* In builtins.c */
extern tree fold_call_expr (tree, bool);
extern tree fold_builtin_fputs (tree, tree, bool, bool, tree);
@@ -4881,7 +4903,6 @@ extern tree fold_builtin_call_array (tree, tree, int, tree *);
extern void debug_fold_checksum (const_tree);
extern tree build_call_expr (tree, int, ...);
extern tree mathfn_built_in (tree, enum built_in_function fn);
-extern tree strip_float_extensions (tree);
extern tree c_strlen (tree, int);
extern tree std_gimplify_va_arg_expr (tree, tree, gimple_seq *, gimple_seq *);
extern tree build_va_arg_indirect_ref (tree);
@@ -4892,6 +4913,7 @@ extern int get_pointer_alignment (tree, unsigned int);
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
/* In convert.c */
extern tree strip_float_extensions (tree);
@@ -4919,10 +4941,12 @@ extern tree type_hash_lookup (unsigned int, tree);
extern void type_hash_add (unsigned int, tree);
extern int simple_cst_list_equal (const_tree, const_tree);
extern void dump_tree_statistics (void);
+START_TARGET_SPECIFIC
extern void expand_function_end (void);
extern void expand_function_start (tree);
extern void stack_protect_prologue (void);
extern void stack_protect_epilogue (void);
+END_TARGET_SPECIFIC
extern void recompute_tree_invariant_for_addr_expr (tree);
extern bool needs_to_live_in_memory (const_tree);
extern tree reconstruct_complex_type (tree, tree);
@@ -4948,12 +4972,16 @@ extern tree *tree_block (tree);
extern location_t *block_nonartificial_location (tree);
extern location_t tree_nonartificial_location (tree);
+START_TARGET_SPECIFIC
/* In function.c */
extern void expand_main_function (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);
@@ -4967,11 +4995,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);
@@ -5048,6 +5079,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);
@@ -5082,6 +5114,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
/* Interface of the DWARF2 unwind info support. */
@@ -5145,8 +5178,10 @@ extern tree walk_tree_without_duplicates_1 (tree*, walk_tree_fn, void*,
/* 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. */
@@ -5249,9 +5284,13 @@ 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
+
/* In tree-inline.c. */
void init_inline_once (void);
diff --git a/gcc/value-prof.c b/gcc/value-prof.c
index 120a68d61e8..1ce68740d47 100644
--- a/gcc/value-prof.c
+++ b/gcc/value-prof.c
@@ -1412,7 +1412,7 @@ gimple_stringops_transform (gimple_stmt_iterator *gsi)
case BUILT_IN_MEMPCPY:
src = gimple_call_arg (stmt, 1);
src_align = get_pointer_alignment (src, BIGGEST_ALIGNMENT);
- if (!can_move_by_pieces (val, MIN (dest_align, src_align)))
+ if (!can_move_by_pieces (val, MIN (dest_align, src_align) ,1))
return false;
break;
case BUILT_IN_MEMSET:
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index b9ff8c57b25..2a5aaa16b80 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -92,6 +92,7 @@
#include "tm.h"
#include "rtl.h"
#include "tree.h"
+#include "tm_p.h"
#include "hard-reg-set.h"
#include "basic-block.h"
#include "flags.h"
@@ -106,6 +107,7 @@
#include "expr.h"
#include "timevar.h"
#include "tree-pass.h"
+#include "multi-target.h"
/* Type of micro operation. */
enum micro_operation_type
@@ -271,6 +273,8 @@ typedef const struct variable_def *const_variable;
/* 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;
@@ -871,13 +875,13 @@ var_reg_set (dataflow_set *set, rtx loc, enum var_init_status initialized,
set_variable_part (set, loc, decl, offset, initialized, set_src);
}
-static int
+static enum var_init_status
get_init_value (dataflow_set *set, rtx loc, tree decl)
{
void **slot;
variable var;
int i;
- int ret_val = VAR_INIT_STATUS_UNKNOWN;
+ enum var_init_status ret_val = VAR_INIT_STATUS_UNKNOWN;
if (! flag_var_tracking_uninit)
return VAR_INIT_STATUS_INITIALIZED;
@@ -3446,3 +3450,4 @@ struct rtl_opt_pass pass_variable_tracking =
}
};
+END_TARGET_SPECIFIC
diff --git a/gcc/varasm.c b/gcc/varasm.c
index e5b9f35fee9..561372d5fc9 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -54,18 +54,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;
@@ -73,6 +76,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;
+#endif /* !EXTRA_TARGET */
+
+START_TARGET_SPECIFIC
+
/* Number for making the label on the next
constant that is stored in memory. */
@@ -168,8 +178,11 @@ section *in_section;
at the cold section. */
bool in_cold_section_p;
-/* A linked list of all the unnamed sections. */
-static GTY(()) section *unnamed_sections;
+/* A linked list of all the unnamed sections.
+ Must not be garbage collected, because that would cause it to be
+ overwritten when a pch file is loaded, and the data and callback
+ members (can) point to non-ggc memory. */
+static section *unnamed_sections;
/* Return a nonzero value if DECL has a section attribute. */
#ifndef IN_NAMED_SECTION
@@ -518,7 +531,7 @@ get_unnamed_section (unsigned int flags, void (*callback) (const void *),
{
section *sect;
- sect = GGC_NEW (section);
+ sect = (section *) xmalloc (sizeof (section));
sect->unnamed.common.flags = flags | SECTION_UNNAMED;
sect->unnamed.callback = callback;
sect->unnamed.data = data;
@@ -535,7 +548,7 @@ get_noswitch_section (unsigned int flags, noswitch_section_callback callback)
{
section *sect;
- sect = GGC_NEW (section);
+ sect = (section *) xmalloc (sizeof (section));
sect->noswitch.common.flags = flags | SECTION_NOSWITCH;
sect->noswitch.callback = callback;
@@ -1619,6 +1632,20 @@ notice_global_symbol (tree decl)
}
}
+void
+default_target_new_arch (FILE *out_file,
+ struct gcc_target *last_arch,
+ struct gcc_target *new_arch)
+{
+#ifndef EXTRA_TARGET
+ if (&targetm != &this_targetm)
+ targetm.asm_out.new_arch (out_file, last_arch, new_arch);
+ else if (last_arch)
+#endif
+ if (last_arch != new_arch)
+ fprintf (out_file, "\t.arch\t\"%s\"\n", new_arch->name);
+}
+
/* Output assembler code for the constant pool of a function and associated
with defining the name of the function. DECL describes the function.
NAME is the function's name. For the constant pool, we use the current
@@ -1631,6 +1658,10 @@ assemble_start_function (tree decl, const char *fnname)
char tmp_label[100];
bool hot_label_written = false;
+ /* Give the main target ulitimate control how to handle a target change. */
+ targetm_array[0]->asm_out.new_arch (asm_out_file, last_arch, &targetm);
+ last_arch = &targetm;
+
crtl->subsections.unlikely_text_section_name = NULL;
first_function_block_is_cold = false;
@@ -2628,7 +2659,7 @@ assemble_integer (rtx x, unsigned int size, unsigned int align, int force)
enum machine_mode omode, imode;
unsigned int subalign;
unsigned int subsize, i;
- unsigned char mclass;
+ enum mode_class mclass;
subsize = size > UNITS_PER_WORD? UNITS_PER_WORD : 1;
subalign = MIN (align, subsize * BITS_PER_UNIT);
@@ -3352,6 +3383,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. */
@@ -3389,6 +3421,7 @@ struct constant_descriptor_rtx GTY((chain_next ("%h.next")))
int labelno;
int mark;
};
+START_TARGET_SPECIFIC
/* Hash and compare functions for const_rtx_htab. */
@@ -3435,7 +3468,7 @@ const_rtx_hash_1 (rtx *xp, void *data)
hwi = INTVAL (x);
fold_hwi:
{
- const int shift = sizeof (hashval_t) * CHAR_BIT;
+ int shift = sizeof (hashval_t) * CHAR_BIT;
const int n = sizeof (HOST_WIDE_INT) / sizeof (hashval_t);
int i;
@@ -5600,6 +5633,58 @@ init_varasm_once (void)
readonly_data_section = text_section;
}
+static GTY(()) section *pickled_in_section;
+
+/* Replace in_section with something that can be restored after reading
+ in a precompiled header file. */
+void
+pickle_in_section (void)
+{
+ section *p;
+ int i = 0;
+
+ if (!in_section || SECTION_STYLE (in_section) != SECTION_UNNAMED)
+ {
+ pickled_in_section = in_section;
+ return;
+ }
+ for (p = unnamed_sections; p != in_section; p = p->unnamed.next)
+ i++;
+ gcc_assert (p == in_section);
+ pickled_in_section = (section *) GGC_NEW (struct unnamed_section);
+ *pickled_in_section = *in_section;
+ pickled_in_section->unnamed.data = (void *) i;
+ in_section = pickled_in_section;
+}
+
+void
+unpickle_in_section (void)
+{
+ int i;
+ section *p;
+
+ in_section = pickled_in_section;
+ if (!in_section || SECTION_STYLE (in_section) != SECTION_UNNAMED)
+ return;
+ /* When flag_preprocess_only is set, backend_init wasn't called, hence the
+ list is empty. But as we are not outputting any asm then, it doesn't
+ matter that we can't restore in_section. */
+ if (!unnamed_sections)
+ {
+ in_section = 0;
+ return;
+ }
+ /* ??? should make section.data a union; we have really stored an int. */
+ for (p = unnamed_sections, i = (char *) in_section->unnamed.data - (char *) 0;
+ i; i--)
+ {
+ gcc_assert (p);
+ p = p->unnamed.next;
+ }
+ gcc_assert (p);
+ in_section = p;
+}
+
enum tls_model
decl_default_tls_model (const_tree decl)
{
@@ -6788,3 +6873,5 @@ default_elf_asm_output_external (FILE *file ATTRIBUTE_UNUSED,
}
#include "gt-varasm.h"
+
+END_TARGET_SPECIFIC
diff --git a/gcc/vec.c b/gcc/vec.c
index 14567827dcd..93e1c19f379 100644
--- a/gcc/vec.c
+++ b/gcc/vec.c
@@ -226,7 +226,7 @@ vec_gc_o_reserve_1 (void *vec, int reserve, size_t vec_offset, size_t elt_size,
bool exact MEM_STAT_DECL)
{
struct vec_prefix *pfx = (struct vec_prefix *) vec;
- unsigned alloc = alloc = calculate_allocation (pfx, reserve, exact);
+ unsigned alloc = calculate_allocation (pfx, reserve, exact);
if (!alloc)
{
diff --git a/gcc/vec.h b/gcc/vec.h
index adbd16aacbb..96e3cd2d123 100644
--- a/gcc/vec.h
+++ b/gcc/vec.h
@@ -558,7 +558,7 @@ static inline int VEC_OP (T,base,iterate) \
} \
else \
{ \
- *ptr = 0; \
+ *ptr = (T) 0; \
return 0; \
} \
} \
diff --git a/gcc/web.c b/gcc/web.c
index 2c5f93e3f62..02e960454f6 100644
--- a/gcc/web.c
+++ b/gcc/web.c
@@ -58,7 +58,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
static rtx entry_register (struct web_entry *, df_ref, char *);
static void replace_ref (df_ref, rtx);
@@ -391,3 +393,4 @@ struct rtl_opt_pass pass_web =
}
};
+END_TARGET_SPECIFIC
diff --git a/include/ChangeLog.cxx b/include/ChangeLog.cxx
new file mode 100644
index 00000000000..bf11d9c4612
--- /dev/null
+++ b/include/ChangeLog.cxx
@@ -0,0 +1,13 @@
+2009-03-06 Ian Lance Taylor <iant@google.com>
+
+ * ansidecl.h: Don't define inline as a macro for C++.
+
+2009-02-10 Ian Lance Taylor <iant@google.com>
+
+ * ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Define for g++ 4.4.
+
+2009-01-30 Ian Lance Taylor <iant@google.com>
+
+ * dyn-string.h: Add extern "C".
+ * fibheap.h: Likewise.
+
diff --git a/include/ansidecl.h b/include/ansidecl.h
index c19955a98a6..1bdb1e65b4f 100644
--- a/include/ansidecl.h
+++ b/include/ansidecl.h
@@ -173,7 +173,7 @@ So instead we use the macro below and test it against specific values. */
/* inline requires special treatment; it's in C99, and GCC >=2.7 supports
it too, but it's not in C89. */
#undef inline
-#if __STDC_VERSION__ > 199901L
+#if __STDC_VERSION__ > 199901L || defined(__cplusplus)
/* it's a keyword */
#else
# if GCC_VERSION >= 2007
@@ -256,13 +256,13 @@ So instead we use the macro below and test it against specific values. */
# endif /* GNUC >= 2.96 */
#endif /* ATTRIBUTE_MALLOC */
-/* Attributes on labels were valid as of gcc 2.93. */
+/* Attributes on labels were valid as of gcc 2.93 and as of g++ 4.5. */
#ifndef ATTRIBUTE_UNUSED_LABEL
-# if (!defined (__cplusplus) && GCC_VERSION >= 2093)
+# if (defined (__cplusplus) ? GCC_VERSION >= 4004 : GCC_VERSION >= 2093)
# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
# else
# define ATTRIBUTE_UNUSED_LABEL
-# endif /* !__cplusplus && GNUC >= 2.93 */
+# endif
#endif /* ATTRIBUTE_UNUSED_LABEL */
#ifndef ATTRIBUTE_UNUSED
diff --git a/include/dyn-string.h b/include/dyn-string.h
index 44e33deba3a..fd1ae9cad22 100644
--- a/include/dyn-string.h
+++ b/include/dyn-string.h
@@ -19,6 +19,9 @@ along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street - Fifth Floor,
Boston, MA 02110-1301, USA. */
+#ifdef __cplusplus
+extern "C" {
+#endif
typedef struct dyn_string
{
@@ -58,3 +61,7 @@ extern int dyn_string_append_cstr (dyn_string_t, const char *);
extern int dyn_string_append_char (dyn_string_t, int);
extern int dyn_string_substring (dyn_string_t, dyn_string_t, int, int);
extern int dyn_string_eq (dyn_string_t, dyn_string_t);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/include/fibheap.h b/include/fibheap.h
index 348c4ae2638..74bcfbbb08c 100644
--- a/include/fibheap.h
+++ b/include/fibheap.h
@@ -42,6 +42,10 @@ Boston, MA 02110-1301, USA. */
#include "ansidecl.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef long fibheapkey_t;
typedef struct fibheap
@@ -83,4 +87,8 @@ extern void *fibheap_delete_node (fibheap_t, fibnode_t);
extern void fibheap_delete (fibheap_t);
extern fibheap_t fibheap_union (fibheap_t, fibheap_t);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _FIBHEAP_H_ */
diff --git a/libcpp/ChangeLog.cxx b/libcpp/ChangeLog.cxx
new file mode 100644
index 00000000000..14aac13fafb
--- /dev/null
+++ b/libcpp/ChangeLog.cxx
@@ -0,0 +1,26 @@
+2009-01-30 Ian Lance Taylor <iant@google.com>
+
+ * include/symtab.h: Use extern "C" for C++.
+ * include/line-map.h: Likewise.
+ * include/internal.h: Likewise.
+
+2008-07-05 Tom Tromey <tromey@redhat.com>
+
+ * include/mkdeps.h: Use 'extern "C"'.
+
+2008-07-03 Tom Tromey <tromey@redhat.com>
+
+ * include/symtab.h (cpp_hash_table): Rename from hash_table.
+ * symtab.c, init.c, identifiers.c, internal.h: Update all users.
+
+2008-06-21 Tom Tromey <tromey@redhat.com>
+
+ * include/cpplib.h (enum cpp_builtin_type): Rename from
+ builtin_type.
+ (union _cpp_hashnode_value) <builtin>: Update.
+ * init.c (cpp_init_special_builtins): Update.
+
+Local Variables:
+mode: change-log
+change-log-default-name: "ChangeLog.cxx"
+End:
diff --git a/libcpp/identifiers.c b/libcpp/identifiers.c
index 8244f0c546e..84ca4e4038c 100644
--- a/libcpp/identifiers.c
+++ b/libcpp/identifiers.c
@@ -1,6 +1,6 @@
/* Hash tables for the CPP library.
Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1998,
- 1999, 2000, 2001, 2002, 2007, 2009 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2007, 2008, 2009 Free Software Foundation, Inc.
Written by Per Bothner, 1994.
Based on CCCP program by Paul Rubin, June 1986
Adapted to ANSI C, Richard Stallman, Jan 1987
@@ -28,12 +28,12 @@ along with this program; see the file COPYING3. If not see
#include "cpplib.h"
#include "internal.h"
-static hashnode alloc_node (hash_table *);
+static hashnode alloc_node (cpp_hash_table *);
/* Return an identifier node for hashtable.c. Used by cpplib except
when integrated with the C front ends. */
static hashnode
-alloc_node (hash_table *table)
+alloc_node (cpp_hash_table *table)
{
cpp_hashnode *node;
@@ -45,7 +45,7 @@ alloc_node (hash_table *table)
/* Set up the identifier hash table. Use TABLE if non-null, otherwise
create our own. */
void
-_cpp_init_hashtable (cpp_reader *pfile, hash_table *table)
+_cpp_init_hashtable (cpp_reader *pfile, cpp_hash_table *table)
{
struct spec_nodes *s;
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index a29dbea8fc2..30045d89e19 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -578,7 +578,7 @@ enum node_type
/* Different flavors of builtin macro. _Pragma is an operator, but we
handle it with the builtin code for efficiency reasons. */
-enum builtin_type
+enum cpp_builtin_type
{
BT_SPECLINE = 0, /* `__LINE__' */
BT_DATE, /* `__DATE__' */
@@ -625,7 +625,7 @@ union _cpp_hashnode_value GTY(())
/* Answers to an assertion. */
struct answer * GTY ((tag ("NTV_ANSWER"))) answers;
/* Code for a builtin macro. */
- enum builtin_type GTY ((tag ("NTV_BUILTIN"))) builtin;
+ enum cpp_builtin_type GTY ((tag ("NTV_BUILTIN"))) builtin;
/* Macro argument index. */
unsigned short GTY ((tag ("NTV_ARGUMENT"))) arg_index;
};
diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h
index 53921456412..9339394de05 100644
--- a/libcpp/include/line-map.h
+++ b/libcpp/include/line-map.h
@@ -23,6 +23,10 @@ along with this program; see the file COPYING3. If not see
#ifndef LIBCPP_LINE_MAP_H
#define LIBCPP_LINE_MAP_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef GTY
#define GTY(x) /* nothing */
#endif
@@ -191,4 +195,9 @@ extern void linemap_print_containing_files (struct line_maps *,
extern source_location
linemap_position_for_column (struct line_maps *set, unsigned int to_column);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* !LIBCPP_LINE_MAP_H */
diff --git a/libcpp/include/mkdeps.h b/libcpp/include/mkdeps.h
index 50bcee40726..7c45d0a9009 100644
--- a/libcpp/include/mkdeps.h
+++ b/libcpp/include/mkdeps.h
@@ -1,5 +1,5 @@
/* Dependency generator for Makefile fragments.
- Copyright (C) 2000, 2001, 2003, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2003, 2008, 2009 Free Software Foundation, Inc.
Contributed by Zack Weinberg, Mar 2000
This program is free software; you can redistribute it and/or modify it
@@ -23,6 +23,10 @@ along with this program; see the file COPYING3. If not see
#ifndef LIBCPP_MKDEPS_H
#define LIBCPP_MKDEPS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* This is the data structure used by all the functions in mkdeps.c.
It's quite straightforward, but should be treated as opaque. */
@@ -76,4 +80,8 @@ extern int deps_restore (struct deps *, FILE *, const char *);
automatic dependency schemes. */
extern void deps_phony_targets (const struct deps *, FILE *);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* ! LIBCPP_MKDEPS_H */
diff --git a/libcpp/include/symtab.h b/libcpp/include/symtab.h
index 225301e10ff..1d42ba69ffc 100644
--- a/libcpp/include/symtab.h
+++ b/libcpp/include/symtab.h
@@ -20,6 +20,11 @@ along with this program; see the file COPYING3. If not see
#define LIBCPP_SYMTAB_H
#include "obstack.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef GTY
#define GTY(x) /* nothing */
#endif
@@ -37,7 +42,7 @@ struct ht_identifier GTY(())
#define HT_LEN(NODE) ((NODE)->len)
#define HT_STR(NODE) ((NODE)->str)
-typedef struct ht hash_table;
+typedef struct ht cpp_hash_table;
typedef struct ht_identifier *hashnode;
enum ht_lookup_option {HT_NO_INSERT = 0, HT_ALLOC};
@@ -50,7 +55,7 @@ struct ht
hashnode *entries;
/* Call back, allocate a node. */
- hashnode (*alloc_node) (hash_table *);
+ hashnode (*alloc_node) (cpp_hash_table *);
/* Call back, allocate something that hangs off a node like a cpp_macro.
NULL means use the usual allocator. */
void * (*alloc_subobject) (size_t);
@@ -70,14 +75,14 @@ struct ht
};
/* Initialize the hashtable with 2 ^ order entries. */
-extern hash_table *ht_create (unsigned int order);
+extern cpp_hash_table *ht_create (unsigned int order);
/* Frees all memory associated with a hash table. */
-extern void ht_destroy (hash_table *);
+extern void ht_destroy (cpp_hash_table *);
-extern hashnode ht_lookup (hash_table *, const unsigned char *,
+extern hashnode ht_lookup (cpp_hash_table *, const unsigned char *,
size_t, enum ht_lookup_option);
-extern hashnode ht_lookup_with_hash (hash_table *, const unsigned char *,
+extern hashnode ht_lookup_with_hash (cpp_hash_table *, const unsigned char *,
size_t, unsigned int,
enum ht_lookup_option);
#define HT_HASHSTEP(r, c) ((r) * 67 + ((c) - 113));
@@ -87,17 +92,21 @@ extern hashnode ht_lookup_with_hash (hash_table *, const unsigned char *,
TABLE->PFILE, the node, and a PTR, and the callback sequence stops
if the callback returns zero. */
typedef int (*ht_cb) (struct cpp_reader *, hashnode, const void *);
-extern void ht_forall (hash_table *, ht_cb, const void *);
+extern void ht_forall (cpp_hash_table *, ht_cb, const void *);
/* For all nodes in TABLE, call the callback. If the callback returns
a nonzero value, the node is removed from the table. */
-extern void ht_purge (hash_table *, ht_cb, const void *);
+extern void ht_purge (cpp_hash_table *, ht_cb, const void *);
/* Restore the hash table. */
-extern void ht_load (hash_table *ht, hashnode *entries,
+extern void ht_load (cpp_hash_table *ht, hashnode *entries,
unsigned int nslots, unsigned int nelements, bool own);
/* Dump allocation statistics to stderr. */
-extern void ht_dump_statistics (hash_table *);
+extern void ht_dump_statistics (cpp_hash_table *);
+
+#ifdef __cplusplus
+}
+#endif
#endif /* LIBCPP_SYMTAB_H */
diff --git a/libcpp/init.c b/libcpp/init.c
index 54a6bbeefd9..62f0dce375a 100644
--- a/libcpp/init.c
+++ b/libcpp/init.c
@@ -1,6 +1,6 @@
/* CPP Library.
Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Per Bothner, 1994-95.
Based on CCCP program by Paul Rubin, June 1986
@@ -140,7 +140,7 @@ init_library (void)
/* Initialize a cpp_reader structure. */
cpp_reader *
-cpp_create_reader (enum c_lang lang, hash_table *table,
+cpp_create_reader (enum c_lang lang, cpp_hash_table *table,
struct line_maps *line_table)
{
cpp_reader *pfile;
@@ -307,7 +307,7 @@ cpp_destroy (cpp_reader *pfile)
"builtin" macros: these are handled by builtin_macro() in
macro.c. Builtin is somewhat of a misnomer -- the property of
interest is that these macros require special code to compute their
- expansions. The value is a "builtin_type" enumerator.
+ expansions. The value is a "cpp_builtin_type" enumerator.
operator_array holds the C++ named operators. These are keywords
which act as aliases for punctuators. In C++, they cannot be
@@ -401,7 +401,7 @@ cpp_init_special_builtins (cpp_reader *pfile)
if (b->always_warn_if_redefined
|| CPP_OPTION (pfile, warn_builtin_macro_redefined))
hp->flags |= NODE_WARN;
- hp->value.builtin = (enum builtin_type) b->value;
+ hp->value.builtin = (enum cpp_builtin_type) b->value;
}
}
diff --git a/libcpp/internal.h b/libcpp/internal.h
index 4e42b152925..9b388202b63 100644
--- a/libcpp/internal.h
+++ b/libcpp/internal.h
@@ -37,6 +37,10 @@ along with this program; see the file COPYING3. If not see
typedef int iconv_t; /* dummy */
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct directive; /* Deliberately incomplete. */
struct pending_option;
struct op;
@@ -538,7 +542,7 @@ extern void _cpp_push_token_context (cpp_reader *, cpp_hashnode *,
extern void _cpp_backup_tokens_direct (cpp_reader *, unsigned int);
/* In identifiers.c */
-extern void _cpp_init_hashtable (cpp_reader *, hash_table *);
+extern void _cpp_init_hashtable (cpp_reader *, cpp_hash_table *);
extern void _cpp_destroy_hashtable (cpp_reader *);
/* In files.c */
@@ -708,4 +712,8 @@ ufputs (const unsigned char *s, FILE *f)
return fputs ((const char *)s, f);
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* ! LIBCPP_INTERNAL_H */
diff --git a/libcpp/symtab.c b/libcpp/symtab.c
index 086d775d599..f5e0a003e57 100644
--- a/libcpp/symtab.c
+++ b/libcpp/symtab.c
@@ -31,7 +31,7 @@ along with this program; see the file COPYING3. If not see
existing entry with a potential new one. */
static unsigned int calc_hash (const unsigned char *, size_t);
-static void ht_expand (hash_table *);
+static void ht_expand (cpp_hash_table *);
static double approx_sqrt (double);
/* A deleted entry. */
@@ -53,13 +53,13 @@ calc_hash (const unsigned char *str, size_t len)
/* Initialize an identifier hashtable. */
-hash_table *
+cpp_hash_table *
ht_create (unsigned int order)
{
unsigned int nslots = 1 << order;
- hash_table *table;
+ cpp_hash_table *table;
- table = XCNEW (hash_table);
+ table = XCNEW (cpp_hash_table);
/* Strings need no alignment. */
_obstack_begin (&table->stack, 0, 0,
@@ -77,7 +77,7 @@ ht_create (unsigned int order)
/* Frees all memory associated with a hash table. */
void
-ht_destroy (hash_table *table)
+ht_destroy (cpp_hash_table *table)
{
obstack_free (&table->stack, NULL);
if (table->entries_owned)
@@ -91,7 +91,7 @@ ht_destroy (hash_table *table)
returns NULL. Otherwise insert and returns a new entry. A new
string is allocated. */
hashnode
-ht_lookup (hash_table *table, const unsigned char *str, size_t len,
+ht_lookup (cpp_hash_table *table, const unsigned char *str, size_t len,
enum ht_lookup_option insert)
{
return ht_lookup_with_hash (table, str, len, calc_hash (str, len),
@@ -99,7 +99,7 @@ ht_lookup (hash_table *table, const unsigned char *str, size_t len,
}
hashnode
-ht_lookup_with_hash (hash_table *table, const unsigned char *str,
+ht_lookup_with_hash (cpp_hash_table *table, const unsigned char *str,
size_t len, unsigned int hash,
enum ht_lookup_option insert)
{
@@ -182,7 +182,7 @@ ht_lookup_with_hash (hash_table *table, const unsigned char *str,
/* Double the size of a hash table, re-hashing existing entries. */
static void
-ht_expand (hash_table *table)
+ht_expand (cpp_hash_table *table)
{
hashnode *nentries, *p, *limit;
unsigned int size, sizemask;
@@ -224,7 +224,7 @@ ht_expand (hash_table *table)
/* For all nodes in TABLE, callback CB with parameters TABLE->PFILE,
the node, and V. */
void
-ht_forall (hash_table *table, ht_cb cb, const void *v)
+ht_forall (cpp_hash_table *table, ht_cb cb, const void *v)
{
hashnode *p, *limit;
@@ -242,7 +242,7 @@ ht_forall (hash_table *table, ht_cb cb, const void *v)
/* Like ht_forall, but a nonzero return from the callback means that
the entry should be removed from the table. */
void
-ht_purge (hash_table *table, ht_cb cb, const void *v)
+ht_purge (cpp_hash_table *table, ht_cb cb, const void *v)
{
hashnode *p, *limit;
@@ -259,7 +259,7 @@ ht_purge (hash_table *table, ht_cb cb, const void *v)
/* Restore the hash table. */
void
-ht_load (hash_table *ht, hashnode *entries,
+ht_load (cpp_hash_table *ht, hashnode *entries,
unsigned int nslots, unsigned int nelements,
bool own)
{
@@ -274,7 +274,7 @@ ht_load (hash_table *ht, hashnode *entries,
/* Dump allocation statistics to stderr. */
void
-ht_dump_statistics (hash_table *table)
+ht_dump_statistics (cpp_hash_table *table)
{
size_t nelts, nids, overhead, headers;
size_t total_bytes, longest, deleted = 0;
diff --git a/libdecnumber/ChangeLog.cxx b/libdecnumber/ChangeLog.cxx
new file mode 100644
index 00000000000..7e1d465db3e
--- /dev/null
+++ b/libdecnumber/ChangeLog.cxx
@@ -0,0 +1,14 @@
+2009-01-30 Ian Lance Taylor <iant@google.com>
+
+ * decRound.h: Add extern "C".
+ * decNumber.h: Likewise.
+ * decExcept.h: Likewise.
+ * decDouble.h: Likewise.
+ * decSingle.h: Likewise.
+ * decContext.h: Likewise.
+ * decPacked.h: Likewise.
+ * decQuad.h: Likewise.
+ * dpd/decimal128.h: Likewise.
+ * dpd/decimal32.h: Likewise.
+ * dpd/decimal64.h: Likewise.
+
diff --git a/libdecnumber/decContext.h b/libdecnumber/decContext.h
index cdbb2447116..5f1291bcd3a 100644
--- a/libdecnumber/decContext.h
+++ b/libdecnumber/decContext.h
@@ -234,6 +234,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "decContextSymbols.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern decContext * decContextClearStatus(decContext *, uint32_t);
extern decContext * decContextDefault(decContext *, int32_t);
extern enum rounding decContextGetRounding(decContext *);
@@ -250,4 +254,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
extern uint32_t decContextTestStatus(decContext *, uint32_t);
extern decContext * decContextZeroStatus(decContext *);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/libdecnumber/decDouble.h b/libdecnumber/decDouble.h
index 136bb9daf1a..5c29d2d089a 100644
--- a/libdecnumber/decDouble.h
+++ b/libdecnumber/decDouble.h
@@ -66,6 +66,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "decDoubleSymbols.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Utilities and conversions, extractors, etc.) */
extern decDouble * decDoubleFromBCD(decDouble *, int32_t, const uint8_t *, int32_t);
extern decDouble * decDoubleFromInt32(decDouble *, int32_t);
@@ -158,4 +162,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define decDoubleToNumber(dq, dn) decimal64ToNumber((decimal64 *)(dq), dn)
#define decDoubleFromNumber(dq, dn, set) (decDouble *)decimal64FromNumber((decimal64 *)(dq), dn, set)
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/libdecnumber/decExcept.h b/libdecnumber/decExcept.h
index 73eb9af14ef..af92af99aba 100644
--- a/libdecnumber/decExcept.h
+++ b/libdecnumber/decExcept.h
@@ -29,6 +29,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define DFP_EXCEPTIONS_ENABLED 1
#define DFP_HANDLE_EXCEPTIONS(A) __dfp_raise_except(A)
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void __dfp_clear_except (void);
int __dfp_test_except (int);
void __dfp_raise_except (int);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/libdecnumber/decNumber.h b/libdecnumber/decNumber.h
index 5cf18ab98bf..fade90dae0f 100644
--- a/libdecnumber/decNumber.h
+++ b/libdecnumber/decNumber.h
@@ -108,6 +108,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "decNumberSymbols.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Conversions */
decNumber * decNumberFromInt32(decNumber *, int32_t);
decNumber * decNumberFromUInt32(decNumber *, uint32_t);
@@ -192,4 +196,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
&& (((dn)->bits&DECSPECIAL)==0))
#define decNumberRadix(dn) (10)
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/libdecnumber/decPacked.h b/libdecnumber/decPacked.h
index 7ee0a18268d..cd105f2df1d 100644
--- a/libdecnumber/decPacked.h
+++ b/libdecnumber/decPacked.h
@@ -56,10 +56,18 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "decPackedSymbols.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Conversions */
uint8_t * decPackedFromNumber(uint8_t *, int32_t, int32_t *,
const decNumber *);
decNumber * decPackedToNumber(const uint8_t *, int32_t, const int32_t *,
decNumber *);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/libdecnumber/decQuad.h b/libdecnumber/decQuad.h
index c8ec11cc016..42d9547578a 100644
--- a/libdecnumber/decQuad.h
+++ b/libdecnumber/decQuad.h
@@ -90,6 +90,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "decQuadSymbols.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Utilities and conversions, extractors, etc.) */
extern decQuad * decQuadFromBCD(decQuad *, int32_t, const uint8_t *, int32_t);
extern decQuad * decQuadFromInt32(decQuad *, int32_t);
@@ -180,4 +184,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define decQuadToNumber(dq, dn) decimal128ToNumber((decimal128 *)(dq), dn)
#define decQuadFromNumber(dq, dn, set) (decQuad *)decimal128FromNumber((decimal128 *)(dq), dn, set)
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/libdecnumber/decRound.h b/libdecnumber/decRound.h
index c17b6d12026..63437abf77d 100644
--- a/libdecnumber/decRound.h
+++ b/libdecnumber/decRound.h
@@ -27,6 +27,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define DFP_INIT_ROUNDMODE(A) A = __decGetRound()
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern void __dfp_set_round (int);
extern int __dfp_get_round (void);
extern enum rounding __decGetRound (void);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/libdecnumber/decSingle.h b/libdecnumber/decSingle.h
index 3e5cc788d1a..dc58ab44386 100644
--- a/libdecnumber/decSingle.h
+++ b/libdecnumber/decSingle.h
@@ -67,6 +67,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "decSingleSymbols.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Utilities (binary argument(s) or result, extractors, etc.) */
extern decSingle * decSingleFromBCD(decSingle *, int32_t, const uint8_t *, int32_t);
extern decSingle * decSingleFromPacked(decSingle *, int32_t, const uint8_t *);
@@ -95,4 +99,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define decSingleToNumber(dq, dn) decimal32ToNumber((decimal32 *)(dq), dn)
#define decSingleFromNumber(dq, dn, set) (decSingle *)decimal32FromNumber((decimal32 *)(dq), dn, set)
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/libdecnumber/dpd/decimal128.h b/libdecnumber/dpd/decimal128.h
index 9fc532b2c59..3be99bf294b 100644
--- a/libdecnumber/dpd/decimal128.h
+++ b/libdecnumber/dpd/decimal128.h
@@ -79,6 +79,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "decimal128Symbols.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* String conversions */
decimal128 * decimal128FromString(decimal128 *, const char *, decContext *);
char * decimal128ToString(const decimal128 *, char *);
@@ -93,4 +97,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
uint32_t decimal128IsCanonical(const decimal128 *);
decimal128 * decimal128Canonical(decimal128 *, const decimal128 *);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/libdecnumber/dpd/decimal32.h b/libdecnumber/dpd/decimal32.h
index 33287662b32..80fb6477e0e 100644
--- a/libdecnumber/dpd/decimal32.h
+++ b/libdecnumber/dpd/decimal32.h
@@ -77,6 +77,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "decimal32Symbols.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* String conversions */
decimal32 * decimal32FromString(decimal32 *, const char *, decContext *);
char * decimal32ToString(const decimal32 *, char *);
@@ -91,4 +95,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
uint32_t decimal32IsCanonical(const decimal32 *);
decimal32 * decimal32Canonical(decimal32 *, const decimal32 *);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/libdecnumber/dpd/decimal64.h b/libdecnumber/dpd/decimal64.h
index 7a9f8ee56c3..f813c7f1658 100644
--- a/libdecnumber/dpd/decimal64.h
+++ b/libdecnumber/dpd/decimal64.h
@@ -79,6 +79,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "decimal64Symbols.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* String conversions */
decimal64 * decimal64FromString(decimal64 *, const char *, decContext *);
char * decimal64ToString(const decimal64 *, char *);
@@ -93,4 +97,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
uint32_t decimal64IsCanonical(const decimal64 *);
decimal64 * decimal64Canonical(decimal64 *, const decimal64 *);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/libgcc/ChangeLog.ARC b/libgcc/ChangeLog.ARC
new file mode 100644
index 00000000000..13656f454ce
--- /dev/null
+++ b/libgcc/ChangeLog.ARC
@@ -0,0 +1,4 @@
+2008-07-15 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * config.host (mxp-*-elf*): Add.
+
diff --git a/libgcc/config.host b/libgcc/config.host
index 55af6516093..216ef6b9860 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -363,6 +363,8 @@ m32r-*-linux*)
;;
m32rle-*-linux*)
;;
+mxp-*-elf*)
+ ;;
m68hc11-*-*|m6811-*-*)
;;
m68hc12-*-*|m6812-*-*)
diff --git a/libstdc++-v3/ChangeLog.ARC b/libstdc++-v3/ChangeLog.ARC
new file mode 100644
index 00000000000..cc2ef180ade
--- /dev/null
+++ b/libstdc++-v3/ChangeLog.ARC
@@ -0,0 +1,20 @@
+2007-06-11 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * libstdc++-v3/testsuite/lib/libstdc++.exp (v3-build_support):
+ When compilation fails, tell why.
+ * scripts/testsuite_flags.in (--build-cxx): Don't mistake -m* inside
+ an identifier for an -m option.
+
+2007-05-16 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * scripts/testsuite_flags.in (--build-cxx): Remove -m options.
+
+2007-05-10 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * testsuite/ext/pb_ds/example/priority_queue_dijkstra.cc (main): Don't
+ access deallocated nodes.
+
+2007-04-20 J"orn Rennecke <joern.rennecke@arc.com>
+
+ * testsuite/27_io/basic_stringbuf/overflow/char/1.cc:
+ specify heap size for ARC.
diff --git a/libstdc++-v3/scripts/testsuite_flags.in b/libstdc++-v3/scripts/testsuite_flags.in
index 457adaf4d5f..84e4a2b5d0f 100755
--- a/libstdc++-v3/scripts/testsuite_flags.in
+++ b/libstdc++-v3/scripts/testsuite_flags.in
@@ -45,7 +45,10 @@ case ${query} in
;;
--build-cxx)
CXX_build="@CXX@"
- CXX=`echo "$CXX_build" | sed 's,gcc/xgcc ,gcc/g++ ,'`
+ # must remove -m options because the actual test options used can be
+ # different from the ones used to build the multilib, when
+ # MULTILIB_MATCHES is used.
+ CXX=`echo "$CXX_build" | sed -e 's,gcc/xgcc ,gcc/g++ ,' -e 's/[ ]-m[a-zA-Z0-9_]*//g'`
echo ${CXX}
;;
--build-cc)
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/1.cc
index cdf84ef919e..9e99ca0758b 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/1.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/char/1.cc
@@ -19,6 +19,8 @@
// 27.7.1.3 basic_stringbuf overridden virtual functions.
+// { dg-options "-Wl,--defsym,__HEAP_SIZE=57m" { target arc-*-* } }
+
#include <sstream>
#include <cstdlib>
#include <testsuite_hooks.h>
diff --git a/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_dijkstra.cc b/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_dijkstra.cc
index 74fdc0e62d8..d215254c6c8 100644
--- a/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_dijkstra.cc
+++ b/libstdc++-v3/testsuite/ext/pb_ds/example/priority_queue_dijkstra.cc
@@ -135,6 +135,10 @@ int main()
// distances, if applicable.
for (size_t neighbor_i = 0; neighbor_i < num_vertices; ++neighbor_i)
{
+ /* If the neighbor has already been deleted, don't try to
+ dereference it. */
+ if (a_it[neighbor_i] == a_it[0])
+ continue;
// Potentially, the distance to the neighbor is the distance
// to the currently-considered node + the distance from this
// node to the neighbor.
@@ -148,6 +152,7 @@ int main()
p.modify(a_it[neighbor_i], pq_value(neighbor_i, pot_dist));
}
+ a_it[node_id] = a_it[0];
// Done with the node, so we pop it.
a_it[node_id] = a_it[0];
p.pop();
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index 3adf91c7718..744c0e288ab 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -546,10 +546,10 @@ proc v3-build_support { } {
set object_file [file tail $obj]
# Compile with "-w" so that warnings issued by the compiler
# do not prevent compilation.
- if { [v3_target_compile $srcdir/util/$f $object_file "object" \
+ set result [v3_target_compile $srcdir/util/$f $object_file "object" \
[list "incdir=$srcdir" "additional_flags=-w"]]
- != "" } {
- error "could not compile $f"
+ if { $result != "" } {
+ error "could not compile $f : $result"
}
append libtest_objs "$object_file "
}