Open chen3feng opened 2 years ago
整数参数和返回值均通过 AX、BX、CX、DI、SI、R8、R9、R10、R11 传递
浮点数参数和返回值均通过X0~X14传递
汇编代码
https://tonybai.com/2021/08/20/using-register-based-calling-convention-in-go-1-17/ https://www.jianshu.com/p/4ebceb127568 https://go.googlesource.com/proposal/+/refs/changes/08/219508/2/design/36821-perf-counter-pprof.md#5-empirical-evidence-on-the-accuracy-and-precision-of-pmu-profiles https://yushuanhsieh.github.io/post/2021-04-24-go-calling-convention/
Go 1.17+ 寄存器调用约定
AMD64
整数参数和返回值均通过 AX、BX、CX、DI、SI、R8、R9、R10、R11 传递
浮点数参数和返回值均通过X0~X14传递
汇编代码
ARM64
Ref
https://tonybai.com/2021/08/20/using-register-based-calling-convention-in-go-1-17/ https://www.jianshu.com/p/4ebceb127568 https://go.googlesource.com/proposal/+/refs/changes/08/219508/2/design/36821-perf-counter-pprof.md#5-empirical-evidence-on-the-accuracy-and-precision-of-pmu-profiles https://yushuanhsieh.github.io/post/2021-04-24-go-calling-convention/