5 ms·
Primer on Go Assembly
- spooneybarger 9y agoA colleague passed this along to me. I've been doing a lot of work in the guts of the Go runtime as part of my work at Wallaroo Labs and while there isn't a ton here yet, what there is was helpful. The links at the bottom were what I found particularly helpful.
- robzyb 9y agoYeah I tried to research Go Assembly ~12 months ago and came up with relatively little. It's great to see this!
- theparanoid 9y agoGo's "pseudo-assembly" is not a plus. Everyone ends up learning both the architecture's assembly and the mapping to Go's pseudo-assembly which isn't actually portable because each architecture has architecture-specific features.
- yur83838 9y agoWould you say LLVM's pseudo assembly is also not a plus?
- codemac 9y agoThey should just call it Plan9 IR
- gameswithgo 9y agoPerhaps such a thing makes sense when you are a target for languages but not when you are just a language. Instead make sure anything that you can express with your IR can be expressed with the language?
- pjmlp 9y agoIt always makes sense. because it is easier to port to new platforms. A low level IR requires less effort to implement a compiler backend. In Go's case, it is what makes the reference compiler so easy to cross-compile.
- jernfrost 9y agoThat is like saying functions are not a plus, because you need to learn the functions and the mapping to the code used to implement the functions. The Go assembly language is no different from having macros, functions or anything else providing a higher level of abstraction to relieve the developer of thinking about every little nuance of the underlying language.
- nerdponx 9y agoIs this different on a conceptual level from bytecode or any other intermediate representation?
- Aissen 9y agoThis 2017 FOSDEM talk is also interesting on this subject: https://archive.fosdem.org/2017/schedule/event/go_scaling/ https://archive.fosdem.org/2017/schedule/event/go_scaling/ ; albeit it's more on the cryptographic side of things.
- to3m 9y ago> 137438953482 actually corresponds to the 10 and 32 4-byte values concatenated into one 8-byte value 32<<32|10 might be a bit clearer, then...