mirror of
https://github.com/fumiama/blake2b-simd.git
synced 2026-06-09 12:30:25 +08:00
Detect SSE automatically and enable corresponding optimized code path.
With this change, following happens.
```
if sse {
compressSSE()
return
}
compressGeneric()
```
compressGeneric is used as a fallback when SSE is not detected.
This commit is contained in:
committed by
Harshavardhana
parent
83ff4cf5f4
commit
3a46db1cb4
14
cpuid_amd64.s
Normal file
14
cpuid_amd64.s
Normal file
@@ -0,0 +1,14 @@
|
||||
// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
|
||||
|
||||
// +build amd64,!gccgo
|
||||
|
||||
// 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