Skip to content

Commit

Permalink
runtime: use explicit NOFRAME on plan9/amd64
Browse files Browse the repository at this point in the history
This CL marks some plan9 assembly functions as NOFRAME to avoid
relying on the implicit amd64 NOFRAME heuristic, where NOSPLIT functions
without stack were also marked as NOFRAME.

Updates #58378

Change-Id: Ic8c9ab5c1a0897bebc6c1419ddc903a7492a1b0a
Reviewed-on: https://go-review.googlesource.com/c/go/+/466457
TryBot-Bypass: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
  • Loading branch information
qmuntal committed Mar 1, 2023
1 parent a4b66b1 commit ea75b94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cmd/internal/obj/x86/obj6.go
Expand Up @@ -617,7 +617,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) {
var usefpheuristic bool
switch ctxt.Headtype {
case objabi.Hwindows, objabi.Hdarwin, objabi.Hlinux, objabi.Hdragonfly,
objabi.Hfreebsd, objabi.Hnetbsd, objabi.Hopenbsd, objabi.Hsolaris:
objabi.Hfreebsd, objabi.Hnetbsd, objabi.Hopenbsd, objabi.Hsolaris, objabi.Hplan9:
default:
usefpheuristic = true
}
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/sys_plan9_amd64.s
Expand Up @@ -166,7 +166,7 @@ TEXT runtime·settls(SB),NOSPLIT,$0
RET

// void sigtramp(void *ureg, int8 *note)
TEXT runtime·sigtramp(SB),NOSPLIT,$0
TEXT runtime·sigtramp(SB),NOSPLIT|NOFRAME,$0
get_tls(AX)

// check that g exists
Expand Down

0 comments on commit ea75b94

Please sign in to comment.