Skip to content

Commit

Permalink
f cpu feature det
Browse files Browse the repository at this point in the history
  • Loading branch information
davecgh committed Jul 15, 2024
1 parent 62a1344 commit cf3c2a3
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions crypto/blake256/internal/compress/blocksisa_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,25 @@ package compress
//
// The parameters are:
//
// h: the chain value
// s: the salt
// state: the block compression state with the chain value and salt
// msg: the padded message to compress (must be at least 64 bytes)
// counter: the total number of message bits hashed so far
// scratch: an array that might be overwritten and used for scratch space
//
// It will panic if the provided message block does not have at least 64 bytes.
//
// The chain value is updated in place.
func Blocks(h *[8]uint32, s *[4]uint32, msg []byte, counter uint64, scratch *[16]uint32) {
// The chain value in the passed state is updated in place.
func Blocks(state *State, msg []byte, counter uint64) {
switch {
case hasAVX:
blocksAVX(h, s, msg, counter, scratch)
// blocksAVX(h, s, msg, counter, scratch)
fallthrough
case hasSSE41:
blocksSSE41(h, s, msg, counter, scratch)
// blocksSSE41(h, s, msg, counter, scratch)
fallthrough
case hasSSE2:
blocksSSE2(h, s, msg, counter, scratch)
// blocksSSE2(h, s, msg, counter, scratch)
fallthrough
default:
blocksGeneric(h, s, msg, counter, scratch)
blocksGeneric(state, msg, counter)
}
}

0 comments on commit cf3c2a3

Please sign in to comment.