amd64: Spell amd64 as AMD64 in macro names.
[libfirm] / ir / Makefile.am
index 3750834..e2846ef 100644 (file)
@@ -1,7 +1,6 @@
 lib_LTLIBRARIES = libfirm.la
 
-INCLUDES = $(LIBCORE_CFLAGS) \
-       -I$(top_srcdir)/include/libfirm \
+INCLUDES = -I$(top_srcdir)/include/libfirm \
        -I$(top_srcdir)/include/libfirm/adt \
        -I$(top_builddir)
 
@@ -14,25 +13,25 @@ INCLUDES += \
        -I$(top_srcdir)/ir/debug \
        -I$(top_srcdir)/ir/ident \
        -I$(top_srcdir)/ir/ir \
+       -I$(top_srcdir)/ir/kaps \
        -I$(top_srcdir)/ir/libcore \
        -I$(top_srcdir)/ir/lower \
+       -I$(top_srcdir)/ir/lpp \
        -I$(top_srcdir)/ir/net \
        -I$(top_srcdir)/ir/opt \
        -I$(top_srcdir)/ir/stat \
        -I$(top_srcdir)/ir/tr \
        -I$(top_srcdir)/ir/tv
 
-libfirm_la_LDFLAGS = -no-undefined
+libfirm_la_LDFLAGS = -no-undefined -version-info $(LT_VERSION) -lm
+libfirm_la_CFLAGS = -std=c99
 libfirm_la_SOURCES = \
        adt/array.c \
        adt/bipartite.c \
        adt/cpset.c \
-       adt/eset.c \
        adt/gaussjordan.c \
        adt/gaussseidel.c \
-       adt/hashset.c \
        adt/hungarian.c \
-       adt/iterator.c \
        adt/pdeq.c \
        adt/plist.c \
        adt/pmap.c \
@@ -47,53 +46,43 @@ libfirm_la_SOURCES = \
        ana/cdep.c \
        ana/cgana.c \
        ana/dfs.c \
+       ana/domfront.c \
        ana/execfreq.c \
-       ana/execution_frequency.c \
-       ana/field_temperature.c \
-       ana/height.c \
-       ana/interval_analysis.c \
+       ana/heights.c \
        ana/irbackedge.c \
        ana/ircfscc.c \
        ana/irconsconfirm.c \
        ana/irdom.c \
-       ana/irextbb2.c \
-       ana/irextbb.c \
        ana/irlivechk.c \
        ana/irloop.c \
        ana/irmemory.c \
        ana/irouts.c \
        ana/irscc.c \
-       ana/irsimpletype.c \
        ana/irtypeinfo.c \
-       ana/phiclass.c \
-       ana/rta.c \
-       ana/structure.c \
        ana/trouts.c \
+       ana/vrp.c \
        be/beabi.c \
+       be/beabihelper.c \
        be/bearch.c \
        be/beblocksched.c \
        be/bechordal.c \
+       be/bechordal_common.c \
        be/bechordal_draw.c \
        be/bechordal_main.c \
        be/becopyheur2.c \
        be/becopyheur4.c \
        be/becopyheur.c \
-       be/becopyilp1.c \
        be/becopyilp2.c \
        be/becopyilp.c \
        be/becopyopt.c \
        be/becopystat.c \
-       be/bedbgout.c \
-       be/bedomfront.c \
+       be/bedump.c \
+       be/bedwarf.c \
+       be/beemitter_binary.c \
        be/beemitter.c \
        be/beflags.c \
        be/begnuas.c \
        be/beifg.c \
-       be/beifg_clique.c \
-       be/beifg_list.c \
-       be/beifg_pointer.c \
-       be/beifg_std.c \
-       be/beilpsched.c \
        be/beinfo.c \
        be/beinsn.c \
        be/beirg.c \
@@ -102,31 +91,27 @@ libfirm_la_SOURCES = \
        be/belive.c \
        be/beloopana.c \
        be/belower.c \
-       be/bemachine.c \
        be/bemain.c \
        be/bemodule.c \
-       be/benewalloc.c \
        be/benode.c \
+       be/bepbqpcoloring.c \
        be/bepeephole.c \
-       be/bepressurestat.c \
+       be/beprefalloc.c \
        be/bera.c \
        be/besched.c \
-       be/beschedmris.c \
        be/beschednormal.c \
        be/beschedrand.c \
        be/beschedregpress.c \
-       be/beschedrss.c \
        be/beschedtrace.c \
        be/beschedtrivial.c \
-       be/bespillbelady2.c \
-       be/bespillbelady3.c \
        be/bespillbelady.c \
        be/bespill.c \
        be/bespilldaemel.c \
        be/bespillslots.c \
+       be/bespillutil.c \
        be/bessaconstr.c \
        be/bessadestr.c \
-       be/bestabs.c \
+       be/bestack.c \
        be/bestat.c \
        be/bestate.c \
        be/betranshlp.c \
@@ -141,16 +126,14 @@ libfirm_la_SOURCES = \
        common/timing.c \
        debug/dbginfo.c \
        debug/debugger.c \
-       debug/seqnumbers.c \
        ident/ident.c \
        ident/mangle.c \
        ir/instrument.c \
        ir/irarch.c \
        ir/irargs.c \
