| 1 |
// To transition from a Go call to a C function call, we are skating |
| 2 |
// on really thin ice... Ceveat Emptor! |
| 3 |
// |
| 4 |
// Ref: |
| 5 |
// https://gitlab.com/x86-psABIs/x86-64-ABI/-/wikis/home |
| 6 |
// |
| 7 |
// This is not strictly needed, but it makes gdb debugging less |
| 8 |
// confusing because spacer ends up being an alias for the TEXT |
| 9 |
// section start. |
| 10 |
TEXT ·spacer(SB),$0 |
| 11 |
RET |
| 12 |
|
| 13 |
#define RINDEX(n) (8*n) |
| 14 |
|
| 15 |
// Header to this function wrapper is the last time we can voluntarily |
| 16 |
// yield to some other goroutine. |
| 17 |
TEXT ·syso(SB),$0-16 |
| 18 |
MOVQ cFn+RINDEX(0)(FP), SI |
| 19 |
MOVQ state+RINDEX(1)(FP), DI |
| 20 |
CALL *SI |
| 21 |
RET |