diff options
| author | Meng Zhuo <mzh@golangcn.org> | 2021-11-03 18:01:09 +0800 |
|---|---|---|
| committer | mzh <mzh@golangcn.org> | 2022-03-27 12:55:16 +0000 |
| commit | 56400fc70675cc2f404f33e3ed13386967cfe4da (patch) | |
| tree | 15ccea24a2b8c0c7eb698aee38eb9e1031f80534 /src/runtime | |
| parent | 79e051ad33992cb50e689b0dff2c6fc6f8b4c94f (diff) | |
| download | go-56400fc70675cc2f404f33e3ed13386967cfe4da.tar.xz | |
reflect, runtime: add reflect support for regabi on riscv64
This CL adds regabi support needed for reflect.
Change-Id: Ib78f8c7765f03e3a7b46e8b115bf8870b8076e6a
Reviewed-on: https://go-review.googlesource.com/c/go/+/360994
Trust: mzh <mzh@golangcn.org>
Run-TryBot: mzh <mzh@golangcn.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/stack.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/stack.go b/src/runtime/stack.go index edc37d4878..54a02173c3 100644 --- a/src/runtime/stack.go +++ b/src/runtime/stack.go @@ -1332,7 +1332,8 @@ func getStackMap(frame *stkframe, cache *pcvalueCache, debug bool) (locals, args } // stack objects. - if (GOARCH == "amd64" || GOARCH == "arm64" || GOARCH == "ppc64" || GOARCH == "ppc64le") && unsafe.Sizeof(abi.RegArgs{}) > 0 && frame.argmap != nil { + if (GOARCH == "amd64" || GOARCH == "arm64" || GOARCH == "ppc64" || GOARCH == "ppc64le" || GOARCH == "riscv64") && + 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. |
