blob: 10b0173f601d5d803fca01c842185fbd3badc014 [file] [log] [blame]
Michael Matloob432cb662015-11-11 12:39:30 -05001// Copyright 2014 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
5package sys
6
7// Declarations for runtime services implemented in C or assembly.
8
9const PtrSize = 4 << (^uintptr(0) >> 63) // unsafe.Sizeof(uintptr(0)) but an ideal const
10const RegSize = 4 << (^Uintreg(0) >> 63) // unsafe.Sizeof(uintreg(0)) but an ideal const
11const SpAlign = 1*(1-GoarchArm64) + 16*GoarchArm64 // SP alignment: 1 normally, 16 for ARM64
Russ Cox83960152018-01-08 11:59:29 -050012
13var DefaultGoroot string // set at link time
Clément Chigot20ac64a2019-01-09 14:05:17 +010014
15// AIX requires a larger stack for syscalls.
16const StackGuardMultiplier = StackGuardMultiplierDefault*(1-GoosAix) + 2*GoosAix