From 59148d666a78d671198d56caabe7fe4d7fb3fee1 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 31 Mar 2024 23:09:14 +0300 Subject: produce some very limited assembly output + Several subsystems missing critical features, but enough to do some basic things like calling procedures, printing to screen and doing loops --- src/main.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index a0eeb42..d6abb2d 100644 --- a/src/main.c +++ b/src/main.c @@ -4,6 +4,8 @@ #include #include +#include +#include #include static char *read_file(const char *file, FILE *f) @@ -56,6 +58,11 @@ int main(int argc, char *argv[]) foreach_fn(i, p->fns) { struct fn_map m = fn_at(p->fns, i); dump_function(m.fn); + // also handles things like register mapping etc. + optimize(m.fn); + dump_function(m.fn); + // for now + output(m.fn, stdout); } destroy_parser(p); -- cgit v1.3