mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore] update dependencies, bump to Go 1.19.1 (#826)
* update dependencies, bump Go version to 1.19 * bump test image Go version * update golangci-lint * update gotosocial-drone-build * sign * linting, go fmt * update swagger docs * update swagger docs * whitespace * update contributing.md * fuckin whoopsie doopsie * linterino, linteroni * fix followrequest test not starting processor * fix other api/client tests not starting processor * fix remaining tests where processor not started * bump go-runners version * don't check last-webfingered-at, processor may have updated this * update swagger command * update bun to latest version * fix embed to work the same as before with new bun Signed-off-by: kim <grufwub@gmail.com> Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
This commit is contained in:
34
vendor/github.com/minio/sha256-simd/sha256.go
generated
vendored
34
vendor/github.com/minio/sha256-simd/sha256.go
generated
vendored
@ -21,6 +21,8 @@ import (
|
||||
"encoding/binary"
|
||||
"hash"
|
||||
"runtime"
|
||||
|
||||
"github.com/klauspost/cpuid/v2"
|
||||
)
|
||||
|
||||
// Size - The size of a SHA256 checksum in bytes.
|
||||
@ -67,10 +69,6 @@ type blockfuncType int
|
||||
|
||||
const (
|
||||
blockfuncGeneric blockfuncType = iota
|
||||
blockfuncAvx512 blockfuncType = iota
|
||||
blockfuncAvx2 blockfuncType = iota
|
||||
blockfuncAvx blockfuncType = iota
|
||||
blockfuncSsse blockfuncType = iota
|
||||
blockfuncSha blockfuncType = iota
|
||||
blockfuncArm blockfuncType = iota
|
||||
)
|
||||
@ -78,26 +76,24 @@ const (
|
||||
var blockfunc blockfuncType
|
||||
|
||||
func init() {
|
||||
is386bit := runtime.GOARCH == "386"
|
||||
isARM := runtime.GOARCH == "arm"
|
||||
blockfunc = blockfuncGeneric
|
||||
switch {
|
||||
case is386bit || isARM:
|
||||
blockfunc = blockfuncGeneric
|
||||
case sha && ssse3 && sse41:
|
||||
case hasSHAExtensions():
|
||||
blockfunc = blockfuncSha
|
||||
case avx2:
|
||||
blockfunc = blockfuncAvx2
|
||||
case avx:
|
||||
blockfunc = blockfuncAvx
|
||||
case ssse3:
|
||||
blockfunc = blockfuncSsse
|
||||
case armSha:
|
||||
case hasArmSha2():
|
||||
blockfunc = blockfuncArm
|
||||
default:
|
||||
blockfunc = blockfuncGeneric
|
||||
}
|
||||
}
|
||||
|
||||
var avx512 = cpuid.CPU.Supports(cpuid.AVX512F, cpuid.AVX512DQ, cpuid.AVX512BW, cpuid.AVX512VL)
|
||||
|
||||
// hasSHAExtensions return whether the cpu supports SHA extensions.
|
||||
func hasSHAExtensions() bool {
|
||||
return cpuid.CPU.Supports(cpuid.SHA, cpuid.SSSE3, cpuid.SSE4) && runtime.GOARCH == "amd64"
|
||||
}
|
||||
|
||||
// New returns a new hash.Hash computing the SHA256 checksum.
|
||||
func New() hash.Hash {
|
||||
if blockfunc != blockfuncGeneric {
|
||||
@ -278,12 +274,6 @@ func (d *digest) checkSum() (digest [Size]byte) {
|
||||
func block(dig *digest, p []byte) {
|
||||
if blockfunc == blockfuncSha {
|
||||
blockShaGo(dig, p)
|
||||
} else if blockfunc == blockfuncAvx2 {
|
||||
blockAvx2Go(dig, p)
|
||||
} else if blockfunc == blockfuncAvx {
|
||||
blockAvxGo(dig, p)
|
||||
} else if blockfunc == blockfuncSsse {
|
||||
blockSsseGo(dig, p)
|
||||
} else if blockfunc == blockfuncArm {
|
||||
blockArmGo(dig, p)
|
||||
} else if blockfunc == blockfuncGeneric {
|
||||
|
Reference in New Issue
Block a user