-       ir/ircgcons.c \
+       ir/ircomplib.c \
        ir/ircons.c \
        ir/irdump.c \
-       ir/irdump_grgen.c \
        ir/irdumptxt.c \
        ir/iredges.c \
        ir/irflag.c \
@@ -161,59 +144,72 @@ libfirm_la_SOURCES = \
        ir/irgwalk.c \
        ir/irhooks.c \
        ir/irio.c \
-       ir/irlinkednodemap.c \
-       ir/irlinkednodeset.c \
        ir/irmode.c \
        ir/irnode.c \
-       ir/irnodemap.c \
+       ir/irnodehashmap.c \
        ir/irnodeset.c \
        ir/irop.c \
        ir/iropt.c \
-       ir/irphase.c \
+       ir/irpass.c \
        ir/irprintf.c \
        ir/irprofile.c \
        ir/irprog.c \
        ir/irssacons.c \
-       ir/irvrfy.c \
-       ir/pseudo_irg.c \
+       ir/irverify.c \
+       ir/rm_bads.c \
+       ir/rm_tuples.c \
+       ir/unreachable.c \
        ir/valueset.c \
        libcore/lc_appendable.c \
-       libcore/lc_config_lexer.c \
-       libcore/lc_config_parser.c \
        libcore/lc_opts.c \
        libcore/lc_opts_enum.c \
        libcore/lc_printf.c \
-       libcore/lc_type.c \
+       lower/lower_alloc.c \
+       lower/lower_builtins.c \
        lower/lower_calls.c \
        lower/lower_copyb.c \
        lower/lower_dw.c \
        lower/lower_hl.c \
        lower/lower_intrinsics.c \
        lower/lower_mode_b.c \
+       lower/lower_mux.c \
+       lower/lower_softfloat.c \
        lower/lower_switch.c \
+       lpp/lpp.c \
+       lpp/lpp_comm.c \
+       lpp/lpp_cplex.c \
+       lpp/lpp_gurobi.c \
+       lpp/lpp_net.c \
+       lpp/lpp_solvers.c \
+       lpp/mps.c \
+       lpp/sp_matrix.c \
        obstack/obstack.c \
        obstack/obstack_printf.c \
        opt/boolopt.c \
        opt/cfopt.c \
        opt/code_placement.c \
        opt/combo.c \
-       opt/jumpthreading.c \
        opt/convopt.c \
        opt/critical_edges.c \
+       opt/dead_code_elimination.c \
        opt/escape_ana.c \
+       opt/fp-vrp.c \
        opt/funccall.c \
+       opt/garbage_collect.c \
        opt/gvn_pre.c \
        opt/ifconv.c \
        opt/ircgopt.c \
-       opt/ldst2.c \
+       opt/jumpthreading.c \
        opt/ldstopt.c \
+       opt/local.c \
+       opt/loop.c \
        opt/opt_blocks.c \
        opt/opt_confirms.c \
        opt/opt_frame.c \
        opt/opt_inline.c \
        opt/opt_ldst.c \
        opt/opt_osr.c \
-       opt/opt_polymorphy.c \
+       opt/parallelize_mem.c \
        opt/proc_cloning.c \
        opt/reassoc.c \
        opt/return.c \
@@ -228,223 +224,239 @@ libfirm_la_SOURCES = \
        stat/pattern_dmp.c \
        stat/stat_dmp.c \
        stat/statev.c \
-       stat/stat_liveness.c \
        stat/stat_timing.c \
        tr/entity.c \
        tr/tpop.c \
        tr/tr_inheritance.c \
-       tr/trvrfy.c \
+       tr/trverify.c \
        tr/type.c \
        tr/type_finalization.c \
-       tr/typegmod.c \
-       tr/type_identify.c \
        tr/typewalk.c \
        tv/fltcalc.c \
        tv/strcalc.c \
-       tv/tv.c
+       tv/tv.c \
+       kaps/brute_force.c \
+       kaps/bucket.c \
+       kaps/heuristical.c \
+       kaps/heuristical_co.c \
+       kaps/heuristical_co_ld.c \
+       kaps/html_dumper.c \
+       kaps/kaps.c \
+       kaps/matrix.c \
+       kaps/optimal.c \
+       kaps/pbqp_edge.c \
+       kaps/pbqp_node.c \
+       kaps/vector.c
 
 EXTRA_DIST = \
-       adt/bitset.h \
        adt/array_t.h \
-       adt/bitset_ia32.h \
-       adt/bitset_std.h \
-       adt/compiler.h \
        adt/bitfiddle.h \
+       adt/bitset.h \
+       adt/util.h \
+       adt/compiler.h \
+       adt/cpset.h \
+       adt/fourcc.h \
+       adt/raw_bitset.h \
+       adt/hashset.h \
+       adt/pset_new.h \
+       ana/absgraph.h \
+       ana/dfs.h \
+       ana/dfs_t.h \
        ana/irbackedge_t.h \
        ana/irdom_t.h \
-       ana/dfs_t.h \
+       ana/cdep_t.h \
+       ana/irlivechk.h \
        ana/irloop_t.h \
        ana/irmemory_t.h \
-       ana/irextbb_t.h \
-       be/beifg_impl.h \
-       be/belive_t.h \
-       be/beifg_t.h \
-       be/bepeephole.h \
-       be/be_dbgout_t.h \
-       be/bessaconstr.h \
+       ana/execfreq_t.h \
+       ana/trouts_t.h \
+       be/be_t.h \
+       be/be_types.h \
+       be/beabi.h \
+       be/bearch.h \
        be/beblocksched.h \
