This document provides a quick overview of the assembly language used by the Go (gc) compiler, noting that it is based on Plan 9 assembler syntax but operates on a semi-abstract instruction set rather than directly representing underlying machine code. Instruction selection occurs partly after code generation, so instructions like MOV may map to different actual operations depending on the architecture.
Background
Go's own compiler (gc) uses a custom assembler with a semi-abstract instruction set, which is unusual compared to traditional toolchains that include a separate assembly pass. This design allows the compiler more flexibility in instruction selection and optimization.
- Source
- Lobsters
- Published
- Nov 6, 2026 at 06:07 AM
- Score
- 5.0 / 10