gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

blake2b_amd64.go (603B)


      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 // +build !go1.7,amd64,gc,!purego
      7 
      8 package blake2b
      9 
     10 import "golang.org/x/sys/cpu"
     11 
     12 func init() {
     13 	useSSE4 = cpu.X86.HasSSE41
     14 }
     15 
     16 //go:noescape
     17 func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
     18 
     19 func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) {
     20 	if useSSE4 {
     21 		hashBlocksSSE4(h, c, flag, blocks)
     22 	} else {
     23 		hashBlocksGeneric(h, c, flag, blocks)
     24 	}
     25 }