Expand description
AArch64 text emitter (design §6): buffers, labels, span stack, and the
encoding-limit helpers (load_imm64, frame/sp/global addressing) that
lower.rs must never bypass.
Two dialects (design §9): Linux GNU as/ELF (bare symbols, .L locals,
:lo12: relocations, .rodata/.bss) and macOS Mach-O via clang
(_-prefixed C symbols, L locals, @PAGE/@PAGEOFF,
__TEXT,__const/.zerofill). Instructions are identical on both.
Structs§
- Assembly
- Finished assembly module plus a per-line source span map for snapshots and the playground (design §6.2, §12).
- Emitter
- Function
Frame - Everything
end_functionneeds to splice prologue and epilogue around a finished body (design §6.1).
Enums§
- AsmDialect
- Assembler/object-format dialect (design §9). Everything the two supported
platforms disagree on — C symbol prefixes, private-label spelling,
adrprelocation syntax, and data-section directives — routes through here; the instruction stream itself is identical.
Constants§
- CLOSURE_
SLOT_ OFFSET - Byte offset below
x29of the hidden closure slot (design §6).
Functions§
- call_
area_ size - Call-site argument area size: 8-byte packed callee + args, 16-aligned (design §7.1).
- scratch_
area_ size - 8-byte packed scratch area (array/hash/free-variable lists), 16-aligned.
- slot_
offset - Byte offset below
x29of symbol slotindex(design §6:[x29, #-16*(i+2)]).