aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/crypto/blake2b/blake2b_amd64.go')
-rw-r--r--vendor/golang.org/x/crypto/blake2b/blake2b_amd64.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.go b/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.go
new file mode 100644
index 0000000..1d0770a
--- /dev/null
+++ b/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.go
@@ -0,0 +1,24 @@
1// Copyright 2016 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5//go:build !go1.7 && amd64 && gc && !purego
6
7package blake2b
8
9import "golang.org/x/sys/cpu"
10
11func init() {
12 useSSE4 = cpu.X86.HasSSE41
13}
14
15//go:noescape
16func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
17
18func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) {
19 if useSSE4 {
20 hashBlocksSSE4(h, c, flag, blocks)
21 } else {
22 hashBlocksGeneric(h, c, flag, blocks)
23 }
24}