Commit graph

12 commits

Author SHA1 Message Date
David Given ac856f3b09 The approach I was taking to csa and csb turns out not to work --- critical
edge splitting can cause new basic blocks to be added to the graph, but while
the graph itself gets properly rewritten the descriptor tables can't be updated
to take these into account, so they end up pointing at the wrong blocks. This
causes really hard-to-debug problems.

The new approach is to parse the descriptor blocks and then generate a
comparison chain. Brute force, but much easier for the compiler to reason
about.
2018-09-20 00:12:03 +02:00
David Given 642956fa2f mcg now uses dataf4 and dataf8 to emit floating point constants, and so doesn't
need flt_arith any more. (And also generates them correctly on little-endian
systems.) as now parses numbers properly, doesn't trash memory all over the
place, and can handle negative numbers.
2018-09-12 23:19:32 +02:00
David Given fbd6e8f63d Add support for consecutive labels; needed by the B compiler. 2016-11-27 21:18:00 +01:00
David Given cc660b230f Floats and doubles are now written out correctly. 2016-11-19 11:39:13 +01:00
David Given 4fa2c94a4a Correctly mangle labels used in initialisers. 2016-10-31 23:21:33 +01:00
David Given acaae765af Emit negative constants correctly. 2016-10-29 12:55:21 +02:00
David Given 61349389fb More opcodes. sti can now cope with non-standard sizes (really need a better
fix for this). Hack in crude support for mismatched stack pushes and pops (ints
vs longs).
2016-10-29 12:48:05 +02:00
David Given 658db4ba71 Mangle label names (turns out that the ACK assembler can't really cope with
labels that are the same name as instructions...).
2016-10-27 23:17:16 +02:00
David Given be3dece5af Allow emission of strings containing ". 2016-10-27 21:48:46 +02:00
David Given 3520704ea8 Add support for floating point constants. 2016-10-18 22:29:42 +02:00
David Given e93c58dc8d Refactored the way hops are rendered; add support for emitting code (although
with no prologue or epilogue yet).
2016-10-11 00:12:11 +02:00
David Given 176cd7365c Archival checking of the half-written IR treebuilder. 2016-09-18 23:24:54 +02:00