ack.git
6 years agoClang-format before editing.
David Given [Mon, 10 Sep 2018 20:42:30 +0000 (22:42 +0200)]
Clang-format before editing.

6 years agoClang-format before editing.
David Given [Mon, 10 Sep 2018 20:37:04 +0000 (22:37 +0200)]
Clang-format before editing.

6 years agoClang-format before editing.
David Given [Mon, 10 Sep 2018 20:25:14 +0000 (22:25 +0200)]
Clang-format before editing.

6 years agoLots more untested helper functions.
David Given [Sun, 9 Sep 2018 23:08:25 +0000 (01:08 +0200)]
Lots more untested helper functions.

6 years agoAdded some more incredibly untested helper functions.
David Given [Sun, 9 Sep 2018 22:21:16 +0000 (00:21 +0200)]
Added some more incredibly untested helper functions.

6 years agoMerge from default.
David Given [Sun, 9 Sep 2018 16:58:07 +0000 (18:58 +0200)]
Merge from default.

6 years agoThinko fix.
David Given [Sun, 9 Sep 2018 16:57:44 +0000 (18:57 +0200)]
Thinko fix.

6 years agoUse the correct ELF processor flags; align properly.
David Given [Sun, 9 Sep 2018 16:57:35 +0000 (18:57 +0200)]
Use the correct ELF processor flags; align properly.

6 years agoCall proper Linux system calls proper-like.
David Given [Sun, 9 Sep 2018 16:57:12 +0000 (18:57 +0200)]
Call proper Linux system calls proper-like.

6 years agoRemember to preserve input registers if we're going to be reading from them
David Given [Sun, 9 Sep 2018 16:53:49 +0000 (18:53 +0200)]
Remember to preserve input registers if we're going to be reading from them
after writing to the output register.

6 years agoCall atexit handlers properly, avoiding a NPE and seg fault every time a
David Given [Sun, 9 Sep 2018 16:51:00 +0000 (18:51 +0200)]
Call atexit handlers properly, avoiding a NPE and seg fault every time a
program exits.

6 years agoYikes! Turns out that FPU registers are only 32 bits wide, and doubles are
David Given [Sun, 9 Sep 2018 16:25:00 +0000 (18:25 +0200)]
Yikes! Turns out that FPU registers are only 32 bits wide, and doubles are
stored in pairs, just like on the PowerPC!

6 years agoAllow the ELF processor flags to be set. Generate MIPS ELF executables, not
David Given [Sun, 9 Sep 2018 12:29:34 +0000 (14:29 +0200)]
Allow the ELF processor flags to be set. Generate MIPS ELF executables, not
PowerPC ones.

6 years agoRework relocations again: add RELO2HI and RELO2HISAD for the high two bytes of
David Given [Sun, 9 Sep 2018 12:11:11 +0000 (14:11 +0200)]
Rework relocations again: add RELO2HI and RELO2HISAD for the high two bytes of
a word.

6 years agoFix some niggling issues --- we have our first binary now!
David Given [Sun, 9 Sep 2018 10:24:22 +0000 (12:24 +0200)]
Fix some niggling issues --- we have our first binary now!

6 years agoSimplify MIPS relocations. Add RELS2 (for generic high-word relocations). Add
David Given [Sun, 9 Sep 2018 10:23:59 +0000 (12:23 +0200)]
Simplify MIPS relocations. Add RELS2 (for generic high-word relocations). Add
support for MIPS branch-and-jump relocations.

6 years agoWarning fix.
David Given [Sun, 9 Sep 2018 10:22:59 +0000 (12:22 +0200)]
Warning fix.

6 years agoAdded some very untested csa and csb implementations, based on the PowerPC
David Given [Sat, 8 Sep 2018 21:12:57 +0000 (23:12 +0200)]
Added some very untested csa and csb implementations, based on the PowerPC
ones.

6 years agoAdded hi[] and lo[] functions to the assembler; fix things enough that we now
David Given [Sat, 8 Sep 2018 20:42:06 +0000 (22:42 +0200)]
Added hi[] and lo[] functions to the assembler; fix things enough that we now
get to the point of failing to link programs.

6 years agoRework floating point conversion. Bash enough of the table into workingness
David Given [Sat, 8 Sep 2018 20:06:38 +0000 (22:06 +0200)]
Rework floating point conversion. Bash enough of the table into workingness
that the libraries build now.

