| 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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|