blob: 057c941f5915715fb042cf376b49589c41ba100c [file] [log] [blame]
Brad Fitzpatrick51947442016-03-01 22:57:46 +00001// Copyright 2012 The Go Authors. All rights reserved.
Russ Coxba4625c2012-09-24 20:06:32 -04002// 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 Coxba4625c2012-09-24 20:06:32 -04008// makeFuncStub is jumped to by the code generated 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.
Dmitriy Vyukov8679d5f2013-07-31 20:00:33 +040011// No argsize here, gc generates argsize info at call site.
Michael Anthony Knyszek28c5fed2021-01-28 15:23:05 +000012TEXT ·makeFuncStub(SB),(NOSPLIT|WRAPPER),$20
Russ Coxf0d44db2014-09-12 07:29:19 -040013 NO_LOCAL_POINTERS
Russ Coxb1b67a32013-02-22 15:23:57 -050014 MOVW R7, 4(R13)
Russ Cox07720b62013-03-22 12:57:55 -040015 MOVW $argframe+0(FP), R1
Russ Coxba4625c2012-09-24 20:06:32 -040016 MOVW R1, 8(R13)
Keith Randallef503732018-09-25 15:54:11 -070017 MOVW $0, R1
Michael Anthony Knyszek28c5fed2021-01-28 15:23:05 +000018 MOVB R1, 20(R13)
19 ADD $20, R13, R1
Keith Randallef503732018-09-25 15:54:11 -070020 MOVW R1, 12(R13)
Michael Anthony Knyszek28c5fed2021-01-28 15:23:05 +000021 MOVW $0, R1
22 MOVW R1, 16(R13)
Russ Coxba4625c2012-09-24 20:06:32 -040023 BL ·callReflect(SB)
24 RET
Russ Cox3be70362013-03-21 16:59:16 -040025
26// methodValueCall is the code half of the function returned by makeMethodValue.
27// See the comment on the declaration of methodValueCall in makefunc.go
28// for more details.
Dmitriy Vyukov8679d5f2013-07-31 20:00:33 +040029// No argsize here, gc generates argsize info at call site.
Michael Anthony Knyszek28c5fed2021-01-28 15:23:05 +000030TEXT ·methodValueCall(SB),(NOSPLIT|WRAPPER),$20
Russ Coxf0d44db2014-09-12 07:29:19 -040031 NO_LOCAL_POINTERS
Russ Cox3be70362013-03-21 16:59:16 -040032 MOVW R7, 4(R13)
Russ Cox07720b62013-03-22 12:57:55 -040033 MOVW $argframe+0(FP), R1
Russ Cox3be70362013-03-21 16:59:16 -040034 MOVW R1, 8(R13)
Keith Randallef503732018-09-25 15:54:11 -070035 MOVW $0, R1
Michael Anthony Knyszek28c5fed2021-01-28 15:23:05 +000036 MOVB R1, 20(R13)
37 ADD $20, R13, R1
Keith Randallef503732018-09-25 15:54:11 -070038 MOVW R1, 12(R13)
Michael Anthony Knyszek28c5fed2021-01-28 15:23:05 +000039 MOVW $0, R1
40 MOVW R1, 16(R13)
Russ Cox3be70362013-03-21 16:59:16 -040041 BL ·callMethod(SB)
42 RET