proto_as,
proto_ncg { ARCHDIR = "arm" },
+ proto_top,
tool_arm_cv,
install = pm.install("%ROOTDIR%/lib/%ARCH%/descr", "%BINDIR%%PLATIND%/%ARCH%/descr")
-- Revision history
-- $Log$
--- Revision 1.1 2006-07-20 23:18:18 dtrg
+-- Revision 1.2 2006-07-22 12:31:19 dtrg
+-- Added support for the top target peephole optimiser.
+--
+-- Revision 1.1 2006/07/20 23:18:18 dtrg
-- First version in CVS.
--
proto_as,
proto_ncg { ARCHDIR = "m68020" },
+ proto_top,
ego_descr,
install = {
-- Revision history
-- $Log$
--- Revision 1.2 2006-07-22 00:52:01 dtrg
+-- Revision 1.3 2006-07-22 12:31:19 dtrg
+-- Added support for the top target peephole optimiser.
+--
+-- Revision 1.2 2006/07/22 00:52:01 dtrg
-- Added support for the ego global optimisation suite.
--
-- Revision 1.1 2006/07/20 23:18:18 dtrg
proto_as,
proto_ncg { ARCHDIR = "m68020" },
+ proto_top,
ego_descr,
install = {
-- Revision history
-- $Log$
--- Revision 1.2 2006-07-22 00:52:01 dtrg
+-- Revision 1.3 2006-07-22 12:31:19 dtrg
+-- Added support for the top target peephole optimiser.
+--
+-- Revision 1.2 2006/07/22 00:52:01 dtrg
-- Added support for the ego global optimisation suite.
--
-- Revision 1.1 2006/07/20 23:18:18 dtrg
proto_as,
proto_cg,
proto_ncg { ARCHDIR = "pdp" },
+ proto_top,
ego_descr,
install = {
-- Revision history
-- $Log$
--- Revision 1.2 2006-07-22 00:52:01 dtrg
+-- Revision 1.3 2006-07-22 12:31:19 dtrg
+-- Added support for the top target peephole optimiser.
+--
+-- Revision 1.2 2006/07/22 00:52:01 dtrg
-- Added support for the ego global optimisation suite.
--
-- Revision 1.1 2006/07/20 23:18:19 dtrg
include (d.."as/pmfile")
include (d.."cg/pmfile")
include (d.."ncg/pmfile")
+include (d.."top/pmfile")
-- Revision history
-- $Log$
--- Revision 1.1 2006-07-20 23:18:18 dtrg
+-- Revision 1.2 2006-07-22 12:31:19 dtrg
+-- Added support for the top target peephole optimiser.
+--
+-- Revision 1.1 2006/07/20 23:18:18 dtrg
-- First version in CVS.
--
--- /dev/null
+-- $Source$
+-- $State$
+
+local d = ROOTDIR.."mach/proto/top/"
+
+local make_tables = topgen {
+ file (ROOTDIR.."mach/%ARCH%/top/table")
+}
+
+local cfile_with_tables = cfile {
+ class = "cfile_with_tables",
+ dynamicheaders = {
+ make_tables,
+ }
+}
+
+proto_top = cprogram {
+ CINCLUDES = {
+ PARENT,
+ "-Imach/%ARCH%/ncg",
+ "-Imach",
+ "-I"..d
+ },
+
+ cfile_with_tables (d.."queue.c"),
+ cfile_with_tables (d.."top.c"),
+
+ lib_string,
+
+ outputs = {"%U%/%ARCH%-top"},
+ install = pm.install("%BINDIR%%PLATDEP%/%ARCH%/top")
+}
+
+-- Revision history
+-- $Log$
+-- Revision 1.1 2006-07-22 12:31:19 dtrg
+-- Added support for the top target peephole optimiser.
+--
+-- Revision 1.1 2006/07/20 23:18:18 dtrg
+-- First version in CVS.
+--
proto_as,
proto_cg,
+ proto_top,
ego_descr,
install = {
-- Revision history
-- $Log$
--- Revision 1.2 2006-07-22 00:52:01 dtrg
+-- Revision 1.3 2006-07-22 12:31:19 dtrg
+-- Added support for the top target peephole optimiser.
+--
+-- Revision 1.2 2006/07/22 00:52:01 dtrg
-- Added support for the ego global optimisation suite.
--
-- Revision 1.1 2006/07/20 23:18:18 dtrg
include "util/misc/pmfile"
include "util/opt/pmfile"
include "util/ego/pmfile"
+include "util/topgen/pmfile"
include "lang/cem/cemcom/pmfile"
include "lang/cem/cemcom.ansi/pmfile"
tool_em_encode,
tool_opt,
tool_ego,
+ tool_topgen,
lang_cem_cemcom,
lang_cem_cemcom_ansi,
-- Revision history
-- $Log$
--- Revision 1.3 2006-07-22 00:52:01 dtrg
+-- Revision 1.4 2006-07-22 12:31:19 dtrg
+-- Added support for the top target peephole optimiser.
+--
+-- Revision 1.3 2006/07/22 00:52:01 dtrg
-- Added support for the ego global optimisation suite.
--
-- Revision 1.2 2006/07/20 23:24:42 dtrg
--- /dev/null
+-- $Source$
+-- $State$
+
+local d = ROOTDIR.."util/topgen/"
+
+local lpars = LLgen {
+ file (d.."topgen.g")
+}
+
+local cfile_with_headers = cfile {
+ class = "cfile_with_headers",
+ dynamicheaders = {
+ file (d),
+ lpars
+ }
+}
+
+tool_topgen = cprogram {
+ cfile_with_headers (d.."LLlex.c"),
+ cfile_with_headers (d.."hash.c"),
+ cfile_with_headers (d.."main.c"),
+ cfile_with_headers (d.."pattern.c"),
+ cfile_with_headers (d.."symtab.c"),
+
+ foreach {
+ rule = cfile_with_headers,
+ ith { lpars, from=2 }
+ },
+
+ lib_assert,
+ lib_print,
+ lib_alloc,
+ lib_system,
+ lib_string,
+
+ outputs = {"%U%/topgen"},
+ install = pm.install("%TOOLDIR%topgen")
+}
+
+topgen = simple {
+ class = "topgen",
+
+ outputs = {"%U%/gen.c"},
+ command = {
+ "mkdir -p %out[1]:dirname%",
+ "cd %out[1]:dirname% && %TOOLDIR%topgen %in[1]%"
+ },
+}
+
+-- Revision history
+-- $Log$
+-- Revision 1.1 2006-07-22 12:31:19 dtrg
+-- Added support for the top target peephole optimiser.
+--
+-- Revision 1.1 2006/07/20 23:24:28 dtrg
+-- First version in CVS.