| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Now that we don't have to edit code to run a single test, delete that
commented out fragment everywhere.
|
|
|
|
|
|
|
|
|
|
| |
Mostly for tests. For every new type we want to compare in a test, we're
now going to start using some primitive that can parse its value from string. In this manner we can get syntax for literals in machine code.
Open question: parsing aggregates of aggregates. Like an array of structs.
This is the first time we allocate from the heap in standard library tests.
So we now need to start initializing the heap in all our apps.
|
|
|
|
|
| |
Operations on buffered-file now always include the word 'buffered'. More
verbose, but hopefully this highlights holes in the library.
|
|
|
|
|
|
|
| |
Start using the new newline escape in string literals everywhere.
I could use it more aggressively, but it makes tests harder to read. So
only one line of text per string for now.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fail early when writing to a fake file runs out of space. Makes debugging
tests easier.
Reads from files, on the other hand, are only buffering to a temporary
stream, so it makes sense to silently stop when they run out of space.
In the process I uncovered a testing bug in pack.subx: I was missing a
trailing space in the expected result, but the test still passed because
the space was getting truncated. Being principled about aborting on overflow
by default will help avoid such issues.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Considering how much trouble a merge phase would be (commit 4978), it seems
simpler to just add the extra syntax for controlling the entry point of
the generated ELF binary.
But I wouldn't have noticed this if I hadn't taken the time to write out
the commit messages of 4976 and 4978.
Even if we happened to already have linked list primitives built, this
may still be a good idea considering that I'm saving quite a lot of code
in duplicated entrypoints.
|
|
|
|
|
| |
Support immediate operands in the data segment in all the ways we support
them in the code segment.
|
|
|
|
| |
Standardize how we show register allocation decisions.
|
| |
|
| |
|
| |
|
|
|
|
| |
We only can't use rm32=5 when mod=0. Totally fine when it's mod=1.
|
| |
|
| |
|
| |
|
|
|
|
| |
New helper: printing a string to a buffered file.
|
|
|
|
| |
Let's standardize to use opcode 39 rather than 3b by default.
|
|
|
|
|
|
| |
Let's start adding ':end' labels in all functions, just because it helps
us visualize where function calls end in traces, thanks to the '--map'
commandline argument.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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().
|
| |
|
| |
|
|
|
|
|
|
| |
Start injecting all dependencies in the Crenshaw compiler app.
In the process I realized the non-fake code path of 'stop' had a bug.
|
|
|
|
|
| |
Start using write() instead of _write().. and we promptly find a typo when
dealing with real file descriptors.
|
| |
|
| |
|
| |
|