diff options
author | Cherry Zhang <cherryyz@google.com> | 2019-11-10 21:57:14 -0500 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2019-11-12 22:30:48 +0000 |
commit | 995ade86e3900a9d6b983c2669f9b5761fc349bf (patch) | |
tree | f6c59e94ea3eb3a807a7fd1944b78781fdc5119f /src/runtime/mkpreempt.go | |
parent | 13fb147e60ba17457366630c60b5dbbe2d6a4304 (diff) | |
download | go-995ade86e3900a9d6b983c2669f9b5761fc349bf.tar.gz go-995ade86e3900a9d6b983c2669f9b5761fc349bf.zip |
runtime: enable async preemption on darwin/arm64
The problem should be fixed by the previous CL. Reenable async
preemption on darwin/arm64.
Updates #35439.
Change-Id: I93e8c4702b4d8fe6abaa6fc9c27def5c8aed1b59
Reviewed-on: https://go-review.googlesource.com/c/go/+/206419
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/mkpreempt.go')
-rw-r--r-- | src/runtime/mkpreempt.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/mkpreempt.go b/src/runtime/mkpreempt.go index 987740c2f7..615ec1868c 100644 --- a/src/runtime/mkpreempt.go +++ b/src/runtime/mkpreempt.go @@ -342,6 +342,12 @@ func genARM64() { p("MOVD R29, -8(RSP)") // save frame pointer (only used on Linux) p("SUB $8, RSP, R29") // set up new frame pointer p("#endif") + // On darwin, save the LR again after decrementing SP. We run the + // signal handler on the G stack (as it doesn't support SA_ONSTACK), + // so any writes below SP may be clobbered. + p("#ifdef GOOS_darwin") + p("MOVD R30, (RSP)") + p("#endif") l.save() p("CALL ·asyncPreempt2(SB)") |