Black Lives Matter. Support the Equal Justice Initiative.

Text file src/runtime/cgo/asm_386.s

Documentation: runtime/cgo

     1  // Copyright 2009 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  #include "textflag.h"
     6  
     7  // Called by C code generated by cmd/cgo.
     8  // func crosscall2(fn, a unsafe.Pointer, n int32, ctxt uintptr)
     9  // Saves C callee-saved registers and calls cgocallback with three arguments.
    10  // fn is the PC of a func(a unsafe.Pointer) function.
    11  TEXT crosscall2(SB),NOSPLIT,$28-16
    12  	MOVL BP, 24(SP)
    13  	MOVL BX, 20(SP)
    14  	MOVL SI, 16(SP)
    15  	MOVL DI, 12(SP)
    16  
    17  	MOVL	ctxt+12(FP), AX
    18  	MOVL	AX, 8(SP)
    19  	MOVL	a+4(FP), AX
    20  	MOVL	AX, 4(SP)
    21  	MOVL	fn+0(FP), AX
    22  	MOVL	AX, 0(SP)
    23  	CALL	runtime¬∑cgocallback(SB)
    24  
    25  	MOVL 12(SP), DI
    26  	MOVL 16(SP), SI
    27  	MOVL 20(SP), BX
    28  	MOVL 24(SP), BP
    29  	RET
    30  

View as plain text