+       be/bechordal.h \
+       be/bechordal_draw.h \
+       be/bechordal_t.h \
        be/becopyopt_t.h \
+       be/beabihelper.h \
        be/becopyilp_t.h \
-       be/bemachine.h \
-       be/beverify.h \
-       be/bechordal_t.h \
+       be/becopyopt.h \
+       be/becopystat.h \
+       be/bedump.h \
+       be/belive.h \
+       be/beintlive_t.h \
        be/beemitter.h \
        be/begnuas.h \
-       be/bemodule.h \
-       be/be_t.h \
-       be/bessadestr.h \
-       be/belistsched.h \
-       be/beabi.h \
-       be/bechordal_draw.h \
-       be/beflags.h \
-       be/bespillslots.h \
        be/beifg.h \
-       be/besched_t.h \
-       be/beschedmris.h \
-       be/besched.h \
-       be/beloopana.h \
-       be/becopyopt.h \
-       be/beilpsched.h \
-       be/bepressurestat.h \
-       be/bestat.h \
-       be/beabi_t.h \
-       be/beuses.h \
-       be/bestate.h \
-       be/bearch_t.h \
-       be/bera.h \
-       be/beirg_t.h \
-       be/beirgmod.h \
-       be/betranshlp.h \
+       be/bechordal_common.h \
        be/beinsn_t.h \
-       be/belive.h \
-       be/bestatevent.h \
-       be/beutil.h \
-       be/bedomfront.h \
-       be/be_dbgout.h \
-       be/bespill.h \
-       be/beintlive_t.h \
+       be/beirg.h \
+       be/beflags.h \
+       be/beirgmod.h \
+       be/beemitter_binary.h \
+       be/belistsched.h \
+       be/belive_t.h \
+       be/beloopana.h \
        be/belower.h \
        be/beinfo.h \
+       be/bessaconstr.h \
+       be/bemodule.h \
        be/bemodule_t.h \
-       be/becopystat.h \
-       be/benode_t.h \
-       be/beschedrss.h \
-       be/bechordal.h \
-       be/bearch.h \
-       be/beirg.h \
+       be/benode.h \
+       be/bepeephole.h \
+       be/bepbqpcoloring.h \
+       be/bera.h \
+       be/besched.h \
+       be/bespill.h \
+       be/bespillslots.h \
+       be/beutil.h \
+       be/bessadestr.h \
+       be/bespillutil.h \
+       be/bestat.h \
+       be/betranshlp.h \
+       be/bestack.h \
+       be/bestate.h \
+       be/beverify.h \
+       be/bedwarf.h \
+       be/beuses.h \
+       be/bedwarf_t.h \
+       common/debug.h \
        common/error.h \
        common/irtools.h \
-       common/debug.h \
        debug/dbginfo_t.h \
        debug/debugger.h \
        ident/ident_t.h \
-       ir/irphases_t.h \
-       ir/irnodeset.h \
-       ir/irop_t.h \
-       ir/irmode_t.h \
+       ir/irflag_t.def \
+       ir/irargs_t.h \
        ir/instrument.h \
-       ir/irvrfy_t.h \
-       ir/iredges_t.h \
-       ir/iredgeset.h \
-       ir/irdump_grgen.h \
-       ir/irphase_t.h \
        ir/ircons_t.h \
        ir/irdump_t.h \
-       ir/irflag_t.def \
-       ir/irprog_t.h \
-       ir/irprofile.h \
-       ir/irprintf_t.h \
-       ir/irtypes.h \
-       ir/irnode_t.h \
-       ir/irargs_t.h \
-       ir/irlinkednodemap.h \
-       ir/irnodemap.h \
-       ir/irgraph_t.h \
-       ir/iropt_t.h \
-       ir/irphaselist.h \
-       ir/irbitset.h \
-       ir/irlinkednodeset.h \
+       ir/iredges_t.h \
        ir/irflag_t.h \
+       ir/irgraph_t.h \
+       ir/iredgeset.h \
+       ir/irmode_t.h \
+       ir/irnode_t.h \
+       ir/irnodeset.h \
        ir/gen_irnode.h \
+       ir/irop_t.h \
+       ir/iropt_t.h \
+       ir/irprog_t.h \
+       ir/irnodemap.h \
+       ir/irpass_t.h \
+       ir/irnodehashmap.h \
+       ir/irtypes.h \
+       ir/irverify_t.h \
+       ir/irprofile.h \
        ir/valueset.h \
-       ir/gen_ir.h \
-       libcore/lc_defines.h \
-       libcore/lc_common_t.h \
-       libcore/lc_parser_t.h \
-       libcore/do_bisonflex.sh \
-       libcore/lc_opts.h \
        libcore/lc_appendable.h \
-       libcore/lc_config_parser.h \
-       libcore/lc_printf_arg_types.def \
-       libcore/lc_printf.h \
+       libcore/lc_opts.h \
        libcore/lc_opts_enum.h \
-       libcore/lc_config.h \
        libcore/lc_opts_t.h \
