sys

package
v0.0.0-...-833ed6d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2019 License: GPL-2.0, BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

package sys contains system- and configuration- and architecture-specific constants used by the runtime.

Index

Constants

View Source
const PtrSize = 4 << (^uintptr(0) >> 63) // unsafe.Sizeof(uintptr(0)) but an ideal const
View Source
const RegSize = 4 << (^Uintreg(0) >> 63) // unsafe.Sizeof(uintreg(0)) but an ideal const
View Source
const SpAlign = 1*(1-GoarchArm64) + 16*GoarchArm64 // SP alignment: 1 normally, 16 for ARM64

Variables

View Source
var DefaultGoroot string // set at link time

Functions

func Bswap32

func Bswap32(x uint32) uint32

Bswap32 returns its input with byte order reversed 0x01020304 -> 0x04030201

func Bswap64

func Bswap64(x uint64) uint64

Bswap64 returns its input with byte order reversed 0x0102030405060708 -> 0x0807060504030201

func Ctz32

func Ctz32(x uint32) int

Ctz32 counts trailing (low-order) zeroes, and if all are zero, then 32.

func Ctz64

func Ctz64(x uint64) int

Ctz64 counts trailing (low-order) zeroes, and if all are zero, then 64.

func Ctz8

func Ctz8(x uint8) int

Ctz8 returns the number of trailing zero bits in x; the result is 8 for x == 0.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL