diff options
Diffstat (limited to 'src/runtime/cgo/asm_s390x.s')
-rw-r--r-- | src/runtime/cgo/asm_s390x.s | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/runtime/cgo/asm_s390x.s b/src/runtime/cgo/asm_s390x.s index 7eab8f652a..8bf16e75e2 100644 --- a/src/runtime/cgo/asm_s390x.s +++ b/src/runtime/cgo/asm_s390x.s @@ -5,8 +5,9 @@ #include "textflag.h" // Called by C code generated by cmd/cgo. -// func crosscall2(fn func(a unsafe.Pointer, n int32, ctxt uintptr), a unsafe.Pointer, n int32, ctxt uintptr) -// Saves C callee-saved registers and calls fn with three arguments. +// func crosscall2(fn, a unsafe.Pointer, n int32, ctxt uintptr) +// Saves C callee-saved registers and calls cgocallback with three arguments. +// fn is the PC of a func(a unsafe.Pointer) function. TEXT crosscall2(SB),NOSPLIT|NOFRAME,$0 // Start with standard C stack frame layout and linkage. @@ -29,10 +30,11 @@ TEXT crosscall2(SB),NOSPLIT|NOFRAME,$0 // Initialize Go ABI environment. BL runtimeĀ·load_g(SB) - MOVD R3, 8(R15) // arg1 - MOVW R4, 16(R15) // arg2 - MOVD R5, 24(R15) // arg3 - BL (R2) // fn(arg1, arg2, arg3) + MOVD R2, 8(R15) // fn unsafe.Pointer + MOVD R3, 16(R15) // a unsafe.Pointer + // Skip R4 = n uint32 + MOVD R5, 24(R15) // ctxt uintptr + BL runtimeĀ·cgocallback(SB) FMOVD 32(R15), F8 FMOVD 40(R15), F9 |