-       opt/scalar_replace.h \
-       opt/tropt.h \
+       libcore/lc_printf.h \
+       libcore/lc_printf_arg_types.def \
+       lower/lower_alloc.h \
+       lower/lower_builtins.h \
+       lower/lower_calls.h \
+       lower/lower_dw.h \
+       lower/lower_mode_b.h \
+       lower/lower_softfloat.h \
+       lpp/lpp.h \
+       lpp/lpp_comm.h \
+       lpp/lpp_cplex.h \
+       lpp/lpp_gurobi.h \
+       lpp/lpp_net.h \
+       lpp/lpp_solvers.h \
+       lpp/lpp_t.h \
+       lpp/mps.h \
+       lpp/sp_matrix.h \
+       opt/iropt_dbg.h \
        opt/reassoc_t.h \
-       opt/opt_confirms.h \
-       opt/funccall_t.h \
-       opt/opt_polymorphy.h \
-       opt/opt_inline_t.h \
-       stat/statev.h \
-       stat/stat_dmp.h \
-       stat/pattern_dmp.h \
-       stat/pattern.h \
-       stat/firmstat_t.h \
+       opt/scalar_replace.h \
+       opt/opt_init.h \
+       stat/counter.h \
        stat/dags.h \
+       stat/firmstat_t.h \
+       stat/pattern.h \
+       stat/pattern_dmp.h \
+       stat/stat_dmp.h \
        stat/stat_timing.h \
-       stat/counter.h \
+       stat/statev_t.h \
        tr/entity_t.h \
-       tr/type_t.h \
        tr/tpop_t.h \
-       tv/strcalc.h \
-       tv/tv_t.h \
+       tr/type_t.h \
        tv/fltcalc.h \
-       ir/gen_irio_export.inl \
-       ir/gen_irio_import.inl \
-       ir/gen_irio_lex.inl \
+       tv/tv_t.h \
+       tv/strcalc.h \
+       kaps/brute_force.h \
+       kaps/bucket.h \
+       kaps/bucket_t.h \
+       kaps/heuristical.h \
+       kaps/heuristical_co.h \
+       kaps/heuristical_co_ld.h \
+       kaps/html_dumper.h \
+       kaps/kaps.h \
+       kaps/matrix.h \
+       kaps/matrix_t.h \
+       kaps/optimal.h \
+       kaps/pbqp_edge.h \
+       kaps/pbqp_edge_t.h \
+       kaps/pbqp_node.h \
+       kaps/pbqp_node_t.h \
+       kaps/pbqp_t.h \
+       kaps/vector.h \
+       kaps/vector_t.h \
        ir/gen_ir_cons.c.inl \
-       ir/gen_irnode.c.inl \
        ir/gen_irop.c.inl \
-       be/scripts/generate_emitter_new.pl \
+       ir/gen_irio.inl \
+       ir/gen_irnode.c.inl \
+       ir/gen_irdump.c.inl \
+       adt/hashset.c.inl \
        be/scripts/generate_emitter.pl \
-       be/scripts/generate_machine.pl \
        be/scripts/generate_new_opcodes.pl \
        be/scripts/generate_regalloc_if.pl
 
-EXTRA_DIST += libcore/do_bisonflex.sh \
-       libcore/lc_config_parser.y \
-       libcore/lc_config_lexer.l
-
 # ia32 backend
-
 ia32_sources = \
        be/ia32/bearch_ia32.c \
-       be/ia32/ia32_architecture.c \
        be/ia32/ia32_address_mode.c \
+       be/ia32/ia32_architecture.c \
        be/ia32/ia32_common_transform.c \
        be/ia32/ia32_emitter.c \
        be/ia32/ia32_finish.c \
        be/ia32/ia32_fpu.c \
        be/ia32/ia32_intrinsics.c \
-       be/ia32/ia32_map_regs.c \
        be/ia32/ia32_new_nodes.c \
        be/ia32/ia32_optimize.c \
        be/ia32/ia32_transform.c \
-       be/ia32/ia32_util.c \
        be/ia32/ia32_x87.c
 
 ia32_built_sources = \
        be/ia32/gen_ia32_emitter.c \
        be/ia32/gen_ia32_emitter.h \
-       be/ia32/gen_ia32_machine.c \
-       be/ia32/gen_ia32_machine.h \
-       be/ia32/gen_ia32_regalloc_if.c \
-       be/ia32/gen_ia32_regalloc_if.h \
        be/ia32/gen_ia32_new_nodes.c.inl \
-       be/ia32/gen_ia32_new_nodes.h
+       be/ia32/gen_ia32_new_nodes.h \
+       be/ia32/gen_ia32_regalloc_if.c \
+       be/ia32/gen_ia32_regalloc_if.h
 MAINTAINERCLEANFILES = $(ia32_built_sources)
 BUILT_SOURCES        = $(ia32_built_sources)
 libfirm_la_SOURCES  += $(ia32_sources) $(ia32_built_sources)
 
 EXTRA_DIST += \
-       be/ia32/ia32_spec.pl \
-       be/ia32/ia32_simd_spec.pl \
        be/ia32/bearch_ia32_t.h \
-       be/ia32/ia32_architecture.h \
        be/ia32/ia32_address_mode.h \
+       be/ia32/ia32_architecture.h \
        be/ia32/ia32_common_transform.h \
        be/ia32/ia32_dbg_stat.h \
        be/ia32/ia32_emitter.h \
        be/ia32/ia32_finish.h \
        be/ia32/ia32_fpu.h \
