mirror of
https://github.com/minio/minio.git
synced 2026-11-13 22:45:16 +00:00
Implement new CPU detection using cpuid, cpuidex plan9 instructions from klauspost/cpuid project, remove C code
This commit is contained in:
1 parent
9977888972
commit
aa67a19e99
10 files changed
+44
-74
No files matched your search
@@ -0,0 +1,27 @@
|
||||
// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
|
||||
//
|
||||
// See https://github.com/klauspost/cpuid/blob/master/LICENSE
|
||||
//
|
||||
// Using this inside Minio with modifications
|
||||
//
|
||||
|
||||
// func cpuid(op uint32) (eax, ebx, ecx, edx uint32)
|
||||
TEXT ·cpuid(SB),7,$0
|
||||
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
|
||||
|
||||
// func cpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32)
|
||||
TEXT ·cpuidex(SB),7,$0
|
||||
MOVL op+0(FP),AX
|
||||
MOVL op2+4(FP),CX
|
||||
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