mu/linux/bootstrap
Kartik K. Agaram 9cbaad0811 obsolete argument 2022-01-09 07:50:09 -08:00
..
tools 7842 - new directory organization 2021-03-03 22:21:03 -08:00
000organization.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
001help.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
002test.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
003trace.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
003trace.cc.filter 7842 - new directory organization 2021-03-03 22:21:03 -08:00
003trace.cc.rotate 7842 - new directory organization 2021-03-03 22:21:03 -08:00
003trace.test.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
010vm.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
011run.cc . 2021-03-29 18:47:52 -07:00
012elf.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
013direct_addressing.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
014indirect_addressing.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
015immediate_addressing.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
016index_addressing.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
017jump_disp8.cc support checking overflow flag everywhere 2021-05-08 21:49:50 -07:00
018jump_disp32.cc support checking overflow flag everywhere 2021-05-08 21:49:50 -07:00
019functions.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
020byte_addressing.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
021div.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
022float.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
029syscalls.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
030translate.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
031transforms.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
032operands.cc . 2021-04-04 20:14:43 -07:00
033check_operands.cc periodic run of misc_checks 2021-06-12 22:34:22 -07:00
034check_operand_bounds.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
035compute_segment_address.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
036labels.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
037global_variables.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
038literal_strings.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
039debug.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
040tests.cc 7842 - new directory organization 2021-03-03 22:21:03 -08:00
README.md . 2021-06-27 07:32:08 -07:00
bootstrap some tweaks while updating mu-normie 2021-03-12 10:14:59 -08:00
build . 2021-07-16 08:28:56 -07:00
build_and_test_until obsolete argument 2022-01-09 07:50:09 -08:00
clean 7842 - new directory organization 2021-03-03 22:21:03 -08:00
test_layers 7842 - new directory organization 2021-03-03 22:21:03 -08:00

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 by bootstrap 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.

Hacking

This directory is the only C++ code in the project, and has an unconventional organization.