aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorqmuntal <quimmuntal@gmail.com>2023-02-08 16:47:16 +0100
committerQuim Muntal <quimmuntal@gmail.com>2023-03-01 16:41:22 +0000
commitea75b9458fed588e84abeacfc9319abb2a51ce0c (patch)
tree1b2ffe7d98a1013d499e1677e5c49061786921e9 /src
parenta4b66b14e217391875921d7a87b33adf2eed7b18 (diff)
downloadgo-ea75b9458fed588e84abeacfc9319abb2a51ce0c.tar.xz
runtime: use explicit NOFRAME on plan9/amd64
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>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/internal/obj/x86/obj6.go2
-rw-r--r--src/runtime/sys_plan9_amd64.s2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/internal/obj/x86/obj6.go b/src/cmd/internal/obj/x86/obj6.go
index 21126adfda..395a0a7919 100644
--- a/src/cmd/internal/obj/x86/obj6.go
+++ b/src/cmd/internal/obj/x86/obj6.go
@@ -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
}
diff --git a/src/runtime/sys_plan9_amd64.s b/src/runtime/sys_plan9_amd64.s
index 638300dfb9..a53f9201f4 100644
--- a/src/runtime/sys_plan9_amd64.s
+++ b/src/runtime/sys_plan9_amd64.s
@@ -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