docs: drop process labels and refresh the architecture and manual pages
Assisted-by: GLM 5.3
This commit is contained in:
+11
-10
@@ -44,10 +44,10 @@ flowchart TD
|
||||
|
||||
The lexer is the shared foundation: the parser builds the AST from it, the
|
||||
formatter re-spaces its tokens directly, and the language server uses it for
|
||||
semantic highlighting. The phases follow a dependency chain: Phase 1 (static
|
||||
analysis) builds only on the AST, Phase 2 (the standalone assembler) emits
|
||||
object code, and Phases 3 (dynamic analysis) and 4 (the debugger) both consume
|
||||
the execution substrate that the assembler provides.
|
||||
semantic highlighting. The packages follow a dependency chain: static analysis
|
||||
builds only on the AST, the standalone assembler emits object code, and both
|
||||
the dynamic analysis and the debugger consume the execution substrate the
|
||||
assembler provides.
|
||||
|
||||
## Packages
|
||||
|
||||
@@ -62,6 +62,7 @@ the execution substrate that the assembler provides.
|
||||
| `format` | canonical formatter over the token stream |
|
||||
| `lsp` | the language server |
|
||||
| `asm` | standalone assembler: encoders, image layout, object emitters |
|
||||
| `disasm` | disassembly backend over golang.org/x/arch |
|
||||
| `verify` | JIT execution, ABI checks, differential fuzzing |
|
||||
| `debug` | interactive ptrace debugger |
|
||||
| `cmd/gasm` | the CLI |
|
||||
@@ -230,20 +231,20 @@ them from the standard LSP legend, so no editor-specific grammar is needed.
|
||||
|
||||
### `asm`
|
||||
|
||||
The standalone assembler (Phase 2). Its core is an amd64 instruction encoder:
|
||||
The standalone assembler. Its core is an amd64 instruction encoder:
|
||||
a REX/ModR-M/SIB/displacement/immediate engine plus the scalar instruction set,
|
||||
with the Plan 9 operand order (source first) mapped onto the x86 encoding.
|
||||
Every encoding is validated by decoding it again with `golang.org/x/arch`, the
|
||||
one module dependency, which also backs the `gasm dis` listings.
|
||||
|
||||
A **RISC-V encoder** (Phase 5, RV64IMAFDC + RVC compression) encodes the full
|
||||
A **RISC-V encoder** (RV64IMAFDC + RVC compression) encodes the full
|
||||
integer, atomic, float/double, FMA and CSR instruction sets with the MOV
|
||||
pseudo-instruction and SB/global symbol references (AUIPC pairs with
|
||||
R_RISCV_PCREL_HI20/LO12 relocations). The encoder compresses eligible
|
||||
instructions to 16-bit RVC forms and is validated byte-for-byte against
|
||||
`GOARCH=riscv64 go tool asm`.
|
||||
|
||||
A **LoongArch encoder** (Phase 5, LoongArch64) encodes the integer and
|
||||
A **LoongArch encoder** (LoongArch64) encodes the integer and
|
||||
floating-point instruction sets with the dual-form arithmetic mnemonics (3R
|
||||
vs 2RI12), the 16/21-bit branch families, the MOV pseudo-instruction and its
|
||||
constant materialisation (the dcon classification driving lu12i.w/ori/lu32i.d/
|
||||
@@ -254,7 +255,7 @@ relocations). Like the RISC-V encoder it is validated byte-for-byte against
|
||||
`GOARCH=loong64 go tool asm`, and its GOOBJ output is proven end-to-end by
|
||||
substituting it into a cross-compiled `go build` and linking with `cmd/link`.
|
||||
|
||||
An **AArch64 encoder** (Phase 5, arm64) encodes the integer instruction set
|
||||
An **AArch64 encoder** (arm64) encodes the integer instruction set
|
||||
with the data-processing (shifted register and immediate forms), load/store
|
||||
(scaled unsigned immediate and unscaled9-bit immediate), conditional and
|
||||
unconditional branches, the MOV pseudo-instruction and its constant
|
||||
@@ -389,7 +390,7 @@ compiled packages it references.
|
||||
|
||||
### `verify`
|
||||
|
||||
The dynamic-analysis substrate (Phase 3). It JIT-loads assembled images into
|
||||
The dynamic-analysis substrate. It JIT-loads assembled images into
|
||||
executable memory and invokes them directly, enabling differential testing,
|
||||
runtime ABI checks and coverage profiling.
|
||||
|
||||
@@ -462,7 +463,7 @@ For non-interactive use, `--script` runs REPL commands from a file (or
|
||||
stdin) and exits, `--timeout` kills the debuggee when a run hangs (the
|
||||
watchdog is armed before the ptrace attach, so a sandboxed debuggee cannot
|
||||
block it), and `--cover` runs to completion with a breakpoint on every
|
||||
label and reports which blocks executed.
|
||||
instruction and reports which instructions executed and how often.
|
||||
|
||||
### Extending the toolkit
|
||||
|
||||
|
||||
Reference in New Issue
Block a user