From 300d2a9c3672acacc8bdd8d5370a424651a00571 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Sun, 18 Oct 2026 22:09:58 -0700 Subject: Cleanup & backport The phase rework, made new phases explicit and add them to the CodeGen driver. Fix the flag-spilling on X86 and ARM. Fix the GCM conservative anti-deps and backport. --- chapter21/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'chapter21/README.md') diff --git a/chapter21/README.md b/chapter21/README.md index 80304c1a..a3ae6cb8 100644 --- a/chapter21/README.md +++ b/chapter21/README.md @@ -17,6 +17,18 @@ in the linear revision history and Here is the [complete language grammar](docs/21-grammar.md) for this chapter. +Two phases extend the pipeline: `Encoding` turns allocated nodes into bytes, +and `Export` resolves relocations in memory or writes an ELF object. For example: + +```java +code.driver(CodeGen.Phase.Encoding, "x86_64_v2", "SystemV"); +code.exportELF("program.o"); +``` + +The CLI uses the same driver. `--dump-after-iter`, the other phase dump options, +and `--dump-time` expose the stages without duplicating their ordering in the +command-line frontend. + ## From machine nodes to bytes Instruction selection chooses the operation and register constraints. Register -- cgit v1.2.3