6 years agoPrecisely one stack hreg gets allocated for each vreg/congruence group for
David Given [Sat, 8 Sep 2018 16:59:55 +0000 (18:59 +0200)]
Precisely 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.

6 years agoMIPS appears to hate converting unsigneds to floats and vice versa.
David Given [Wed, 5 Sep 2018 21:53:38 +0000 (23:53 +0200)]
MIPS appears to hate converting unsigneds to floats and vice versa.

6 years ago(Slightly) better errors on phi congruence group mismatches.
David Given [Wed, 5 Sep 2018 21:53:08 +0000 (23:53 +0200)]
(Slightly) better errors on phi congruence group mismatches.

6 years agoWe attempt to compile the first library function; we fail.
David Given [Tue, 4 Sep 2018 22:13:01 +0000 (00:13 +0200)]
We attempt to compile the first library function; we fail.

6 years agoAdded library skeletons.
David Given [Tue, 4 Sep 2018 22:07:07 +0000 (00:07 +0200)]
Added library skeletons.

6 years agoAdded a boot.o based on the PowerPC one.
David Given [Tue, 4 Sep 2018 22:00:13 +0000 (00:00 +0200)]
Added a boot.o based on the PowerPC one.

6 years agoThe examples all compile now (probably incorrectly, and the libc doesn't
David Given [Tue, 4 Sep 2018 21:55:28 +0000 (23:55 +0200)]
The examples all compile now (probably incorrectly, and the libc doesn't
compile yet).

6 years agoLots of assembler and rule bugfixing.
David Given [Tue, 4 Sep 2018 21:43:24 +0000 (23:43 +0200)]
Lots of assembler and rule bugfixing.

6 years agoAdded li and la instructions.
David Given [Mon, 3 Sep 2018 20:47:41 +0000 (22:47 +0200)]
Added li and la instructions.

6 years agoAdd in floating point support to the code generator.
David Given [Mon, 3 Sep 2018 20:06:05 +0000 (22:06 +0200)]
Add in floating point support to the code generator.

6 years agomcgg now checks that registers have at most one type attribute set.
David Given [Mon, 3 Sep 2018 20:03:57 +0000 (22:03 +0200)]
mcgg now checks that registers have at most one type attribute set.

6 years agoAdd some painfully untested FPU instructions.
David Given [Sun, 2 Sep 2018 19:36:09 +0000 (21:36 +0200)]
Add some painfully untested FPU instructions.

6 years agoThe MIPS backend is still full of holes, and cut-and-pasted PowerPC code, but
David Given [Sun, 2 Sep 2018 16:57:25 +0000 (18:57 +0200)]
The MIPS backend is still full of holes, and cut-and-pasted PowerPC code, but
is beginning to look like an actual code generator.

6 years agoBetter error reporting for unterminated strings.
David Given [Sun, 2 Sep 2018 16:55:44 +0000 (18:55 +0200)]
Better error reporting for unterminated strings.

6 years agoMerge pull request #120 from davidgiven/dtrg-no
David Given [Sun, 2 Sep 2018 11:15:11 +0000 (13:15 +0200)]
Merge pull request #120 from davidgiven/dtrg-no

Remove the built-in preprocessor in cemcom.ansi

6 years agoRemove stray #include.
David Given [Sun, 2 Sep 2018 10:54:53 +0000 (12:54 +0200)]
Remove stray #include.

6 years agoRip out the built-in preprocessor from cemcom.ansi, now it's no longer used.
David Given [Sun, 2 Sep 2018 10:50:50 +0000 (12:50 +0200)]
Rip out the built-in preprocessor from cemcom.ansi, now it's no longer used.

6 years agoDisable the built-in preprocessor in cemcom.ansi; the external preprocessor is
David Given [Sun, 2 Sep 2018 10:39:00 +0000 (12:39 +0200)]
Disable the built-in preprocessor in cemcom.ansi; the external preprocessor is
always run. Fix a bug in block skipping in the preprocessor.

6 years agoImplement single-line C++-style comments.
David Given [Sun, 2 Sep 2018 10:14:59 +0000 (12:14 +0200)]
Implement single-line C++-style comments.

Fixes: #118

6 years agoRun through clang-format before editing.
David Given [Sun, 2 Sep 2018 10:04:33 +0000 (12:04 +0200)]
Run through clang-format before editing.

6 years agoRun through clang-format before editing.
David Given [Sun, 2 Sep 2018 09:49:40 +0000 (11:49 +0200)]
Run through clang-format before editing.

6 years agoRun files through clang-format before editing.
David Given [Sun, 2 Sep 2018 09:36:15 +0000 (11:36 +0200)]
Run files through clang-format before editing.

6 years agoConvert CRLF into LF on read; this should avoid problems with parsing CRLF files.
David Given [Sun, 2 Sep 2018 09:30:20 +0000 (11:30 +0200)]
Convert CRLF into LF on read; this should avoid problems with parsing CRLF files.

Fixes #117.

6 years agoRun files through clang-format before editing.
David Given [Sun, 2 Sep 2018 09:16:06 +0000 (11:16 +0200)]
Run files through clang-format before editing.

6 years agoAdd a completely non-tested table-based MIPS assembler.
David Given [Sat, 1 Sep 2018 17:35:31 +0000 (19:35 +0200)]
Add a completely non-tested table-based MIPS assembler.

6 years agoMerge.
David Given [Sat, 1 Sep 2018 13:34:36 +0000 (15:34 +0200)]
Merge.

6 years agoThe default installation location should be /usr/local.
David Given [Sat, 1 Sep 2018 13:34:01 +0000 (15:34 +0200)]
The default installation location should be /usr/local.

6 years agoMerge pull request #112 from davidgiven/dtrg-te
David Given [Sat, 1 Sep 2018 09:49:28 +0000 (11:49 +0200)]
Merge pull request #112 from davidgiven/dtrg-te

Add tea-ci CI for Windows builds

6 years agoDisable the msys32 build because it doesn't work (due to brk issues).
David Given [Sat, 1 Sep 2018 09:43:52 +0000 (11:43 +0200)]
Disable the msys32 build because it doesn't work (due to brk issues).

6 years agoAnother typo fix.
David Given [Sat, 1 Sep 2018 09:34:29 +0000 (11:34 +0200)]
Another typo fix.

6 years agoTypo fix.
David Given [Sat, 1 Sep 2018 09:32:26 +0000 (11:32 +0200)]
Typo fix.

6 years agoExperiment with a build matrix and msys32.
David Given [Sat, 1 Sep 2018 09:31:45 +0000 (11:31 +0200)]
Experiment with a build matrix and msys32.

6 years agoAdd bison and flex.
David Given [Sat, 1 Sep 2018 09:25:03 +0000 (11:25 +0200)]
Add bison and flex.

6 years agoNo luck with ninja --- make should work?
David Given [Sat, 1 Sep 2018 09:23:39 +0000 (11:23 +0200)]
No luck with ninja --- make should work?

6 years agoUpdate apt before installing.
David Given [Sat, 1 Sep 2018 09:19:16 +0000 (11:19 +0200)]
Update apt before installing.

6 years agoTypo fix.
David Given [Sat, 1 Sep 2018 09:18:25 +0000 (11:18 +0200)]
Typo fix.

6 years agoCygwin setup is very slow, so put sh-on-windows first for testing.
David Given [Sat, 1 Sep 2018 09:17:50 +0000 (11:17 +0200)]
Cygwin setup is very slow, so put sh-on-windows first for testing.

6 years agoLet's try sh-on-windows as well.
David Given [Sat, 1 Sep 2018 09:12:14 +0000 (11:12 +0200)]
Let's try sh-on-windows as well.

6 years agomsys32 doesn't work; try Cygwin instead.
David Given [Sat, 1 Sep 2018 09:07:28 +0000 (11:07 +0200)]
msys32 doesn't work; try Cygwin instead.

6 years agoInstall ninja before building.
David Given [Sat, 1 Sep 2018 09:04:12 +0000 (11:04 +0200)]
Install ninja before building.

6 years agoLooks like sh-on-windows isn't working.
David Given [Sat, 1 Sep 2018 09:02:48 +0000 (11:02 +0200)]
Looks like sh-on-windows isn't working.

6 years agoAdd a drone.yml for tea-ci.
David Given [Sat, 1 Sep 2018 09:00:08 +0000 (11:00 +0200)]
Add a drone.yml for tea-ci.

6 years agoDon't try to use acct() on cygwin (which doesn't support it). Fixes: #111
David Given [Sat, 1 Sep 2018 08:41:31 +0000 (10:41 +0200)]
Don't try to use acct() on cygwin (which doesn't support it). Fixes: #111

