| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
map of how far we've gotten by now (functions with '*' independently tested):
✓ compute-offsets*
✓ compute-addresses*
✓ emit-output
✓ emit-headers
✓ emit-elf-header
✓ emit-hex-array*
✓ first emit-elf-program-header-entry
✓ emit-hex-array*
? second emit-elf-program-header-entry
emit-hex-array*
emit-segments*
|
| |
|
| |
|
|
|
|
| |
Clean up.
|
| |
|
| |
|
|
|
|
| |
Clean up.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
I carefully logged the segment a label is declared in but forgot to
actually save it in the table. This has been a theoretic concern for
some time, but I've never seen it actually happen until now. SubX is
just too low level.
Now I get past the first two phases but code generation fails to find
the 'Entry' label.
|
|
|
|
|
|
|
|
| |
Snapshot at a random moment, showing a new debugging trick: hacking on
the C++ level to dump memory contents on specific labels.
For some reason label 'x' doesn't have a segment assigned by the time we
get to compute-addresses.
|
|
|
|
| |
The final integration test-convert-computes-addresses is still failing.
|
| |
|
|
|
|
|
| |
Now they're in the order you expect to see them at runtime: first you
see a segment header, then you see labels.
|
|
|
|
| |
move trace dump to before checks
|
| |
|
|
|
|
|
|
|
|
|
| |
'curr-segment-name' is now a string, and it's stored in a register
rather than a global.
Paradoxically, this leaks *less* than before. Before, every call to
`get-or-insert-slice` leaked memory. Now we leak one string for every
new segment. Which is trivial.
|
| |
|
|
|
|
|
| |
Pseudocode is a little more truthful now about what variables are on the
stack.
|
|
|
|
|
|
|
| |
It's a slice into the 'line' stream. But we want to preserve the current
segment name across lines.
Let's leak some memory.
|
|
|
|
| |
Make the trace a little more consistent.
|
|
|
|
|
|
| |
I changed the test a little to make it obvious.
Basically there's no way we can compute the segment offset correctly
without knowing the segment name in the previous assertion.
|
|
|
|
|
|
|
|
| |
The pseudocode was a mess here :/ I was saving the segment-offset but
tracing the file-offset.
Segments need file offsets (to tweak their starting address).
Labels need segment offsets (to add to segment starting address).
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
I think we're calling the wrong variant here.
|
| |
|
| |
|
|
|
|
|
| |
Another batch of incorrectly signed conditional jumps. (Follow-up to
commit 5180.)
|
|
|
|
| |
Fix infinite loop in the 2 remaining failing tests; now it's a segfault.
|
| |
|
| |
|
|
|
|
|
| |
Some nooks and crannies will need light final debugging with xxd, but
emit-hex-output covers most of the logic.
|
|
|
|
| |
Only failures now are the first two tests in survey.subx.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Everywhere we check if something is true, we check it by comparing
against 0, not 1.
|
|
|
|
|
| |
But of course the test is still infinite-looping so we can't be sure.
I'm still just reading the code.
|
| |
|
| |
|
|
|
|
|
| |
It's ugly to have function locals in global variables, but we'll figure
out later how to deal with it.
|
| |
|
|
|
|
|
| |
Looks like the original compute-width is now dead. But still seems
useful to have around.
|