-       be/ia32/ia32_map_regs.h \
        be/ia32/ia32_new_nodes.h \
        be/ia32/ia32_nodes_attr.h \
        be/ia32/ia32_optimize.h \
+       be/ia32/ia32_spec.pl \
        be/ia32/ia32_transform.h \
-       be/ia32/ia32_util.h \
        be/ia32/ia32_x87.h
 
 $(srcdir)/be/ia32/gen_ia32_new_nodes.c.inl $(srcdir)/be/ia32/gen_ia32_new_nodes.h: \
@@ -455,10 +467,6 @@ $(srcdir)/be/ia32/gen_ia32_emitter.c $(srcdir)/be/ia32/gen_ia32_emitter.h: \
                be/ia32/ia32_spec.pl be/scripts/generate_emitter.pl
        $(PERL) $(srcdir)/be/scripts/generate_emitter.pl $(srcdir)/be/ia32/ia32_spec.pl $(srcdir)/be/ia32
 
-$(srcdir)/be/ia32/gen_ia32_machine.c $(srcdir)/be/ia32/gen_ia32_machine.h: \
-               be/ia32/ia32_spec.pl be/scripts/generate_machine.pl
-       $(PERL) $(srcdir)/be/scripts/generate_machine.pl $(srcdir)/be/ia32/ia32_spec.pl $(srcdir)/be/ia32
-
 $(srcdir)/be/ia32/gen_ia32_regalloc_if.c $(srcdir)/be/ia32/gen_ia32_regalloc_if.h: \
                be/ia32/ia32_spec.pl be/scripts/generate_regalloc_if.pl
        $(PERL) $(srcdir)/be/scripts/generate_regalloc_if.pl $(srcdir)/be/ia32/ia32_spec.pl $(srcdir)/be/ia32
@@ -466,35 +474,34 @@ $(srcdir)/be/ia32/gen_ia32_regalloc_if.c $(srcdir)/be/ia32/gen_ia32_regalloc_if.
 # arm backend
 
 arm_sources = \
-       be/arm/bearch_arm.c \
        be/arm/arm_emitter.c \
-       be/arm/arm_map_regs.c \
        be/arm/arm_new_nodes.c \
        be/arm/arm_optimize.c \
-       be/arm/arm_transform.c
+       be/arm/arm_transform.c \
+       be/arm/arm_map_regs.c \
+       be/arm/arm_cconv.c \
+       be/arm/bearch_arm.c
 arm_built_sources = \
        be/arm/gen_arm_emitter.c \
        be/arm/gen_arm_emitter.h \
-       be/arm/gen_arm_machine.c \
-       be/arm/gen_arm_machine.h \
-       be/arm/gen_arm_regalloc_if.c \
-       be/arm/gen_arm_regalloc_if.h \
        be/arm/gen_arm_new_nodes.c.inl \
-       be/arm/gen_arm_new_nodes.h
+       be/arm/gen_arm_new_nodes.h \
+       be/arm/gen_arm_regalloc_if.c \
+       be/arm/gen_arm_regalloc_if.h
 MAINTAINERCLEANFILES += $(arm_built_sources)
 BUILT_SOURCES += $(arm_built_sources)
 libfirm_la_SOURCES += $(arm_sources) $(arm_built_sources)
 
 
 EXTRA_DIST += \
-       be/arm/arm_spec.pl \
        be/arm/arm_emitter.h \
-       be/arm/arm_map_regs.h \
        be/arm/arm_new_nodes.h \
        be/arm/arm_nodes_attr.h \
        be/arm/arm_optimize.h \
+       be/arm/arm_spec.pl \
        be/arm/arm_transform.h \
-       be/arm/bearch_arm.h \
+       be/arm/arm_map_regs.h \
+       be/arm/arm_cconv.h \
        be/arm/bearch_arm_t.h
 
 $(srcdir)/be/arm/gen_arm_new_nodes.c.inl $(srcdir)/be/arm/gen_arm_new_nodes.h: \
@@ -505,143 +512,117 @@ $(srcdir)/be/arm/gen_arm_emitter.c $(srcdir)/be/arm/gen_arm_emitter.h: \
                be/arm/arm_spec.pl be/scripts/generate_emitter.pl
        $(PERL) $(srcdir)/be/scripts/generate_emitter.pl $(srcdir)/be/arm/arm_spec.pl $(srcdir)/be/arm
 
-$(srcdir)/be/arm/gen_arm_machine.c $(srcdir)/be/arm/gen_arm_machine.h: \
-               be/arm/arm_spec.pl be/scripts/generate_machine.pl
-       $(PERL) $(srcdir)/be/scripts/generate_machine.pl $(srcdir)/be/arm/arm_spec.pl $(srcdir)/be/arm
-
 $(srcdir)/be/arm/gen_arm_regalloc_if.c $(srcdir)/be/arm/gen_arm_regalloc_if.h: \
-               be/arm/arm_spec.pl be/scripts/generate_machine.pl
+               be/arm/arm_spec.pl be/scripts/generate_regalloc_if.pl
        $(PERL) $(srcdir)/be/scripts/generate_regalloc_if.pl $(srcdir)/be/arm/arm_spec.pl $(srcdir)/be/arm
 
