summaryrefslogtreecommitdiff
path: root/src/runtime/cgo/asm_mips64x.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/cgo/asm_mips64x.s')
-rw-r--r--src/runtime/cgo/asm_mips64x.s8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/runtime/cgo/asm_mips64x.s b/src/runtime/cgo/asm_mips64x.s
index 904f781d87..0a8fbbbef0 100644
--- a/src/runtime/cgo/asm_mips64x.s
+++ b/src/runtime/cgo/asm_mips64x.s
@@ -6,6 +6,14 @@
#include "textflag.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
+ MOVV _crosscall2_ptr(SB), R5
+ MOVV $crosscall2(SB), R6
+ MOVV R6, (R5)
+ 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.