6 years agoMerge pull request #110 from davidgiven/dtrg-warnings
David Given [Mon, 25 Jun 2018 20:29:47 +0000 (22:29 +0200)]
Merge pull request #110 from davidgiven/dtrg-warnings

Fix warnings and convert the Modula-2 library to ANSI C.

6 years agoWarning-fixed and ansified the Modula-2 library. dtrg-warnings
David Given [Mon, 25 Jun 2018 20:22:37 +0000 (22:22 +0200)]
Warning-fixed and ansified the Modula-2 library.

6 years agoMove the Modula-2 library includes into a directory in lang/m2 where they belong.
David Given [Sun, 24 Jun 2018 18:32:59 +0000 (20:32 +0200)]
Move the Modula-2 library includes into a directory in lang/m2 where they belong.

6 years agoMerge pull request #109 from davidgiven/dtrg-warnings
David Given [Sun, 24 Jun 2018 18:03:21 +0000 (20:03 +0200)]
Merge pull request #109 from davidgiven/dtrg-warnings

Rework the Linux include directories.

6 years agoAll the Linux include directories are the same, so common them all out into a
David Given [Sun, 24 Jun 2018 17:57:43 +0000 (19:57 +0200)]
All the Linux include directories are the same, so common them all out into a
single one, like OSX.

