Commit graph

  • a58ad2bc31 * Adapt to more ANSI C carl 2019-03-24 23:36:52 +0800
  • da0e0ac257 * Adapt to more ANSI C carl 2019-03-24 23:35:59 +0800
  • 56e64a1fd0 Merge remote-tracking branch 'upstream/default' into carl-ansi-part1 carl 2019-03-24 21:42:56 +0800
  • 75394c93e1 Better ANSI C portability. carl 2019-03-24 17:40:27 +0800
  • 9b6e1774ea ANSI C version More portability fixes. carl 2019-03-24 17:37:49 +0800
  • 53fa893738 ANSI C version More portability fixes. carl 2019-03-24 17:11:56 +0800
  • 7063301f8c Add additional defines for compilation. carl 2019-03-24 17:09:29 +0800
  • 086a2ac9ab Add additional defines for compilation. carl 2019-03-24 17:09:12 +0800
  • c5f5bace63 Add additional defines for compilation. carl 2019-03-24 17:08:45 +0800
  • ae76564657
    Merge pull request #183 from kernigh/kernigh-include David Given 2019-03-23 12:31:32 +0100
  • bec236c108 Include more headers to declare functions. George Koehler 2019-03-22 15:15:40 -0400
  • 84f65f7ce3 Raise _XOPEN_SOURCE from 500 to 700 George Koehler 2019-03-22 14:35:07 -0400
  • cdbff0dd1c Include <fcntl.h> or <unistd.h> George Koehler 2019-03-22 14:19:02 -0400
  • dd328215d8 Use %zu to print size_t count George Koehler 2019-03-22 14:09:50 -0400
  • f8cbe04447 Include <unistd.h> for lseek() George Koehler 2019-03-22 13:18:07 -0400
  • 3f61c0d507
    Merge pull request #181 from ccodere/carl-ansi-part1 David Given 2019-03-20 15:53:22 +0100
  • b3814af1ba * Bugfix of "rename" across volumes, now simply copies the file instead. carl 2019-03-17 23:19:16 +0800
  • de57335296 Try to update frontend driver. carl 2019-03-17 22:42:58 +0800
  • 8b525f59c3 + ANSI C conversion carl 2019-03-17 22:42:20 +0800
  • 3ac4504a5a + ANSI C conversion carl 2019-03-17 22:42:10 +0800
  • 5a18b85b3f + ANSI C conversion carl 2019-03-17 22:42:00 +0800
  • 75909230c9 + ANSI C conversion carl 2019-03-17 22:41:25 +0800
  • 0df5d2f50b + Make it build with troff carl 2019-03-17 22:25:47 +0800
  • 9f29c76c74 + Have the DEBUG version compile carl 2019-03-17 22:24:54 +0800
  • 6bfac1d24d + Add sys_tmpnam() and sys_basename() carl 2019-03-17 22:23:56 +0800
  • da71e5a018 Addition of tmpnam system function. carl 2019-03-17 22:23:18 +0800
  • 91adc2849b + Have the DEBUG version compile carl 2019-03-17 22:22:29 +0800
  • 9e93eb642b Better type checking on function callback. carl 2019-03-17 22:22:19 +0800
  • 43ea6e2bec
    Merge pull request #177 from davidgiven/dtrg-8080 David Given 2019-03-11 17:00:12 +0100
  • c59eae1429 Don't buffer overflow when trying to process source bytes with the high bit set. David Given 2019-03-11 13:50:30 +0000
  • 88fd7b3cdc Add a 'kill' pseudoinstruction to the 8080 assembler, which marks when the code generator is finished with a register; use this to create some more effective peephole optimiser rules. David Given 2019-03-08 23:06:34 +0100
  • e2625813c9
    Merge pull request #174 from ccodere/carl-ansi-part1 David Given 2019-03-07 20:51:08 +0100
  • 8f6073d446 + Better type checking in function tables. carl 2019-03-02 01:41:01 +0800
  • 3867cfdaca + M2 Compiler ISO C90 compatibility * Fixing of potential crash issue with function tables in compiler. + SYSTEM.h is now renamed to SYSTEMM2.h to avoid conflicts on non case sensitive filesystems. carl 2019-03-02 01:39:25 +0800
  • 5f9a199257 CPP ISO C90 compatibility and conversion. carl 2019-03-02 01:36:11 +0800
  • f371f452b5 Basic compiler is now ISO C90 compliant. carl 2019-03-02 01:35:09 +0800
  • ca3e272233
    Merge pull request #173 from ccodere/carl-ansi-part1 David Given 2019-02-25 23:23:04 +0100
  • 9fab867333 Fix issue again with wrong macro on error. carl 2019-02-26 00:46:10 +0800
  • bd52b1f8f5 * Fix more tabs. carl 2019-02-26 00:44:52 +0800
  • e233db6dc0 * Convert spaces -> tabs to keep consistency with existing code. carl 2019-02-24 01:15:23 +0800
  • f74b29d303 * Remove some more compiler warnings. carl 2019-02-24 00:46:05 +0800
  • 9622898131 Bugfix of fprint using correct output redirection (fix from last commit). carl 2019-02-24 00:45:35 +0800
  • 41cb541e7e Pascal compiler better type checking and function declarations (Better ISO C compatibility) carl 2019-02-24 00:44:50 +0800
  • d41ba12679
    Merge pull request #172 from ccodere/carl-ansi-part1 David Given 2019-02-20 19:36:49 +0100
  • 4b5de6c203 Remove unused variable. carl 2019-02-21 00:43:49 +0800
  • f7ba3eec50 Remove CMake changes and generic sed scripts so they are move to a separate branch. carl 2019-02-21 00:43:04 +0800
  • a80248f204 * Was trying to use the new system API which is not ready causing stack issues. carl 2019-02-20 00:44:32 +0800
  • 9ca8f42930 + Add missing files. carl 2019-02-20 00:32:19 +0800
  • 79eb91c880 + Add topgen carl 2019-02-19 00:48:21 +0800
  • d825e962ed Better ANSI C compatibility and portability: + Addition of function prototypes and include files. + Change function definitions to ANSI C style. + Initial support for CMake carl 2019-02-19 00:44:39 +0800
  • cc27fd471d Better ANSI C compatibility and portability: + Addition of function prototypes and include files. + Change function definitions to ANSI C style. + Initial support for CMake . carl 2019-02-19 00:44:19 +0800
  • 750a6bc684 Better ANSI C compatibility and portability: + Addition of function prototypes and include files. + Change function definitions to ANSI C style. + Initial support for CMake + Scripts to generate compiler header is now sed based. carl 2019-02-19 00:42:15 +0800
  • e70690c510 + Addition of scripts to generate compiler include files. carl 2019-02-19 00:40:51 +0800
  • 910643ccbb Better ANSI C compatibility and portability: + Addition of function prototypes and include files. + Change function definitions to ANSI C style. + Initial support for CMake carl 2019-02-19 00:39:39 +0800
  • 10717cc791 Better ANSI C compatibility and portability: + Addition of function prototypes and include files. + Change function definitions to ANSI C style. - Remove support for generating K&R code. - Remove mkstemp and replace by tmpnam (more portable but less safe) carl 2019-02-19 00:39:05 +0800
  • 42bbdec82d Better ANSI C compatibility and portability - part 1: + Addition of function prototypes. + Change function definitions to ANSI C style. carl 2019-02-19 00:37:52 +0800
  • f49a5a24f7 * Initial support of CMake carl 2019-02-19 00:37:26 +0800
  • 58d0c33784 * Initial support of CMake carl 2019-02-19 00:37:11 +0800
  • b4df26e79d Better ANSI C compatibility and portability - part 1: + Addition of function prototypes. + Change function definitions to ANSI C style. + Initial support for CMake + Added support for sys_tmpdir for better portability. carl 2019-02-19 00:36:48 +0800
  • 7317ae3291 * Initial support of CMake carl 2019-02-19 00:35:32 +0800
  • 3214ddfa68 Better ANSI C compatibility and portability - part 1: + Addition of function prototypes. + Change function definitions to ANSI C style. carl 2019-02-19 00:35:24 +0800
  • 288e81355e * Add missing header file. carl 2019-02-19 00:35:01 +0800
  • bd25701a3f * Initial support of CMake carl 2019-02-19 00:34:44 +0800
  • 18730a361d * Adapt to new sys_filesize prototype. carl 2019-02-19 00:34:24 +0800
  • 8c7de90005 * Initial support of CMake carl 2019-02-19 00:34:03 +0800
  • 7c7379c46f Better ANSI C compatibility and portability - part 1: + Addition of function prototypes. + Change function definitions to ANSI C style. + Convert to sed scripts some shell scripts for better portability. + Reduce usage of em_path.h (TMPDIR is no longer hard coded) carl 2019-02-19 00:33:54 +0800
  • a4650360a3 * Initial support of CMake + Generation of header files is now made through a C program to make it more portable. carl 2019-02-19 00:33:21 +0800
  • 0ac16f6116 Better ANSI C compatibility and portability - part 1: + Addition of function prototypes. + Change function definitions to ANSI C style. + Convert to sed scripts some shell scripts for better portability. + Reduce usage of em_path.h carl 2019-02-19 00:32:48 +0800
  • 90d4797ff7 * Initial support of CMake carl 2019-02-19 00:32:17 +0800
  • 0f75cc09ad Better ANSI C compatibility and portability - part 1: + Addition of function prototypes. + Change function definitions to ANSI C style. + Convert to sed scripts some shell scripts for better portability. + Reduce usage of em_path.h carl 2019-02-19 00:31:58 +0800
  • 4555c1c8cf Better ANSI C compatibility and portability - part 1: + Addition of function prototypes. + Change function definitions to ANSI C style. + Convert to sed scripts some shell scripts for better portability. + Reduce usage of em_path.h carl 2019-02-19 00:31:29 +0800
  • fdf5da62d7 Better ANSI C compatibility and portability - part 1: * Adapt to new sys_filesize prototype. carl 2019-02-19 00:30:47 +0800
  • 796317e0e3 Better ANSI C compatibility and portability - part 1: * Adapt to new sys_filesize prototype. carl 2019-02-19 00:30:35 +0800
  • 2e1c7c37e7 Better ANSI C compatibility and portability - part 1: + Addition of function prototypes. + Change function definitions to ANSI C style. + Convert to sed scripts some shell scripts for better portability. + Reduce usage of em_path.h carl 2019-02-19 00:30:01 +0800
  • 3ee29a17e9 Better ANSI C compatibility and portability - part 1: + Addition of function prototypes. + Change function definitions to ANSI C style. + Convert to sed scripts some shell scripts for better portability. + Reduce usage of em_path.h carl 2019-02-19 00:29:42 +0800
  • 52aa22dc80 Fix typo. David Given 2019-02-18 11:04:23 +0100
  • 12a0421988 Minor improvements to the way types are expanded (should avoid embarassing ands with 0xff). David Given 2019-02-17 10:09:22 +0100
  • c4ff0899dc
    Merge pull request #171 from davidgiven/dtrg-comparisons David Given 2019-02-16 01:23:27 +0100
  • 61d623c4d6 Add a few minor top optimisations. David Given 2019-02-16 01:18:31 +0100
  • 6a8b298861 Fix typo where I was confusing sbi and sui, with hilarious results. David Given 2019-02-16 01:18:21 +0100
  • dfd75c770b
    Merge pull request #170 from davidgiven/dtrg-i169 David Given 2019-02-15 23:56:00 +0100
  • 245478a030 Fix memory corruption when using -R; the values being stored in the list weren't freeable when they should have been. David Given 2019-02-15 23:40:42 +0100
  • e976e10708 Reformat before editing. David Given 2019-02-15 23:24:10 +0100
  • d4d5eee1cd
    Merge pull request #168 from davidgiven/dtrg-i167 David Given 2019-02-15 23:12:12 +0100
  • 4474d6433a Loading large constants now computes the stack offset correctly. David Given 2019-02-15 23:03:01 +0100
  • 34c67698ef Generate the proper function prologues for big stack frames. David Given 2019-02-15 23:01:33 +0100
  • e1ddbf969a
    Merge pull request #166 from davidgiven/dtrg-comparisons David Given 2019-02-15 22:54:13 +0100
  • 8ca4d6ea1e Cleanup. David Given 2019-02-15 22:26:14 +0100
  • c9467b683a Add rules for converting smallnconst2 and smallpconst2 to registers, to stop the conversion from happening via the stack. Star Trek goes from 39450 to 39384 bytes. David Given 2019-02-15 22:20:07 +0100
  • afd45acb89 Using regpair instead of hl_or_de is not, in fact, safe until we've stopped using bc. David Given 2019-02-15 21:38:17 +0100
  • d63a359a49 Fix nearly all the comparisons, a lot of which were broken. Using a rst for unsigned comparisons is surprisingly not that useful due to marshalling overhead; it's only four bytes to do inline (plus jc), or six for a constant. Also add some useful top optimisations. Star Trek goes from 39890 to 39450 bytes. David Given 2019-02-15 21:30:27 +0100
  • 91c75f81b5 Call cmps rather than cmpu for bge... make cmps and cmpu rsts. Apply various other tiny optimisations. David Given 2019-02-15 00:38:39 +0100
  • 2924ce8ffa Use nicely optimised helper tools to do signed comparisons of words. Star Trek goes from 40452 to 39890 bytes. David Given 2019-02-14 23:57:55 +0100
  • 0694cf34b0
    Merge pull request #165 from davidgiven/dtrg-b164 David Given 2019-02-14 23:29:41 +0100
  • 3c3d2a4520 Fix bad helper tool invocation for inl with faddrn. David Given 2019-02-14 23:21:47 +0100
  • cf6041c57f Add failing test case. David Given 2019-02-14 23:19:11 +0100
  • 44c8b53a2d
    Merge pull request #163 from davidgiven/dtrg-regmoves David Given 2019-02-14 00:13:41 +0100
  • 8eaa11ac72 Turns out that every time the compiler tried to do a stack retraction with asp, it would flush registers onto the stack. This stops it doing this. Star Trek goes from 40779 to 40452 bytes. David Given 2019-02-14 00:05:08 +0100
  • 2deead3d3d
    Merge pull request #161 from davidgiven/dtrg-faststack David Given 2019-02-13 22:56:18 +0100
  • 6e3ba8e9a0 Merge from default. David Given 2019-02-13 22:46:00 +0100