f9f419af71 | ||
---|---|---|
.. | ||
tools | ||
000organization.cc | ||
001help.cc | ||
002test.cc | ||
003trace.cc | ||
003trace.cc.filter | ||
003trace.cc.rotate | ||
003trace.test.cc | ||
010vm.cc | ||
011run.cc | ||
012elf.cc | ||
013direct_addressing.cc | ||
014indirect_addressing.cc | ||
015immediate_addressing.cc | ||
016index_addressing.cc | ||
017jump_disp8.cc | ||
018jump_disp32.cc | ||
019functions.cc | ||
020byte_addressing.cc | ||
021div.cc | ||
022float.cc | ||
029syscalls.cc | ||
030translate.cc | ||
031transforms.cc | ||
032operands.cc | ||
033check_operands.cc | ||
034check_operand_bounds.cc | ||
035compute_segment_address.cc | ||
036labels.cc | ||
037global_variables.cc | ||
038literal_strings.cc | ||
039debug.cc | ||
040tests.cc | ||
README.md | ||
bootstrap | ||
build | ||
build_and_test_until | ||
clean | ||
test_layers |
README.md
This tool is 2 things:
a) An emulator for SubX, the subset of the 32-bit x86 instruction set used by Mu.
b) A second translator for SubX programs that emits identical binaries to the self-hosting versions in the parent directory. Having two diverse compilers (one in a familiar language, one with minimal syscall surface area) that emit identical binaries should help gain confidence in Mu.
Running
bootstrap
currently has the following sub-commands:
-
bootstrap help
: some helpful documentation to have at your fingertips. -
bootstrap test
: runs all automated tests. -
bootstrap translate <input files> -o <output ELF binary>
: translates.subx
files into an executable ELF binary. -
bootstrap run <ELF binary> <args>
: simulates running the ELF binaries emitted bybootstrap translate
. Useful for testing and debugging.Remember, not all 32-bit Linux binaries are guaranteed to run. I'm not building general infrastructure here for all of the x86 instruction set. SubX is about programming with a small, regular subset of 32-bit x86.