Commit graph

  • 79a38ecc08 Instead of using parameterised rsts for stack access, add a huge swathe of automatically built helper tools. Star Trek goes up from 40243 to 40779 bytes, but should be a lot faster. David Given 2019-02-13 22:45:22 +0100
  • f70659f460 Don't do weird things if files starting with a hyphen exist in the build directory. David Given 2019-02-13 22:42:05 +0100
  • 37ded7e65d
    Merge pull request #160 from davidgiven/dtrg-b159 David Given 2019-02-13 21:16:06 +0100
  • 8200f041c2 Fix issue with logical operations and small signed constants which turned out to affect multiple platforms. David Given 2019-02-13 20:56:10 +0100
  • eb57db75a4 Update test case to provoke bug. David Given 2019-02-13 20:10:38 +0100
  • 55f3880f43
    Merge pull request #158 from davidgiven/dtrg-b157 David Given 2019-02-12 22:29:01 +0100
  • f4b45f1ed7 Fix bad code generation due to not correctly flushing the stack before comparisons. David Given 2019-02-12 22:19:07 +0100
  • a2b5202081 Added a test case for #157. David Given 2019-02-12 22:08:08 +0100
  • 073451dd44
    Merge pull request #154 from ccodere/buildfix David Given 2019-02-12 21:51:46 +0100
  • 664338aa49 Fix compilation issue on C90 compilers (gcc 4.8 was failing to compile with default flags) - updated following comment. carl 2019-02-13 00:17:45 +0800
  • 360e1525ae Replace the non-working Z80 style signed comparison sign adjustment with something which actually works on the 8080. Sadly, Star Trek is up to 40243 bytes again. David Given 2019-02-12 11:57:37 +0100
  • ee716754d3
    Merge pull request #156 from davidgiven/dtrg-arraysizes David Given 2019-02-11 21:35:16 +0100
  • e8994afdf0 Apply Alan Cox's patch to add the 8085 extended instructions to the i80 assembler. David Given 2019-02-11 21:14:35 +0100
  • ae6ea14e93
    Merge pull request #155 from davidgiven/dtrg-arraysizes David Given 2019-02-11 21:09:52 +0100
  • f1b128baeb Signed comparisons now work correctly; sadly, Star Trek increases from 39656 to 39726 bytes. Note that the emulator doesn't set P/V correctly and all the tests fail. Testing in z80ex works fine. David Given 2019-02-11 20:46:06 +0100
  • c63f527dde Fix compilation issue on C90 compilers (gcc 4.8 was failing to compile with default flags). carl 2019-02-12 00:46:09 +0800
  • 34e9573929 Merge from default. David Given 2019-02-10 23:40:07 +0100
  • 1564e65c2d Add tests for simple comparisons (which i80 fails). David Given 2019-02-10 23:39:15 +0100
  • 3991a0db3a
    Merge pull request #153 from davidgiven/dtrg-i80 David Given 2019-02-10 19:45:00 +0100
  • fca54ccc1b Improve subtractions, using dad and inline constants where possible. Shrinks Star Trek from 39740 to 39656 bytes. David Given 2019-02-10 19:40:48 +0100
  • 7d34cd7407 Simplify simple comparisons and use inlie constants where possible. Reduces Star Trek from 39771 to 39740 bytes. David Given 2019-02-10 19:22:43 +0100
  • 35d1f36ca4 Use pop rather than inx;inx to retract the stack; consumes a register but halves the number of calls. Reduces Star Trek from 39976 to 39771 bytes. David Given 2019-02-10 18:57:20 +0100
  • b34ff2bdec Teach the i80 code generator how to do left shifts by using dad hl; prevents it from calling out to .sli2 for simple shifts. Shrinks Star Trek from 40055 bytes to 39976. David Given 2019-02-10 18:44:47 +0100
  • 608e386ca4
    Merge pull request #152 from davidgiven/dtrg-osx David Given 2019-02-10 16:40:16 +0100
  • c95d5db372 Replace mkstemp() with the more modern and safer and simpler tmpfile(). David Given 2019-02-10 14:36:15 +0100
  • 63fa647bc9 freopen() appears to be problematic on OSX; as it's only ever used to rewind files, replace with rewind(). David Given 2019-02-10 14:32:17 +0100
  • 1dfafe070c Better error reporting. David Given 2019-02-10 14:19:18 +0100
  • 813595358c More common symbol removal. David Given 2019-02-10 14:09:52 +0100
  • d37749750d More common symbol fixing. David Given 2019-02-10 14:03:55 +0100
  • 58698bed19 Removed a whole bunch of old strcpy() prototypes in favour of <string.h>. David Given 2019-02-10 13:20:04 +0100
  • c8c48221b3 Second try at removing common symbols. David Given 2019-02-10 13:11:03 +0100
  • 8a7077d5a9 Change the way external symbols are defined to avoid COMMON symbols, which don't work on OSX very well. David Given 2019-02-10 12:57:22 +0100
  • 666d9a3edb Add stray header. David Given 2019-02-10 12:57:00 +0100
  • 020e910560 Remember that we need to update the generated file in LLgen, as it's not self-bootstrapping... David Given 2019-02-10 12:38:33 +0100
  • dd35aa3eef We don't need depth 10 in the travis checkout. David Given 2019-02-10 12:35:18 +0100
  • 65e544c35a Don't prototype strcpy as it makes OSX sad. David Given 2019-02-10 12:28:42 +0100
  • 7cdd0cd5c0 Merge from default. David Given 2019-02-10 12:22:59 +0100
  • aa6aefdaa0 Add missing header. David Given 2019-02-10 00:45:09 +0100
  • 39acc01862
    Merge pull request #150 from davidgiven/dtrg-windows David Given 2019-02-09 17:43:19 +0100
  • 810afbb5b9 Don't run the floating point tests on i80. David Given 2019-02-09 14:24:31 +0100
  • 74f0eb90fa
    Merge pull request #148 from davidgiven/dtrg-windows David Given 2019-02-09 14:15:38 +0100
  • 39eb8a85f5 Don't run the tests in Appveyor. David Given 2019-02-09 13:59:37 +0100
  • bcc9c16bf7 More z80ex removal. David Given 2019-02-09 13:42:09 +0100
  • ada4d0806b
    Merge pull request #149 from davidgiven/dtrg-arraysizes David Given 2019-02-09 13:40:36 +0100
  • 343cdf7983 Remove stray z80ex reference. David Given 2019-02-09 13:30:29 +0100
  • 10b509d6b6 Add rst 3 to get the address of a frame variable; lots of rule overhaulage. Reduces Star Trek from 41821 to 41055 bytes. David Given 2019-02-09 13:29:41 +0100
  • f9a3baeaf7 Ugh, typo fix. David Given 2019-02-09 12:25:27 +0100
  • 6c146e8c05 Maybe the setup script is somewhere else? David Given 2019-02-09 12:23:42 +0100
  • e62b113b0a Try to install cygwin packages. David Given 2019-02-09 12:17:57 +0100
  • 369e3300ac Another try at an AppVeyor build script. David Given 2019-02-09 12:04:42 +0100
  • 27b8312598 Add experimental appveyor file. David Given 2019-02-09 00:07:33 +0100
  • 9e2d45b301 Rename all files called 'aux.*' to something else; Windows can't handle them. David Given 2019-02-09 00:02:41 +0100
  • 857f6a6646
    Merge pull request #147 from davidgiven/dtrg-arraysizes David Given 2019-02-08 23:19:08 +0100
  • 0de5001f82 Make sign extension much less horrible. David Given 2019-02-08 23:16:57 +0100
  • 0ac145a0d1 Add tests for simple and, or, and xor; drastically improve the i80 code generation for these. David Given 2019-02-08 22:38:07 +0100
  • 996188d20a
    Merge pull request #145 from davidgiven/dtrg-arraysizes David Given 2019-02-08 21:53:56 +0100
  • 19f5ee3399 CP/M sbrk now handles overflow correctly. David Given 2019-02-08 21:43:52 +0100
  • a91ab5c599 Somehow the implementation of rst 2 got lost, with hilarious results. Also fix some register corruption issues (I hope). David Given 2019-02-08 21:35:14 +0100
  • 22032575c5 Add a 'disassemble' command to the CP/M emulator. David Given 2019-02-08 20:54:44 +0100
  • d319c7d679 Fix swapped bytes in probyte which was causing junk stack frames. David Given 2019-02-08 08:09:55 +0100
  • b47d59aa4a Merge from default. David Given 2019-02-07 23:45:47 +0100
  • 1982301639
    Merge pull request #146 from davidgiven/dtrg-cpmemu David Given 2019-02-07 23:45:08 +0100
  • 8876ddcad2 Build the CP/M tests (which got turned off accidentally). Add a disassembler to the emulator debugger. David Given 2019-02-07 23:36:45 +0100
  • 80bfbd17b7 Add missing file. David Given 2019-02-07 23:01:10 +0100
  • 7473601172 Add the cpm emulator from Cowgol, modified to work with an 8080 emulator rather than libz80ex; enable tests for cpm. David Given 2019-02-07 22:39:57 +0100
  • a5bf2932c8 Add rst 1 to store frame variables. Reduces Star Trek from 42339 to 41821 bytes. David Given 2019-02-07 09:31:38 +0100
  • 67a9be26d1 Fix warnings. David Given 2019-02-07 09:09:31 +0100
  • 9d8ea79c7f rst 1 now takes an eight-bit parameter, not a 16 bit one. Reduces Star Trek again from 43205 to 42339 bytes. David Given 2019-02-07 08:45:20 +0100
  • 5ac280026e Experimentally use rst 1 to optimise frame variable loads. Reduces Star Trek from 43892 to 43205 bytes. David Given 2019-02-07 00:06:32 +0100
  • a6b8ae66d7
    Merge pull request #144 from davidgiven/dtrg-arraysizes David Given 2019-02-06 21:31:29 +0100
  • 08b92153a0 Use a helper function for cai --- only saves two bytes per invocation, but is much less embarassing. David Given 2019-02-06 20:36:23 +0100
  • 3d5977b93b
    Merge pull request #142 from davidgiven/dtrg-arraysizes David Given 2019-02-06 16:15:53 +0100
  • 2b0629f87f Common out boilerplate function prologue code; shrinks Star Trek from 44256 to 43892 bytes. David Given 2019-02-06 16:06:07 +0100
  • b77f616598 Run through clang-format before editing. David Given 2019-02-06 11:50:05 +0100
  • 73fab341f5
    Merge pull request #141 from davidgiven/dtrg-stray David Given 2019-02-06 11:30:56 +0100
  • 24ffbe086a Install the cpp.ansi man page. #82. David Given 2018-12-22 23:47:49 +0100
  • 7563ac46a7
    Merge pull request #140 from davidgiven/dtrg-arraysizes David Given 2019-02-06 07:43:16 +0000
  • 02779325ab Move the standard ret boilerplate into a helper procedure, to save a little space. David Given 2019-02-06 08:08:11 +0100
  • 2e71c027a3
    Merge pull request #136 from kernigh/kernigh-led-malloc David Given 2018-11-20 10:52:44 +0100
  • 33c0573598 Remove code to calculate memory usage with sbrk(). George Koehler 2018-11-14 16:13:54 -0500
  • 1c8434e33a Switch led to malloc() and realloc(). George Koehler 2018-11-13 18:05:16 -0500
  • 4fdfa3177e Fix em_led -u name when memory allocator moves ALLOMODL. George Koehler 2018-11-12 22:46:26 -0500
  • f09f14cd4d Switch from long to size_t when allocating memory. George Koehler 2018-11-11 22:51:17 -0500
  • c55ed2acfa
    Merge pull request #135 from kernigh/kernigh-mv-int David Given 2018-11-05 21:48:17 +0100
  • df855248a0 Move int to $(INSDIR)/bin/int George Koehler 2018-11-05 15:14:29 -0500
  • 1b60af4f0b
    Merge pull request #133 from davidgiven/dtrg-mips David Given 2018-09-22 17:30:52 +0200
  • ed91ea4371 When parsing constants which don't fit into an arith, handle overflow properly (and don't turn them all into INT_MAX...). David Given 2018-09-22 12:45:59 +0200
  • c6a1cf8de4
    Merge pull request #132 from davidgiven/dtrg-mips David Given 2018-09-22 11:04:13 +0100
  • 79e7636537 Teach the code generator about the zero register and how to efficiently access the stack. David Given 2018-09-22 11:49:13 +0200
  • 99fcde69dc Take hreg aliases into account when finding evicted registers and performing the register shuffle dance. David Given 2018-09-22 11:19:50 +0200
  • bbb708717a Add the OPTIONS clause to the mcgg grammar; add an optional pass which converts sequences of PUSHes to a single STACKADJUST followed by STOREs. This should dramatically improve code on stack-unfriendly architectures like MIPS. David Given 2018-09-22 11:19:00 +0200
  • 8fd3e1f5ce
    Merge pull request #131 from davidgiven/dtrg-mips David Given 2018-09-20 23:05:55 +0100
  • 985d3dc7d1 Remove some old, hopefully unused PowerPC code. Teach the code generator about non-volatile long registers. David Given 2018-09-20 23:30:38 +0200
  • 65a20ce2d6 Fix subtle register corruption bug where aliases weren't taken into account when assigning input registers to phis, which could cause the same hreg to be assigned to two vregs of different types. Also improve tracing. David Given 2018-09-20 23:24:46 +0200
  • 436d50b54c Create correctly sized csa descriptors in the Basic compiler. David Given 2018-09-20 00:49:31 +0200
  • cb20856aea A few more minor optimisations. David Given 2018-09-20 00:39:13 +0200
  • 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. David Given 2018-09-20 00:12:03 +0200
  • ac921080b7 Fix incorrect ori encoding. David Given 2018-09-20 00:06:26 +0200
  • 8fda024ec8 Remember to save longs and doubles. Yikes. David Given 2018-09-19 00:09:50 +0200
  • 365c89c9e7 Updated READMEs with the MIPS platform. David Given 2018-09-18 23:49:31 +0200