Brad Fitzpatrick | 5194744 | 2016-03-01 22:57:46 +0000 | [diff] [blame] | 1 | // Copyright 2012 The Go Authors. All rights reserved. |
Russ Cox | ba4625c | 2012-09-24 20:06:32 -0400 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
Rob Pike | 8bca148 | 2014-08-12 17:04:45 -0700 | [diff] [blame] | 5 | #include "textflag.h" |
Russ Cox | f0d44db | 2014-09-12 07:29:19 -0400 | [diff] [blame] | 6 | #include "funcdata.h" |
Keith Randall | 8b789e1 | 2013-08-12 10:25:36 -0700 | [diff] [blame] | 7 | |
Russ Cox | ba4625c | 2012-09-24 20:06:32 -0400 | [diff] [blame] | 8 | // makeFuncStub is jumped to by the code generated by MakeFunc. |
Russ Cox | 3be7036 | 2013-03-21 16:59:16 -0400 | [diff] [blame] | 9 | // See the comment on the declaration of makeFuncStub in makefunc.go |
Russ Cox | ba4625c | 2012-09-24 20:06:32 -0400 | [diff] [blame] | 10 | // for more details. |
Dmitriy Vyukov | 8679d5f | 2013-07-31 20:00:33 +0400 | [diff] [blame] | 11 | // No argsize here, gc generates argsize info at call site. |
Michael Anthony Knyszek | 28c5fed | 2021-01-28 15:23:05 +0000 | [diff] [blame] | 12 | TEXT ·makeFuncStub(SB),(NOSPLIT|WRAPPER),$20 |
Russ Cox | f0d44db | 2014-09-12 07:29:19 -0400 | [diff] [blame] | 13 | NO_LOCAL_POINTERS |
Russ Cox | b1b67a3 | 2013-02-22 15:23:57 -0500 | [diff] [blame] | 14 | MOVW R7, 4(R13) |
Russ Cox | 07720b6 | 2013-03-22 12:57:55 -0400 | [diff] [blame] | 15 | MOVW $argframe+0(FP), R1 |
Russ Cox | ba4625c | 2012-09-24 20:06:32 -0400 | [diff] [blame] | 16 | MOVW R1, 8(R13) |
Keith Randall | ef50373 | 2018-09-25 15:54:11 -0700 | [diff] [blame] | 17 | MOVW $0, R1 |
Michael Anthony Knyszek | 28c5fed | 2021-01-28 15:23:05 +0000 | [diff] [blame] | 18 | MOVB R1, 20(R13) |
| 19 | ADD $20, R13, R1 |
Keith Randall | ef50373 | 2018-09-25 15:54:11 -0700 | [diff] [blame] | 20 | MOVW R1, 12(R13) |
Michael Anthony Knyszek | 28c5fed | 2021-01-28 15:23:05 +0000 | [diff] [blame] | 21 | MOVW $0, R1 |
| 22 | MOVW R1, 16(R13) |
Russ Cox | ba4625c | 2012-09-24 20:06:32 -0400 | [diff] [blame] | 23 | BL ·callReflect(SB) |
| 24 | RET |
Russ Cox | 3be7036 | 2013-03-21 16:59:16 -0400 | [diff] [blame] | 25 | |
| 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 Vyukov | 8679d5f | 2013-07-31 20:00:33 +0400 | [diff] [blame] | 29 | // No argsize here, gc generates argsize info at call site. |
Michael Anthony Knyszek | 28c5fed | 2021-01-28 15:23:05 +0000 | [diff] [blame] | 30 | TEXT ·methodValueCall(SB),(NOSPLIT|WRAPPER),$20 |
Russ Cox | f0d44db | 2014-09-12 07:29:19 -0400 | [diff] [blame] | 31 | NO_LOCAL_POINTERS |
Russ Cox | 3be7036 | 2013-03-21 16:59:16 -0400 | [diff] [blame] | 32 | MOVW R7, 4(R13) |
Russ Cox | 07720b6 | 2013-03-22 12:57:55 -0400 | [diff] [blame] | 33 | MOVW $argframe+0(FP), R1 |
Russ Cox | 3be7036 | 2013-03-21 16:59:16 -0400 | [diff] [blame] | 34 | MOVW R1, 8(R13) |
Keith Randall | ef50373 | 2018-09-25 15:54:11 -0700 | [diff] [blame] | 35 | MOVW $0, R1 |
Michael Anthony Knyszek | 28c5fed | 2021-01-28 15:23:05 +0000 | [diff] [blame] | 36 | MOVB R1, 20(R13) |
| 37 | ADD $20, R13, R1 |
Keith Randall | ef50373 | 2018-09-25 15:54:11 -0700 | [diff] [blame] | 38 | MOVW R1, 12(R13) |
Michael Anthony Knyszek | 28c5fed | 2021-01-28 15:23:05 +0000 | [diff] [blame] | 39 | MOVW $0, R1 |
| 40 | MOVW R1, 16(R13) |
Russ Cox | 3be7036 | 2013-03-21 16:59:16 -0400 | [diff] [blame] | 41 | BL ·callMethod(SB) |
| 42 | RET |