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
- Claude Is Not a Compilerblog.exe.dev
- Many can write faster asm than the compiler, yet don't. Why? — LessWronglesswrong.com
- How to use storytelling to fit inline assembly into Rustralfj.de
- A Gentle Introduction to LLVM IR · mcyoungmcyoung.xyz
- GitHub - NickTsaizer/splitasm.nvim: godbolt at homegithub.com
- Frequently Asked Questions (FAQ) - The Go Programming Languagego.dev
- Compilers - What Every Programmer Should Know About Compiler Optimizations | Microsoft Learnlearn.microsoft.com
- A Gentle Introduction to LLVM IR · mcyoungmcyoung.xyz
- Write your Own Virtual Machinejmeiners.com
- Inline In Rustmatklad.github.io
- LLVM is Smarter Than Meblog.sulami.xyz
- Go at Google: Language Design in the Service of Software Engineering - The Go Programming Languagego.dev