blob: 5a6c27ac93b699d647c4f4dc0ecd07be9dc0f4db [file] [log] [blame]
Russ Coxba4625c2012-09-24 20:06:32 -04001// 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
Rob Pike8bca1482014-08-12 17:04:45 -07005#include "textflag.h"
Russ Coxf0d44db2014-09-12 07:29:19 -04006#include "funcdata.h"
Keith Randall8b789e12013-08-12 10:25:36 -07007
Russ Coxb1b67a32013-02-22 15:23:57 -05008// makeFuncStub is the code half of the function returned by MakeFunc.
Russ Cox3be70362013-03-21 16:59:16 -04009// See the comment on the declaration of makeFuncStub in makefunc.go
Russ Coxba4625c2012-09-24 20:06:32 -040010// for more details.
Russ Coxf0d44db2014-09-12 07:29:19 -040011// No arg size here; runtime pulls arg map out of the func value.
Russ Cox7276c022013-09-12 14:00:16 -040012TEXT ·makeFuncStub(SB),(NOSPLIT|WRAPPER),$16
Russ Coxf0d44db2014-09-12 07:29:19 -040013 NO_LOCAL_POINTERS
Russ Coxb1b67a32013-02-22 15:23:57 -050014 MOVQ DX, 0(SP)
Russ Cox07720b62013-03-22 12:57:55 -040015 LEAQ argframe+0(FP), CX
Russ Coxb1b67a32013-02-22 15:23:57 -050016 MOVQ CX, 8(SP)
Russ Coxba4625c2012-09-24 20:06:32 -040017 CALL ·callReflect(SB)
18 RET
Russ Cox3be70362013-03-21 16:59:16 -040019
20// methodValueCall is the code half of the function returned by makeMethodValue.
21// See the comment on the declaration of methodValueCall in makefunc.go
22// for more details.
Russ Coxf0d44db2014-09-12 07:29:19 -040023// No arg size here; runtime pulls arg map out of the func value.
Russ Cox7276c022013-09-12 14:00:16 -040024TEXT ·methodValueCall(SB),(NOSPLIT|WRAPPER),$16
Russ Coxf0d44db2014-09-12 07:29:19 -040025 NO_LOCAL_POINTERS
Russ Cox3be70362013-03-21 16:59:16 -040026 MOVQ DX, 0(SP)
Russ Cox07720b62013-03-22 12:57:55 -040027 LEAQ argframe+0(FP), CX
Russ Cox3be70362013-03-21 16:59:16 -040028 MOVQ CX, 8(SP)
29 CALL ·callMethod(SB)
30 RET