]> Cypherpunks.ru repositories - gostls13.git/blob - src/reflect/asm_wasm.s
cmd/compile/internal/inline: score call sites exposed by inlines
[gostls13.git] / src / reflect / asm_wasm.s
1 // Copyright 2018 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 TEXT ·makeFuncStub(SB),(NOSPLIT|WRAPPER),$40
13         NO_LOCAL_POINTERS
14
15         MOVD CTXT, 0(SP)
16
17         Get SP
18         Get SP
19         I64ExtendI32U
20         I64Const $argframe+0(FP)
21         I64Add
22         I64Store $8
23
24         MOVB $0, 32(SP)
25         MOVD $32(SP), 16(SP)
26         MOVD $0, 24(SP)
27
28         CALL ·callReflect(SB)
29         RET
30
31 // methodValueCall is the code half of the function returned by makeMethodValue.
32 // See the comment on the declaration of methodValueCall in makefunc.go
33 // for more details.
34 // No arg size here; runtime pulls arg map out of the func value.
35 TEXT ·methodValueCall(SB),(NOSPLIT|WRAPPER),$40
36         NO_LOCAL_POINTERS
37
38         MOVD CTXT, 0(SP)
39
40         Get SP
41         Get SP
42         I64ExtendI32U
43         I64Const $argframe+0(FP)
44         I64Add
45         I64Store $8
46
47         MOVB $0, 32(SP)
48         MOVD $32(SP), 16(SP)
49         MOVD $0, 24(SP)
50
51         CALL ·callMethod(SB)
52         RET