1// Generated, DO NOT EDIT,
2// but copy it to your own project and rename the package.
3// See more at http://github.com/klauspost/cpuid
4
5//+build 386,!gccgo,!noasm amd64,!gccgo,!noasm,!appengine
6
7package cpuid
8
9func asmCpuid(op uint32) (eax, ebx, ecx, edx uint32)
10func asmCpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32)
11func asmXgetbv(index uint32) (eax, edx uint32)
12func asmRdtscpAsm() (eax, ebx, ecx, edx uint32)
13
14func initCPU() {
15	cpuid = asmCpuid
16	cpuidex = asmCpuidex
17	xgetbv = asmXgetbv
18	rdtscpAsm = asmRdtscpAsm
19}
20
21func addInfo(c *cpuInfo) {
22	c.maxFunc = maxFunctionID()
23	c.maxExFunc = maxExtendedFunction()
24	c.brandname = brandName()
25	c.cacheline = cacheLine()
26	c.family, c.model = familyModel()
27	c.features = support()
28	c.sgx = hasSGX(c.features&sgx != 0, c.features&sgxlc != 0)
29	c.threadspercore = threadsPerCore()
30	c.logicalcores = logicalCores()
31	c.physicalcores = physicalCores()
32	c.vendorid, c.vendorstring = vendorID()
33	c.hz = hertz(c.brandname)
34	c.cacheSize()
35}
36