diff options
author | Michael Anthony Knyszek <mknyszek@google.com> | 2021-01-28 15:23:05 +0000 |
---|---|---|
committer | Michael Knyszek <mknyszek@google.com> | 2021-04-02 16:53:18 +0000 |
commit | 28c5fed5576483cc696db233d7f6fffecd2833a2 (patch) | |
tree | 00109d3e508e63bbfff7c5c73f2b54ea321c402c /src/runtime/stubs_amd64.go | |
parent | 6996bae5d1d34ea9e2ab6399f70adb402697ed94 (diff) | |
download | go-28c5fed5576483cc696db233d7f6fffecd2833a2.tar.gz go-28c5fed5576483cc696db233d7f6fffecd2833a2.zip |
reflect: add register ABI support for makeFuncStub and methodValueCall
This change finishes off functionality register ABI for the reflect
package.
Specifically, it implements a call on a MakeFunc'd value by performing
the reverse process that reflect.Value.Call does, using the same ABI
steps. It implements a call on a method value created by reflect by
translating between the method value's ABI to the method's ABI.
Tests are added for both cases.
For #40724.
Change-Id: I302820b61fc0a8f94c5525a002bc02776aef41af
Reviewed-on: https://go-review.googlesource.com/c/go/+/298670
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/runtime/stubs_amd64.go')
-rw-r--r-- | src/runtime/stubs_amd64.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/runtime/stubs_amd64.go b/src/runtime/stubs_amd64.go index bf98493e9d..687a506cdd 100644 --- a/src/runtime/stubs_amd64.go +++ b/src/runtime/stubs_amd64.go @@ -40,3 +40,10 @@ func retpolineR15() //go:noescape func asmcgocall_no_g(fn, arg unsafe.Pointer) + +// Used by reflectcall and the reflect package. +// +// Spills/loads arguments in registers to/from an internal/abi.RegArgs +// respectively. Does not follow the Go ABI. +func spillArgs() +func unspillArgs() |