summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2022-05-13 10:56:04 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2022-05-13 10:56:04 +0200
commit5a1bc4fc3c5990f7e71ccf5191bc33c5874dea04 (patch)
tree0588e01891f7bb457b15df7ccd9f44ac5c9c395d
parentfaed727c1e17b8ba72a5ea1199dec7cea307e375 (diff)
downloadcompilertests-5a1bc4fc3c5990f7e71ccf5191bc33c5874dea04.tar.gz
compilertests-5a1bc4fc3c5990f7e71ccf5191bc33c5874dea04.tar.bz2
added notes about ras52 bootstrapping from hex to C project
added about t3x
-rw-r--r--README.bootstrapping38
1 files changed, 37 insertions, 1 deletions
diff --git a/README.bootstrapping b/README.bootstrapping
index 6d77295..7cbcbd9 100644
--- a/README.bootstrapping
+++ b/README.bootstrapping
@@ -12,8 +12,27 @@ https://github.com/aalhour/awesome-compilers
notes on specific projects
--------------------------
+Richard Smith bootstrap experiment
+----------------------------------
+
https://github.com/ras52/bootstrap
+Full bootstrap of linker, assember, C-compiler, stages from hex.
+Too much assembly for my taste. I would like to freeze version of
+the generated code (C code, AST code, assembly code, hex dumps)
+for bootstrapping, but generate them with tools written in high-level
+languages (at least C).
+Not strictly cascaded output, for instance as0 outputs unelfified
+binary instead of hexl. elfification is a nice idea, keeping things
+nicely apart. Some code is just available in HEX (undex, elfify), we
+would actually like just to write in C later on in the bootstrapping
+process and the freeze the intermediate formats for later bootstrapping.
+This would also serve as documentation (note: of course there is objdump -d)
+ELF and linking is quite complex, I wouldn't go that route..
+Stage 4 has no type system in compiler, this makes things easy. Making a
+compiler behaving like B but in the syntax of C is a smart idea. And it's
+always forward compatible..
+
bcompiler
---------
@@ -30,7 +49,24 @@ Bootstrap a C environment via intermediate language (G), writes assembly
and proto-tinity in G, then bootstraps a tinyc and a libc.
Good testbed, demonstrates the whole bootstrapping process in qemu, really nice.
Why is the minikernel written in assembly? Most likely needed early on..
-Very good back and forth of documenting the requirements whicle bootstrapping
+Very good back and forth of documenting the requirements while bootstrapping
(ASSUMPTIONS.md).
+t3x
+---
+http://t3x.org/t3x/index.html
+virtual stack machine for code generation, self-bootstrappable.
+Weird %1 for -1 just to avoid const expressions, I would actually support
+at least this one case as -1 (%1 is only in the first versions, when there
+is no constexpressions). I would bootstrap via VSM emulator or a
+C code generator backend, not by having a second compiler written in C.
+Allocation of vectors strictly on the stack, to avoid heap memory management,
+BCPL style, very interesting. Tables are very lua-like, many things we
+only have again in C99 and later. Computed tables I have never seen before.
+No type system, byte and word deref and signed/unsigned operators are
+represented in the grammar. T3X9 is the simple non-OOP-version used for
+bootstrapping, there are TCode-middle-code and more feature-full versions.
+Precedence loop for operator parsing. Minimalistic dependencies (read, write, exit)
+on the operating system, especially no sbrk/mmap for dynamic memory management.
+Bootstrapping compiler is written in C (tested with multiple C compilers, fine).