cpu: Remove pkg/cpu in favor of better klauspost/cpuid.

Fixes #1128
This commit is contained in:
Harshavardhana
2016-02-15 12:45:02 -08:00
parent a173313bc2
commit 9e10ee7e47
24 changed files with 2750 additions and 200 deletions
+17
View File
@@ -0,0 +1,17 @@
// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
// +build 386 amd64
package cpuid
func asmCpuid(op uint32) (eax, ebx, ecx, edx uint32)
func asmCpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32)
func asmXgetbv(index uint32) (eax, edx uint32)
func asmRdtscpAsm() (eax, ebx, ecx, edx uint32)
func initCPU() {
cpuid = asmCpuid
cpuidex = asmCpuidex
xgetbv = asmXgetbv
rdtscpAsm = asmRdtscpAsm
}