David Given [Fri, 13 Jan 2017 19:29:05 +0000 (20:29 +0100)]
Replace the 'preserved' constraint with a per-register form of 'corrupted';
it's going to work almost exactly the same, but is easier to get my head around
and friendlier to the new allocator.
David Given [Thu, 12 Jan 2017 22:29:23 +0000 (23:29 +0100)]
Start putting the vreg stuff back in; vregs are now assigned (but we're not in
elementary form yet).
David Given [Thu, 12 Jan 2017 22:28:35 +0000 (23:28 +0100)]
Remove imap, as it was ugly and nobody used it.
David Given [Thu, 12 Jan 2017 20:03:27 +0000 (21:03 +0100)]
Archival checkin (won't build): monster refactor; don't allocate vregs at
instruction selection time, but instead deal with 'values' which are tied to
their parent IR. The code is now way cleaner and more understandable. We'll
aasign vregs in a later pass, as we convert to elementary form.
David Given [Mon, 9 Jan 2017 21:44:00 +0000 (22:44 +0100)]
Fixup after merge.
David Given [Sun, 8 Jan 2017 17:54:58 +0000 (18:54 +0100)]
Merge from default.
David Given [Sun, 8 Jan 2017 17:53:59 +0000 (18:53 +0100)]
Fix typo.
David Given [Sun, 8 Jan 2017 10:25:57 +0000 (11:25 +0100)]
Improve confusing error message when calling function procedures from a
top-level statement.
Fixes: #30
David Given [Sun, 8 Jan 2017 10:23:56 +0000 (11:23 +0100)]
Run through clang-format.
David Given [Sat, 7 Jan 2017 23:16:35 +0000 (00:16 +0100)]
Don't print source file names during compilation (gcc stopped doing it years
ago).
David Given [Sat, 7 Jan 2017 23:15:23 +0000 (00:15 +0100)]
Run through clang-format.
David Given [Sat, 7 Jan 2017 23:15:10 +0000 (00:15 +0100)]
Don't sort inludes any more (breaks too many ACK files).
David Given [Sat, 7 Jan 2017 22:23:00 +0000 (23:23 +0100)]
Merge pull request #32 from dram/add-execve
Add execve() system call for Linux
David Given [Sat, 7 Jan 2017 22:00:52 +0000 (23:00 +0100)]
No longer truncate module names at 10 characters when constructing paths;
rename some library modules to their full names.
David Given [Sat, 7 Jan 2017 21:56:00 +0000 (22:56 +0100)]
Run through clang-format.
David Given [Sat, 7 Jan 2017 21:38:30 +0000 (22:38 +0100)]
Properly install man pages.
David Given [Sat, 7 Jan 2017 21:35:02 +0000 (22:35 +0100)]
Add a B man page.
David Given [Sat, 7 Jan 2017 19:11:01 +0000 (20:11 +0100)]
Update the README.
David Given [Sat, 7 Jan 2017 18:53:57 +0000 (19:53 +0100)]
Make sure that constant folding doesn't render our tests trivial.
David Given [Sat, 7 Jan 2017 17:47:46 +0000 (18:47 +0100)]
Sections are now aligned (required by the EM spec).
David Given [Sat, 7 Jan 2017 17:47:00 +0000 (18:47 +0100)]
Fix a bunch of issues with pushing and popping mismatched sizes, which the B
compiler does a lot; dup 8 for pairs of words is now optimised.
David Given [Sat, 7 Jan 2017 17:46:03 +0000 (18:46 +0100)]
Pre-and-post-modification operators now work substantially better (i.e.,
working).
David Given [Sat, 7 Jan 2017 17:38:43 +0000 (18:38 +0100)]
Moved the inc/dec operator tests into their own source file; more exhaustive
testing.
David Given [Sat, 7 Jan 2017 12:25:09 +0000 (13:25 +0100)]
ine and ste are now declared to modify memory (preventing cached values being
propagated across the modification).
David Given [Sat, 7 Jan 2017 12:17:39 +0000 (13:17 +0100)]
Introduce sequence points before store instructions to prevent loads from the
same address being delayed until after the store (at which point they'll return
the wrong value).
David Given [Sat, 7 Jan 2017 00:03:15 +0000 (01:03 +0100)]
Use a better NOT; and after remembering that PowerPC bit numbers are all
backwards in the documentation, rewrote IFEQ/IFLT/IFLE to actually work.
Probably. Thanks to the B test suite for spotting this.
David Given [Fri, 6 Jan 2017 22:24:05 +0000 (23:24 +0100)]
Extern variables can now be written to.
David Given [Fri, 6 Jan 2017 21:29:52 +0000 (22:29 +0100)]
Ensure that procedure labels are word-aligned.
Xin Wang [Fri, 6 Jan 2017 10:33:52 +0000 (18:33 +0800)]
Add execve() system call for Linux
David Given [Wed, 4 Jan 2017 13:28:40 +0000 (13:28 +0000)]
Fix typo in the descr file which was stopping -B from working. Add B
documentation to the ack man page.
David Given [Tue, 3 Jan 2017 18:54:13 +0000 (18:54 +0000)]
Added an abmodules tool which detects B modules and generates an initialiser
function for them (in C, unfortunately).
David Given [Sun, 1 Jan 2017 23:51:48 +0000 (23:51 +0000)]
Add a control flow test.
David Given [Sun, 1 Jan 2017 23:28:41 +0000 (23:28 +0000)]
Jump tables for switch now go in ROM (required by the EM spec). Forward gotos
now work.
David Given [Sun, 1 Jan 2017 17:56:53 +0000 (17:56 +0000)]
Add proper support for negative constants in external initialisers.
David Given [Sun, 1 Jan 2017 17:44:55 +0000 (17:44 +0000)]
Remove the negative-constant code from the compiler; I think it's going to
break a=-1 (with no spaces). Backed out changeset
dead3363ac7d.
David Given [Sun, 1 Jan 2017 17:44:03 +0000 (17:44 +0000)]
Add tests for more operators.
David Given [Sun, 1 Jan 2017 17:40:06 +0000 (17:40 +0000)]
Add support for the ~ operator.
David Given [Sat, 31 Dec 2016 19:43:03 +0000 (19:43 +0000)]
Add support for negative constants in external initialisers.
David Given [Sat, 31 Dec 2016 17:39:51 +0000 (17:39 +0000)]
Allow programs to override binit() (so they can register their own modules).
David Given [Sat, 31 Dec 2016 17:38:52 +0000 (17:38 +0000)]
Add support for B tests; add a test for the B operators (finding several
compiler bugs in the process).
David Given [Sat, 31 Dec 2016 17:36:12 +0000 (17:36 +0000)]
Add support for the xor operator.
David Given [Sat, 31 Dec 2016 00:14:28 +0000 (00:14 +0000)]
B patch table names shouldn't be in the B symbol namespace.
David Given [Sat, 31 Dec 2016 00:14:04 +0000 (00:14 +0000)]
Fix issue where !x was actually calculating !!x.
David Given [Thu, 29 Dec 2016 17:30:47 +0000 (17:30 +0000)]
Trying to install openbios-ppc causes Travis to error out now (not sure why).
David Given [Thu, 29 Dec 2016 17:20:51 +0000 (17:20 +0000)]
Add a B version of the hilo program.
David Given [Thu, 29 Dec 2016 17:12:40 +0000 (17:12 +0000)]
Add a declaration for the -Bxyz module name flag, used by the B compiler.
Rename some of the Basic flags to avoid confusion.
David Given [Thu, 29 Dec 2016 17:11:53 +0000 (17:11 +0000)]
Fix an issue throughout where B couldn't be built by ackprogram due to symbol
laziness.
David Given [Thu, 29 Dec 2016 17:11:07 +0000 (17:11 +0000)]
Build the B compiler and standard library (also the Basic one, which was
missing).
David Given [Thu, 29 Dec 2016 17:10:21 +0000 (17:10 +0000)]
First draft of the B module code; a module name can now be specified as a
compiler flag, which is used to set the name of the patch table. The compiler
now understands C preprocessor line directives. Extend the standard library
somewhat.
David Given [Thu, 29 Dec 2016 17:08:53 +0000 (17:08 +0000)]
Change the i80 assembler to be three-pass, which allows forward references;
required for assembling B.
David Given [Wed, 28 Dec 2016 23:49:55 +0000 (23:49 +0000)]
Don't crash when using the -u option to enter undefined symbols.
David Given [Wed, 28 Dec 2016 19:16:15 +0000 (19:16 +0000)]
Correctly export PREFIX to the Lua build system.
David Given [Wed, 28 Dec 2016 17:30:14 +0000 (17:30 +0000)]
Merge in B changes.
David Given [Mon, 26 Dec 2016 19:44:48 +0000 (19:44 +0000)]
Merge from default.
David Given [Sun, 18 Dec 2016 19:21:22 +0000 (20:21 +0100)]
Emit more detailed register class information.
David Given [Sun, 18 Dec 2016 19:20:42 +0000 (20:20 +0100)]
Warning fix.
David Given [Sat, 17 Dec 2016 21:25:26 +0000 (22:25 +0100)]
Add a bitmap library to modules/src/data; mcgg now computers register bitmaps.
David Given [Sat, 17 Dec 2016 19:22:20 +0000 (20:22 +0100)]
Replace smap with string-based hashtables; add some boilerplate to make sets
and hashtables of strings easier to use.
David Given [Sat, 17 Dec 2016 18:33:56 +0000 (19:33 +0100)]
Factor out the register handling code into a separate file, because everything
is getting to be a bit of a mess.
David Given [Sat, 17 Dec 2016 09:30:27 +0000 (10:30 +0100)]
Hash table sizes now must be a power of two (saves a modulus instruction);
optimise key comparison (if the two keys are identical, we don't need to call
the comparator).
David Given [Sat, 17 Dec 2016 09:18:51 +0000 (10:18 +0100)]
Bigraph now uses hash tables to hold edges inside vertices, rather than linked
lists.
David Given [Fri, 16 Dec 2016 23:21:27 +0000 (00:21 +0100)]
Massive graph performance boost by checking to see whether an edge already
exists in the hash table before trying to add it.
David Given [Fri, 16 Dec 2016 22:25:10 +0000 (23:25 +0100)]
More porting to the set and graph libraries; no longer maintain a set of
vertices, as it's easier and faster to fetch from the interference or
preference graphs.
David Given [Fri, 16 Dec 2016 22:23:41 +0000 (23:23 +0100)]
Fix warning.
David Given [Fri, 16 Dec 2016 21:16:45 +0000 (22:16 +0100)]
Add hashtable/set_empty to go with _reset, which removes all items from the
table but doesn't free the bucket array or reset the size --- saves an
allocation when reusing the hashtable.
David Given [Fri, 16 Dec 2016 21:12:28 +0000 (22:12 +0100)]
Fix crash when enumerating uninitialised hashtables.
David Given [Fri, 16 Dec 2016 20:12:35 +0000 (21:12 +0100)]
Convert to the set API.
David Given [Fri, 16 Dec 2016 20:08:28 +0000 (21:08 +0100)]
Convert to use the set API.
David Given [Fri, 16 Dec 2016 20:04:31 +0000 (21:04 +0100)]
Convert to use the set API.
David Given [Fri, 16 Dec 2016 20:01:40 +0000 (21:01 +0100)]
Convert to use set and graph APIs.
David Given [Fri, 16 Dec 2016 20:00:47 +0000 (21:00 +0100)]
Expand the graph and set APIs.
David Given [Fri, 16 Dec 2016 17:09:58 +0000 (18:09 +0100)]
The hash table now automatically resizes when it gets full.
David Given [Fri, 16 Dec 2016 15:45:52 +0000 (16:45 +0100)]
Add a set-based hashtable; change the register allocator to use it for vertices.
David Given [Fri, 16 Dec 2016 15:00:05 +0000 (16:00 +0100)]
Switch completely away from pmap_bi to the new bigraph module.
David Given [Thu, 15 Dec 2016 23:34:57 +0000 (00:34 +0100)]
Ensure that cflags is honoured when linking cprograms. (Needed for -pg to
work.)
David Given [Thu, 15 Dec 2016 23:34:15 +0000 (00:34 +0100)]
Archival checkin: partial conversion to using bigraph for the interference and
preference graphs.
David Given [Thu, 15 Dec 2016 23:33:50 +0000 (00:33 +0100)]
Actually, let's not split phis on entry just yet; because we split vregs one at
a time, splitting several in a row just causes half of them to interfere with
the other half, which doesn't really help.
David Given [Thu, 15 Dec 2016 23:32:22 +0000 (00:32 +0100)]
Add hashtable and work-in-progress bigraph modules.
David Given [Thu, 15 Dec 2016 23:01:21 +0000 (00:01 +0100)]
Fix an embarrassing but safe mistake where 3x the space was being allocated for
arrays.
David Given [Wed, 14 Dec 2016 22:14:13 +0000 (23:14 +0100)]
Ensure we cover all vregs, even pathalogical cases (e.g. phis which are never
used).
David Given [Wed, 14 Dec 2016 21:30:44 +0000 (22:30 +0100)]
Merge pull request #29 from kernigh/pr-elf-symbol
ELF symbol table from aelflod
David Given [Tue, 13 Dec 2016 23:27:19 +0000 (00:27 +0100)]
Spillable vregs now get simplified, if possible.
David Given [Tue, 13 Dec 2016 23:26:58 +0000 (00:26 +0100)]
Much more aggressive splitting.
George Koehler [Tue, 13 Dec 2016 22:22:45 +0000 (17:22 -0500)]
Update aelflod.1 to describe options, mention symbol table.
George Koehler [Tue, 13 Dec 2016 21:41:22 +0000 (16:41 -0500)]
Teach aelflod to write the ELF symbol table.
Convert each ack.out symbol to ELF, preserving its name and value, and
some but not all other symbol info. The ELF symbol table comes with
ELF section headers. If the input file has no symbols (ack -Rled-s),
then the output file has no ELF section headers.
Append the symbol table and section headers to the ELF file. Linux
ignores this appended info when it execs the file. The info might
pollute the last page of the ELF segment, but Linux clears this
pollution. Tools like nm and gdb can read the ELF symbol table.
I include code to translate debugger symbols to an ELF .stab section.
I did not test this code, because I did not find a platform that can
put S_STB symbols in the ack.out file.
George Koehler [Tue, 13 Dec 2016 21:02:38 +0000 (16:02 -0500)]
In aslod, remove some unused m68k2 stuff.
George Koehler [Tue, 13 Dec 2016 20:54:38 +0000 (15:54 -0500)]
Tweak man syntax in aelflod.1 and aslod.1
Put end of sentence at end of line. This is roff(7) syntax so the
formatter can make spacing between sentences.
Use the macro .PP to break paragraphs. Use bold for the command name
in SYNOPSIS, to match other ack manuals.
David Given [Mon, 12 Dec 2016 22:58:54 +0000 (23:58 +0100)]
Merge in warning fixes (properly, this time).
David Given [Mon, 12 Dec 2016 22:58:24 +0000 (23:58 +0100)]
Merge from trunk.
David Given [Mon, 12 Dec 2016 22:56:49 +0000 (23:56 +0100)]
Add pmap_contains_bi() and pmap_remove_bi().
David Given [Mon, 12 Dec 2016 22:55:49 +0000 (23:55 +0100)]
Fix warnings.
David Given [Mon, 12 Dec 2016 22:55:24 +0000 (23:55 +0100)]
Cleanup for correctly assigning bbs when tinkering with IRs.
David Given [Mon, 12 Dec 2016 22:54:59 +0000 (23:54 +0100)]
Wire up the new passes.
David Given [Mon, 12 Dec 2016 22:54:25 +0000 (23:54 +0100)]
Add infrastructure for new, special move hops.
David Given [Mon, 12 Dec 2016 22:53:33 +0000 (23:53 +0100)]
Fix warnings.
David Given [Mon, 12 Dec 2016 22:51:05 +0000 (23:51 +0100)]
Gets much further at allocating registers now; the register graph is (possibly)
correctly simplified and spilt, although it still fails on mandelbrot.c.
David Given [Mon, 12 Dec 2016 22:49:42 +0000 (23:49 +0100)]
Nothing uses phi congruence any more (replaced by register allocator anode
coalescing), so remove the pass that calculated it.
David Given [Mon, 12 Dec 2016 22:47:05 +0000 (23:47 +0100)]
Don't record use-def data; we have a pass now that does this for us.
David Given [Mon, 12 Dec 2016 22:45:52 +0000 (23:45 +0100)]
Rename the locals SSA pass to be more clearly named.
David Given [Mon, 12 Dec 2016 22:45:13 +0000 (23:45 +0100)]
Always insert phis, even if we don't technically need one (saves time later).