mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: document, clean up internal/sys
Document what the values in internal/sys mean. Remove various special cases for arm64 in the code using StackAlign. Delete Uintreg - it was for GOARCH=amd64p32, which was specific to GOOS=nacl and has been retired. 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: I40e8fa07b4e192298b6536b98a72a751951a4383 Reviewed-on: https://go-review.googlesource.com/c/go/+/288795 Trust: Russ Cox <rsc@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
678568a5cf
commit
8ac23a1f15
26 changed files with 124 additions and 168 deletions
|
|
@ -651,7 +651,7 @@ func adjustframe(frame *stkframe, arg unsafe.Pointer) bool {
|
|||
|
||||
// Adjust saved base pointer if there is one.
|
||||
// TODO what about arm64 frame pointer adjustment?
|
||||
if sys.ArchFamily == sys.AMD64 && frame.argp-frame.varp == 2*sys.RegSize {
|
||||
if sys.ArchFamily == sys.AMD64 && frame.argp-frame.varp == 2*sys.PtrSize {
|
||||
if stackDebug >= 3 {
|
||||
print(" saved bp\n")
|
||||
}
|
||||
|
|
@ -1245,7 +1245,7 @@ func getStackMap(frame *stkframe, cache *pcvalueCache, debug bool) (locals, args
|
|||
var minsize uintptr
|
||||
switch sys.ArchFamily {
|
||||
case sys.ARM64:
|
||||
minsize = sys.SpAlign
|
||||
minsize = sys.StackAlign
|
||||
default:
|
||||
minsize = sys.MinFrameSize
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue