Documentation ¶
Overview ¶
package sys contains system- and configuration- and architecture-specific constants used by the runtime.
Index ¶
- Constants
- Variables
- func Bswap32(x uint32) uint32
- func Bswap64(x uint64) uint64
- func Ctz32(x uint32) int
- func Ctz64(x uint64) int
- func Ctz8(x uint8) int
- func LeadingZeros64(x uint64) int
- func LeadingZeros8(x uint8) int
- func Len64(x uint64) (n int)
- func Len8(x uint8) int
- func OnesCount64(x uint64) int
- func TrailingZeros64(x uint64) int
- func TrailingZeros8(x uint8) int
Constants ¶
const PtrSize = 4 << (^uintptr(0) >> 63) // unsafe.Sizeof(uintptr(0)) but an ideal const
const RegSize = 4 << (^Uintreg(0) >> 63) // unsafe.Sizeof(uintreg(0)) but an ideal const
const SpAlign = 1*(1-GoarchArm64) + 16*GoarchArm64 // SP alignment: 1 normally, 16 for ARM64
Variables ¶
var DefaultGoroot string // set at link time
Functions ¶
func Bswap64 ¶
Bswap64 returns its input with byte order reversed 0x0102030405060708 -> 0x0807060504030201
func LeadingZeros64 ¶
LeadingZeros64 returns the number of leading zero bits in x; the result is 64 for x == 0.
func LeadingZeros8 ¶
LeadingZeros8 returns the number of leading zero bits in x; the result is 8 for x == 0.
func Len64 ¶
len64 returns the minimum number of bits required to represent x; the result is 0 for x == 0.
func Len8 ¶
Len8 returns the minimum number of bits required to represent x; the result is 0 for x == 0.
func OnesCount64 ¶
OnesCount64 returns the number of one bits ("population count") in x.
func TrailingZeros64 ¶
TrailingZeros64 returns the number of trailing zero bits in x; the result is 64 for x == 0.
func TrailingZeros8 ¶
TrailingZeros8 returns the number of trailing zero bits in x; the result is 8 for x == 0.
Types ¶
This section is empty.