Commit graph

7515 commits

Author SHA1 Message Date
David Given 7ec9f54679 Turns out that andi and andis only have . forms. Fixed; another test passes. 2018-06-17 10:43:39 +02:00
David Given 78eaf836be Turns out I was returning values from syscalls in the wrong register; fixed.
More tests pass.
2018-06-17 10:22:20 +02:00
David Given ab660a44e9 Lots of floating point, bugfixes, and system calls. Most of the tests pass now. 2018-06-17 09:24:01 +02:00
David Given 67efbb5f7f Do a bit of floating point stuff; added brk(); fixed a horrible bug where
stores with 16-bit displacements were storing the register number and not the
contents of the register.
2018-06-16 22:55:23 +02:00
David Given 5d7cdd2c67 Fix a setcr0 bug which was trashing the condition register; some system
calls are now implemented. A few tests more-or-less pass (but crash on
exit).
2018-06-16 08:35:36 +02:00
David Given 5111556d14 Got the emulator to the point where we're hitting the first major emulation bug
(the calloc test hangs).
2018-06-14 05:53:39 -07:00
David Given 853af4c4dd Some code runs (up to needing setcr0). 2018-06-14 04:41:21 -07:00
David Given b71145f79d Implement a non-functional skeleton of the PowerPC emulator (with, hopefully,
most of the instruction decode done).
2018-06-14 03:07:36 -07:00
David Given c9e5190a12
Merge pull request #99 from davidgiven/dtrg-ass
Bodge together a buildable em22 plat for use with int.
2018-06-14 10:08:17 +09:00
David Given 519eef933c Merge from trunk. 2018-06-13 21:47:25 +09:00
David Given 31c2ba3f94 File cleanup. 2018-06-13 21:47:08 +09:00
David Given 7eaa235fd1 Bodge the ancient em monitor library into building as a libsys for the em22
plat. It's completely untested, but it builds and makes e.out executables.
2018-06-13 21:44:25 +09:00
David Given 13a7abdd69 Rename a function to avoid a clash with an em system call. 2018-06-13 21:34:14 +09:00
David Given 670c7ce96f After finding the em_table documentation, move it somewhere where other people
can find it.
2018-06-13 20:58:44 +09:00
David Given 15161ebb35 Remember to always link the libsys and libend. 2018-06-13 20:57:31 +09:00
David Given 7f2ca76663 Expose our custom Lua interpreter to the build system so utility scripts can be
written in it.
2018-06-13 20:56:49 +09:00
David Given 2e93b8446e
Merge pull request #98 from davidgiven/dtrg-m68k
Fix sub-word-size type conversions for m68020.
2018-06-12 14:24:32 +02:00
David Given 3892b7e0e6 Remove bogus conversion from test which was causing failure; you're not allowed
to do cui or ciu with sizes smaller than a word.
2018-06-12 21:04:27 +09:00
David Given 6ae38887a7 It appears that the parameter to lol technically has to be word aligned; having
a non-word aligned parameter is illegal (but most of the toolchain accepts it).
So, word align data structures for em22.
2018-06-12 20:54:15 +09:00
David Given 7edc835626
Merge pull request #95 from davidgiven/dtrg-b
Fix occasional weird behaviour causing compilation failures in b.
2018-06-10 21:22:26 +09:00
David Given 4a249b1bdb Merge. 2018-06-10 20:26:10 +09:00
David Given d623440c77 Add the core of a simple em22 platform. Unfortunately it doesn't work; the old
em libmon vanished decades ago (or never existed), and also ass appears to have
a different idea of what the em opcodes are to everything else and gets
confused.
2018-06-10 20:25:48 +09:00
David Given cebb238036 Merge. 2018-06-10 18:09:18 +09:00
David Given 003799f898 Fix table underrun when looking up the character class of the EOF character,
-1.
2018-06-10 17:52:45 +09:00
David Given 5d519b79f7
Merge pull request #94 from davidgiven/dtrg-ass
Get int and ass building.
2018-06-09 22:44:24 +09:00
David Given e7124f3e3f File cleanup. 2018-06-09 21:21:28 +09:00
David Given a12181748b Make ass and int built with clang --- surprisingly easy. 2018-06-09 21:18:50 +09:00
David Given 59b383afd0 Make the em interpreter build --- again, lots of warnings, so it probably won't
work on clang. I have no idea whether it runs or not as building a e.out
program is quite hard and needs a special platform.
2018-06-09 21:13:31 +09:00
David Given d10a594c04 Get ass running --- it's very K&R and almost certainly won't build on clang,
but it works on gcc.
2018-06-09 14:10:45 +09:00
David Given ae3074cd9a
Merge pull request #93 from davidgiven/dtrg-pc86-2
Rearrange the tests; don't run unsupported tests on emulators which don't support them.
2018-06-08 21:40:25 +09:00
David Given 19cd42124f Rearrange the tests into sets; allow plats to skip sets; pc86 and linux68k now
skip the tests which use floating point instructions (as their emulators don't
support them).
2018-06-08 15:59:04 +09:00
David Given b94199aba7
Merge pull request #92 from davidgiven/dtrg-pc86-2
Replace the qemu pc86 emulator with a custom x86emu-based one.
2018-06-08 00:18:18 +09:00
David Given 1d4ddb939d Merge from trunk. 2018-06-08 00:05:50 +09:00
David Given 37f466a8f4
Merge pull request #91 from davidgiven/dtrg-m68k
Add a Musashi-based 68020 emulator; use it to run the linux68k tests.
2018-06-07 13:48:06 +09:00
David Given b9c0e1d964 Dummied out some more system calls --- more tests pass. 2018-06-07 13:12:15 +09:00
David Given 2682c125e0 More real ELF loading and brk handling; more tests pass. 2018-06-07 13:03:36 +09:00
David Given 396795105f Beat the 68k simulator into enough shape that at least *some* of the tests pass. 2018-06-06 22:39:43 +09:00
David Given 4b26f75d23 Hang on, the 68k is big-endian --- I'm extracting words (and bytes) from longs
incorrectly.
2018-06-06 12:49:21 +09:00
David Given 2cf39be752 Get the emulator to the point where it'll start to run code; it then fails,
because the version of Musashi I imported doesn't support floating point...
2018-06-05 23:17:22 +09:00
David Given a8802c934b Enable tests for linux68k. 2018-06-05 23:16:34 +09:00
David Given 5034ed1c39 Crudely beat the standard Masushi simulator into working in the ACK framework. 2018-06-05 17:45:00 +09:00
David Given 3f049a4c29 Basic mid now throws an error on out-of-bounds parameters rather than returning
an uninitialised pointer (and crashing).

Fixes: #54
2018-06-05 09:53:56 +09:00
David Given 9dede01efe Fix bogus test.
Fixes: #89.
2018-06-05 09:41:31 +09:00
David Given 342a321c87 Fix bogus test.
Fixes: #90
2018-06-05 09:20:46 +09:00
David Given c6b9446722 Check in the x86emu-based emulator. Sadly, just like the 8086tiny-based
emulator, FPU instructions aren't supported.
2018-06-04 16:19:45 +09:00
David Given d908f9cfb2 Modify the pc86 test harness to use 8086tiny instead of qemu. Sadly, some tests fail. 2018-06-03 15:13:43 +02:00
David Given 0eb89d5d95 Add a clean copy of the Musashi emulator. 2018-06-05 17:04:47 +09:00
David Given d70eb76dbb Modify the pc86 test harness to use 8086tiny instead of qemu. Sadly, some tests fail. 2018-06-03 15:13:43 +02:00
David Given 9132641100 Add the pc86emu skeleton. 2018-06-03 08:24:21 -07:00
David Given eb96ea5d28 Add a clean copy of the x86emu library. 2018-06-03 08:06:23 -07:00