Debian Codegraph @

libgo/go/runtime/internal/sys/consts.go

raw
1 // 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
5 package sys
6
7 import (
8 "internal/goarch"
9 "internal/goos"
10 )
11
12 // AIX requires a larger stack for syscalls.
13 const StackGuardMultiplier = StackGuardMultiplierDefault*(1-goos.IsAix) + 2*goos.IsAix
14
15 // DefaultPhysPageSize is the default physical page size.
16 const DefaultPhysPageSize = goarch.DefaultPhysPageSize
17
18 // PCQuantum is the minimal unit for a program counter (1 on x86, 4 on most other systems).
19 // The various PC tables record PC deltas pre-divided by PCQuantum.
20 const PCQuantum = goarch.PCQuantum
21
22 // Int64Align is the required alignment for a 64-bit integer (4 on 32-bit systems, 8 on 64-bit).
23 const Int64Align = goarch.PtrSize
24
25 // MinFrameSize is the size of the system-reserved words at the bottom
26 // of a frame (just above the architectural stack pointer).
27 // It is zero on x86 and PtrSize on most non-x86 (LR-based) systems.
28 // On PowerPC it is larger, to cover three more reserved words:
29 // the compiler word, the link editor word, and the TOC save word.
30 const MinFrameSize = goarch.MinFrameSize
31
32 // StackAlign is the required alignment of the SP register.
33 // The stack must be at least word aligned, but some architectures require more.
34 const StackAlign = goarch.StackAlign