aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/stack.go
diff options
context:
space:
mode:
authorElias Naur <elias.naur@gmail.com>2018-06-07 12:19:42 +0200
committerKeith Randall <khr@golang.org>2018-06-12 17:05:46 +0000
commit021c39d7a3361290d9e29497cf2a4a8fd2ee7b5c (patch)
tree573c7176129e0e5a0ed8b30b867453f04de0aa4b /src/runtime/stack.go
parentec989337c5d3203d52de1a2314813996c711fce6 (diff)
downloadgo-021c39d7a3361290d9e29497cf2a4a8fd2ee7b5c.tar.xz
runtime: use libc for signal functions on iOS
Also: - Add extra SystemStack space for darwin/arm64 just like for darwin/arm. - Removed redundant stack alignment; the arm64 hardware enforces the 16 byte alignment. - Save and restore the g registers at library initialization. - Zero g registers since libpreinit can call libc functions that in turn use asmcgocall. asmcgocall requires an initialized g. - Change asmcgocall to work even if no g is set. The change mimics amd64. Change-Id: I1b8c63b07cfec23b909c0d215b50dc229f8adbc8 Reviewed-on: https://go-review.googlesource.com/117176 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/stack.go')
-rw-r--r--src/runtime/stack.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/stack.go b/src/runtime/stack.go
index e40fa9cc1b..d83e9d6722 100644
--- a/src/runtime/stack.go
+++ b/src/runtime/stack.go
@@ -64,8 +64,8 @@ const (
// StackSystem is a number of additional bytes to add
// to each stack below the usual guard area for OS-specific
// purposes like signal handling. Used on Windows, Plan 9,
- // and Darwin/ARM because they do not use a separate stack.
- _StackSystem = sys.GoosWindows*512*sys.PtrSize + sys.GoosPlan9*512 + sys.GoosDarwin*sys.GoarchArm*1024
+ // and iOS because they do not use a separate stack.
+ _StackSystem = sys.GoosWindows*512*sys.PtrSize + sys.GoosPlan9*512 + sys.GoosDarwin*sys.GoarchArm*1024 + sys.GoosDarwin*sys.GoarchArm64*1024
// The minimum size of stack used by Go code
_StackMin = 2048