]> Cypherpunks.ru repositories - gostls13.git/blobdiff - test/nosplit.go
cmd/compile/internal/inline: score call sites exposed by inlines
[gostls13.git] / test / nosplit.go
index 218eb73727affe9739bd1a9830d3f479eb425315..e171d1da6618ec649274f36d5fed8d76ebb4a38f 100644 (file)
@@ -1,6 +1,7 @@
-// +build !nacl,!js,!aix,!gcflags_noopt,gc
 // run
 
+//go:build !nacl && !js && !aix && !wasip1 && !gcflags_noopt && gc
+
 // Copyright 2014 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
@@ -342,22 +343,15 @@ TestCases:
                                nosplit := m[3]
                                body := m[4]
 
-                               // The limit was originally 128 but is now 800 (928-128).
+                               // The limit was originally 128 but is now 800.
                                // Instead of rewriting the test cases above, adjust
                                // the first nosplit frame to use up the extra bytes.
                                // This isn't exactly right because we could have
                                // nosplit -> split -> nosplit, but it's good enough.
                                if !adjusted && nosplit != "" {
+                                       const stackNosplitBase = 800 // internal/abi.StackNosplitBase
                                        adjusted = true
-                                       size += (928 - 128) - 128
-                                       // Noopt builds have a larger stackguard.
-                                       // See ../src/cmd/dist/buildruntime.go:stackGuardMultiplier
-                                       // This increase is included in objabi.StackGuard
-                                       for _, s := range strings.Split(os.Getenv("GO_GCFLAGS"), " ") {
-                                               if s == "-N" {
-                                                       size += 928
-                                               }
-                                       }
+                                       size += stackNosplitBase - 128
                                }
 
                                if nosplit != "" {