1
0
mirror of https://github.com/fumiama/go-base16384.git synced 2026-06-22 04:02:56 +08:00

fix generic panic, add movbe check

This commit is contained in:
源文雨
2022-09-17 20:38:32 +08:00
parent ceb3054caa
commit b75d6ab6d8
6 changed files with 90 additions and 43 deletions

12
cpuid.go Normal file
View File

@@ -0,0 +1,12 @@
//go:build amd64
// +build amd64
package base14
func cpuid(op uint32) (eax, ebx, ecx, edx uint32)
// True when MOVBEx instructions are available.
var movbe = func() bool {
_, _, c, _ := cpuid(1)
return c&(1<<22) > 0
}()