Everyone Says Assembly Is Untyped—Everyone Is Wrong - gingerBill
The most important aspects are of this article listed below. I am not aware of any other assembly (GCC/Clang/Rust/Go…) that would combine all of these aspects: I have been asked why Odin even bothers having its own custom inline assembler at all. Isn’t inline assembly a solved problem? You take a string, you hand it to the assembler, and you let that external assembler sort out the rest. Everyone from GCC to Clang to Rust does more or less this. The wheel has been invented, right? This is precisely the design I did not want, and the design that most languages have settled for. My goal from the beginning was to have an inline assembler that is actually integrated into the rest of the language rather than feeling bolted on the side. And I honestly believe that what Odin has ended up with is the best inline assembly system in any language right now. I don’t say that lightly, and by the end of this article I hope you’ll at least understand why I believe that to be true. Let’s start with t
TL;DR: I believe Odin’s inline assembly is currently the best out of any language. The most important aspects are of this article listed below. I am not aware of any other assembly (GCC/Clang/Rust/Go…) that would combine all of these aspects: Inline assembly is organized into asm “templates”, similar to and callable as procedures. asm templates integrate with rest of the code, through bindings specifying clobbers, pinned, tied, and scratch registers. Assembly syntax is unified across ISAs and consistent with Odin syntax. Assembly is fully type checked, just like rest of Odin code.…
saved by
related reading
- A data race that doesn't compilecorentin-core.github.io
- A Tiny Compiler for Data-Parallel Kernelshealeycodes.com
- Claude Is Not a Compilerblog.exe.dev
- Many can write faster asm than the compiler, yet don't. Why? — LessWronglesswrong.com
- A Gentle Introduction to LLVM IR · mcyoungmcyoung.xyz
- How to use storytelling to fit inline assembly into Rustralfj.de
- Writing a C compiler in 500 lines of Pythonvgel.me
- A fundamental introduction to x86 assembly programmingnayuki.io
- Understanding static single assignment formsblog.yossarian.net
- Why ML/OCaml are good for writing compilersflint.cs.yale.edu
- Against Query Based Compilersmatklad.github.io
- A Gentle Introduction to LLVM IR · mcyoungmcyoung.xyz