c6f576f758Bodge in enough phi support to let the instruction generator complete on basic programs.
David Given
2016-10-04 21:58:31 +0200
8d4186130dOops --- hadn't updated the nts array for the new child order.
David Given
2016-10-04 21:32:28 +0200
e13ff5be31Don't allocate new vregs for REG and NOP --- a bit hacky, but suppresses stray movs very effectively.
David Given
2016-10-04 21:29:03 +0200
bd28bddb92Massive rewrite of how emitters and the instruction selector works, after I realised that the existing approach wasn't working. Now, hopefully, tracks the instruction trees generated during selection properly.
David Given
2016-10-04 00:16:06 +0200
68f98cbad7Instruction selection now happens on a shadow tree, rather than on the IR tree itself. Currently it's semantically the same but the implementation is cleaner.
David Given
2016-10-03 20:52:36 +0200
288ee56203Get quite a long way towards basic output-register equality constraints (needed to make special nodes like NOP work properly). Realise that the way I'm dealing with the instruction selector is all wrong; I need to physically copy chunks of tree to give to burg (so I can terminate them correctly).
David Given
2016-10-02 23:25:54 +0200
3aa30e50d1Come up with a syntax for register constraints.
David Given
2016-10-02 21:51:25 +0200
02fb480217Commit a preview of osx386 and osxppc as new platforms.
George Koehler
2016-10-02 14:58:05 -0400
c079e97492Perform SSA conversion of locals. Much, *much* better code now, at least inasmuch as it looks better before register allocation. Basic blocks now know their own successors and predecessors (after a certain point in the IR processing).
David Given
2016-10-02 17:50:34 +0200
b11f96e8feAdd array push/pop; fix ghastly memory overrun bug.
David Given
2016-10-02 17:24:31 +0200
79d4ab1d96Add zrl opcode. Keep track of local sizes as well as offsets.
David Given
2016-10-02 16:08:46 +0200
bf73fcdb64Add inl and del opcodes.
David Given
2016-10-02 14:44:21 +0200
b298c27c63Refactor mcg.h as it's getting a bit big; keep track of register variables.
David Given
2016-10-02 00:30:33 +0200
06059233daMake betterer.
David Given
2016-10-01 23:41:45 +0200
65e75be42dFix edge case where leftover pushes would occasionally cause infinite loops in the analysis.
David Given
2016-10-01 23:41:35 +0200
73d7e89c32Show expression trees correctly.
David Given
2016-10-01 23:41:03 +0200
3474e20274Deal with malformed mes instructions emitted by ego.
David Given
2016-10-01 23:13:39 +0200
a3cfe6047fMore rigorous dealing of IR groups; no need for is_generated and is_root any more (but now passes are required to set IR roots properly when changing instructions).
David Given
2016-10-01 22:58:29 +0200
21898f784aWe're going to need some type inference after all, I think. Let's do a little for now and see how it goes.
David Given
2016-10-01 19:10:22 +0200
91e277e046Predicates work; we now have prefers and requires clauses. Predicates must be functions. Not convinced that semantic types are actually working --- there are still problems with earlier statements leaving things in the wrong registers.
David Given
2016-10-01 13:56:52 +0200
4a3a9a98dcIt doesn't really make a lot of sense to have BURG nonterminal names different to register classes, so combine them. Refactor the map code.
David Given
2016-10-01 12:17:14 +0200
9017ba9deaMerge branch 'default' into kernigh-linuxppc
George Koehler
2016-09-30 13:55:06 -0400
ce5faba919Remove .linenumber and .filename; use hol0 and hol0+4.
George Koehler
2016-09-30 13:40:36 -0400
b427d33f9fDefine the begdata, begrom, begbss symbols for linuxppc.
George Koehler
2016-09-30 13:21:42 -0400
3a973a19f3Move fatal(), warning() and aprintf() into the new data module (because they're really useful).
David Given
2016-09-30 19:10:30 +0200
e22c8881e7Add a rule for sdl ldl $1==$2 to work around a bug.
George Koehler
2016-09-30 11:50:50 -0400
b32883b013More properly keep track of register classes.
David Given
2016-09-29 22:32:43 +0200
b27758b7deError check fragment rules which don't emit anything.
David Given
2016-09-29 22:14:11 +0200
0d246c0d73Much better handling of fragments (no run-time code needed to distinguish them from registers) and better handling of individual hops within a paragraph --- no more ghastly hacks to try and distinguish the input from the output.
David Given
2016-09-29 22:06:04 +0200
6ae415d48bRewrite fef 8 in powerpc assembly.
George Koehler
2016-09-29 15:52:54 -0400
a0131fdb47You know what, the type inference stuff is a complete red herring. What this actually needs is a more intelligent register allocator. So, remove the type inference.
David Given
2016-09-29 19:58:02 +0200
ba1a3656a1You can tell whether an item already exists in the array when calling array_appendu() now.
David Given
2016-09-28 23:39:00 +0200
a71eee3914For "pat ass", move fake stack to real stack before adjusting SP.
George Koehler
2016-09-28 00:13:35 -0400
4572f1b774Actually, I don't need vregs: hops work just as well. Particularly if I restructure things so that I don't need to walk the blasted ir / burg tree every time I look at an instruction.
David Given
2016-09-27 23:38:47 +0200
1e3dde915aRemove the "invalid" stacking rule.
George Koehler
2016-09-27 16:46:11 -0400
e77c5164cfFleshed out hops and vregs. The result is almost looking like code now --- uncanny.
David Given
2016-09-27 00:19:45 +0200
f552c9c7c6Move map into the data module.
David Given
2016-09-26 23:03:04 +0200
c4b8e00ae2Revamp the array module not to use nasty macros any more. Slightly more verbose to use, but definitely cleaner.
David Given
2016-09-26 22:48:58 +0200
3671892c34Move the array library into the data module.
David Given
2016-09-26 22:24:49 +0200
cc176e5183Keep more data around about ir instructions. Implement a half-baked type inference routine to propagate information about floats up the tree, so we know whether to put floats into special registers as early as possible.
David Given
2016-09-26 22:12:46 +0200
416b13fd76Start factoring out the hardware op code.
David Given
2016-09-25 23:29:59 +0200
39aa672422Sort of keep track of registers and register classes. Start walking the generated instruction tree --- holy cow, they look like instructions!
David Given
2016-09-25 22:17:14 +0200
bde5792b1aCollapse several rule arrays into one; actually generate the array properly.
David Given
2016-09-25 17:14:54 +0200
67eb21d428Rename struct insn to struct em (throughout).
David Given
2016-09-25 12:29:03 +0200
bcc74ba18dStupid stringlist is stupid. Use a proper data structure, properly abstracted out (so other things can use it).
David Given
2016-09-25 12:18:39 +0200
9f78e0b36bRethink the way patterns are mapped to rules; generate emitters (probably badly).
David Given
2016-09-25 11:49:51 +0200
7c028bdd45We now record the code fragments to be emitted by each rule.
David Given
2016-09-25 00:21:46 +0200
717b77dd0aInstruction selection is so important the file needs a longer name.
David Given
2016-09-24 22:50:53 +0200
629e0ddfc6Some instruction selection is now happening.
David Given
2016-09-24 22:46:08 +0200
c8fcbe282aMore grammar changes.
David Given
2016-09-24 19:03:55 +0200
2acc4ed29dIR codes are now owned by mcgg; ir terminals are inserted into the table during compilation (so you can refer to them).
David Given
2016-09-24 18:31:35 +0200
1516657907Crudely bolt on mcgg to mcg itself.
David Given
2016-09-24 17:20:40 +0200
13132128a1Parameters are parsed with getopt. Simplify, constify.
David Given
2016-09-24 16:59:49 +0200
434eafd35dChange 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
2016-09-24 13:33:59 +0200
d96ceea08aLots of exploratory new grammar for instruction definitions and string and fragment emission (none of which is hooked up to anything yet).
David Given
2016-09-24 13:08:17 +0200
960259f0b0Add support for labelled tree nodes.
David Given
2016-09-24 12:11:30 +0200
6643d39b2cFix some late-night typo bugs.
David Given
2016-09-24 01:09:32 +0200
bb9aa030a5Procedure 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
2016-09-24 01:04:00 +0200
ed67d427c9Replaced 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
2016-09-23 23:59:15 +0200
f8bbf9e87dEach pass now lives in its own source file; much cleaner.
David Given
2016-09-23 21:07:16 +0200
9077baa850Add 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
2016-09-22 23:19:29 +0200
6a74cb2e11Tracing cleanup. Simplified the IR code. Some more opcodes.
David Given
2016-09-22 00:15:48 +0200
865ef629ddMultiple tweaks to plat/linuxppc/descr
George Koehler
2016-09-21 16:26:30 -0400
bbac1193ffMerge pull request #5 from kernigh/fix-isatty
David Given
2016-09-21 19:47:00 +0200
f6dc6f6875Implement isatty() for Linux.
George Koehler
2016-09-20 21:28:37 -0400
4546dd5f22Massive 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
2016-09-21 00:43:10 +0200
2183c6c622Run through clang-format.
David Given
2016-09-20 21:00:16 +0200
03b7202e54Strip out surplus files. Rewrite README.
David Given
2016-09-20 20:46:45 +0200
5cb3fbb3d3Import iburg.
David Given
2016-09-20 20:44:51 +0200
13c117d15dImport iburg.
David Given
2016-09-20 20:37:16 +0200
36d7d1ee4eCreate 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
2016-09-20 00:19:39 +0200
dcba03646bTreebuilder now gets to the bottom of my test file, merrily generating (probably horribly broken) IR.
David Given
2016-09-19 23:30:41 +0200
6ce2495aebStore the EM code up front and build the basic block graph *before* generating the IR code. Lots more IR code.
David Given
2016-09-19 23:06:59 +0200
176cd7365cArchival checking of the half-written IR treebuilder.
David Given
2016-09-18 23:24:54 +0200
5b69777647Rename our pseudo-opcode 'la' to 'li32'.
George Koehler
2016-09-18 17:03:23 -0400
9db305b338Enable the Hall check again, and get powerpc to pass it.
George Koehler
2016-09-18 15:08:55 -0400
9ec2918e14In ncgg, increase MAXREGS from 80 to 200.
George Koehler
2016-09-18 14:37:42 -0400
e4ce7da0a2Fix hilo.p for big-endian platforms.
George Koehler
2016-09-18 00:07:30 -0400
03b067e1d5Add the missing .lar4 and .sar4 for powerpc.
George Koehler
2016-09-17 23:55:55 -0400
f992eb28acANSIise to fix warnings.
David Given
2016-09-18 00:23:42 +0200
ff4a7e3d2aMerge branch 'default' into kernigh-linuxppc
George Koehler
2016-09-17 18:15:54 -0400
24380e2a93Abstract out the EM reader; skeleton of the tree builder.
David Given
2016-09-18 00:02:16 +0200
2eee391aefBasic skeleton of em parser.
David Given
2016-09-17 22:21:47 +0200
80cb6ba927Eliminate the RELOH2 relocation, as it never worked --- the address would be calculated incorrectly because of overflow errors.
David Given
2016-09-17 12:43:15 +0200
45a950571dMostly add support for the experimental and largely broken linuxppc platform. (Doesn't quite build.)
David Given
2016-09-15 23:12:03 +0200
4703db0fffMerge from default.
David Given
2016-09-15 22:59:01 +0200
52ad82f8b9Merge pull request #3 from kernigh/ego-fix
David Given
2016-09-10 11:25:21 +0200
b1d1b5e1f8Fix bugs with memory allocation in ego.
George Koehler
2016-09-09 23:37:43 -0400
8c94b1316cAdd unlink system call.
David Given
2016-09-04 19:23:02 +0200
56e13e24e0Cleanup some stray files.
David Given
2016-09-03 19:22:38 +0200
1b8df04e58Add modeline, fix formatting.
David Given
2016-09-03 19:17:09 +0200
95ad06849bUpdated.
David Given
2016-09-03 19:07:12 +0200
de2f99dc1aMore documentation.
David Given
2016-09-03 19:01:47 +0200
ea4142daeeFirst half of the ackbuilder documentation.
David Given
2016-09-03 01:04:16 +0200
ff9bf5b08aMakefiles are now slightly less inaccurate. Does actually seem to do sensible incremental builds now. I loathe make.
David Given
2016-09-03 00:20:11 +0200
de7023dd61Add an install target.
David Given
2016-09-02 23:03:57 +0200
f67c98e239Distributions 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
2016-09-02 23:00:38 +0200
612e38f1c6Remove the old make-based build system, plus some big chunks of horribly obsolete protomake build system.
David Given
2016-09-02 22:17:51 +0200
96e7447bfaClean up the top level makefile.
David Given
2016-09-01 23:36:39 +0200
2b6d251decFix a fun bug where, every now again, ego would get its temporary files mangled and generate invalid calls to the optimisers.
David Given
2016-08-22 23:53:01 +0200