diff options
Diffstat (limited to 'src/runtime/cgo/asm_arm64.s')
-rw-r--r-- | src/runtime/cgo/asm_arm64.s | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/runtime/cgo/asm_arm64.s b/src/runtime/cgo/asm_arm64.s index e808dedcfc..ce8909b492 100644 --- a/src/runtime/cgo/asm_arm64.s +++ b/src/runtime/cgo/asm_arm64.s @@ -5,6 +5,14 @@ #include "textflag.h" #include "abi_arm64.h" +// Set the x_crosscall2_ptr C function pointer variable point to crosscall2. +// It's such a pointer chain: _crosscall2_ptr -> x_crosscall2_ptr -> crosscall2 +TEXT ·set_crosscall2(SB),NOSPLIT,$0-0 + MOVD _crosscall2_ptr(SB), R1 + MOVD $crosscall2(SB), R2 + MOVD R2, (R1) + RET + // Called by C code generated by cmd/cgo. // func crosscall2(fn, a unsafe.Pointer, n int32, ctxt uintptr) // Saves C callee-saved registers and calls cgocallback with three arguments. |