| 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://stackoverflow.com/questions/261419/what-registers-to-save-in-the-arm-c-calling-convention |
| 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 FINDEX(n) (8*n) |
| 14 |
|
| 15 |
// Header to this function wrapper is the last time we can voluntarily |
| 16 |
// yield to some other goroutine. |
| 17 |
// |
| 18 |
// Conventions: PC == R15, SP == R13, LR == R14, IP (scratch) = R12 |
| 19 |
TEXT ·syso(SB),$0-8 |
| 20 |
MOVW cFn+0(FP), R14 |
| 21 |
MOVW state+4(FP), R0 |
| 22 |
BL (R14) |
| 23 |
RET |