9333b323a5Make the MIPS boot code produce correct code.
David Given
2018-09-18 23:39:04 +0200
d23d2dd1b3Loads and stores (except longs, which are difficult) are now loaded with two instructions rather than three.
David Given
2018-09-18 23:38:37 +0200
52ee317878Fixed some bad mcg ir code generation: only nodes which have been appendir'd may be used multiple times.
David Given
2018-09-18 23:32:53 +0200
692caa2b0aAdd unsigned comparison rules.
David Given
2018-09-18 00:19:40 +0200
f362d12deeAdd extern declaration which I forget to check in.
David Given
2018-09-17 23:59:49 +0200
fe177bd688Add specialist rules for signed integer comparisons; much better code.
David Given
2018-09-17 23:53:18 +0200
ec0891469fArray descriptor ranges are inclusive; adjust aar and the tests to check for this. All the tests except rotate build now!
David Given
2018-09-17 19:34:38 +0100
f61500c51bFix lar and sar, which were horribly, horribly broken. Add tests.
David Given
2018-09-17 18:44:17 +0100
abb7e3e105Fix aar; add test.
David Given
2018-09-17 16:59:45 +0100
b665efca04ACK loi 1 and sti 1 load and store unsigned bytes. I think.
David Given
2018-09-17 15:03:44 +0100
c2dc1e184erotate() now generates valid code.
David Given
2018-09-17 13:13:39 +0100
0202ac8700Fix bls4.
David Given
2018-09-17 12:53:27 +0100
1e073e944aAdded cms, and a test for it.
David Given
2018-09-17 12:42:10 +0100
0b65591972Add hacky 64-bit comparisons (used by M2).
David Given
2018-09-17 12:16:17 +0100
15ae171aefAdded a test for set. Fix mips set implementation.
David Given
2018-09-17 11:56:15 +0100
7efb749003Set fixes; also add discrete tests for and, ior, xor.
David Given
2018-09-14 14:13:35 +0100
08b1e8d71bMake inn work; fix broken 64-bit loads and stores.
David Given
2018-09-14 13:48:43 +0200
5d0876a30bImplement a working .trp.
David Given
2018-09-14 12:26:27 +0200
ba0849c87cRemove la; turns out that the assembler gets upset if you ask it to generate more than one fixup per instruction (I think).
David Given
2018-09-14 11:30:15 +0200
ac33bdd031Clang-format before editing.
David Given
2018-09-14 09:28:35 +0200
c4e3d0903eBugfix rck.
David Given
2018-09-14 00:38:31 +0200
8c0b2f8aeeFix csa and csb.
David Given
2018-09-14 00:15:43 +0200
9b0a1c1c10Make work with clang.
David Given
2018-09-14 00:04:25 +0200
57338b1991Fix an incorrect instruction, and incredibly broken li handling.
David Given
2018-09-12 23:59:09 +0200
ecb3395abaConverting floats and doubles to integers now works, as much as these ever do on MIPS; turns out that it can't (or at least can't in qemu) reliably turn INT_MIN from a double to an int.
David Given
2018-09-12 23:58:48 +0200
642956fa2fmcg 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.
David Given
2018-09-12 23:19:32 +0200
8105281534Make sure li works properly when loading fixed up values which end up as 0. Use lui rather than li to load high values.
David Given
2018-09-12 22:28:40 +0200
a8df9721d3Adding new tokens to the assembler isn't quite as easy as I thought: ensure that NUMBERF is stored properly in the temporary file.
David Given
2018-09-12 22:27:39 +0200
5264db860dValues are more useful shown in hex.
David Given
2018-09-11 23:17:09 +0200
8379969b6fFix an unsubtle bug where subtractions were done backwards...
David Given
2018-09-11 23:16:50 +0200
8230ec42acFix a subtle thinko which was causing bits 2-3 of jump targets to be reset.
David Given
2018-09-11 23:16:30 +0200
b81e060372Add huge numbers of failing tests.
David Given
2018-09-10 23:40:03 +0200
0ce368324eAdd the bitset helpers. We now have enough helpers for the tests to run (and massively fail).
David Given
2018-09-10 23:37:28 +0200
2f8fe3ce6eDo some cleanup; ha16[] and friends can now be used with li.
David Given
2018-09-10 23:37:04 +0200
3122946a6fReplaced some incorrect hi16s with ha16s.
David Given
2018-09-10 23:21:54 +0200
008737ed19Added some more very untested helper functions.
David Given
2018-09-10 23:20:52 +0200
a1747ac916Add the .dataf4 and .dataf8 directives to the assembler --- manually converting floats and doubles to bytes is not fun. It might even work!
David Given
2018-09-10 22:56:18 +0200
53f7de794aAnsify.
David Given
2018-09-10 22:55:05 +0200
9733454d8eClang-format before editing.
David Given
2018-09-10 22:42:30 +0200
976fa0efcaClang-format before editing.
David Given
2018-09-10 22:37:04 +0200
6275896a11Clang-format before editing.
David Given
2018-09-10 22:25:14 +0200
185e910246Lots more untested helper functions.
David Given
2018-09-10 01:08:25 +0200
f8f6fa9fc1Added some more incredibly untested helper functions.
David Given
2018-09-10 00:21:16 +0200
ee328a0572Merge from default.
David Given
2018-09-09 18:58:07 +0200
776e93221fThinko fix.
David Given
2018-09-09 18:57:44 +0200
c769fbec93Use the correct ELF processor flags; align properly.
David Given
2018-09-09 18:57:35 +0200
f3bc9ef92aCall proper Linux system calls proper-like.
David Given
2018-09-09 18:57:12 +0200
bb15c03339Remember to preserve input registers if we're going to be reading from them after writing to the output register.
David Given
2018-09-09 18:53:49 +0200
79fd34dac6Call atexit handlers properly, avoiding a NPE and seg fault every time a program exits.
David Given
2018-09-09 18:51:00 +0200
e88670dad4Yikes! Turns out that FPU registers are only 32 bits wide, and doubles are stored in pairs, just like on the PowerPC!
David Given
2018-09-09 18:25:00 +0200
ec46643124Allow the ELF processor flags to be set. Generate MIPS ELF executables, not PowerPC ones.
David Given
2018-09-09 14:29:34 +0200
5dfef6f180Rework relocations again: add RELO2HI and RELO2HISAD for the high two bytes of a word.
David Given
2018-09-09 14:11:11 +0200
95dd6f0141Fix some niggling issues --- we have our first binary now!
David Given
2018-09-09 12:24:22 +0200
b3b7c684c6Simplify MIPS relocations. Add RELS2 (for generic high-word relocations). Add support for MIPS branch-and-jump relocations.
David Given
2018-09-09 12:23:59 +0200
0d8d98fd0fWarning fix.
David Given
2018-09-09 12:22:59 +0200
d2a1d4dcdaAdded some very untested csa and csb implementations, based on the PowerPC ones.
David Given
2018-09-08 23:12:57 +0200
75308901bcAdded hi[] and lo[] functions to the assembler; fix things enough that we now get to the point of failing to link programs.
David Given
2018-09-08 22:42:06 +0200
379c1a4a3cRework floating point conversion. Bash enough of the table into workingness that the libraries build now.
David Given
2018-09-08 22:06:38 +0200
d2c14ca44fPrecisely one stack hreg gets allocated for each vreg/congruence group for eviction; this prevents us from having to worry about moving values from stack slot to stack slot, which is hard.
David Given
2018-09-08 18:59:55 +0200
b7a1c96986MIPS appears to hate converting unsigneds to floats and vice versa.
David Given
2018-09-05 23:53:38 +0200
fc0b0ae178(Slightly) better errors on phi congruence group mismatches.
David Given
2018-09-05 23:53:08 +0200
7fbce066f8We attempt to compile the first library function; we fail.
David Given
2018-09-05 00:13:01 +0200
26fe3f7530Added library skeletons.
David Given
2018-09-05 00:07:07 +0200
98afb42095Added a boot.o based on the PowerPC one.
David Given
2018-09-05 00:00:13 +0200
26c0228b14The examples all compile now (probably incorrectly, and the libc doesn't compile yet).
David Given
2018-09-04 23:55:28 +0200
9d80756253Lots of assembler and rule bugfixing.
David Given
2018-09-04 23:43:24 +0200
fe5ca5a85fAdded li and la instructions.
David Given
2018-09-03 22:47:41 +0200
26f9b4ceaeAdd in floating point support to the code generator.
David Given
2018-09-03 22:06:05 +0200
83cf1be6a8mcgg now checks that registers have at most one type attribute set.
David Given
2018-09-03 22:03:57 +0200
f8e71d888bAdd some painfully untested FPU instructions.
David Given
2018-09-02 21:36:09 +0200
1d6ecddcf4The MIPS backend is still full of holes, and cut-and-pasted PowerPC code, but is beginning to look like an actual code generator.
David Given
2018-09-02 18:57:25 +0200
a023fd8591Better error reporting for unterminated strings.
David Given
2018-09-02 18:55:44 +0200
Merge pull request #120 from davidgiven/dtrg-no
David Given
2018-09-02 13:15:11 +0200
b76352de99Remove stray #include.
David Given
2018-09-02 12:54:53 +0200
cb983fac44Rip out the built-in preprocessor from cemcom.ansi, now it's no longer used.
David Given
2018-09-02 12:50:50 +0200
6931ffa5a4Disable the built-in preprocessor in cemcom.ansi; the external preprocessor is always run. Fix a bug in block skipping in the preprocessor.
David Given
2018-09-02 12:39:00 +0200
f8fc5bc3d8Implement single-line C++-style comments.
David Given
2018-09-02 12:14:59 +0200
0e9736fdcaRun through clang-format before editing.
David Given
2018-09-02 12:04:33 +0200
274ed3cb6aRun through clang-format before editing.
David Given
2018-09-02 11:49:40 +0200
dd00b81080Run files through clang-format before editing.
David Given
2018-09-02 11:36:15 +0200
fa1ba55ad2Convert CRLF into LF on read; this should avoid problems with parsing CRLF files.
David Given
2018-09-02 11:30:20 +0200
788f439a48Run files through clang-format before editing.
David Given
2018-09-02 11:16:06 +0200
4741ed8e14Add a completely non-tested table-based MIPS assembler.
David Given
2018-09-01 19:35:31 +0200
bed39e1f4dMerge.
David Given
2018-09-01 15:34:36 +0200
1d9f9074d9The default installation location should be /usr/local.
David Given
2018-09-01 15:34:01 +0200