diff options
| author | qmuntal <quimmuntal@gmail.com> | 2022-12-23 13:22:00 +0100 |
|---|---|---|
| committer | Quim Muntal <quimmuntal@gmail.com> | 2023-01-24 19:29:51 +0000 |
| commit | 083d94f69c35b2244ea43738c1d28aa5d9e6d567 (patch) | |
| tree | cbcc4cf9b4eb2a6f7e351423c9e2bcb61135de37 /src/runtime/wincallback.go | |
| parent | 27500d88f082d2789f90a644962684b4118c4d44 (diff) | |
| download | go-083d94f69c35b2244ea43738c1d28aa5d9e6d567.tar.xz | |
runtime: use explicit NOFRAME on windows/amd64
This CL marks non-leaf nosplit assembly functions as NOFRAME to avoid
relying on the implicit amd64 NOFRAME heuristic, where NOSPLIT functions
without stack were also marked as NOFRAME.
Updates #57302
Updates #40044
Change-Id: Ia4d26f8420dcf2b54528969ffbf40a73f1315d61
Reviewed-on: https://go-review.googlesource.com/c/go/+/459395
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/runtime/wincallback.go')
| -rw-r--r-- | src/runtime/wincallback.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/wincallback.go b/src/runtime/wincallback.go index 9ec2027f97..14847db3fd 100644 --- a/src/runtime/wincallback.go +++ b/src/runtime/wincallback.go @@ -23,6 +23,8 @@ func genasm386Amd64() { //go:build 386 || amd64 +#include "textflag.h" + // runtime·callbackasm is called by external code to // execute Go implemented callback function. It is not // called from the start, instead runtime·compilecallback @@ -31,7 +33,7 @@ func genasm386Amd64() { // CALL instruction in runtime·callbackasm. This determines // which Go callback function is executed later on. -TEXT runtime·callbackasm(SB),7,$0 +TEXT runtime·callbackasm(SB),NOSPLIT|NOFRAME,$0 `) for i := 0; i < maxCallback; i++ { buf.WriteString("\tCALL\truntime·callbackasm1(SB)\n") |
