-// +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.
case "mips64", "mips64le":
ptrSize = 8
fmt.Fprintf(&buf, "#define REGISTER (R0)\n")
+ case "loong64":
+ ptrSize = 8
+ fmt.Fprintf(&buf, "#define REGISTER (R0)\n")
case "ppc64", "ppc64le":
ptrSize = 8
fmt.Fprintf(&buf, "#define REGISTER (CTR)\n")
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 != "" {