1
0
mirror of https://github.com/fumiama/blake2b-simd.git synced 2026-06-05 02:00:26 +08:00
Files
blake2b-simd/cpuid_386.s
Harshavardhana 3a46db1cb4 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.
2016-06-28 02:51:14 -07:00

16 lines
363 B
ArmAsm

// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
// +build 386,!gccgo
// func cpuid(op uint32) (eax, ebx, ecx, edx uint32)
TEXT ·cpuid(SB), 7, $0
XORL CX, CX
MOVL op+0(FP), AX
CPUID
MOVL AX, eax+4(FP)
MOVL BX, ebx+8(FP)
MOVL CX, ecx+12(FP)
MOVL DX, edx+16(FP)
RET