Menu

📰
0

Everyone Says Assembly Is Untyped—Everyone Is Wrong

www.gingerbill.org·www.gingerbill.org·25 days ago
#h0C3VHXu
Reading 0:00
15s threshold

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. Understanding that assembly is actually typed. Real semantic diagnostics via core:rexcode encoding tables. It was built in ~7 days. 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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More