github.com/geraldss/go/src@v0.0.0-20210511222824-ac7d0ebfc235/reflect/asm_amd64.s (about)

     1  // Copyright 2012 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  #include "funcdata.h"
     7  
     8  // makeFuncStub is the code half of the function returned by MakeFunc.
     9  // See the comment on the declaration of makeFuncStub in makefunc.go
    10  // for more details.
    11  // No arg size here; runtime pulls arg map out of the func value.
    12  // makeFuncStub must be ABIInternal because it is placed directly
    13  // in function values.
    14  TEXT ·makeFuncStub<ABIInternal>(SB),(NOSPLIT|WRAPPER),$32
    15  	NO_LOCAL_POINTERS
    16  	MOVQ	DX, 0(SP)
    17  	LEAQ	argframe+0(FP), CX
    18  	MOVQ	CX, 8(SP)
    19  	MOVB	$0, 24(SP)
    20  	LEAQ	24(SP), AX
    21  	MOVQ	AX, 16(SP)
    22  	CALL	·callReflect<ABIInternal>(SB)
    23  	RET
    24  
    25  // methodValueCall is the code half of the function returned by makeMethodValue.
    26  // See the comment on the declaration of methodValueCall in makefunc.go
    27  // for more details.
    28  // No arg size here; runtime pulls arg map out of the func value.
    29  // methodValueCall must be ABIInternal because it is placed directly
    30  // in function values.
    31  TEXT ·methodValueCall<ABIInternal>(SB),(NOSPLIT|WRAPPER),$32
    32  	NO_LOCAL_POINTERS
    33  	MOVQ	DX, 0(SP)
    34  	LEAQ	argframe+0(FP), CX
    35  	MOVQ	CX, 8(SP)
    36  	MOVB	$0, 24(SP)
    37  	LEAQ	24(SP), AX
    38  	MOVQ	AX, 16(SP)
    39  	CALL	·callMethod<ABIInternal>(SB)
    40  	RET