Commit graph

34 commits

Author SHA1 Message Date
George Koehler b3c0a767a5 Sync qemuppc with linuxppc.
- Don't reverse bitfields; do use ego (41f3bf7).
 - Use MACHOPT_F=-m2 (3dae9e4).
 - Remove old trap.s (26de4c1).

At this commit, one can build qemuppc with mcg by editing the root
build.lua to uncomment "qemuppc" in "vars.plats".  If one also
uncomments "qemuppc" from "vars.plats_with_tests", then mcg fails to
build the tests.  If one uses ncg (by editing plat/qemuppc/descr to
change "mcg" to "ncg"), then the tests pass.
2018-01-27 21:41:13 -05:00
David Given 81c677d218 Add a bunch more set operations to the PowerPC backends, and the Pascal test
for the same.
2017-01-17 22:31:38 +01:00
David Given e7e29d34ff Add a test (currently failing) to check that Pascal char sets can store all 256
possible values. Add the PowerPC ncg and mcg backend support to let the test
actually run, including modifying a bunch of PowrePC libem functions so that
they can be called from both ncg and mcg.
2017-01-15 22:28:14 +01:00
David Given 0e10329876 Fix an issue throughout where B couldn't be built by ackprogram due to symbol
laziness.
2016-12-29 17:11:53 +00:00
David Given e50f4be710 Merge from default. 2016-12-26 19:44:48 +00:00
George Koehler df86e3b84f Fix typo: msr0 should be msr. 2016-12-09 16:04:21 -05:00
George Koehler d94ea4c508 Teach qemuppc to halt the cpu on _exit().
Without this, qemu-system-ppc spins the host cpu until I close its
window.  I assume the default G3 emulation.  The emulator yields the
host cpu if I set certain flags in hid0 then msr.  The hid0 flag can
be any of DOZE, NAP, SLEEP, so I just set all 3.  I encode mfmsr and
mtmsr with .data4, because our assembler doesn't know instructions for
supervisor mode.

Also move some common symbols from .rom to .bss.  Our assembler puts
common symbols in any section.

Also clean up the file.  Delete a comment about linuxppc that is wrong
here.  Delete redundant .extern because .define is the same.
2016-12-07 18:11:12 -05:00
David Given 4485d89b23 Hook the B compiler up to the compiler driver. 2016-11-27 20:48:07 +01:00
David Given 5bce5fc4da Change the extension used by Basic files for .b to .bas, to avoid conflicts
with B.
2016-11-27 20:38:33 +01:00
David Given 8a58614aef Rework the tests to run on pc86; lots of test fixes for the brk() test, which
was nearly useless; lots of fixes to qemuppc and pc86 sbrk(), which was broken;
change the pc86 console to echo output to the serial port (needed for running
tests on qemu).
2016-11-26 11:23:25 +01:00
David Given 5f66f06dc6 Refactored the tests to make the generic across different plats. 2016-11-25 21:02:51 +01:00
David Given c084f9f224 Remove the Mark() and Release() procedures from the Pascal compiler and
standard library, because they never worked and come from an achingly old
version of the Pascal specification. Fix the implementations of New() and
Dispose() to use the standard C memory allocator rather than rolling their own
(also in C). Write test!
2016-11-24 20:35:26 +01:00
David Given 899f1ea4f3 Forgot to check in the change to qemuppc's brk() to set errno on memory
allocation failure.
2016-11-24 19:47:11 +01:00
David Given 991f47098c Add a test for brk() and sbrk(). 2016-11-23 22:28:21 +01:00
David Given 6cd2a9ba81 Add a test for calloc(). 2016-11-23 22:22:04 +01:00
David Given 36ab90385f Change sbrk() to take an int rather than an intptr_t (following the OpenBSD way
rather than the Linux way; various non-C bits of the ACK assume it takes an
int, so it's cleaner).
2016-11-23 22:06:24 +01:00
David Given 6e9c2d5c0d Also call .trp .trap, for ncg compatibility. 2016-11-20 19:39:28 +01:00
David Given 953c08839f inn works now; add a helper for it. 2016-11-20 12:53:44 +01:00
David Given 196fa914b3 lxa now works, I hope; traps are better (and stubbed out on qemuppc). 2016-11-20 11:57:21 +01:00
David Given d5328492d7 Better handling of float conversions; more tests; converting to unsigned ints
works now.
2016-11-20 11:27:40 +01:00
David Given 132baac78a Add some more tests. 2016-11-20 10:46:53 +01:00
David Given 454a7494bb cif8 and cuf8 work now. More tests. 2016-11-19 11:42:30 +01:00
David Given db3564f35a Use .hol0 as an additional name for hol0; mcg requires it. 2016-11-19 11:09:07 +01:00
David Given d31bc6a3f9 Made csa and csb work with mcg; adjust the libem functions and the
corresponding invocation in the ncg table so the same helpers can be used for
both mcg and ncg. Add a new IR opcode, FARJUMP, which jumps to a helper
function but saves volatile registers.
2016-11-19 10:55:41 +01:00
David Given a4616b7124 Betterer timeout handling. 2016-11-17 22:04:50 +01:00
David Given c25ad82a89 Tests can now specify (via a hacky filename suffix) which runtime they want. 2016-11-16 21:08:03 +01:00
David Given 71e6ca26d5 Add another test. 2016-11-16 20:56:45 +01:00
David Given edfee33576 Cleanup; the test driver is now way more robust. 2016-11-16 20:50:14 +01:00
David Given cc686ded62 Get subtractions the right way round. 2016-11-15 20:25:11 +01:00
David Given 5e8babf098 Add a basic integer shift test. 2016-11-14 22:12:13 +01:00
David Given c6bce0aaee Add basic integer comparison test. 2016-11-14 22:01:25 +01:00
David Given 6a4f465f53 Add a rather bodged test framework for the qemuppc plat, which only runs if the
qemu-system-ppc emulator is installed.
2016-11-13 13:37:22 +01:00
David Given f52cb45e49 Add just enough Open Firmware support for an output console. 2016-11-12 22:09:54 +01:00
David Given 48e74f46fc Add the very experimental qemuppc plat, intended to generate minimal images
which can be emulated using qemu (for, hopefully, a test suite). Currently it
generates images which won't run because there's no RAM.
2016-11-12 19:20:58 +01:00