Dropping Down Go Functions in Assembly
summary
Shows how to write Go functions in the plan9-derived assembler, with concrete examples of syntax, calling convention, stack-frame size and argument-size declarations, and pseudo-registers SP FP and SB. Demonstrates that assembly accelerates crypto and math routines, explains destination-on-the-right operand order, how to use NoSplit/NoEscape flags to avoid stack growth and heap escapes, and documents raw bytes for missing opcodes. Describes porting work that adds the s390x target in Go 1.7 and a GitHub layout for testing and portability.
AI-written summary · about
chapters (14)
- 0:00Intro
- 2:17What is the Go toolchain's assembly language?
- 4:49What is assembly used for in Go's standard library
- 7:08Terminology
- 10:46Move instructions
- 14:19Branches
- 15:12Missing instructions
- 16:14Function declaration
- 18:37Pseudo-registers
- 19:45Calling convention
- 22:47Local variables
- 23:54Stack growth
- 25:22Flags
- 26:02Escape analysis
related talks
07mA Small Update On TinyGo
57mAssembly crash course
40mDay 3 Closing Talk: The Legacy of Go
51mTinyGo, small but mighty! 💪
34mGo Hardware Go!
47mTinyGo, Small but Mighty! 💪
29mDissecting Slices, Maps and Channels in Go
12mLightning Talk: From Hardware Simulation to Real Devices with WebAssembly Using TinyGo
