3 ms·
Generally the inline assembly is hand-written and must follow the platform rules, see "Architecture-specific details" in https://go.dev/doc/asm https://go.dev/d
by yencabulator 2y ago
Generally the inline assembly is hand-written and must follow the platform rules, see "Architecture-specific details" in https://go.dev/doc/asm https://go.dev/doc/asm
The few tools that generate that asm, such as https://github.com/mmcloughlin/avo https://github.com/mmcloughlin/avo
, would also have follow the rules.
You're not meant to take C source, crank it through GCC, and slurp that in as inline asm in Go.
Background: https://www.youtube.com/watch?v=KINIAgRpkDA https://www.youtube.com/watch?v=KINIAgRpkDA