Skip to content

v0.2.0

@tavro tavro tagged this 08 Aug 11:35
Adds the machine-code backend. Alongside the assembly output, coff can now
emit a flat binary with --raw, or an ELF64 executable for Moonshot with
the --elf flag, together with the builtins that are syscalls on that
kernel.

The language gains layout and sizeof, which give a block of memory named
field offsets and make e.field sugar over load64 and store64, plus extern
int for a global that another object file defines.

Four codegen bugs are fixed with it, all in the machine-code path and none
of them reachable by the differential suite, since coff0.c has no such
backend to be diffed against. The worst was exit(), which emitted the Linux
exit number rather than the kernel's and so quietly did nothing at all.

267 checks green and both bootstrap fixpoints hold. The README is honest
about what that does not cover, which is the machine-code backend.
Assets 2
Loading