-# mips backend
-
-mips_sources = \
-       be/mips/bearch_mips.c \
-       be/mips/mips_emitter.c \
-       be/mips/mips_map_regs.c \
-       be/mips/mips_new_nodes.c \
-       be/mips/mips_scheduler.c \
-       be/mips/mips_transform.c
-mips_built_sources = \
-       be/mips/gen_mips_emitter.c \
-       be/mips/gen_mips_emitter.h \
-       be/mips/gen_mips_machine.c \
-       be/mips/gen_mips_machine.h \
-       be/mips/gen_mips_regalloc_if.c \
-       be/mips/gen_mips_regalloc_if.h \
-       be/mips/gen_mips_new_nodes.c.inl \
-       be/mips/gen_mips_new_nodes.h
-MAINTAINERCLEANFILES += $(mips_built_sources)
-BUILT_SOURCES += $(mips_built_sources)
-libfirm_la_SOURCES += $(mips_sources) $(mips_built_sources)
+# sparc backend
+
+sparc_sources = \
+       be/sparc/bearch_sparc.c \
+       be/sparc/sparc_cconv.c \
+       be/sparc/sparc_emitter.c \
+       be/sparc/sparc_finish.c \
+       be/sparc/sparc_lower64.c \
+       be/sparc/sparc_new_nodes.c \
+       be/sparc/sparc_stackframe.c \
+       be/sparc/sparc_transform.c
+sparc_built_sources = \
+       be/sparc/gen_sparc_emitter.c \
+       be/sparc/gen_sparc_emitter.h \
+       be/sparc/gen_sparc_new_nodes.c.inl \
+       be/sparc/gen_sparc_new_nodes.h \
+       be/sparc/gen_sparc_regalloc_if.c \
+       be/sparc/gen_sparc_regalloc_if.h
+MAINTAINERCLEANFILES += $(sparc_built_sources)
+BUILT_SOURCES += $(sparc_built_sources)
+libfirm_la_SOURCES += $(sparc_sources) $(sparc_built_sources)
 
 EXTRA_DIST += \
-       be/mips/mips_spec.pl \
-       be/mips/bearch_mips.h \
-       be/mips/bearch_mips_t.h \
-       be/mips/mips_emitter.h \
-       be/mips/mips_map_regs.h \
-       be/mips/mips_new_nodes.h \
-       be/mips/mips_nodes_attr.h \
-       be/mips/mips_scheduler.h \
-       be/mips/mips_transform.h \
-       be/mips/mips_util.h
-
-$(srcdir)/be/mips/gen_mips_new_nodes.c.inl $(srcdir)/be/mips/gen_mips_new_nodes.h: \
-               be/mips/mips_spec.pl be/scripts/generate_new_opcodes.pl
-       $(PERL) $(srcdir)/be/scripts/generate_new_opcodes.pl $(srcdir)/be/mips/mips_spec.pl $(srcdir)/be/mips
-
-$(srcdir)/be/mips/gen_mips_emitter.c $(srcdir)/be/mips/gen_mips_emitter.h: \
-               be/mips/mips_spec.pl be/scripts/generate_emitter.pl
-       $(PERL) $(srcdir)/be/scripts/generate_emitter.pl $(srcdir)/be/mips/mips_spec.pl $(srcdir)/be/mips
-
-$(srcdir)/be/mips/gen_mips_machine.c $(srcdir)/be/mips/gen_mips_machine.h: \
-               be/mips/mips_spec.pl be/scripts/generate_machine.pl
-       $(PERL) $(srcdir)/be/scripts/generate_machine.pl $(srcdir)/be/mips/mips_spec.pl $(srcdir)/be/mips
-
-$(srcdir)/be/mips/gen_mips_regalloc_if.c $(srcdir)/be/mips/gen_mips_regalloc_if.h: \
-               be/mips/mips_spec.pl be/scripts/generate_machine.pl
-       $(PERL) $(srcdir)/be/scripts/generate_regalloc_if.pl $(srcdir)/be/mips/mips_spec.pl $(srcdir)/be/mips
-
-# ppc32 backend
-
-ppc32_sources = \
-       be/ppc32/bearch_ppc32.c \
-       be/ppc32/ppc32_emitter.c \
-       be/ppc32/ppc32_map_regs.c \
-       be/ppc32/ppc32_new_nodes.c \
-       be/ppc32/ppc32_transform.c \
-       be/ppc32/ppc32_transform_conv.c
-ppc32_built_sources = \
-       be/ppc32/gen_ppc32_emitter.c \
-       be/ppc32/gen_ppc32_emitter.h \
-       be/ppc32/gen_ppc32_machine.c \
-       be/ppc32/gen_ppc32_machine.h \
-       be/ppc32/gen_ppc32_regalloc_if.c \
-       be/ppc32/gen_ppc32_regalloc_if.h \
-       be/ppc32/gen_ppc32_new_nodes.c.inl \
-       be/ppc32/gen_ppc32_new_nodes.h
-MAINTAINERCLEANFILES += $(ppc32_built_sources)
-BUILT_SOURCES += $(ppc32_built_sources)
-libfirm_la_SOURCES += $(ppc32_sources) $(ppc32_built_sources)
+       be/sparc/sparc_emitter.h \
+       be/sparc/sparc_new_nodes.h \
+       be/sparc/sparc_nodes_attr.h \
+       be/sparc/sparc_spec.pl \
+       be/sparc/sparc_cconv.h \
+       be/sparc/sparc_transform.h \
+       be/sparc/bearch_sparc_t.h
+
+$(srcdir)/be/sparc/gen_sparc_new_nodes.c.inl $(srcdir)/be/sparc/gen_sparc_new_nodes.h: \
+               be/sparc/sparc_spec.pl be/scripts/generate_new_opcodes.pl
+       $(PERL) $(srcdir)/be/scripts/generate_new_opcodes.pl $(srcdir)/be/sparc/sparc_spec.pl $(srcdir)/be/sparc
+
+$(srcdir)/be/sparc/gen_sparc_emitter.c $(srcdir)/be/sparc/gen_sparc_emitter.h: \
+               be/sparc/sparc_spec.pl be/scripts/generate_emitter.pl
+       $(PERL) $(srcdir)/be/scripts/generate_emitter.pl $(srcdir)/be/sparc/sparc_spec.pl $(srcdir)/be/sparc
+
+$(srcdir)/be/sparc/gen_sparc_regalloc_if.c $(srcdir)/be/sparc/gen_sparc_regalloc_if.h: \
+               be/sparc/sparc_spec.pl be/scripts/generate_regalloc_if.pl
+       $(PERL) $(srcdir)/be/scripts/generate_regalloc_if.pl $(srcdir)/be/sparc/sparc_spec.pl $(srcdir)/be/sparc
+
+# amd64 backend
+
+amd64_sources = \
+       be/amd64/amd64_emitter.c \
+       be/amd64/amd64_new_nodes.c \
+       be/amd64/amd64_transform.c \
+       be/amd64/bearch_amd64.c
+amd64_built_sources = \
+       be/amd64/gen_amd64_emitter.c \
+       be/amd64/gen_amd64_emitter.h \
+       be/amd64/gen_amd64_new_nodes.c.inl \
+       be/amd64/gen_amd64_new_nodes.h \
+       be/amd64/gen_amd64_regalloc_if.c \
+       be/amd64/gen_amd64_regalloc_if.h
+MAINTAINERCLEANFILES += $(amd64_built_sources)
+BUILT_SOURCES += $(amd64_built_sources)
+libfirm_la_SOURCES += $(amd64_sources) $(amd64_built_sources)
 
 EXTRA_DIST += \