6 years agoMerge pull request #108 from davidgiven/dtrg-warnings
David Given [Sat, 23 Jun 2018 23:00:30 +0000 (01:00 +0200)]
Merge pull request #108 from davidgiven/dtrg-warnings

Warning-fix and protoise the basic library.

6 years agoWarning-fix and protoise the basic library.
David Given [Sat, 23 Jun 2018 22:35:51 +0000 (00:35 +0200)]
Warning-fix and protoise the basic library.

6 years agoMerge pull request #107 from davidgiven/dtrg-libc
David Given [Sat, 23 Jun 2018 22:21:29 +0000 (00:21 +0200)]
Merge pull request #107 from davidgiven/dtrg-libc

OpenBSD fixes

6 years agoMerge from trunk.
David Given [Sat, 23 Jun 2018 22:08:39 +0000 (00:08 +0200)]
Merge from trunk.

6 years agoRemove the dependency on the glibc-only byteswap.h.
David Given [Sat, 23 Jun 2018 22:01:06 +0000 (00:01 +0200)]
Remove the dependency on the glibc-only byteswap.h.

6 years agoRemove c99-isms.
David Given [Sat, 23 Jun 2018 21:56:34 +0000 (23:56 +0200)]
Remove c99-isms.

6 years agoRun through clang-format.
David Given [Sat, 23 Jun 2018 21:46:44 +0000 (23:46 +0200)]
Run through clang-format.

6 years agoMerge pull request #106 from davidgiven/dtrg-libc
David Given [Sat, 23 Jun 2018 21:28:21 +0000 (23:28 +0200)]
Merge pull request #106 from davidgiven/dtrg-libc

Refactor the libc

6 years agoRemove the attic.
David Given [Sat, 23 Jun 2018 21:16:22 +0000 (23:16 +0200)]
Remove the attic.

6 years agoMove mktemp to sys; attic getgrent as noone will ever use this.
David Given [Sat, 23 Jun 2018 21:15:42 +0000 (23:15 +0200)]
Move mktemp to sys; attic getgrent as noone will ever use this.

