docs(asm): add user-facing inline-assembly guide
Adds docs/inline-assembly.md — a how-to guide for inline assembly in the docs/error-handling.md style: mental model, operands (inputs / value outputs / naming + auto-naming rule), the result-type table, volatile, clobbers, all three `-> @place` forms (write-through / read-write / indirect-memory), multi-instruction `#string` templates, global asm + lib-less extern, the JIT/AOT-yes vs `#run`-no execution model, a cookbook (read-register, x86_64 syscall, divmod), and rules of thumb. All aarch64 snippets are verified to run; x86_64 ones are labeled. The design doc (docs/inline-asm-design.md) stays as the internal rationale; this guide is the user-facing companion, linked from readme.md.
This commit is contained in:
@@ -488,7 +488,9 @@ my_add :: (a: i64, b: i64) -> i64 extern;
|
||||
```
|
||||
|
||||
Inline asm is target-specific and never runs at compile time. See
|
||||
`examples/16xx-platform-asm-*` for the full matrix.
|
||||
[docs/inline-assembly.md](docs/inline-assembly.md) for the full guide
|
||||
(place outputs, global asm, the cookbook) and `examples/16xx-platform-asm-*`
|
||||
for the runnable matrix.
|
||||
|
||||
### Modules
|
||||
|
||||
|
||||
Reference in New Issue
Block a user