David Given [Sat, 24 Sep 2016 20:46:08 +0000 (22:46 +0200)]
Some instruction selection is now happening.
David Given [Sat, 24 Sep 2016 17:03:55 +0000 (19:03 +0200)]
More grammar changes.
David Given [Sat, 24 Sep 2016 16:31:35 +0000 (18:31 +0200)]
IR codes are now owned by mcgg; ir terminals are inserted into the table during
compilation (so you can refer to them).
David Given [Sat, 24 Sep 2016 15:20:40 +0000 (17:20 +0200)]
Crudely bolt on mcgg to mcg itself.
David Given [Sat, 24 Sep 2016 14:59:49 +0000 (16:59 +0200)]
Parameters are parsed with getopt. Simplify, constify.
David Given [Sat, 24 Sep 2016 11:33:59 +0000 (13:33 +0200)]
Change the predicate stuff to use costs instead; now you can use when clauses
on leaves. Remove an iburg premature optimisation (required for above).
David Given [Sat, 24 Sep 2016 11:08:17 +0000 (13:08 +0200)]
Lots of exploratory new grammar for instruction definitions and string and
fragment emission (none of which is hooked up to anything yet).
David Given [Sat, 24 Sep 2016 10:11:30 +0000 (12:11 +0200)]
Add support for labelled tree nodes.
David Given [Fri, 23 Sep 2016 23:09:32 +0000 (01:09 +0200)]
Fix some late-night typo bugs.
David Given [Fri, 23 Sep 2016 23:04:00 +0000 (01:04 +0200)]
Procedure compilation now happens after the entire EM file has been read in (so
that we can look inside data blocks which might be defined in the future...
sigh, csa and csb). csa and csb no longer generate invalid IR.
David Given [Fri, 23 Sep 2016 21:59:15 +0000 (23:59 +0200)]
Replaced the block splicer with a trivial block eliminator (which rewrites
jumps to blocks which contain only a jump). Don't bother storing the bb graph
in the ir nodes; we can find it on demand by walking the tree instead ---
slower, but much easier to understand and more robust. Added a terrible map
library.
David Given [Fri, 23 Sep 2016 19:07:16 +0000 (21:07 +0200)]
Each pass now lives in its own source file; much cleaner.
David Given [Thu, 22 Sep 2016 21:19:29 +0000 (23:19 +0200)]
Add a bodged in algorithm for converting basic block communication from stacked
variables to SSA. Also add dead block removal and block splicing. IR code is
much better now.
David Given [Wed, 21 Sep 2016 22:15:48 +0000 (00:15 +0200)]
Tracing cleanup. Simplified the IR code. Some more opcodes.
David Given [Tue, 20 Sep 2016 22:43:10 +0000 (00:43 +0200)]
Massive grammar overhaul and refactor. Hacked in support for predicates, where
instructions can be turned on and off based on their parameters. New lexer
using a lexer. Now quite a lot of the way towards being a real instruction
selector.
David Given [Tue, 20 Sep 2016 19:00:16 +0000 (21:00 +0200)]
Run through clang-format.
David Given [Tue, 20 Sep 2016 18:46:45 +0000 (20:46 +0200)]
Strip out surplus files. Rewrite README.
David Given [Tue, 20 Sep 2016 18:44:51 +0000 (20:44 +0200)]
Import iburg.
David Given [Tue, 20 Sep 2016 18:37:16 +0000 (20:37 +0200)]
Import iburg.
David Given [Mon, 19 Sep 2016 22:19:39 +0000 (00:19 +0200)]
Create hacky fake basic blocks for data fragments, used to track which
instruction labels descriptor blocks refer to; this allows csa and csb to know
where they're going.
David Given [Mon, 19 Sep 2016 21:30:41 +0000 (23:30 +0200)]
Treebuilder now gets to the bottom of my test file, merrily generating
(probably horribly broken) IR.
David Given [Mon, 19 Sep 2016 21:06:59 +0000 (23:06 +0200)]
Store the EM code up front and build the basic block graph *before*
generating the IR code. Lots more IR code.
David Given [Sun, 18 Sep 2016 21:24:54 +0000 (23:24 +0200)]
Archival checking of the half-written IR treebuilder.
David Given [Sat, 17 Sep 2016 22:23:42 +0000 (00:23 +0200)]
ANSIise to fix warnings.
David Given [Sat, 17 Sep 2016 22:02:16 +0000 (00:02 +0200)]
Abstract out the EM reader; skeleton of the tree builder.
David Given [Sat, 17 Sep 2016 20:21:47 +0000 (22:21 +0200)]
Basic skeleton of em parser.
David Given [Sat, 10 Sep 2016 09:25:21 +0000 (11:25 +0200)]
Merge pull request #3 from kernigh/ego-fix
Fix bugs with memory allocation in ego.
George Koehler [Sat, 10 Sep 2016 03:37:43 +0000 (23:37 -0400)]
Fix bugs with memory allocation in ego.
cf/cf_loop.c and share/put.c tried to read the next pointer in an
element of a linked list after freeing the element. ud/ud_copy.c
tried to read beyond the end of the _defs_ array: it only has
_nrexpldefs_ elements, not _nrdefs_ elements.
These bugs caused core dumps on OpenBSD. Its malloc() put _defs_ near
the end of a page, so reading beyond the end crossed into an unmapped
page. Its free() wrote junk bytes and changed the next pointer to
0xdfdfdfdfdfdfdfdf.
David Given [Sun, 4 Sep 2016 17:23:02 +0000 (19:23 +0200)]
Add unlink system call.
David Given [Sat, 3 Sep 2016 17:22:38 +0000 (19:22 +0200)]
Cleanup some stray files.
David Given [Sat, 3 Sep 2016 17:17:09 +0000 (19:17 +0200)]
Add modeline, fix formatting.
David Given [Sat, 3 Sep 2016 17:07:12 +0000 (19:07 +0200)]
Updated.
David Given [Sat, 3 Sep 2016 17:01:47 +0000 (19:01 +0200)]
More documentation.
David Given [Fri, 2 Sep 2016 23:04:16 +0000 (01:04 +0200)]
First half of the ackbuilder documentation.
David Given [Fri, 2 Sep 2016 22:20:11 +0000 (00:20 +0200)]
Makefiles are now slightly less inaccurate. Does actually seem to do sensible
incremental builds now. I loathe make.
David Given [Fri, 2 Sep 2016 21:03:57 +0000 (23:03 +0200)]
Add an install target.
David Given [Fri, 2 Sep 2016 21:00:38 +0000 (23:00 +0200)]
Distributions are a pain --- let's not bother any more. Instead, we just tag
the repository and download a complete snapshot, old and ancient stuff and all.
David Given [Fri, 2 Sep 2016 20:17:51 +0000 (22:17 +0200)]
Remove the old make-based build system, plus some big chunks of horribly
obsolete protomake build system.
David Given [Thu, 1 Sep 2016 21:36:39 +0000 (23:36 +0200)]
Clean up the top level makefile.
David Given [Mon, 22 Aug 2016 21:53:01 +0000 (23:53 +0200)]
Fix a fun bug where, every now again, ego would get its temporary files mangled
and generate invalid calls to the optimisers.
Previously ego would generate a temporary file template that looked like
/tmp/ego.A.BB.XXXXXX, call mktemp() on it to randomise the XXXXXX, and then
replace A and BB with data.
However, it used strrchr to find the A and B. Which would fine, except when
mktemp produced an A or a B in the randomised part...
This code was written on 4 March 1991. I was 16.
David Given [Mon, 22 Aug 2016 20:45:32 +0000 (22:45 +0200)]
Forgot to check a file in.
David Given [Sun, 21 Aug 2016 20:01:19 +0000 (22:01 +0200)]
ego now builds and is used.
This needed lots of refactoring to ego --- not all platforms have ego descr
files, and ego will just crash if you invoke it without one. I think originally
it was never intended that these platforms would be used at -O2 or above.
Plats now only specify the ego descr file if they have one.
David Given [Sun, 21 Aug 2016 19:55:21 +0000 (21:55 +0200)]
filenamesof() an installable now returns all installed files, not just the ones
at the top level (necessary to make a lot of the dependency stuff work when
using tools which depend on installables).
David Given [Sun, 21 Aug 2016 18:27:52 +0000 (20:27 +0200)]
Fix linking bug where em_decode would generate binary data instead of text.
David Given [Sun, 21 Aug 2016 18:08:05 +0000 (20:08 +0200)]
Run through clang-format.
David Given [Sun, 21 Aug 2016 17:53:14 +0000 (19:53 +0200)]
Run through clang-format.
David Given [Sun, 21 Aug 2016 17:46:19 +0000 (19:46 +0200)]
Run through clang-format.
David Given [Sun, 21 Aug 2016 17:38:54 +0000 (19:38 +0200)]
Run through clang-format.
David Given [Sun, 21 Aug 2016 17:38:02 +0000 (19:38 +0200)]
Run through clang-format.
David Given [Sun, 21 Aug 2016 17:34:54 +0000 (19:34 +0200)]
Push through clang-format.
David Given [Sun, 21 Aug 2016 16:51:36 +0000 (18:51 +0200)]
Run through clang-format.
David Given [Sun, 21 Aug 2016 16:45:25 +0000 (18:45 +0200)]
Push em_ego.c through clang-format before working on it.
David Given [Sat, 20 Aug 2016 12:05:24 +0000 (14:05 +0200)]
Build the examples when doing a normal build; this exercises the compiler as a
whole and is one step further towards a proper test suite.
David Given [Sat, 20 Aug 2016 12:04:46 +0000 (14:04 +0200)]
aal doesn't build the ranlib table if you don't set -DAAL.
David Given [Sat, 20 Aug 2016 12:04:17 +0000 (14:04 +0200)]
Add files which got missed in the initial build pass.
David Given [Sat, 20 Aug 2016 12:03:49 +0000 (14:03 +0200)]
liblinux is no more; its files are now in libsys.
David Given [Sat, 20 Aug 2016 12:03:19 +0000 (14:03 +0200)]
rpi has a time() function; don't try to call gettimeofday().
David Given [Sat, 20 Aug 2016 12:02:12 +0000 (14:02 +0200)]
Print hex numbers actually properly this time.
David Given [Sat, 20 Aug 2016 10:40:13 +0000 (12:40 +0200)]
Raspberry Pi backend now builds.
David Given [Sat, 20 Aug 2016 10:40:00 +0000 (12:40 +0200)]
Wildcards are allowed to match no files now.
David Given [Sun, 14 Aug 2016 22:47:08 +0000 (00:47 +0200)]
Filename variables now get passed into ackbuilder on the command line.
David Given [Sun, 14 Aug 2016 22:46:43 +0000 (00:46 +0200)]
Fix dependency error (only shows up with make, not ninja. Odd).
David Given [Sun, 14 Aug 2016 21:01:12 +0000 (23:01 +0200)]
Fix compiler warnings and 64bitisms.
David Given [Sun, 14 Aug 2016 20:55:10 +0000 (22:55 +0200)]
Er, oops; the ninja build system is in a package called ninja-build.
David Given [Sun, 14 Aug 2016 20:52:57 +0000 (22:52 +0200)]
Backport to Lua 5.1 (because 5.2 on Travis doesn't have luaposix...).
David Given [Sun, 14 Aug 2016 20:41:54 +0000 (22:41 +0200)]
Add another Travis library.
David Given [Sun, 14 Aug 2016 12:44:00 +0000 (14:44 +0200)]
Update Travis metadata.
David Given [Sun, 14 Aug 2016 12:40:01 +0000 (14:40 +0200)]
LED builds now.
David Given [Sun, 14 Aug 2016 12:17:35 +0000 (14:17 +0200)]
Move the em_code headers into the em_code module.
David Given [Sun, 14 Aug 2016 12:09:38 +0000 (14:09 +0200)]
Move util/data into modules/src/em_data, for consistency with the other
modules.
David Given [Sun, 14 Aug 2016 09:34:18 +0000 (11:34 +0200)]
linux68k builds now.
David Given [Sun, 14 Aug 2016 09:25:47 +0000 (11:25 +0200)]
installables need to depend on their source files...
David Given [Sun, 14 Aug 2016 09:23:57 +0000 (11:23 +0200)]
Turns out I wasn't building the syscall libraries. Do so.
David Given [Sun, 14 Aug 2016 09:01:36 +0000 (11:01 +0200)]
Wasn't exporting the plat headers; refactor to make this a little cleaner.
David Given [Sun, 14 Aug 2016 08:37:55 +0000 (10:37 +0200)]
linux386 builds. Also, forgot to turn back on the language runtimes.
David Given [Sat, 13 Aug 2016 23:39:40 +0000 (01:39 +0200)]
Biggish refactor to break cycles; my build rules were full of them. cpm builds,
which requires top and topgen.
David Given [Sat, 13 Aug 2016 23:38:36 +0000 (01:38 +0200)]
Add cycle detection, because it was ruining my day. Allow targets to be stored
in a file called build-<target>.lua to allow better dividing up of build rules
(to break cycles).
David Given [Sat, 13 Aug 2016 11:07:19 +0000 (13:07 +0200)]
Pascal runtime library now builds.
David Given [Sat, 13 Aug 2016 11:03:06 +0000 (13:03 +0200)]
Pascal compiler builds.
David Given [Sat, 13 Aug 2016 10:43:44 +0000 (12:43 +0200)]
Modula-2 runtime library now builds.
David Given [Sat, 13 Aug 2016 10:21:16 +0000 (12:21 +0200)]
Fixed a small bug where two line number directives next to each other wouldn't
be parsed properly (the second one would be treated as Modula-2 syntax).
David Given [Fri, 12 Aug 2016 22:02:21 +0000 (00:02 +0200)]
The Modula-2 compiler now builds.
David Given [Thu, 11 Aug 2016 22:24:40 +0000 (00:24 +0200)]
The Basic runtime builds now.
David Given [Thu, 11 Aug 2016 22:19:51 +0000 (00:19 +0200)]
The Basic compiler works now.
David Given [Thu, 11 Aug 2016 22:19:30 +0000 (00:19 +0200)]
replace() gets confused if you give it a singleton list as its parameter.
David Given [Wed, 10 Aug 2016 22:30:32 +0000 (00:30 +0200)]
Replaced the funky and hard-to-compile ACK malloc with a much smaller
and simpler one stolen from K&R. libc builds now.
David Given [Mon, 8 Aug 2016 21:55:47 +0000 (23:55 +0200)]
Most of libc builds now (missing malloc).
David Given [Mon, 8 Aug 2016 21:55:23 +0000 (23:55 +0200)]
Target lists can now have keyed items ({["foo"] = "+target"); this is
used by both installable and by clibrary{} to allow headers to be
installed into subdirectories.
David Given [Sun, 7 Aug 2016 19:56:53 +0000 (21:56 +0200)]
We can build our first C file.
David Given [Thu, 4 Aug 2016 22:01:55 +0000 (00:01 +0200)]
Add check for undefined variables. Find undefined variables. Fix undefined
variables.
David Given [Thu, 4 Aug 2016 21:51:19 +0000 (23:51 +0200)]
Massive ackbuilder refactor --- cleaner and more expressive. Lists
are automatically flattened (leading to better build files), and the
list and filename functions are vastly more orthogonal.
David Given [Fri, 29 Jul 2016 22:39:22 +0000 (00:39 +0200)]
Builds libend (the simplest library). Becoming obvious I need to rework the way
ackbuilder deals with lists.
David Given [Thu, 28 Jul 2016 22:22:49 +0000 (00:22 +0200)]
C preprocessor; tabgen; now the pc86 boot.s builds using the ack
toolchain.
David Given [Thu, 28 Jul 2016 22:22:22 +0000 (00:22 +0200)]
Fix a nasty dependency bug where filenamesof() on installables wouldn't
return any of the installable files (which meant installables were
never considered as dependencies).
David Given [Tue, 26 Jul 2016 22:10:15 +0000 (00:10 +0200)]
Replace the hacky cflags variable with an equally hacky but vastly
more useful magic vars variable.
David Given [Tue, 26 Jul 2016 21:43:31 +0000 (23:43 +0200)]
Replaced the fairly complex environment code with a much simpler
emitter object.
David Given [Tue, 26 Jul 2016 21:35:30 +0000 (23:35 +0200)]
yacc, ncgg; platform ncg builds now.
David Given [Sat, 23 Jul 2016 22:50:02 +0000 (00:50 +0200)]
Baby steps towards building a platform --- make the assembler work.
Add ackbuilder support for C preprocessor files and yacc.
David Given [Fri, 22 Jul 2016 22:30:31 +0000 (00:30 +0200)]
More programs, more libraries. src/modules build files are now saner.
David Given [Tue, 19 Jul 2016 21:43:14 +0000 (23:43 +0200)]
cemcom.ansi now builds.