]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: use explicit NOFRAME on plan9/amd64
authorqmuntal <quimmuntal@gmail.com>
Wed, 8 Feb 2023 15:47:16 +0000 (16:47 +0100)
committerQuim Muntal <quimmuntal@gmail.com>
Wed, 1 Mar 2023 16:41:22 +0000 (16:41 +0000)
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>
src/cmd/internal/obj/x86/obj6.go
src/runtime/sys_plan9_amd64.s

index 21126adfda49131c1f81d89b7e50f4b4bc0eb417..395a0a791965091654cfe25d3b63f661e6e3d986 100644 (file)
@@ -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
        }
index 638300dfb935481b786d84beeaa4716a1cf01536..a53f9201f47cbf9381aba27c438b2a423ab2a98b 100644 (file)
@@ -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