diff options
author | Russ Cox <rsc@golang.org> | 2021-01-27 11:34:42 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2021-02-19 00:04:22 +0000 |
commit | 09e059afb1270498f416f5b5c75a6a5683b6d1da (patch) | |
tree | cec3165dd2d1b93fb9a3a95188faca0433aca990 /src/runtime/runtime2.go | |
parent | b19e7b518e564cd309d3eb68dfd2da8839a7433b (diff) | |
download | go-09e059afb1270498f416f5b5c75a6a5683b6d1da.tar.gz go-09e059afb1270498f416f5b5c75a6a5683b6d1da.zip |
runtime: enable framepointer on all arm64
Frame pointers were already enabled on linux, darwin, ios,
but not freebsd, android, openbsd, netbsd.
But the space was reserved on all platforms, leading to
two different arm64 framepointer conditions in different
parts of the code, one of which had no name
(framepointer_enabled || GOARCH == "arm64",
which might have been "framepointer_space_reserved").
So on the disabled systems, the stack layouts were still
set up for frame pointers and the only difference was not
actually maintaining the FP register in the generated code.
Reduce complexity by just enabling the frame pointer
completely on all the arm64 systems.
This commit passes on freebsd, android, netbsd.
I have not been able to try it on openbsd.
This CL is part of a stack adding windows/arm64
support (#36439), intended to land in the Go 1.17 cycle.
This CL is, however, not windows/arm64-specific.
It is cleanup meant to make the port (and future ports) easier.
Change-Id: I83bd23369d24b76db4c6a648fa74f6917819a093
Reviewed-on: https://go-review.googlesource.com/c/go/+/288814
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/runtime/runtime2.go')
-rw-r--r-- | src/runtime/runtime2.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go index 05520d07b2..5bd283d12f 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go @@ -1106,4 +1106,4 @@ var ( ) // Must agree with cmd/internal/objabi.Framepointer_enabled. -const framepointer_enabled = GOARCH == "amd64" || GOARCH == "arm64" && (GOOS == "linux" || GOOS == "darwin" || GOOS == "ios") +const framepointer_enabled = GOARCH == "amd64" || GOARCH == "arm64" |