-       be/ppc32/ppc32_spec.pl \
-       be/ppc32/bearch_ppc32.h \
-       be/ppc32/bearch_ppc32_t.h \
-       be/ppc32/ppc32_emitter.h \
-       be/ppc32/ppc32_map_regs.h \
-       be/ppc32/ppc32_new_nodes.h \
-       be/ppc32/ppc32_nodes_attr.h \
-       be/ppc32/ppc32_transform_conv.h \
-       be/ppc32/ppc32_transform.h
-
-$(srcdir)/be/ppc32/gen_ppc32_new_nodes.c.inl $(srcdir)/be/ppc32/gen_ppc32_new_nodes.h: \
-               be/ppc32/ppc32_spec.pl be/scripts/generate_new_opcodes.pl
-       $(PERL) $(srcdir)/be/scripts/generate_new_opcodes.pl $(srcdir)/be/ppc32/ppc32_spec.pl $(srcdir)/be/ppc32
-
-$(srcdir)/be/ppc32/gen_ppc32_emitter.c $(srcdir)/be/ppc32/gen_ppc32_emitter.h: \
-               be/ppc32/ppc32_spec.pl be/scripts/generate_emitter.pl
-       $(PERL) $(srcdir)/be/scripts/generate_emitter.pl $(srcdir)/be/ppc32/ppc32_spec.pl $(srcdir)/be/ppc32
-
-$(srcdir)/be/ppc32/gen_ppc32_machine.c $(srcdir)/be/ppc32/gen_ppc32_machine.h: \
-               be/ppc32/ppc32_spec.pl be/scripts/generate_machine.pl
-       $(PERL) $(srcdir)/be/scripts/generate_machine.pl $(srcdir)/be/ppc32/ppc32_spec.pl $(srcdir)/be/ppc32
-
-$(srcdir)/be/ppc32/gen_ppc32_regalloc_if.c $(srcdir)/be/ppc32/gen_ppc32_regalloc_if.h: \
-               be/ppc32/ppc32_spec.pl be/scripts/generate_machine.pl
-       $(PERL) $(srcdir)/be/scripts/generate_regalloc_if.pl $(srcdir)/be/ppc32/ppc32_spec.pl $(srcdir)/be/ppc32
+       be/amd64/amd64_emitter.h \
+       be/amd64/amd64_new_nodes.h \
+       be/amd64/amd64_nodes_attr.h \
+       be/amd64/amd64_spec.pl \
+       be/amd64/amd64_transform.h \
+       be/amd64/bearch_amd64_t.h
+
+$(srcdir)/be/amd64/gen_amd64_new_nodes.c.inl $(srcdir)/be/amd64/gen_amd64_new_nodes.h: \
+               be/amd64/amd64_spec.pl be/scripts/generate_new_opcodes.pl
+       $(PERL) $(srcdir)/be/scripts/generate_new_opcodes.pl $(srcdir)/be/amd64/amd64_spec.pl $(srcdir)/be/amd64
+
+$(srcdir)/be/amd64/gen_amd64_emitter.c $(srcdir)/be/amd64/gen_amd64_emitter.h: \
+               be/amd64/amd64_spec.pl be/scripts/generate_emitter.pl
+       $(PERL) $(srcdir)/be/scripts/generate_emitter.pl $(srcdir)/be/amd64/amd64_spec.pl $(srcdir)/be/amd64
+
+$(srcdir)/be/amd64/gen_amd64_regalloc_if.c $(srcdir)/be/amd64/gen_amd64_regalloc_if.h: \
+               be/amd64/amd64_spec.pl be/scripts/generate_regalloc_if.pl
+       $(PERL) $(srcdir)/be/scripts/generate_regalloc_if.pl $(srcdir)/be/amd64/amd64_spec.pl $(srcdir)/be/amd64
+
 
 # TEMPLATE backend
 
 TEMPLATE_sources = \
