From 9c43872bd831396ccf637f4569a18d784d1e9bce Mon Sep 17 00:00:00 2001 From: Lynn Boger Date: Mon, 27 Sep 2021 07:48:33 -0500 Subject: reflect,runtime: add reflect support for regabi on PPC64 This adds the regabi support needed for reflect including: - implementation of the makeFuncSub and methodValueCall for reflect - implementations of archFloat32FromReg and archFloat32ToReg needed for PPC64 due to differences in the way float32 are represented in registers as compared to other platforms - change needed to stack.go due to the functions that are changed above Change-Id: Ida40d831370e39b91711ccb9616492b7fad3debf Reviewed-on: https://go-review.googlesource.com/c/go/+/352429 Run-TryBot: Lynn Boger Reviewed-by: Cherry Mui TryBot-Result: Go Bot Trust: Lynn Boger --- src/runtime/stack.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/runtime/stack.go') diff --git a/src/runtime/stack.go b/src/runtime/stack.go index cccec49f8e..22fff73947 100644 --- a/src/runtime/stack.go +++ b/src/runtime/stack.go @@ -1316,7 +1316,7 @@ func getStackMap(frame *stkframe, cache *pcvalueCache, debug bool) (locals, args } // stack objects. - if (GOARCH == "amd64" || GOARCH == "arm64") && unsafe.Sizeof(abi.RegArgs{}) > 0 && frame.argmap != nil { + if (GOARCH == "amd64" || GOARCH == "arm64" || GOARCH == "ppc64" || GOARCH == "ppc64le") && 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. -- cgit v1.3