| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some automated commenting cleanup. Still needs more careful manual scanning.
sed -i 's/^# 1-3/# . 1-3/' *.subx */*.subx
sed -i 's/^# op/# . op/' *.subx */*.subx
sed -i 's/# vim/# . . vim/' *.subx */*.subx
sed -i 's/^ # push args/ # . . push args/' *.subx */*.subx
sed -i 's/^ # discard args/ # . . discard args/' *.subx */*.subx
sed -i 's/^ # call/ # . . call/' *.subx */*.subx
sed -i 's/^ # prolog/ # . prolog/' *.subx */*.subx
sed -i 's/^ # epilog/ # . epilog/' *.subx */*.subx
sed -i 's/^ # save registers/ # . save registers/' *.subx */*.subx
sed -i 's/^ # restore registers/ # . restore registers/' *.subx */*.subx
sed -i 's/ operand / register /' *.subx */*.subx
|
|
|
|
| |
Reindent all SubX code to make some room for the new comment style.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Crenshaw compiler now runs natively as well.
It turns out I was misreading the Intel manual, and the jump instructions
that I thought take disp16 operands actually take disp32 operands by default
on both i686 and x86_64 processors. The disp16 versions are some holdover
from the 16-bit days.
This was the first time I've used one of these erstwhile-disp16 instructions,
but I still haven't tested most of them. We'll see if we run into future
issues.
|
|
|
|
|
|
|
| |
Start with an exactly corresponding version to Crenshaw 2-1: single-digit
numbers. The only change: we assume the number is in hex.
The next version now supports multi-digit hex numbers.
|
|
|
|
| |
Simplification.
|
|
|
|
| |
In the process I had to fix a couple more bugs in support for disp16 instructions.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This time I've ported (and test-driven) 'GetChar' and 'GetNum'. The new
tests bring together our new testable interfaces for read() and exit().
|
|
|
|
|
| |
Long-standing and long-copied typo has been messing with our exit status
on test failures.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Extract a helper that we'll need for 'read'.
|
| |
|
|
|
|
|
|
|
|
|
| |
We'll use a common stream data structure for input and output streams.
Having separate types makes more sense in a more high-level language, where
we have type checking and where functions for handling the different types
are more concise. But in machine code the sweet spot is more toward fewer
types.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Start injecting all dependencies in the Crenshaw compiler app.
In the process I realized the non-fake code path of 'stop' had a bug.
|
| |
|
|
|
|
|
|
|
|
| |
Initial sketch of a dependency-injected wrapper around the exit() syscall.
I don't have the primitives yet, just a sketch of how they should work
-- and a passing test for non-local jumps without support for passing the
exit status to the caller.
|
|
|
|
|
|
|
| |
Extract a helper for appending strings to raw buffers.
I'd been resisting this idea, but it actually turns out to be a pretty
clean abstraction in the end.
|
|
|
|
|
| |
Start using write() instead of _write().. and we promptly find a typo when
dealing with real file descriptors.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
All tests now once again run the same natively and on VM.
|
|
|
|
|
|
|
|
|
|
| |
Turns out the tests for 'trace' have been broken in native mode since the
original commit (4674). Dangers of running my tests on Darwin, where I
can't run them natively.
The test failures didn't get flagged on CI because I'd forgotten to update
the exit code of the factorial app in commit 4664. At least that's fixed
in this commit.
|
| |
|