6 years agoMove the portable time code into core. clock() goes into sys (as it calls
David Given [Sat, 23 Jun 2018 17:49:29 +0000 (19:49 +0200)]
Move the portable time code into core. clock() goes into sys (as it calls
times()).

6 years agoMove time() into sys; change the name of the variable which controls it.
David Given [Sat, 23 Jun 2018 17:40:50 +0000 (19:40 +0200)]
Move time() into sys; change the name of the variable which controls it.

6 years agoMove the big gnarly functions like system() and popen() into sys, and make them
David Given [Sat, 23 Jun 2018 17:18:16 +0000 (19:18 +0200)]
Move the big gnarly functions like system() and popen() into sys, and make them
build.

6 years agoMove stdio into (mostly) sys.
David Given [Sat, 23 Jun 2018 16:54:40 +0000 (18:54 +0200)]
Move stdio into (mostly) sys.

6 years agoChange stdio to use atexit() rather than the internal __clean variable; this
David Given [Sat, 23 Jun 2018 16:35:45 +0000 (18:35 +0200)]
Change stdio to use atexit() rather than the internal __clean variable; this
breaks the dependency between exit/atexit and stdio. Buffers are no longer
flushed on abort() (because it's pretty risky). Move the relevant functions
into sys/core.

6 years agoAll the opendir()/readdir() stuff is obsolete because it's all implemented in
David Given [Sat, 23 Jun 2018 16:25:26 +0000 (18:25 +0200)]
All the opendir()/readdir() stuff is obsolete because it's all implemented in
terms of open() and read(), which isn't how it's done any more; move the
functions into an attic.

6 years agoAdd the sys directory for libc functions which use system calls; move the
David Given [Sat, 23 Jun 2018 16:08:03 +0000 (18:08 +0200)]
Add the sys directory for libc functions which use system calls; move the
malloc functions in there.

6 years agoMove the errno functions into core.
David Given [Sat, 23 Jun 2018 15:52:15 +0000 (17:52 +0200)]
Move the errno functions into core.

6 years agoGet em22 working. Remove the leading-underscore system calls from its libsys.
David Given [Sat, 23 Jun 2018 13:57:57 +0000 (15:57 +0200)]
Get em22 working. Remove the leading-underscore system calls from its libsys.

6 years agoGet the pdp7 plat working; remove the leading-underscore syscalls.
David Given [Sat, 23 Jun 2018 13:18:26 +0000 (15:18 +0200)]
Get the pdp7 plat working; remove the leading-underscore syscalls.

6 years agoMade the rpi platform work with the new libc layout.
David Given [Sat, 23 Jun 2018 11:05:27 +0000 (13:05 +0200)]
Made the rpi platform work with the new libc layout.

6 years agoMade pc86 work with the new libc.
David Given [Sat, 23 Jun 2018 10:59:40 +0000 (12:59 +0200)]
Made pc86 work with the new libc.

6 years agoMade the two OSX platforms work with the new libc layout.
David Given [Sat, 23 Jun 2018 10:55:59 +0000 (12:55 +0200)]
Made the two OSX platforms work with the new libc layout.

6 years agoMake linuxppc work.
David Given [Sat, 23 Jun 2018 10:41:54 +0000 (12:41 +0200)]
Make linuxppc work.

6 years agoMade linux68k work; commoned up all the generic linux includes.
David Given [Sat, 23 Jun 2018 10:35:17 +0000 (12:35 +0200)]
Made linux68k work; commoned up all the generic linux includes.

6 years agoMake linux386 work with the new libc layout.
David Given [Sat, 23 Jun 2018 10:13:33 +0000 (12:13 +0200)]
Make linux386 work with the new libc layout.

6 years agoCreate a basic and probably wrong common unistd.h, which replaces the plat one.
David Given [Sat, 23 Jun 2018 09:46:55 +0000 (11:46 +0200)]
Create a basic and probably wrong common unistd.h, which replaces the plat one.
Made this work with cpm (but nothing else yet).

6 years agoMove assert into core.
David Given [Sat, 23 Jun 2018 09:16:06 +0000 (11:16 +0200)]
Move assert into core.

6 years agoWarning fix.
David Given [Sat, 23 Jun 2018 09:14:49 +0000 (11:14 +0200)]
Warning fix.

6 years agoDon't crash and burn if there are no tests to run.
David Given [Sat, 23 Jun 2018 09:14:40 +0000 (11:14 +0200)]
Don't crash and burn if there are no tests to run.

6 years agoMove the string-to-float functions into core, after marking them as
David Given [Sat, 23 Jun 2018 09:14:24 +0000 (11:14 +0200)]
Move the string-to-float functions into core, after marking them as
ACKCONF_WANT_FLOAT.

6 years agolibc floating point and stdio floating point can now be turned on and off using
David Given [Fri, 22 Jun 2018 22:04:14 +0000 (00:04 +0200)]
libc floating point and stdio floating point can now be turned on and off using
ACKCONF variables.