diff options
| author | Meng Zhuo <mzh@golangcn.org> | 2021-11-03 18:01:09 +0800 |
|---|---|---|
| committer | mzh <mzh@golangcn.org> | 2022-04-01 01:41:42 +0000 |
| commit | bb2b16d15ead9c5b6b9e2b699aed8bdfcf7e9518 (patch) | |
| tree | 3e58ba90314728de37aa6c9e2be927f4ba45a8f3 /src/runtime | |
| parent | ecee4a32918c5e575303530abb9a504a235a1c71 (diff) | |
| download | go-bb2b16d15ead9c5b6b9e2b699aed8bdfcf7e9518.tar.xz | |
reflect, runtime: add reflect support for regabi on riscv64
This CL adds regabi support needed for reflect and reimplement
of CL 360994, which is reverted.
Change-Id: I140673f09109dd9f72eff70aad64c0aa00d6857a
Reviewed-on: https://go-review.googlesource.com/c/go/+/396077
Reviewed-by: Cherry Mui <cherryyz@google.com>
Trust: mzh <mzh@golangcn.org>
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. |
