Documentation ¶
Overview ¶
Package processorfeatures provides details on the available processor features
Code generated using 'go generate'; DO NOT EDIT. hwcap2flags files contain the HWCAP flags for each architecture
Index ¶
- Constants
- Variables
- func IsMachineComplete(v string) (missing []uint32)
- func IsMachineFeaturePresent(i uint32) (bool, error)
- func IsProcessorFeaturePresent(i uint32) (bool, error)
- func IsVersionComplete(v string) (missing []uint32)
- func LoadHWCAP2() (uint32, error)
- func SetGOAMD64v() (v string, err error)
- func SetGOARMv() (v string, err error)
- type ProcessorFeature
Constants ¶
const ( AT_NULL = 0 AT_IGNORE = 1 AT_EXECFD = 2 AT_PHDR = 3 AT_PHENT = 4 AT_PHNUM = 5 AT_PAGESZ = 6 AT_BASE = 7 AT_FLAGS = 8 AT_ENTRY = 9 AT_NOTELF = 10 AT_UID = 11 AT_EUID = 12 AT_GID = 13 AT_EGID = 14 AT_CLKTCK = 17 AT_PLATFORM = 15 AT_HWCAP = 16 AT_FPUCW = 18 AT_DCACHEBSIZE = 19 AT_ICACHEBSIZE = 20 AT_UCACHEBSIZE = 21 AT_IGNOREPPC = 22 AT_SECURE = 23 AT_BASE_PLATFORM = 24 AT_RANDOM = 25 AT_HWCAP2 = 26 AT_EXECFN = 31 AT_SYSINFO = 32 AT_SYSINFO_EHDR = 33 AT_L1I_CACHESHAPE = 34 AT_L1D_CACHESHAPE = 35 AT_L2_CACHESHAPE = 36 AT_L3_CACHESHAPE = 37 AT_L1I_CACHESIZE = 40 AT_L1I_CACHEGEOMETRY = 41 AT_L1D_CACHESIZE = 42 AT_L1D_CACHEGEOMETRY = 43 AT_L2_CACHESIZE = 44 AT_L2_CACHEGEOMETRY = 45 AT_L3_CACHESIZE = 46 AT_L3_CACHEGEOMETRY = 47 AT_MINSIGSTKSZ = 51 )
Variables ¶
var Bits32 bool // true when 32 bits architecture
var LEndian bool // true when little (low) endian architecture
var MachineFeatures = []ProcessorFeature{
{0, "", "none", "NONE 0"},
{1, "", "64", "64 1"},
{2, "", "pc32", "PC32 2"},
{3, "", "got32", "GOT32 3"},
{4, "", "plt32", "PLT32 4"},
{5, "", "copy", "COPY 5"},
{6, "", "glob_dat", "GLOB_DAT 6"},
{7, "", "jump_slot", "JUMP_SLOT 7"},
{8, "", "relative", "RELATIVE 8"},
{9, "", "gotpcrel", "GOTPCREL 9"},
{10, "", "32", "32 10"},
{11, "", "32s", "32S 11"},
{12, "", "16", "16 12"},
{13, "", "pc16", "PC16 13"},
{14, "", "8", "8 14"},
{15, "", "pc8", "PC8 15"},
{16, "", "dtpmod64", "DTPMOD64 16"},
{17, "", "dtpoff64", "DTPOFF64 17"},
{18, "", "tpoff64", "TPOFF64 18"},
{19, "", "tlsgd", "TLSGD 19"},
{20, "", "tlsld", "TLSLD 20"},
{21, "", "dtpoff32", "DTPOFF32 21"},
{22, "", "gottpoff", "GOTTPOFF 22"},
{23, "", "tpoff32", "TPOFF32 23"},
{24, "", "pc64", "PC64 24"},
{25, "", "gotoff64", "GOTOFF64 25"},
{26, "", "gotpc32", "GOTPC32 26"},
{27, "", "got64", "GOT64 27"},
{28, "", "gotpcrel64", "GOTPCREL64 28"},
{29, "", "gotpc64", "GOTPC64 29"},
{30, "", "gotplt64", "GOTPLT64 30"},
{31, "", "pltoff64", "PLTOFF64 31"},
{32, "", "size32", "SIZE32 32"},
{33, "", "size64", "SIZE64 33"},
{34, "", "gotpc32_tlsdesc", "GOTPC32_TLSDESC 34"},
{35, "", "tlsdesc_call", "TLSDESC_CALL 35"},
{36, "", "tlsdesc", "TLSDESC 36"},
{37, "", "irelative", "IRELATIVE 37"},
{38, "", "relative64", "RELATIVE64 38"},
{41, "", "gotpcrelx", "GOTPCRELX 41"},
{42, "", "rex_gotpcrelx", "REX_GOTPCRELX 42"},
{43, "", "num", "NUM 43"},
}
var ProcessorFeatures = []ProcessorFeature{}/* 138 elements not displayed */
Functions ¶
func IsMachineComplete ¶
IsMachineComplete verifies all machine features listed for version v
func IsMachineFeaturePresent ¶
IsMachineFeaturePresent returns true when the feature identified by the number is present.
func IsProcessorFeaturePresent ¶
IsProcessorFeaturePresent returns true when the feature identified by the number is present.
func IsVersionComplete ¶
IsVersionComplete verifies all features listed for version v
func LoadHWCAP2 ¶
LoadHWCAP2 returns HWCAP2 as a uint64 by reading /proc/self/auxv. THe error is always returned. The caller can ignore the io.EOF when the value is not 0.
func SetGOAMD64v ¶
SetGOAMD64v sets GOAMD64 for the current go session. Default v1 is used when no higher version is complete. Version set is returned or an error.