| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Just clarified for myself why `subx translate` and `subx run` need to share
code: emulation supports the tests first and foremost.
In the process we clean up our architecture for levels of layers. It's
a good idea but unused once we reconceive of "level 1" as just part of
the test harness.
|
|
|
|
|
| |
Deemphasize details of x86 addressing modes. I want people using SubX's
syntax sugar now.
|
| |
|
| |
|
|
|
|
| |
Move script to create a Linux-based boot image into a sub-directory.
|
|
|
|
|
|
| |
Move script to create a Soso boot image into a sub-directory.
I'm trying to streamline newcomer attention to just a couple of use cases.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename a few scripts to be more consistent.
I'm also starting to feel the urge to bud off `subx run` into its own program,
say tools/emulate_x86. It doesn't really rely on the SubX notation at all.
And then I could rename `subx translate` to `translate_subx_bootstrap`.
Only problem: the commands in the Readme get verbose. But the Readme is
gonna need surgery soon anyway to put translate_mu front and center.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I can now run this program:
fn main -> result/ebx: int {
result <- do-add 3 4
}
fn do-add a: int, b: int -> result/ebx: int {
result <- copy a
result <- add b
}
We still can't define local variables, but can write any programs involving
ints by passing in enough arguments for temporaries.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Let's start putting r32 first in compare instructions that need it. Ordering
there is quite subtle and of great import.
|
| |
|
|
|
|
|
|
| |
Extremely crappy syntax highlighting for Emacs. I just can't wrap my head
around elisp, and I'm inclined to blame elisp. Checking this off my todo
list and moving on.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Bugfix.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We haven't implemented it yet, but there's now a design for how we check
whether a function has written its output correctly. Functions must write
to each output at the top level at least once, and never overwrite an output
register in the top-level once it's been defined.
This is conservative (it can be perfectly reasonable for functions to write
the output, reuse the register for a temporary, and then write the output
again) but easy to check.
|
| |
|
|
|
|
|
| |
Bugfix: statements defining a new register variable require an initializer
instruction.
|
| |
|
| |
|
|
|
|
|
| |
Copy (mov) instructions are unlike instructions we've encoded so far, in
that their destination is not read.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
See test-convert-function-with-arg-and-body.
|
|
|
|
|
|
|
|
|
|
|
| |
One test failing. It took enough debugging just to get to the expected
failure that it seems worth saving this snapshot.
Saw some signs that I have to remember to zero-out allocated memory. We
need a scalable solution for this.
I think parse-var-with-type needs to be rewritten. Just added a test and
a hacky fix for now.
|
|
|
|
| |
Minor tweaks to stop wasting horizontal space in the trace.
|
| |
|
| |
|
| |
|
| |
|