| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
No automated tests for argv_equal because we need it to run automated tests.
But maybe we should have them anyway.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even more cuddling. We want to keep lines short where the opcode and operands
are self-explanatory.
If there are any implicit registers, etc., we'll continue to do the table
layout.
The first two columns look messy now; let's see how this goes.
Maybe I'll give up on the tabular layout altogether, just string args with
a single space.
|
| |
|
|
|
|
|
|
|
|
|
| |
All it takes is to code-generate a simple function called 'run_tests' that
calls all functions starting with 'test_' one by one.
I've temporarily switched the factorial app to run as a test. But that's
temporary, because all the code to print '.' vs 'F' needs to get extracted
out into a helper.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Start of a new example program.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Streamline the factorial function; we don't need to save a stack variable
into a register before operating on it. All instructions can take a stack
variable directly.
In the process we found two bugs:
a) Opcode f7 was not implemented correctly. It was internally consistent
but I'd never validated it against a natively running program. Turns out
it encodes multiple instructions, not just 'not'.
b) The way we look up imm32 operands was sometimes reading them before
disp8/disp32 operands.
|
| |
|
| |
|
|
|