diff options
| author | Cherry Mui <cherryyz@google.com> | 2021-05-27 20:20:16 -0400 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2021-06-02 16:50:22 +0000 |
| commit | 0c123cdf8ba88991e51fdb3523fdc7df03cf3118 (patch) | |
| tree | 658ce1c49635f78160fcc7982ec055400eab915a /src/runtime/stack.go | |
| parent | 2e4b79949fbb6e0c7e68a1f0258c42ea791069e6 (diff) | |
| download | go-0c123cdf8ba88991e51fdb3523fdc7df03cf3118.tar.xz | |
[dev.typeparams] reflect: implement register ABI for MakeFunc etc. on ARM64
Implement register ABI for reflect.MakeFunc and method Value Call
on ARM64.
Change-Id: I5487febb9ea764af5ccf5d7c94858ab0acec7cac
Reviewed-on: https://go-review.googlesource.com/c/go/+/323936
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/runtime/stack.go')
| -rw-r--r-- | src/runtime/stack.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/stack.go b/src/runtime/stack.go index 622de45f25..a1182b00bd 100644 --- a/src/runtime/stack.go +++ b/src/runtime/stack.go @@ -1318,11 +1318,11 @@ func getStackMap(frame *stkframe, cache *pcvalueCache, debug bool) (locals, args } // stack objects. - if GOARCH == "amd64" && unsafe.Sizeof(abi.RegArgs{}) > 0 && frame.argmap != nil { + if (GOARCH == "amd64" || GOARCH == "arm64") && unsafe.Sizeof(abi.RegArgs{}) > 0 && frame.argmap != nil { // argmap is set when the function is reflect.makeFuncStub or reflect.methodValueCall. // We don't actually use argmap in this case, but we need to fake the stack object - // record for these frames which contain an internal/abi.RegArgs at a hard-coded offset - // on amd64. + // record for these frames which contain an internal/abi.RegArgs at a hard-coded offset. + // This offset matches the assembly code on amd64 and arm64. objs = methodValueCallFrameObjs } else { p := funcdata(f, _FUNCDATA_StackObjects) |
