github.com/huandu/go@v0.0.0-20151114150818-04e615e41150/src/cmd/internal/obj/stack.go (about) 1 // Copyright 2011 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Inferno utils/5l/span.c 6 // http://code.google.com/p/inferno-os/source/browse/utils/5l/span.c 7 // 8 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. 9 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) 10 // Portions Copyright © 1997-1999 Vita Nuova Limited 11 // Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com) 12 // Portions Copyright © 2004,2006 Bruce Ellis 13 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) 14 // Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others 15 // Portions Copyright © 2009 The Go Authors. All rights reserved. 16 // 17 // Permission is hereby granted, free of charge, to any person obtaining a copy 18 // of this software and associated documentation files (the "Software"), to deal 19 // in the Software without restriction, including without limitation the rights 20 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 21 // copies of the Software, and to permit persons to whom the Software is 22 // furnished to do so, subject to the following conditions: 23 // 24 // The above copyright notice and this permission notice shall be included in 25 // all copies or substantial portions of the Software. 26 // 27 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 28 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 29 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 30 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 31 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 32 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 33 // THE SOFTWARE. 34 35 package obj 36 37 // For the linkers. Must match Go definitions. 38 // TODO(rsc): Share Go definitions with linkers directly. 39 40 const ( 41 STACKSYSTEM = 0 42 StackSystem = STACKSYSTEM 43 StackBig = 4096 44 StackGuard = 640*stackGuardMultiplier + StackSystem 45 StackSmall = 128 46 StackLimit = StackGuard - StackSystem - StackSmall 47 ) 48 49 const ( 50 StackPreempt = -1314 // 0xfff...fade 51 )