blake2b_amd64.go 558 B

1234567891011121314151617181920212223
  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. // +build !go1.7,amd64,!gccgo,!appengine
  5. package blake2b
  6. var useSSE4 = supportSSE4()
  7. //go:noescape
  8. func supportSSE4() bool
  9. //go:noescape
  10. func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
  11. func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) {
  12. if useSSE4 {
  13. hashBlocksSSE4(h, c, flag, blocks)
  14. } else {
  15. hashBlocksGeneric(h, c, flag, blocks)
  16. }
  17. }