Shenghou Ma | ca7f2c7 | 2014-08-12 21:43:31 -0400 | [diff] [blame] | 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 | |
Russ Cox | 09d92b6 | 2014-12-05 19:13:20 -0500 | [diff] [blame] | 5 | // +build ppc64 ppc64le |
Shenghou Ma | ca7f2c7 | 2014-08-12 21:43:31 -0400 | [diff] [blame] | 6 | |
Austin Clements | 3208250 | 2014-10-22 11:21:16 -0400 | [diff] [blame] | 7 | #include "textflag.h" |
Austin Clements | 700ab16 | 2014-10-31 15:29:03 -0400 | [diff] [blame] | 8 | #include "funcdata.h" |
Shenghou Ma | ca7f2c7 | 2014-08-12 21:43:31 -0400 | [diff] [blame] | 9 | |
| 10 | // makeFuncStub is the code half of the function returned by MakeFunc. |
| 11 | // See the comment on the declaration of makeFuncStub in makefunc.go |
| 12 | // for more details. |
Austin Clements | 700ab16 | 2014-10-31 15:29:03 -0400 | [diff] [blame] | 13 | // No arg size here, runtime pulls arg map out of the func value. |
Shenghou Ma | ca7f2c7 | 2014-08-12 21:43:31 -0400 | [diff] [blame] | 14 | TEXT ·makeFuncStub(SB),(NOSPLIT|WRAPPER),$16 |
Austin Clements | 700ab16 | 2014-10-31 15:29:03 -0400 | [diff] [blame] | 15 | NO_LOCAL_POINTERS |
Shenghou Ma | ca7f2c7 | 2014-08-12 21:43:31 -0400 | [diff] [blame] | 16 | MOVD R11, 8(R1) |
| 17 | MOVD $argframe+0(FP), R3 |
| 18 | MOVD R3, 16(R1) |
| 19 | BL ·callReflect(SB) |
| 20 | RETURN |
| 21 | |
| 22 | // methodValueCall is the code half of the function returned by makeMethodValue. |
| 23 | // See the comment on the declaration of methodValueCall in makefunc.go |
| 24 | // for more details. |
Austin Clements | 700ab16 | 2014-10-31 15:29:03 -0400 | [diff] [blame] | 25 | // No arg size here; runtime pulls arg map out of the func value. |
Shenghou Ma | ca7f2c7 | 2014-08-12 21:43:31 -0400 | [diff] [blame] | 26 | TEXT ·methodValueCall(SB),(NOSPLIT|WRAPPER),$16 |
Austin Clements | 700ab16 | 2014-10-31 15:29:03 -0400 | [diff] [blame] | 27 | NO_LOCAL_POINTERS |
Shenghou Ma | ca7f2c7 | 2014-08-12 21:43:31 -0400 | [diff] [blame] | 28 | MOVD R11, 8(R1) |
| 29 | MOVD $argframe+0(FP), R3 |
| 30 | MOVD R3, 16(R1) |
| 31 | BL ·callMethod(SB) |
| 32 | RETURN |