-       be/TEMPLATE/bearch_TEMPLATE.c \
        be/TEMPLATE/TEMPLATE_emitter.c \
-       be/TEMPLATE/TEMPLATE_map_regs.c \
        be/TEMPLATE/TEMPLATE_new_nodes.c \
-       be/TEMPLATE/TEMPLATE_transform.c
+       be/TEMPLATE/TEMPLATE_transform.c \
+       be/TEMPLATE/bearch_TEMPLATE.c
 TEMPLATE_built_sources = \
        be/TEMPLATE/gen_TEMPLATE_emitter.c \
        be/TEMPLATE/gen_TEMPLATE_emitter.h \
-       be/TEMPLATE/gen_TEMPLATE_machine.c \
-       be/TEMPLATE/gen_TEMPLATE_machine.h \
-       be/TEMPLATE/gen_TEMPLATE_regalloc_if.c \
-       be/TEMPLATE/gen_TEMPLATE_regalloc_if.h \
        be/TEMPLATE/gen_TEMPLATE_new_nodes.c.inl \
-       be/TEMPLATE/gen_TEMPLATE_new_nodes.h
+       be/TEMPLATE/gen_TEMPLATE_new_nodes.h \
+       be/TEMPLATE/gen_TEMPLATE_regalloc_if.c \
+       be/TEMPLATE/gen_TEMPLATE_regalloc_if.h
 MAINTAINERCLEANFILES += $(TEMPLATE_built_sources)
 BUILT_SOURCES += $(TEMPLATE_built_sources)
 libfirm_la_SOURCES += $(TEMPLATE_sources) $(TEMPLATE_built_sources)
 
 EXTRA_DIST += \
-       be/TEMPLATE/TEMPLATE_spec.pl \
-       be/TEMPLATE/bearch_TEMPLATE.h \
-       be/TEMPLATE/bearch_TEMPLATE_t.h \
        be/TEMPLATE/TEMPLATE_emitter.h \
-       be/TEMPLATE/TEMPLATE_map_regs.h \
        be/TEMPLATE/TEMPLATE_new_nodes.h \
        be/TEMPLATE/TEMPLATE_nodes_attr.h \
-       be/TEMPLATE/TEMPLATE_transform.h
+       be/TEMPLATE/TEMPLATE_spec.pl \
+       be/TEMPLATE/TEMPLATE_transform.h \
+       be/TEMPLATE/bearch_TEMPLATE_t.h
 
 $(srcdir)/be/TEMPLATE/gen_TEMPLATE_new_nodes.c.inl $(srcdir)/be/TEMPLATE/gen_TEMPLATE_new_nodes.h: \
                be/TEMPLATE/TEMPLATE_spec.pl be/scripts/generate_new_opcodes.pl
@@ -651,10 +632,6 @@ $(srcdir)/be/TEMPLATE/gen_TEMPLATE_emitter.c $(srcdir)/be/TEMPLATE/gen_TEMPLATE_
                be/TEMPLATE/TEMPLATE_spec.pl be/scripts/generate_emitter.pl
        $(PERL) $(srcdir)/be/scripts/generate_emitter.pl $(srcdir)/be/TEMPLATE/TEMPLATE_spec.pl $(srcdir)/be/TEMPLATE
 
-$(srcdir)/be/TEMPLATE/gen_TEMPLATE_machine.c $(srcdir)/be/TEMPLATE/gen_TEMPLATE_machine.h: \
-               be/TEMPLATE/TEMPLATE_spec.pl be/scripts/generate_machine.pl
-       $(PERL) $(srcdir)/be/scripts/generate_machine.pl $(srcdir)/be/TEMPLATE/TEMPLATE_spec.pl $(srcdir)/be/TEMPLATE
-
 $(srcdir)/be/TEMPLATE/gen_TEMPLATE_regalloc_if.c $(srcdir)/be/TEMPLATE/gen_TEMPLATE_regalloc_if.h: \
-               be/TEMPLATE/TEMPLATE_spec.pl be/scripts/generate_machine.pl
+               be/TEMPLATE/TEMPLATE_spec.pl be/scripts/generate_regalloc_if.pl
        $(PERL) $(srcdir)/be/scripts/generate_regalloc_if.pl $(srcdir)/be/TEMPLATE/TEMPLATE_spec.pl $(srcdir)/be/TEMPLATE