mirror of
https://github.com/fumiama/unibase2n.git
synced 2026-06-24 05:18:11 +08:00
rm cpuid
This commit is contained in:
12
cpuid.go
12
cpuid.go
@@ -1,12 +0,0 @@
|
|||||||
//go:build amd64
|
|
||||||
// +build amd64
|
|
||||||
|
|
||||||
package unibase2n
|
|
||||||
|
|
||||||
func cpuid(op uint32) (eax, ebx, ecx, edx uint32)
|
|
||||||
|
|
||||||
// True when SSE2 instructions are available.
|
|
||||||
var canusesse2 = func() bool {
|
|
||||||
_, _, c, _ := cpuid(1)
|
|
||||||
return c&(1<<26) > 0
|
|
||||||
}()
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
//go:build amd64
|
|
||||||
// +build amd64
|
|
||||||
|
|
||||||
// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
|
|
||||||
|
|
||||||
// func cpuid(op uint32) (eax, ebx, ecx, edx uint32)
|
|
||||||
TEXT ·cpuid(SB), 7, $0
|
|
||||||
XORQ CX, CX
|
|
||||||
MOVL op+0(FP), AX
|
|
||||||
CPUID
|
|
||||||
MOVL AX, eax+8(FP)
|
|
||||||
MOVL BX, ebx+12(FP)
|
|
||||||
MOVL CX, ecx+16(FP)
|
|
||||||
MOVL DX, edx+20(FP)
|
|
||||||
RET
|
|
||||||
Reference in New Issue
Block a user