1
0
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:
Harshavardhana
2016-06-25 00:25:28 -07:00
committed by Harshavardhana
parent 83ff4cf5f4
commit 3a46db1cb4
10 changed files with 1553 additions and 1456 deletions

View File

@@ -42,9 +42,8 @@
// rounds 2 & 12 are identical)
//
// func compressSSE(compressSSE(p []uint8, in, iv, t, f, shffle, out []uint64)
TEXT ·compressSSE(SB), 7, $0
// func blockSSE(p []uint8, in, iv, t, f, shffle, out []uint64)
TEXT ·blockSSE(SB), 7, $0
// REGISTER USE
// X0 - X7: v0 - v15
@@ -1888,3 +1887,4 @@ TEXT ·compressSSE(SB), 7, $0
MOVOU X3, 48(DX) // out[6]+out[7] = X3
RET