diff options
| author | Keith Randall <khr@golang.org> | 2025-06-18 15:14:00 -0700 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2025-07-24 16:06:16 -0700 |
| commit | 076eae436e63f33cc5999f8e2e1822f3396af3b1 (patch) | |
| tree | 636664e36983c0acd21e26def8c372b10448952d /src/cmd/internal | |
| parent | f703dc5befdad9390decc251e8b1f5e0f061c088 (diff) | |
| download | go-076eae436e63f33cc5999f8e2e1822f3396af3b1.tar.xz | |
cmd/compile: move amd64 and 386 over to new bounds check strategy
Change-Id: I13f54f04ccb8452e625dba4249e0d56bafd1fad8
Reviewed-on: https://go-review.googlesource.com/c/go/+/682397
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/internal')
| -rw-r--r-- | src/cmd/internal/obj/x86/obj6.go | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/cmd/internal/obj/x86/obj6.go b/src/cmd/internal/obj/x86/obj6.go index 53c0918254..1208f3d31e 100644 --- a/src/cmd/internal/obj/x86/obj6.go +++ b/src/cmd/internal/obj/x86/obj6.go @@ -653,6 +653,11 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) { case obj.ACALL: // Treat common runtime calls that take no arguments // the same as duffcopy and duffzero. + + // Note that of these functions, panicBounds does + // use some stack, but its stack together with the + // < StackSmall used by this function is still + // less than stackNosplit. See issue 31219. if !isZeroArgRuntimeCall(q.To.Sym) { leaf = false break LeafSearch @@ -969,13 +974,7 @@ func isZeroArgRuntimeCall(s *obj.LSym) bool { return false } switch s.Name { - case "runtime.panicdivide", "runtime.panicwrap", "runtime.panicshift": - return true - } - if strings.HasPrefix(s.Name, "runtime.panicIndex") || strings.HasPrefix(s.Name, "runtime.panicSlice") { - // These functions do take arguments (in registers), - // but use no stack before they do a stack check. We - // should include them. See issue 31219. + case "runtime.panicdivide", "runtime.panicwrap", "runtime.panicshift", "runtime.panicBounds", "runtime.panicExtend": return true } return false |
