diff options
author | 2025-03-09 17:47:56 +0100 | |
---|---|---|
committer | 2025-03-10 01:59:49 +0100 | |
commit | 3ac1ee16f377d31a0fb80c8dae28b6239ac4229e (patch) | |
tree | f61faa581feaaeaba2542b9f2b8234a590684413 /vendor/golang.org/x/crypto/blake2s | |
parent | [chore] update URLs to forked source (diff) | |
download | gotosocial-3ac1ee16f377d31a0fb80c8dae28b6239ac4229e.tar.xz |
[chore] remove vendor
Diffstat (limited to 'vendor/golang.org/x/crypto/blake2s')
-rw-r--r-- | vendor/golang.org/x/crypto/blake2s/blake2s.go | 254 | ||||
-rw-r--r-- | vendor/golang.org/x/crypto/blake2s/blake2s_386.go | 32 | ||||
-rw-r--r-- | vendor/golang.org/x/crypto/blake2s/blake2s_386.s | 429 | ||||
-rw-r--r-- | vendor/golang.org/x/crypto/blake2s/blake2s_amd64.go | 37 | ||||
-rw-r--r-- | vendor/golang.org/x/crypto/blake2s/blake2s_amd64.s | 2173 | ||||
-rw-r--r-- | vendor/golang.org/x/crypto/blake2s/blake2s_generic.go | 178 | ||||
-rw-r--r-- | vendor/golang.org/x/crypto/blake2s/blake2s_ref.go | 17 | ||||
-rw-r--r-- | vendor/golang.org/x/crypto/blake2s/blake2x.go | 178 |
8 files changed, 0 insertions, 3298 deletions
diff --git a/vendor/golang.org/x/crypto/blake2s/blake2s.go b/vendor/golang.org/x/crypto/blake2s/blake2s.go deleted file mode 100644 index c25d07d4f..000000000 --- a/vendor/golang.org/x/crypto/blake2s/blake2s.go +++ /dev/null @@ -1,254 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package blake2s implements the BLAKE2s hash algorithm defined by RFC 7693 -// and the extendable output function (XOF) BLAKE2Xs. -// -// BLAKE2s is optimized for 8- to 32-bit platforms and produces digests of any -// size between 1 and 32 bytes. -// For a detailed specification of BLAKE2s see https://blake2.net/blake2.pdf -// and for BLAKE2Xs see https://blake2.net/blake2x.pdf -// -// If you aren't sure which function you need, use BLAKE2s (Sum256 or New256). -// If you need a secret-key MAC (message authentication code), use the New256 -// function with a non-nil key. -// -// BLAKE2X is a construction to compute hash values larger than 32 bytes. It -// can produce hash values between 0 and 65535 bytes. -package blake2s - -import ( - "crypto" - "encoding/binary" - "errors" - "hash" -) - -const ( - // The blocksize of BLAKE2s in bytes. - BlockSize = 64 - - // The hash size of BLAKE2s-256 in bytes. - Size = 32 - - // The hash size of BLAKE2s-128 in bytes. - Size128 = 16 -) - -var errKeySize = errors.New("blake2s: invalid key size") - -var iv = [8]uint32{ - 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, - 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19, -} - -// Sum256 returns the BLAKE2s-256 checksum of the data. -func Sum256(data []byte) [Size]byte { - var sum [Size]byte - checkSum(&sum, Size, data) - return sum -} - -// New256 returns a new hash.Hash computing the BLAKE2s-256 checksum. A non-nil -// key turns the hash into a MAC. The key must between zero and 32 bytes long. -// When the key is nil, the returned hash.Hash implements BinaryMarshaler -// and BinaryUnmarshaler for state (de)serialization as documented by hash.Hash. -func New256(key []byte) (hash.Hash, error) { return newDigest(Size, key) } - -func init() { - crypto.RegisterHash(crypto.BLAKE2s_256, func() hash.Hash { - h, _ := New256(nil) - return h - }) -} - -// New128 returns a new hash.Hash computing the BLAKE2s-128 checksum given a -// non-empty key. Note that a 128-bit digest is too small to be secure as a -// cryptographic hash and should only be used as a MAC, thus the key argument -// is not optional. -func New128(key []byte) (hash.Hash, error) { - if len(key) == 0 { - return nil, errors.New("blake2s: a key is required for a 128-bit hash") - } - return newDigest(Size128, key) -} - -func newDigest(hashSize int, key []byte) (*digest, error) { - if len(key) > Size { - return nil, errKeySize - } - d := &digest{ - size: hashSize, - keyLen: len(key), - } - copy(d.key[:], key) - d.Reset() - return d, nil -} - -func checkSum(sum *[Size]byte, hashSize int, data []byte) { - var ( - h [8]uint32 - c [2]uint32 - ) - - h = iv - h[0] ^= uint32(hashSize) | (1 << 16) | (1 << 24) - - if length := len(data); length > BlockSize { - n := length &^ (BlockSize - 1) - if length == n { - n -= BlockSize - } - hashBlocks(&h, &c, 0, data[:n]) - data = data[n:] - } - - var block [BlockSize]byte - offset := copy(block[:], data) - remaining := uint32(BlockSize - offset) - - if c[0] < remaining { - c[1]-- - } - c[0] -= remaining - - hashBlocks(&h, &c, 0xFFFFFFFF, block[:]) - - for i, v := range h { - binary.LittleEndian.PutUint32(sum[4*i:], v) - } -} - -type digest struct { - h [8]uint32 - c [2]uint32 - size int - block [BlockSize]byte - offset int - - key [BlockSize]byte - keyLen int -} - -const ( - magic = "b2s" - marshaledSize = len(magic) + 8*4 + 2*4 + 1 + BlockSize + 1 -) - -func (d *digest) MarshalBinary() ([]byte, error) { - if d.keyLen != 0 { - return nil, errors.New("crypto/blake2s: cannot marshal MACs") - } - b := make([]byte, 0, marshaledSize) - b = append(b, magic...) - for i := 0; i < 8; i++ { - b = appendUint32(b, d.h[i]) - } - b = appendUint32(b, d.c[0]) - b = appendUint32(b, d.c[1]) - // Maximum value for size is 32 - b = append(b, byte(d.size)) - b = append(b, d.block[:]...) - b = append(b, byte(d.offset)) - return b, nil -} - -func (d *digest) UnmarshalBinary(b []byte) error { - if len(b) < len(magic) || string(b[:len(magic)]) != magic { - return errors.New("crypto/blake2s: invalid hash state identifier") - } - if len(b) != marshaledSize { - return errors.New("crypto/blake2s: invalid hash state size") - } - b = b[len(magic):] - for i := 0; i < 8; i++ { - b, d.h[i] = consumeUint32(b) - } - b, d.c[0] = consumeUint32(b) - b, d.c[1] = consumeUint32(b) - d.size = int(b[0]) - b = b[1:] - copy(d.block[:], b[:BlockSize]) - b = b[BlockSize:] - d.offset = int(b[0]) - return nil -} - -func (d *digest) BlockSize() int { return BlockSize } - -func (d *digest) Size() int { return d.size } - -func (d *digest) Reset() { - d.h = iv - d.h[0] ^= uint32(d.size) | (uint32(d.keyLen) << 8) | (1 << 16) | (1 << 24) - d.offset, d.c[0], d.c[1] = 0, 0, 0 - if d.keyLen > 0 { - d.block = d.key - d.offset = BlockSize - } -} - -func (d *digest) Write(p []byte) (n int, err error) { - n = len(p) - - if d.offset > 0 { - remaining := BlockSize - d.offset - if n <= remaining { - d.offset += copy(d.block[d.offset:], p) - return - } - copy(d.block[d.offset:], p[:remaining]) - hashBlocks(&d.h, &d.c, 0, d.block[:]) - d.offset = 0 - p = p[remaining:] - } - - if length := len(p); length > BlockSize { - nn := length &^ (BlockSize - 1) - if length == nn { - nn -= BlockSize - } - hashBlocks(&d.h, &d.c, 0, p[:nn]) - p = p[nn:] - } - - d.offset += copy(d.block[:], p) - return -} - -func (d *digest) Sum(sum []byte) []byte { - var hash [Size]byte - d.finalize(&hash) - return append(sum, hash[:d.size]...) -} - -func (d *digest) finalize(hash *[Size]byte) { - var block [BlockSize]byte - h := d.h - c := d.c - - copy(block[:], d.block[:d.offset]) - remaining := uint32(BlockSize - d.offset) - if c[0] < remaining { - c[1]-- - } - c[0] -= remaining - - hashBlocks(&h, &c, 0xFFFFFFFF, block[:]) - for i, v := range h { - binary.LittleEndian.PutUint32(hash[4*i:], v) - } -} - -func appendUint32(b []byte, x uint32) []byte { - var a [4]byte - binary.BigEndian.PutUint32(a[:], x) - return append(b, a[:]...) -} - -func consumeUint32(b []byte) ([]byte, uint32) { - x := binary.BigEndian.Uint32(b) - return b[4:], x -} diff --git a/vendor/golang.org/x/crypto/blake2s/blake2s_386.go b/vendor/golang.org/x/crypto/blake2s/blake2s_386.go deleted file mode 100644 index 97f629617..000000000 --- a/vendor/golang.org/x/crypto/blake2s/blake2s_386.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build 386 && gc && !purego - -package blake2s - -import "golang.org/x/sys/cpu" - -var ( - useSSE4 = false - useSSSE3 = cpu.X86.HasSSSE3 - useSSE2 = cpu.X86.HasSSE2 -) - -//go:noescape -func hashBlocksSSE2(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) - -//go:noescape -func hashBlocksSSSE3(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) - -func hashBlocks(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) { - switch { - case useSSSE3: - hashBlocksSSSE3(h, c, flag, blocks) - case useSSE2: - hashBlocksSSE2(h, c, flag, blocks) - default: - hashBlocksGeneric(h, c, flag, blocks) - } -} diff --git a/vendor/golang.org/x/crypto/blake2s/blake2s_386.s b/vendor/golang.org/x/crypto/blake2s/blake2s_386.s deleted file mode 100644 index 919c02654..000000000 --- a/vendor/golang.org/x/crypto/blake2s/blake2s_386.s +++ /dev/null @@ -1,429 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build 386 && gc && !purego - -#include "textflag.h" - -DATA iv0<>+0x00(SB)/4, $0x6a09e667 -DATA iv0<>+0x04(SB)/4, $0xbb67ae85 -DATA iv0<>+0x08(SB)/4, $0x3c6ef372 -DATA iv0<>+0x0c(SB)/4, $0xa54ff53a -GLOBL iv0<>(SB), (NOPTR+RODATA), $16 - -DATA iv1<>+0x00(SB)/4, $0x510e527f -DATA iv1<>+0x04(SB)/4, $0x9b05688c -DATA iv1<>+0x08(SB)/4, $0x1f83d9ab -DATA iv1<>+0x0c(SB)/4, $0x5be0cd19 -GLOBL iv1<>(SB), (NOPTR+RODATA), $16 - -DATA rol16<>+0x00(SB)/8, $0x0504070601000302 -DATA rol16<>+0x08(SB)/8, $0x0D0C0F0E09080B0A -GLOBL rol16<>(SB), (NOPTR+RODATA), $16 - -DATA rol8<>+0x00(SB)/8, $0x0407060500030201 -DATA rol8<>+0x08(SB)/8, $0x0C0F0E0D080B0A09 -GLOBL rol8<>(SB), (NOPTR+RODATA), $16 - -DATA counter<>+0x00(SB)/8, $0x40 -DATA counter<>+0x08(SB)/8, $0x0 -GLOBL counter<>(SB), (NOPTR+RODATA), $16 - -#define ROTL_SSE2(n, t, v) \ - MOVO v, t; \ - PSLLL $n, t; \ - PSRLL $(32-n), v; \ - PXOR t, v - -#define ROTL_SSSE3(c, v) \ - PSHUFB c, v - -#define ROUND_SSE2(v0, v1, v2, v3, m0, m1, m2, m3, t) \ - PADDL m0, v0; \ - PADDL v1, v0; \ - PXOR v0, v3; \ - ROTL_SSE2(16, t, v3); \ - PADDL v3, v2; \ - PXOR v2, v1; \ - ROTL_SSE2(20, t, v1); \ - PADDL m1, v0; \ - PADDL v1, v0; \ - PXOR v0, v3; \ - ROTL_SSE2(24, t, v3); \ - PADDL v3, v2; \ - PXOR v2, v1; \ - ROTL_SSE2(25, t, v1); \ - PSHUFL $0x39, v1, v1; \ - PSHUFL $0x4E, v2, v2; \ - PSHUFL $0x93, v3, v3; \ - PADDL m2, v0; \ - PADDL v1, v0; \ - PXOR v0, v3; \ - ROTL_SSE2(16, t, v3); \ - PADDL v3, v2; \ - PXOR v2, v1; \ - ROTL_SSE2(20, t, v1); \ - PADDL m3, v0; \ - PADDL v1, v0; \ - PXOR v0, v3; \ - ROTL_SSE2(24, t, v3); \ - PADDL v3, v2; \ - PXOR v2, v1; \ - ROTL_SSE2(25, t, v1); \ - PSHUFL $0x39, v3, v3; \ - PSHUFL $0x4E, v2, v2; \ - PSHUFL $0x93, v1, v1 - -#define ROUND_SSSE3(v0, v1, v2, v3, m0, m1, m2, m3, t, c16, c8) \ - PADDL m0, v0; \ - PADDL v1, v0; \ - PXOR v0, v3; \ - ROTL_SSSE3(c16, v3); \ - PADDL v3, v2; \ - PXOR v2, v1; \ - ROTL_SSE2(20, t, v1); \ - PADDL m1, v0; \ - PADDL v1, v0; \ - PXOR v0, v3; \ - ROTL_SSSE3(c8, v3); \ - PADDL v3, v2; \ - PXOR v2, v1; \ - ROTL_SSE2(25, t, v1); \ - PSHUFL $0x39, v1, v1; \ - PSHUFL $0x4E, v2, v2; \ - PSHUFL $0x93, v3, v3; \ - PADDL m2, v0; \ - PADDL v1, v0; \ - PXOR v0, v3; \ - ROTL_SSSE3(c16, v3); \ - PADDL v3, v2; \ - PXOR v2, v1; \ - ROTL_SSE2(20, t, v1); \ - PADDL m3, v0; \ - PADDL v1, v0; \ - PXOR v0, v3; \ - ROTL_SSSE3(c8, v3); \ - PADDL v3, v2; \ - PXOR v2, v1; \ - ROTL_SSE2(25, t, v1); \ - PSHUFL $0x39, v3, v3; \ - PSHUFL $0x4E, v2, v2; \ - PSHUFL $0x93, v1, v1 - -#define PRECOMPUTE(dst, off, src, t) \ - MOVL 0*4(src), t; \ - MOVL t, 0*4+off+0(dst); \ - MOVL t, 9*4+off+64(dst); \ - MOVL t, 5*4+off+128(dst); \ - MOVL t, 14*4+off+192(dst); \ - MOVL t, 4*4+off+256(dst); \ - MOVL t, 2*4+off+320(dst); \ - MOVL t, 8*4+off+384(dst); \ - MOVL t, 12*4+off+448(dst); \ - MOVL t, 3*4+off+512(dst); \ - MOVL t, 15*4+off+576(dst); \ - MOVL 1*4(src), t; \ - MOVL t, 4*4+off+0(dst); \ - MOVL t, 8*4+off+64(dst); \ - MOVL t, 14*4+off+128(dst); \ - MOVL t, 5*4+off+192(dst); \ - MOVL t, 12*4+off+256(dst); \ - MOVL t, 11*4+off+320(dst); \ - MOVL t, 1*4+off+384(dst); \ - MOVL t, 6*4+off+448(dst); \ - MOVL t, 10*4+off+512(dst); \ - MOVL t, 3*4+off+576(dst); \ - MOVL 2*4(src), t; \ - MOVL t, 1*4+off+0(dst); \ - MOVL t, 13*4+off+64(dst); \ - MOVL t, 6*4+off+128(dst); \ - MOVL t, 8*4+off+192(dst); \ - MOVL t, 2*4+off+256(dst); \ - MOVL t, 0*4+off+320(dst); \ - MOVL t, 14*4+off+384(dst); \ - MOVL t, 11*4+off+448(dst); \ - MOVL t, 12*4+off+512(dst); \ - MOVL t, 4*4+off+576(dst); \ - MOVL 3*4(src), t; \ - MOVL t, 5*4+off+0(dst); \ - MOVL t, 15*4+off+64(dst); \ - MOVL t, 9*4+off+128(dst); \ - MOVL t, 1*4+off+192(dst); \ - MOVL t, 11*4+off+256(dst); \ - MOVL t, 7*4+off+320(dst); \ - MOVL t, 13*4+off+384(dst); \ - MOVL t, 3*4+off+448(dst); \ - MOVL t, 6*4+off+512(dst); \ - MOVL t, 10*4+off+576(dst); \ - MOVL 4*4(src), t; \ - MOVL t, 2*4+off+0(dst); \ - MOVL t, 1*4+off+64(dst); \ - MOVL t, 15*4+off+128(dst); \ - MOVL t, 10*4+off+192(dst); \ - MOVL t, 6*4+off+256(dst); \ - MOVL t, 8*4+off+320(dst); \ - MOVL t, 3*4+off+384(dst); \ - MOVL t, 13*4+off+448(dst); \ - MOVL t, 14*4+off+512(dst); \ - MOVL t, 5*4+off+576(dst); \ - MOVL 5*4(src), t; \ - MOVL t, 6*4+off+0(dst); \ - MOVL t, 11*4+off+64(dst); \ - MOVL t, 2*4+off+128(dst); \ - MOVL t, 9*4+off+192(dst); \ - MOVL t, 1*4+off+256(dst); \ - MOVL t, 13*4+off+320(dst); \ - MOVL t, 4*4+off+384(dst); \ - MOVL t, 8*4+off+448(dst); \ - MOVL t, 15*4+off+512(dst); \ - MOVL t, 7*4+off+576(dst); \ - MOVL 6*4(src), t; \ - MOVL t, 3*4+off+0(dst); \ - MOVL t, 7*4+off+64(dst); \ - MOVL t, 13*4+off+128(dst); \ - MOVL t, 12*4+off+192(dst); \ - MOVL t, 10*4+off+256(dst); \ - MOVL t, 1*4+off+320(dst); \ - MOVL t, 9*4+off+384(dst); \ - MOVL t, 14*4+off+448(dst); \ - MOVL t, 0*4+off+512(dst); \ - MOVL t, 6*4+off+576(dst); \ - MOVL 7*4(src), t; \ - MOVL t, 7*4+off+0(dst); \ - MOVL t, 14*4+off+64(dst); \ - MOVL t, 10*4+off+128(dst); \ - MOVL t, 0*4+off+192(dst); \ - MOVL t, 5*4+off+256(dst); \ - MOVL t, 9*4+off+320(dst); \ - MOVL t, 12*4+off+384(dst); \ - MOVL t, 1*4+off+448(dst); \ - MOVL t, 13*4+off+512(dst); \ - MOVL t, 2*4+off+576(dst); \ - MOVL 8*4(src), t; \ - MOVL t, 8*4+off+0(dst); \ - MOVL t, 5*4+off+64(dst); \ - MOVL t, 4*4+off+128(dst); \ - MOVL t, 15*4+off+192(dst); \ - MOVL t, 14*4+off+256(dst); \ - MOVL t, 3*4+off+320(dst); \ - MOVL t, 11*4+off+384(dst); \ - MOVL t, 10*4+off+448(dst); \ - MOVL t, 7*4+off+512(dst); \ - MOVL t, 1*4+off+576(dst); \ - MOVL 9*4(src), t; \ - MOVL t, 12*4+off+0(dst); \ - MOVL t, 2*4+off+64(dst); \ - MOVL t, 11*4+off+128(dst); \ - MOVL t, 4*4+off+192(dst); \ - MOVL t, 0*4+off+256(dst); \ - MOVL t, 15*4+off+320(dst); \ - MOVL t, 10*4+off+384(dst); \ - MOVL t, 7*4+off+448(dst); \ - MOVL t, 5*4+off+512(dst); \ - MOVL t, 9*4+off+576(dst); \ - MOVL 10*4(src), t; \ - MOVL t, 9*4+off+0(dst); \ - MOVL t, 4*4+off+64(dst); \ - MOVL t, 8*4+off+128(dst); \ - MOVL t, 13*4+off+192(dst); \ - MOVL t, 3*4+off+256(dst); \ - MOVL t, 5*4+off+320(dst); \ - MOVL t, 7*4+off+384(dst); \ - MOVL t, 15*4+off+448(dst); \ - MOVL t, 11*4+off+512(dst); \ - MOVL t, 0*4+off+576(dst); \ - MOVL 11*4(src), t; \ - MOVL t, 13*4+off+0(dst); \ - MOVL t, 10*4+off+64(dst); \ - MOVL t, 0*4+off+128(dst); \ - MOVL t, 3*4+off+192(dst); \ - MOVL t, 9*4+off+256(dst); \ - MOVL t, 6*4+off+320(dst); \ - MOVL t, 15*4+off+384(dst); \ - MOVL t, 4*4+off+448(dst); \ - MOVL t, 2*4+off+512(dst); \ - MOVL t, 12*4+off+576(dst); \ - MOVL 12*4(src), t; \ - MOVL t, 10*4+off+0(dst); \ - MOVL t, 12*4+off+64(dst); \ - MOVL t, 1*4+off+128(dst); \ - MOVL t, 6*4+off+192(dst); \ - MOVL t, 13*4+off+256(dst); \ - MOVL t, 4*4+off+320(dst); \ - MOVL t, 0*4+off+384(dst); \ - MOVL t, 2*4+off+448(dst); \ - MOVL t, 8*4+off+512(dst); \ - MOVL t, 14*4+off+576(dst); \ - MOVL 13*4(src), t; \ - MOVL t, 14*4+off+0(dst); \ - MOVL t, 3*4+off+64(dst); \ - MOVL t, 7*4+off+128(dst); \ - MOVL t, 2*4+off+192(dst); \ - MOVL t, 15*4+off+256(dst); \ - MOVL t, 12*4+off+320(dst); \ - MOVL t, 6*4+off+384(dst); \ - MOVL t, 0*4+off+448(dst); \ - MOVL t, 9*4+off+512(dst); \ - MOVL t, 11*4+off+576(dst); \ - MOVL 14*4(src), t; \ - MOVL t, 11*4+off+0(dst); \ - MOVL t, 0*4+off+64(dst); \ - MOVL t, 12*4+off+128(dst); \ - MOVL t, 7*4+off+192(dst); \ - MOVL t, 8*4+off+256(dst); \ - MOVL t, 14*4+off+320(dst); \ - MOVL t, 2*4+off+384(dst); \ - MOVL t, 5*4+off+448(dst); \ - MOVL t, 1*4+off+512(dst); \ - MOVL t, 13*4+off+576(dst); \ - MOVL 15*4(src), t; \ - MOVL t, 15*4+off+0(dst); \ - MOVL t, 6*4+off+64(dst); \ - MOVL t, 3*4+off+128(dst); \ - MOVL t, 11*4+off+192(dst); \ - MOVL t, 7*4+off+256(dst); \ - MOVL t, 10*4+off+320(dst); \ - MOVL t, 5*4+off+384(dst); \ - MOVL t, 9*4+off+448(dst); \ - MOVL t, 4*4+off+512(dst); \ - MOVL t, 8*4+off+576(dst) - -// func hashBlocksSSE2(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) -TEXT ·hashBlocksSSE2(SB), 0, $672-24 // frame = 656 + 16 byte alignment - MOVL h+0(FP), AX - MOVL c+4(FP), BX - MOVL flag+8(FP), CX - MOVL blocks_base+12(FP), SI - MOVL blocks_len+16(FP), DX - - MOVL SP, DI - ADDL $15, DI - ANDL $~15, DI - - MOVL CX, 8(DI) - MOVL 0(BX), CX - MOVL CX, 0(DI) - MOVL 4(BX), CX - MOVL CX, 4(DI) - XORL CX, CX - MOVL CX, 12(DI) - - MOVOU 0(AX), X0 - MOVOU 16(AX), X1 - MOVOU counter<>(SB), X2 - -loop: - MOVO X0, X4 - MOVO X1, X5 - MOVOU iv0<>(SB), X6 - MOVOU iv1<>(SB), X7 - - MOVO 0(DI), X3 - PADDQ X2, X3 - PXOR X3, X7 - MOVO X3, 0(DI) - - PRECOMPUTE(DI, 16, SI, CX) - ROUND_SSE2(X4, X5, X6, X7, 16(DI), 32(DI), 48(DI), 64(DI), X3) - ROUND_SSE2(X4, X5, X6, X7, 16+64(DI), 32+64(DI), 48+64(DI), 64+64(DI), X3) - ROUND_SSE2(X4, X5, X6, X7, 16+128(DI), 32+128(DI), 48+128(DI), 64+128(DI), X3) - ROUND_SSE2(X4, X5, X6, X7, 16+192(DI), 32+192(DI), 48+192(DI), 64+192(DI), X3) - ROUND_SSE2(X4, X5, X6, X7, 16+256(DI), 32+256(DI), 48+256(DI), 64+256(DI), X3) - ROUND_SSE2(X4, X5, X6, X7, 16+320(DI), 32+320(DI), 48+320(DI), 64+320(DI), X3) - ROUND_SSE2(X4, X5, X6, X7, 16+384(DI), 32+384(DI), 48+384(DI), 64+384(DI), X3) - ROUND_SSE2(X4, X5, X6, X7, 16+448(DI), 32+448(DI), 48+448(DI), 64+448(DI), X3) - ROUND_SSE2(X4, X5, X6, X7, 16+512(DI), 32+512(DI), 48+512(DI), 64+512(DI), X3) - ROUND_SSE2(X4, X5, X6, X7, 16+576(DI), 32+576(DI), 48+576(DI), 64+576(DI), X3) - - PXOR X4, X0 - PXOR X5, X1 - PXOR X6, X0 - PXOR X7, X1 - - LEAL 64(SI), SI - SUBL $64, DX - JNE loop - - MOVL 0(DI), CX - MOVL CX, 0(BX) - MOVL 4(DI), CX - MOVL CX, 4(BX) - - MOVOU X0, 0(AX) - MOVOU X1, 16(AX) - - RET - -// func hashBlocksSSSE3(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) -TEXT ·hashBlocksSSSE3(SB), 0, $704-24 // frame = 688 + 16 byte alignment - MOVL h+0(FP), AX - MOVL c+4(FP), BX - MOVL flag+8(FP), CX - MOVL blocks_base+12(FP), SI - MOVL blocks_len+16(FP), DX - - MOVL SP, DI - ADDL $15, DI - ANDL $~15, DI - - MOVL CX, 8(DI) - MOVL 0(BX), CX - MOVL CX, 0(DI) - MOVL 4(BX), CX - MOVL CX, 4(DI) - XORL CX, CX - MOVL CX, 12(DI) - - MOVOU 0(AX), X0 - MOVOU 16(AX), X1 - MOVOU counter<>(SB), X2 - -loop: - MOVO X0, 656(DI) - MOVO X1, 672(DI) - MOVO X0, X4 - MOVO X1, X5 - MOVOU iv0<>(SB), X6 - MOVOU iv1<>(SB), X7 - - MOVO 0(DI), X3 - PADDQ X2, X3 - PXOR X3, X7 - MOVO X3, 0(DI) - - MOVOU rol16<>(SB), X0 - MOVOU rol8<>(SB), X1 - - PRECOMPUTE(DI, 16, SI, CX) - ROUND_SSSE3(X4, X5, X6, X7, 16(DI), 32(DI), 48(DI), 64(DI), X3, X0, X1) - ROUND_SSSE3(X4, X5, X6, X7, 16+64(DI), 32+64(DI), 48+64(DI), 64+64(DI), X3, X0, X1) - ROUND_SSSE3(X4, X5, X6, X7, 16+128(DI), 32+128(DI), 48+128(DI), 64+128(DI), X3, X0, X1) - ROUND_SSSE3(X4, X5, X6, X7, 16+192(DI), 32+192(DI), 48+192(DI), 64+192(DI), X3, X0, X1) - ROUND_SSSE3(X4, X5, X6, X7, 16+256(DI), 32+256(DI), 48+256(DI), 64+256(DI), X3, X0, X1) - ROUND_SSSE3(X4, X5, X6, X7, 16+320(DI), 32+320(DI), 48+320(DI), 64+320(DI), X3, X0, X1) - ROUND_SSSE3(X4, X5, X6, X7, 16+384(DI), 32+384(DI), 48+384(DI), 64+384(DI), X3, X0, X1) - ROUND_SSSE3(X4, X5, X6, X7, 16+448(DI), 32+448(DI), 48+448(DI), 64+448(DI), X3, X0, X1) - ROUND_SSSE3(X4, X5, X6, X7, 16+512(DI), 32+512(DI), 48+512(DI), 64+512(DI), X3, X0, X1) - ROUND_SSSE3(X4, X5, X6, X7, 16+576(DI), 32+576(DI), 48+576(DI), 64+576(DI), X3, X0, X1) - - MOVO 656(DI), X0 - MOVO 672(DI), X1 - PXOR X4, X0 - PXOR X5, X1 - PXOR X6, X0 - PXOR X7, X1 - - LEAL 64(SI), SI - SUBL $64, DX - JNE loop - - MOVL 0(DI), CX - MOVL CX, 0(BX) - MOVL 4(DI), CX - MOVL CX, 4(BX) - - MOVOU X0, 0(AX) - MOVOU X1, 16(AX) - - RET diff --git a/vendor/golang.org/x/crypto/blake2s/blake2s_amd64.go b/vendor/golang.org/x/crypto/blake2s/blake2s_amd64.go deleted file mode 100644 index 8a7310254..000000000 --- a/vendor/golang.org/x/crypto/blake2s/blake2s_amd64.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build amd64 && gc && !purego - -package blake2s - -import "golang.org/x/sys/cpu" - -var ( - useSSE4 = cpu.X86.HasSSE41 - useSSSE3 = cpu.X86.HasSSSE3 - useSSE2 = cpu.X86.HasSSE2 -) - -//go:noescape -func hashBlocksSSE2(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) - -//go:noescape -func hashBlocksSSSE3(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) - -//go:noescape -func hashBlocksSSE4(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) - -func hashBlocks(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) { - switch { - case useSSE4: - hashBlocksSSE4(h, c, flag, blocks) - case useSSSE3: - hashBlocksSSSE3(h, c, flag, blocks) - case useSSE2: - hashBlocksSSE2(h, c, flag, blocks) - default: - hashBlocksGeneric(h, c, flag, blocks) - } -} diff --git a/vendor/golang.org/x/crypto/blake2s/blake2s_amd64.s b/vendor/golang.org/x/crypto/blake2s/blake2s_amd64.s deleted file mode 100644 index 57d510fc0..000000000 --- a/vendor/golang.org/x/crypto/blake2s/blake2s_amd64.s +++ /dev/null @@ -1,2173 +0,0 @@ -// Code generated by command: go run blake2s_amd64_asm.go -out ../blake2s_amd64.s -pkg blake2s. DO NOT EDIT. - -//go:build amd64 && gc && !purego - -#include "textflag.h" - -// func hashBlocksSSE2(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) -// Requires: SSE2 -TEXT ·hashBlocksSSE2(SB), $672-48 - MOVQ h+0(FP), AX - MOVQ c+8(FP), BX - MOVL flag+16(FP), CX - MOVQ blocks_base+24(FP), SI - MOVQ blocks_len+32(FP), DX - MOVQ SP, BP - ADDQ $0x0f, BP - ANDQ $-16, BP - MOVQ (BX), R9 - MOVQ R9, (BP) - MOVQ CX, 8(BP) - MOVOU (AX), X0 - MOVOU 16(AX), X1 - MOVOU iv0<>+0(SB), X2 - MOVOU iv1<>+0(SB), X3 - MOVOU counter<>+0(SB), X12 - MOVOU rol16<>+0(SB), X13 - MOVOU rol8<>+0(SB), X14 - MOVO (BP), X15 - -loop: - MOVO X0, X4 - MOVO X1, X5 - MOVO X2, X6 - MOVO X3, X7 - PADDQ X12, X15 - PXOR X15, X7 - MOVQ (SI), R8 - MOVQ 8(SI), R9 - MOVQ 16(SI), R10 - MOVQ 24(SI), R11 - MOVQ 32(SI), R12 - MOVQ 40(SI), R13 - MOVQ 48(SI), R14 - MOVQ 56(SI), R15 - MOVL R8, 16(BP) - MOVL R8, 116(BP) - MOVL R8, 164(BP) - MOVL R8, 264(BP) - MOVL R8, 288(BP) - MOVL R8, 344(BP) - MOVL R8, 432(BP) - MOVL R8, 512(BP) - MOVL R8, 540(BP) - MOVL R8, 652(BP) - SHRQ $0x20, R8 - MOVL R8, 32(BP) - MOVL R8, 112(BP) - MOVL R8, 200(BP) - MOVL R8, 228(BP) - MOVL R8, 320(BP) - MOVL R8, 380(BP) - MOVL R8, 404(BP) - MOVL R8, 488(BP) - MOVL R8, 568(BP) - MOVL R8, 604(BP) - MOVL R9, 20(BP) - MOVL R9, 132(BP) - MOVL R9, 168(BP) - MOVL R9, 240(BP) - MOVL R9, 280(BP) - MOVL R9, 336(BP) - MOVL R9, 456(BP) - MOVL R9, 508(BP) - MOVL R9, 576(BP) - MOVL R9, 608(BP) - SHRQ $0x20, R9 - MOVL R9, 36(BP) - MOVL R9, 140(BP) - MOVL R9, 180(BP) - MOVL R9, 212(BP) - MOVL R9, 316(BP) - MOVL R9, 364(BP) - MOVL R9, 452(BP) - MOVL R9, 476(BP) - MOVL R9, 552(BP) - MOVL R9, 632(BP) - MOVL R10, 24(BP) - MOVL R10, 84(BP) - MOVL R10, 204(BP) - MOVL R10, 248(BP) - MOVL R10, 296(BP) - MOVL R10, 368(BP) - MOVL R10, 412(BP) - MOVL R10, 516(BP) - MOVL R10, 584(BP) - MOVL R10, 612(BP) - SHRQ $0x20, R10 - MOVL R10, 40(BP) - MOVL R10, 124(BP) - MOVL R10, 152(BP) - MOVL R10, 244(BP) - MOVL R10, 276(BP) - MOVL R10, 388(BP) - MOVL R10, 416(BP) - MOVL R10, 496(BP) - MOVL R10, 588(BP) - MOVL R10, 620(BP) - MOVL R11, 28(BP) - MOVL R11, 108(BP) - MOVL R11, 196(BP) - MOVL R11, 256(BP) - MOVL R11, 312(BP) - MOVL R11, 340(BP) - MOVL R11, 436(BP) - MOVL R11, 520(BP) - MOVL R11, 528(BP) - MOVL R11, 616(BP) - SHRQ $0x20, R11 - MOVL R11, 44(BP) - MOVL R11, 136(BP) - MOVL R11, 184(BP) - MOVL R11, 208(BP) - MOVL R11, 292(BP) - MOVL R11, 372(BP) - MOVL R11, 448(BP) - MOVL R11, 468(BP) - MOVL R11, 580(BP) - MOVL R11, 600(BP) - MOVL R12, 48(BP) - MOVL R12, 100(BP) - MOVL R12, 160(BP) - MOVL R12, 268(BP) - MOVL R12, 328(BP) - MOVL R12, 348(BP) - MOVL R12, 444(BP) - MOVL R12, 504(BP) - MOVL R12, 556(BP) - MOVL R12, 596(BP) - SHRQ $0x20, R12 - MOVL R12, 64(BP) - MOVL R12, 88(BP) - MOVL R12, 188(BP) - MOVL R12, 224(BP) - MOVL R12, 272(BP) - MOVL R12, 396(BP) - MOVL R12, 440(BP) - MOVL R12, 492(BP) - MOVL R12, 548(BP) - MOVL R12, 628(BP) - MOVL R13, 52(BP) - MOVL R13, 96(BP) - MOVL R13, 176(BP) - MOVL R13, 260(BP) - MOVL R13, 284(BP) - MOVL R13, 356(BP) - MOVL R13, 428(BP) - MOVL R13, 524(BP) - MOVL R13, 572(BP) - MOVL R13, 592(BP) - SHRQ $0x20, R13 - MOVL R13, 68(BP) - MOVL R13, 120(BP) - MOVL R13, 144(BP) - MOVL R13, 220(BP) - MOVL R13, 308(BP) - MOVL R13, 360(BP) - MOVL R13, 460(BP) - MOVL R13, 480(BP) - MOVL R13, 536(BP) - MOVL R13, 640(BP) - MOVL R14, 56(BP) - MOVL R14, 128(BP) - MOVL R14, 148(BP) - MOVL R14, 232(BP) - MOVL R14, 324(BP) - MOVL R14, 352(BP) - MOVL R14, 400(BP) - MOVL R14, 472(BP) - MOVL R14, 560(BP) - MOVL R14, 648(BP) - SHRQ $0x20, R14 - MOVL R14, 72(BP) - MOVL R14, 92(BP) - MOVL R14, 172(BP) - MOVL R14, 216(BP) - MOVL R14, 332(BP) - MOVL R14, 384(BP) - MOVL R14, 424(BP) - MOVL R14, 464(BP) - MOVL R14, 564(BP) - MOVL R14, 636(BP) - MOVL R15, 60(BP) - MOVL R15, 80(BP) - MOVL R15, 192(BP) - MOVL R15, 236(BP) - MOVL R15, 304(BP) - MOVL R15, 392(BP) - MOVL R15, 408(BP) - MOVL R15, 484(BP) - MOVL R15, 532(BP) - MOVL R15, 644(BP) - SHRQ $0x20, R15 - MOVL R15, 76(BP) - MOVL R15, 104(BP) - MOVL R15, 156(BP) - MOVL R15, 252(BP) - MOVL R15, 300(BP) - MOVL R15, 376(BP) - MOVL R15, 420(BP) - MOVL R15, 500(BP) - MOVL R15, 544(BP) - MOVL R15, 624(BP) - PADDL 16(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 32(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 48(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 64(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PADDL 80(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 96(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 112(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 128(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PADDL 144(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 160(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 176(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 192(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PADDL 208(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 224(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 240(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 256(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PADDL 272(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 288(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 304(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 320(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PADDL 336(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 352(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 368(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 384(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PADDL 400(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 416(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 432(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 448(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PADDL 464(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 480(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 496(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 512(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PADDL 528(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 544(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 560(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 576(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PADDL 592(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 608(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 624(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x10, X8 - PSRLL $0x10, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 640(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - MOVO X7, X8 - PSLLL $0x18, X8 - PSRLL $0x08, X7 - PXOR X8, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PXOR X4, X0 - PXOR X5, X1 - PXOR X6, X0 - PXOR X7, X1 - LEAQ 64(SI), SI - SUBQ $0x40, DX - JNE loop - MOVO X15, (BP) - MOVQ (BP), R9 - MOVQ R9, (BX) - MOVOU X0, (AX) - MOVOU X1, 16(AX) - RET - -DATA iv0<>+0(SB)/4, $0x6a09e667 -DATA iv0<>+4(SB)/4, $0xbb67ae85 -DATA iv0<>+8(SB)/4, $0x3c6ef372 -DATA iv0<>+12(SB)/4, $0xa54ff53a -GLOBL iv0<>(SB), RODATA|NOPTR, $16 - -DATA iv1<>+0(SB)/4, $0x510e527f -DATA iv1<>+4(SB)/4, $0x9b05688c -DATA iv1<>+8(SB)/4, $0x1f83d9ab -DATA iv1<>+12(SB)/4, $0x5be0cd19 -GLOBL iv1<>(SB), RODATA|NOPTR, $16 - -DATA counter<>+0(SB)/8, $0x0000000000000040 -DATA counter<>+8(SB)/8, $0x0000000000000000 -GLOBL counter<>(SB), RODATA|NOPTR, $16 - -DATA rol16<>+0(SB)/8, $0x0504070601000302 -DATA rol16<>+8(SB)/8, $0x0d0c0f0e09080b0a -GLOBL rol16<>(SB), RODATA|NOPTR, $16 - -DATA rol8<>+0(SB)/8, $0x0407060500030201 -DATA rol8<>+8(SB)/8, $0x0c0f0e0d080b0a09 -GLOBL rol8<>(SB), RODATA|NOPTR, $16 - -// func hashBlocksSSSE3(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) -// Requires: SSE2, SSSE3 -TEXT ·hashBlocksSSSE3(SB), $672-48 - MOVQ h+0(FP), AX - MOVQ c+8(FP), BX - MOVL flag+16(FP), CX - MOVQ blocks_base+24(FP), SI - MOVQ blocks_len+32(FP), DX - MOVQ SP, BP - ADDQ $0x0f, BP - ANDQ $-16, BP - MOVQ (BX), R9 - MOVQ R9, (BP) - MOVQ CX, 8(BP) - MOVOU (AX), X0 - MOVOU 16(AX), X1 - MOVOU iv0<>+0(SB), X2 - MOVOU iv1<>+0(SB), X3 - MOVOU counter<>+0(SB), X12 - MOVOU rol16<>+0(SB), X13 - MOVOU rol8<>+0(SB), X14 - MOVO (BP), X15 - -loop: - MOVO X0, X4 - MOVO X1, X5 - MOVO X2, X6 - MOVO X3, X7 - PADDQ X12, X15 - PXOR X15, X7 - MOVQ (SI), R8 - MOVQ 8(SI), R9 - MOVQ 16(SI), R10 - MOVQ 24(SI), R11 - MOVQ 32(SI), R12 - MOVQ 40(SI), R13 - MOVQ 48(SI), R14 - MOVQ 56(SI), R15 - MOVL R8, 16(BP) - MOVL R8, 116(BP) - MOVL R8, 164(BP) - MOVL R8, 264(BP) - MOVL R8, 288(BP) - MOVL R8, 344(BP) - MOVL R8, 432(BP) - MOVL R8, 512(BP) - MOVL R8, 540(BP) - MOVL R8, 652(BP) - SHRQ $0x20, R8 - MOVL R8, 32(BP) - MOVL R8, 112(BP) - MOVL R8, 200(BP) - MOVL R8, 228(BP) - MOVL R8, 320(BP) - MOVL R8, 380(BP) - MOVL R8, 404(BP) - MOVL R8, 488(BP) - MOVL R8, 568(BP) - MOVL R8, 604(BP) - MOVL R9, 20(BP) - MOVL R9, 132(BP) - MOVL R9, 168(BP) - MOVL R9, 240(BP) - MOVL R9, 280(BP) - MOVL R9, 336(BP) - MOVL R9, 456(BP) - MOVL R9, 508(BP) - MOVL R9, 576(BP) - MOVL R9, 608(BP) - SHRQ $0x20, R9 - MOVL R9, 36(BP) - MOVL R9, 140(BP) - MOVL R9, 180(BP) - MOVL R9, 212(BP) - MOVL R9, 316(BP) - MOVL R9, 364(BP) - MOVL R9, 452(BP) - MOVL R9, 476(BP) - MOVL R9, 552(BP) - MOVL R9, 632(BP) - MOVL R10, 24(BP) - MOVL R10, 84(BP) - MOVL R10, 204(BP) - MOVL R10, 248(BP) - MOVL R10, 296(BP) - MOVL R10, 368(BP) - MOVL R10, 412(BP) - MOVL R10, 516(BP) - MOVL R10, 584(BP) - MOVL R10, 612(BP) - SHRQ $0x20, R10 - MOVL R10, 40(BP) - MOVL R10, 124(BP) - MOVL R10, 152(BP) - MOVL R10, 244(BP) - MOVL R10, 276(BP) - MOVL R10, 388(BP) - MOVL R10, 416(BP) - MOVL R10, 496(BP) - MOVL R10, 588(BP) - MOVL R10, 620(BP) - MOVL R11, 28(BP) - MOVL R11, 108(BP) - MOVL R11, 196(BP) - MOVL R11, 256(BP) - MOVL R11, 312(BP) - MOVL R11, 340(BP) - MOVL R11, 436(BP) - MOVL R11, 520(BP) - MOVL R11, 528(BP) - MOVL R11, 616(BP) - SHRQ $0x20, R11 - MOVL R11, 44(BP) - MOVL R11, 136(BP) - MOVL R11, 184(BP) - MOVL R11, 208(BP) - MOVL R11, 292(BP) - MOVL R11, 372(BP) - MOVL R11, 448(BP) - MOVL R11, 468(BP) - MOVL R11, 580(BP) - MOVL R11, 600(BP) - MOVL R12, 48(BP) - MOVL R12, 100(BP) - MOVL R12, 160(BP) - MOVL R12, 268(BP) - MOVL R12, 328(BP) - MOVL R12, 348(BP) - MOVL R12, 444(BP) - MOVL R12, 504(BP) - MOVL R12, 556(BP) - MOVL R12, 596(BP) - SHRQ $0x20, R12 - MOVL R12, 64(BP) - MOVL R12, 88(BP) - MOVL R12, 188(BP) - MOVL R12, 224(BP) - MOVL R12, 272(BP) - MOVL R12, 396(BP) - MOVL R12, 440(BP) - MOVL R12, 492(BP) - MOVL R12, 548(BP) - MOVL R12, 628(BP) - MOVL R13, 52(BP) - MOVL R13, 96(BP) - MOVL R13, 176(BP) - MOVL R13, 260(BP) - MOVL R13, 284(BP) - MOVL R13, 356(BP) - MOVL R13, 428(BP) - MOVL R13, 524(BP) - MOVL R13, 572(BP) - MOVL R13, 592(BP) - SHRQ $0x20, R13 - MOVL R13, 68(BP) - MOVL R13, 120(BP) - MOVL R13, 144(BP) - MOVL R13, 220(BP) - MOVL R13, 308(BP) - MOVL R13, 360(BP) - MOVL R13, 460(BP) - MOVL R13, 480(BP) - MOVL R13, 536(BP) - MOVL R13, 640(BP) - MOVL R14, 56(BP) - MOVL R14, 128(BP) - MOVL R14, 148(BP) - MOVL R14, 232(BP) - MOVL R14, 324(BP) - MOVL R14, 352(BP) - MOVL R14, 400(BP) - MOVL R14, 472(BP) - MOVL R14, 560(BP) - MOVL R14, 648(BP) - SHRQ $0x20, R14 - MOVL R14, 72(BP) - MOVL R14, 92(BP) - MOVL R14, 172(BP) - MOVL R14, 216(BP) - MOVL R14, 332(BP) - MOVL R14, 384(BP) - MOVL R14, 424(BP) - MOVL R14, 464(BP) - MOVL R14, 564(BP) - MOVL R14, 636(BP) - MOVL R15, 60(BP) - MOVL R15, 80(BP) - MOVL R15, 192(BP) - MOVL R15, 236(BP) - MOVL R15, 304(BP) - MOVL R15, 392(BP) - MOVL R15, 408(BP) - MOVL R15, 484(BP) - MOVL R15, 532(BP) - MOVL R15, 644(BP) - SHRQ $0x20, R15 - MOVL R15, 76(BP) - MOVL R15, 104(BP) - MOVL R15, 156(BP) - MOVL R15, 252(BP) - MOVL R15, 300(BP) - MOVL R15, 376(BP) - MOVL R15, 420(BP) - MOVL R15, 500(BP) - MOVL R15, 544(BP) - MOVL R15, 624(BP) - PADDL 16(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 32(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 48(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 64(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PADDL 80(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 96(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 112(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 128(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PADDL 144(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 160(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 176(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 192(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PADDL 208(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 224(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 240(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 256(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PADDL 272(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 288(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 304(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 320(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PADDL 336(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 352(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 368(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 384(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PADDL 400(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 416(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 432(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 448(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PADDL 464(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 480(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 496(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 512(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PADDL 528(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 544(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 560(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 576(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PADDL 592(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 608(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL 624(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL 640(BP), X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PXOR X4, X0 - PXOR X5, X1 - PXOR X6, X0 - PXOR X7, X1 - LEAQ 64(SI), SI - SUBQ $0x40, DX - JNE loop - MOVO X15, (BP) - MOVQ (BP), R9 - MOVQ R9, (BX) - MOVOU X0, (AX) - MOVOU X1, 16(AX) - RET - -// func hashBlocksSSE4(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) -// Requires: SSE2, SSE4.1, SSSE3 -TEXT ·hashBlocksSSE4(SB), $32-48 - MOVQ h+0(FP), AX - MOVQ c+8(FP), BX - MOVL flag+16(FP), CX - MOVQ blocks_base+24(FP), SI - MOVQ blocks_len+32(FP), DX - MOVQ SP, BP - ADDQ $0x0f, BP - ANDQ $-16, BP - MOVQ (BX), R9 - MOVQ R9, (BP) - MOVQ CX, 8(BP) - MOVOU (AX), X0 - MOVOU 16(AX), X1 - MOVOU iv0<>+0(SB), X2 - MOVOU iv1<>+0(SB), X3 - MOVOU counter<>+0(SB), X12 - MOVOU rol16<>+0(SB), X13 - MOVOU rol8<>+0(SB), X14 - MOVO (BP), X15 - -loop: - MOVO X0, X4 - MOVO X1, X5 - MOVO X2, X6 - MOVO X3, X7 - PADDQ X12, X15 - PXOR X15, X7 - MOVL (SI), X8 - PINSRD $0x01, 8(SI), X8 - PINSRD $0x02, 16(SI), X8 - PINSRD $0x03, 24(SI), X8 - MOVL 4(SI), X9 - PINSRD $0x01, 12(SI), X9 - PINSRD $0x02, 20(SI), X9 - PINSRD $0x03, 28(SI), X9 - MOVL 32(SI), X10 - PINSRD $0x01, 40(SI), X10 - PINSRD $0x02, 48(SI), X10 - PINSRD $0x03, 56(SI), X10 - MOVL 36(SI), X11 - PINSRD $0x01, 44(SI), X11 - PINSRD $0x02, 52(SI), X11 - PINSRD $0x03, 60(SI), X11 - PADDL X8, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X9, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL X10, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X11, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - MOVL 56(SI), X8 - PINSRD $0x01, 16(SI), X8 - PINSRD $0x02, 36(SI), X8 - PINSRD $0x03, 52(SI), X8 - MOVL 40(SI), X9 - PINSRD $0x01, 32(SI), X9 - PINSRD $0x02, 60(SI), X9 - PINSRD $0x03, 24(SI), X9 - MOVL 4(SI), X10 - PINSRD $0x01, (SI), X10 - PINSRD $0x02, 44(SI), X10 - PINSRD $0x03, 20(SI), X10 - MOVL 48(SI), X11 - PINSRD $0x01, 8(SI), X11 - PINSRD $0x02, 28(SI), X11 - PINSRD $0x03, 12(SI), X11 - PADDL X8, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X9, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL X10, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X11, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - MOVL 44(SI), X8 - PINSRD $0x01, 48(SI), X8 - PINSRD $0x02, 20(SI), X8 - PINSRD $0x03, 60(SI), X8 - MOVL 32(SI), X9 - PINSRD $0x01, (SI), X9 - PINSRD $0x02, 8(SI), X9 - PINSRD $0x03, 52(SI), X9 - MOVL 40(SI), X10 - PINSRD $0x01, 12(SI), X10 - PINSRD $0x02, 28(SI), X10 - PINSRD $0x03, 36(SI), X10 - MOVL 56(SI), X11 - PINSRD $0x01, 24(SI), X11 - PINSRD $0x02, 4(SI), X11 - PINSRD $0x03, 16(SI), X11 - PADDL X8, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X9, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL X10, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X11, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - MOVL 28(SI), X8 - PINSRD $0x01, 12(SI), X8 - PINSRD $0x02, 52(SI), X8 - PINSRD $0x03, 44(SI), X8 - MOVL 36(SI), X9 - PINSRD $0x01, 4(SI), X9 - PINSRD $0x02, 48(SI), X9 - PINSRD $0x03, 56(SI), X9 - MOVL 8(SI), X10 - PINSRD $0x01, 20(SI), X10 - PINSRD $0x02, 16(SI), X10 - PINSRD $0x03, 60(SI), X10 - MOVL 24(SI), X11 - PINSRD $0x01, 40(SI), X11 - PINSRD $0x02, (SI), X11 - PINSRD $0x03, 32(SI), X11 - PADDL X8, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X9, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL X10, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X11, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - MOVL 36(SI), X8 - PINSRD $0x01, 20(SI), X8 - PINSRD $0x02, 8(SI), X8 - PINSRD $0x03, 40(SI), X8 - MOVL (SI), X9 - PINSRD $0x01, 28(SI), X9 - PINSRD $0x02, 16(SI), X9 - PINSRD $0x03, 60(SI), X9 - MOVL 56(SI), X10 - PINSRD $0x01, 44(SI), X10 - PINSRD $0x02, 24(SI), X10 - PINSRD $0x03, 12(SI), X10 - MOVL 4(SI), X11 - PINSRD $0x01, 48(SI), X11 - PINSRD $0x02, 32(SI), X11 - PINSRD $0x03, 52(SI), X11 - PADDL X8, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X9, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL X10, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X11, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - MOVL 8(SI), X8 - PINSRD $0x01, 24(SI), X8 - PINSRD $0x02, (SI), X8 - PINSRD $0x03, 32(SI), X8 - MOVL 48(SI), X9 - PINSRD $0x01, 40(SI), X9 - PINSRD $0x02, 44(SI), X9 - PINSRD $0x03, 12(SI), X9 - MOVL 16(SI), X10 - PINSRD $0x01, 28(SI), X10 - PINSRD $0x02, 60(SI), X10 - PINSRD $0x03, 4(SI), X10 - MOVL 52(SI), X11 - PINSRD $0x01, 20(SI), X11 - PINSRD $0x02, 56(SI), X11 - PINSRD $0x03, 36(SI), X11 - PADDL X8, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X9, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL X10, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X11, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - MOVL 48(SI), X8 - PINSRD $0x01, 4(SI), X8 - PINSRD $0x02, 56(SI), X8 - PINSRD $0x03, 16(SI), X8 - MOVL 20(SI), X9 - PINSRD $0x01, 60(SI), X9 - PINSRD $0x02, 52(SI), X9 - PINSRD $0x03, 40(SI), X9 - MOVL (SI), X10 - PINSRD $0x01, 24(SI), X10 - PINSRD $0x02, 36(SI), X10 - PINSRD $0x03, 32(SI), X10 - MOVL 28(SI), X11 - PINSRD $0x01, 12(SI), X11 - PINSRD $0x02, 8(SI), X11 - PINSRD $0x03, 44(SI), X11 - PADDL X8, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X9, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL X10, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X11, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - MOVL 52(SI), X8 - PINSRD $0x01, 28(SI), X8 - PINSRD $0x02, 48(SI), X8 - PINSRD $0x03, 12(SI), X8 - MOVL 44(SI), X9 - PINSRD $0x01, 56(SI), X9 - PINSRD $0x02, 4(SI), X9 - PINSRD $0x03, 36(SI), X9 - MOVL 20(SI), X10 - PINSRD $0x01, 60(SI), X10 - PINSRD $0x02, 32(SI), X10 - PINSRD $0x03, 8(SI), X10 - MOVL (SI), X11 - PINSRD $0x01, 16(SI), X11 - PINSRD $0x02, 24(SI), X11 - PINSRD $0x03, 40(SI), X11 - PADDL X8, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X9, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL X10, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X11, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - MOVL 24(SI), X8 - PINSRD $0x01, 56(SI), X8 - PINSRD $0x02, 44(SI), X8 - PINSRD $0x03, (SI), X8 - MOVL 60(SI), X9 - PINSRD $0x01, 36(SI), X9 - PINSRD $0x02, 12(SI), X9 - PINSRD $0x03, 32(SI), X9 - MOVL 48(SI), X10 - PINSRD $0x01, 52(SI), X10 - PINSRD $0x02, 4(SI), X10 - PINSRD $0x03, 40(SI), X10 - MOVL 8(SI), X11 - PINSRD $0x01, 28(SI), X11 - PINSRD $0x02, 16(SI), X11 - PINSRD $0x03, 20(SI), X11 - PADDL X8, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X9, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL X10, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X11, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - MOVL 40(SI), X8 - PINSRD $0x01, 32(SI), X8 - PINSRD $0x02, 28(SI), X8 - PINSRD $0x03, 4(SI), X8 - MOVL 8(SI), X9 - PINSRD $0x01, 16(SI), X9 - PINSRD $0x02, 24(SI), X9 - PINSRD $0x03, 20(SI), X9 - MOVL 60(SI), X10 - PINSRD $0x01, 36(SI), X10 - PINSRD $0x02, 12(SI), X10 - PINSRD $0x03, 52(SI), X10 - MOVL 44(SI), X11 - PINSRD $0x01, 56(SI), X11 - PINSRD $0x02, 48(SI), X11 - PINSRD $0x03, (SI), X11 - PADDL X8, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X9, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X5, X5 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X7, X7 - PADDL X10, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X13, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x14, X8 - PSRLL $0x0c, X5 - PXOR X8, X5 - PADDL X11, X4 - PADDL X5, X4 - PXOR X4, X7 - PSHUFB X14, X7 - PADDL X7, X6 - PXOR X6, X5 - MOVO X5, X8 - PSLLL $0x19, X8 - PSRLL $0x07, X5 - PXOR X8, X5 - PSHUFL $0x39, X7, X7 - PSHUFL $0x4e, X6, X6 - PSHUFL $0x93, X5, X5 - PXOR X4, X0 - PXOR X5, X1 - PXOR X6, X0 - PXOR X7, X1 - LEAQ 64(SI), SI - SUBQ $0x40, DX - JNE loop - MOVO X15, (BP) - MOVQ (BP), R9 - MOVQ R9, (BX) - MOVOU X0, (AX) - MOVOU X1, 16(AX) - RET diff --git a/vendor/golang.org/x/crypto/blake2s/blake2s_generic.go b/vendor/golang.org/x/crypto/blake2s/blake2s_generic.go deleted file mode 100644 index 24a1ff22a..000000000 --- a/vendor/golang.org/x/crypto/blake2s/blake2s_generic.go +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package blake2s - -import ( - "math/bits" -) - -// the precomputed values for BLAKE2s -// there are 10 16-byte arrays - one for each round -// the entries are calculated from the sigma constants. -var precomputed = [10][16]byte{ - {0, 2, 4, 6, 1, 3, 5, 7, 8, 10, 12, 14, 9, 11, 13, 15}, - {14, 4, 9, 13, 10, 8, 15, 6, 1, 0, 11, 5, 12, 2, 7, 3}, - {11, 12, 5, 15, 8, 0, 2, 13, 10, 3, 7, 9, 14, 6, 1, 4}, - {7, 3, 13, 11, 9, 1, 12, 14, 2, 5, 4, 15, 6, 10, 0, 8}, - {9, 5, 2, 10, 0, 7, 4, 15, 14, 11, 6, 3, 1, 12, 8, 13}, - {2, 6, 0, 8, 12, 10, 11, 3, 4, 7, 15, 1, 13, 5, 14, 9}, - {12, 1, 14, 4, 5, 15, 13, 10, 0, 6, 9, 8, 7, 3, 2, 11}, - {13, 7, 12, 3, 11, 14, 1, 9, 5, 15, 8, 2, 0, 4, 6, 10}, - {6, 14, 11, 0, 15, 9, 3, 8, 12, 13, 1, 10, 2, 7, 4, 5}, - {10, 8, 7, 1, 2, 4, 6, 5, 15, 9, 3, 13, 11, 14, 12, 0}, -} - -func hashBlocksGeneric(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) { - var m [16]uint32 - c0, c1 := c[0], c[1] - - for i := 0; i < len(blocks); { - c0 += BlockSize - if c0 < BlockSize { - c1++ - } - - v0, v1, v2, v3, v4, v5, v6, v7 := h[0], h[1], h[2], h[3], h[4], h[5], h[6], h[7] - v8, v9, v10, v11, v12, v13, v14, v15 := iv[0], iv[1], iv[2], iv[3], iv[4], iv[5], iv[6], iv[7] - v12 ^= c0 - v13 ^= c1 - v14 ^= flag - - for j := range m { - m[j] = uint32(blocks[i]) | uint32(blocks[i+1])<<8 | uint32(blocks[i+2])<<16 | uint32(blocks[i+3])<<24 - i += 4 - } - - for k := range precomputed { - s := &(precomputed[k]) - - v0 += m[s[0]] - v0 += v4 - v12 ^= v0 - v12 = bits.RotateLeft32(v12, -16) - v8 += v12 - v4 ^= v8 - v4 = bits.RotateLeft32(v4, -12) - v1 += m[s[1]] - v1 += v5 - v13 ^= v1 - v13 = bits.RotateLeft32(v13, -16) - v9 += v13 - v5 ^= v9 - v5 = bits.RotateLeft32(v5, -12) - v2 += m[s[2]] - v2 += v6 - v14 ^= v2 - v14 = bits.RotateLeft32(v14, -16) - v10 += v14 - v6 ^= v10 - v6 = bits.RotateLeft32(v6, -12) - v3 += m[s[3]] - v3 += v7 - v15 ^= v3 - v15 = bits.RotateLeft32(v15, -16) - v11 += v15 - v7 ^= v11 - v7 = bits.RotateLeft32(v7, -12) - - v0 += m[s[4]] - v0 += v4 - v12 ^= v0 - v12 = bits.RotateLeft32(v12, -8) - v8 += v12 - v4 ^= v8 - v4 = bits.RotateLeft32(v4, -7) - v1 += m[s[5]] - v1 += v5 - v13 ^= v1 - v13 = bits.RotateLeft32(v13, -8) - v9 += v13 - v5 ^= v9 - v5 = bits.RotateLeft32(v5, -7) - v2 += m[s[6]] - v2 += v6 - v14 ^= v2 - v14 = bits.RotateLeft32(v14, -8) - v10 += v14 - v6 ^= v10 - v6 = bits.RotateLeft32(v6, -7) - v3 += m[s[7]] - v3 += v7 - v15 ^= v3 - v15 = bits.RotateLeft32(v15, -8) - v11 += v15 - v7 ^= v11 - v7 = bits.RotateLeft32(v7, -7) - - v0 += m[s[8]] - v0 += v5 - v15 ^= v0 - v15 = bits.RotateLeft32(v15, -16) - v10 += v15 - v5 ^= v10 - v5 = bits.RotateLeft32(v5, -12) - v1 += m[s[9]] - v1 += v6 - v12 ^= v1 - v12 = bits.RotateLeft32(v12, -16) - v11 += v12 - v6 ^= v11 - v6 = bits.RotateLeft32(v6, -12) - v2 += m[s[10]] - v2 += v7 - v13 ^= v2 - v13 = bits.RotateLeft32(v13, -16) - v8 += v13 - v7 ^= v8 - v7 = bits.RotateLeft32(v7, -12) - v3 += m[s[11]] - v3 += v4 - v14 ^= v3 - v14 = bits.RotateLeft32(v14, -16) - v9 += v14 - v4 ^= v9 - v4 = bits.RotateLeft32(v4, -12) - - v0 += m[s[12]] - v0 += v5 - v15 ^= v0 - v15 = bits.RotateLeft32(v15, -8) - v10 += v15 - v5 ^= v10 - v5 = bits.RotateLeft32(v5, -7) - v1 += m[s[13]] - v1 += v6 - v12 ^= v1 - v12 = bits.RotateLeft32(v12, -8) - v11 += v12 - v6 ^= v11 - v6 = bits.RotateLeft32(v6, -7) - v2 += m[s[14]] - v2 += v7 - v13 ^= v2 - v13 = bits.RotateLeft32(v13, -8) - v8 += v13 - v7 ^= v8 - v7 = bits.RotateLeft32(v7, -7) - v3 += m[s[15]] - v3 += v4 - v14 ^= v3 - v14 = bits.RotateLeft32(v14, -8) - v9 += v14 - v4 ^= v9 - v4 = bits.RotateLeft32(v4, -7) - } - - h[0] ^= v0 ^ v8 - h[1] ^= v1 ^ v9 - h[2] ^= v2 ^ v10 - h[3] ^= v3 ^ v11 - h[4] ^= v4 ^ v12 - h[5] ^= v5 ^ v13 - h[6] ^= v6 ^ v14 - h[7] ^= v7 ^ v15 - } - c[0], c[1] = c0, c1 -} diff --git a/vendor/golang.org/x/crypto/blake2s/blake2s_ref.go b/vendor/golang.org/x/crypto/blake2s/blake2s_ref.go deleted file mode 100644 index 38ce8e283..000000000 --- a/vendor/golang.org/x/crypto/blake2s/blake2s_ref.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build (!amd64 && !386) || !gc || purego - -package blake2s - -var ( - useSSE4 = false - useSSSE3 = false - useSSE2 = false -) - -func hashBlocks(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) { - hashBlocksGeneric(h, c, flag, blocks) -} diff --git a/vendor/golang.org/x/crypto/blake2s/blake2x.go b/vendor/golang.org/x/crypto/blake2s/blake2x.go deleted file mode 100644 index 828749ff0..000000000 --- a/vendor/golang.org/x/crypto/blake2s/blake2x.go +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package blake2s - -import ( - "encoding/binary" - "errors" - "io" -) - -// XOF defines the interface to hash functions that -// support arbitrary-length output. -type XOF interface { - // Write absorbs more data into the hash's state. It panics if called - // after Read. - io.Writer - - // Read reads more output from the hash. It returns io.EOF if the limit - // has been reached. - io.Reader - - // Clone returns a copy of the XOF in its current state. - Clone() XOF - - // Reset resets the XOF to its initial state. - Reset() -} - -// OutputLengthUnknown can be used as the size argument to NewXOF to indicate -// the length of the output is not known in advance. -const OutputLengthUnknown = 0 - -// magicUnknownOutputLength is a magic value for the output size that indicates -// an unknown number of output bytes. -const magicUnknownOutputLength = 65535 - -// maxOutputLength is the absolute maximum number of bytes to produce when the -// number of output bytes is unknown. -const maxOutputLength = (1 << 32) * 32 - -// NewXOF creates a new variable-output-length hash. The hash either produce a -// known number of bytes (1 <= size < 65535), or an unknown number of bytes -// (size == OutputLengthUnknown). In the latter case, an absolute limit of -// 128GiB applies. -// -// A non-nil key turns the hash into a MAC. The key must between -// zero and 32 bytes long. -func NewXOF(size uint16, key []byte) (XOF, error) { - if len(key) > Size { - return nil, errKeySize - } - if size == magicUnknownOutputLength { - // 2^16-1 indicates an unknown number of bytes and thus isn't a - // valid length. - return nil, errors.New("blake2s: XOF length too large") - } - if size == OutputLengthUnknown { - size = magicUnknownOutputLength - } - x := &xof{ - d: digest{ - size: Size, - keyLen: len(key), - }, - length: size, - } - copy(x.d.key[:], key) - x.Reset() - return x, nil -} - -type xof struct { - d digest - length uint16 - remaining uint64 - cfg, root, block [Size]byte - offset int - nodeOffset uint32 - readMode bool -} - -func (x *xof) Write(p []byte) (n int, err error) { - if x.readMode { - panic("blake2s: write to XOF after read") - } - return x.d.Write(p) -} - -func (x *xof) Clone() XOF { - clone := *x - return &clone -} - -func (x *xof) Reset() { - x.cfg[0] = byte(Size) - binary.LittleEndian.PutUint32(x.cfg[4:], uint32(Size)) // leaf length - binary.LittleEndian.PutUint16(x.cfg[12:], x.length) // XOF length - x.cfg[15] = byte(Size) // inner hash size - - x.d.Reset() - x.d.h[3] ^= uint32(x.length) - - x.remaining = uint64(x.length) - if x.remaining == magicUnknownOutputLength { - x.remaining = maxOutputLength - } - x.offset, x.nodeOffset = 0, 0 - x.readMode = false -} - -func (x *xof) Read(p []byte) (n int, err error) { - if !x.readMode { - x.d.finalize(&x.root) - x.readMode = true - } - - if x.remaining == 0 { - return 0, io.EOF - } - - n = len(p) - if uint64(n) > x.remaining { - n = int(x.remaining) - p = p[:n] - } - - if x.offset > 0 { - blockRemaining := Size - x.offset - if n < blockRemaining { - x.offset += copy(p, x.block[x.offset:]) - x.remaining -= uint64(n) - return - } - copy(p, x.block[x.offset:]) - p = p[blockRemaining:] - x.offset = 0 - x.remaining -= uint64(blockRemaining) - } - - for len(p) >= Size { - binary.LittleEndian.PutUint32(x.cfg[8:], x.nodeOffset) - x.nodeOffset++ - - x.d.initConfig(&x.cfg) - x.d.Write(x.root[:]) - x.d.finalize(&x.block) - - copy(p, x.block[:]) - p = p[Size:] - x.remaining -= uint64(Size) - } - - if todo := len(p); todo > 0 { - if x.remaining < uint64(Size) { - x.cfg[0] = byte(x.remaining) - } - binary.LittleEndian.PutUint32(x.cfg[8:], x.nodeOffset) - x.nodeOffset++ - - x.d.initConfig(&x.cfg) - x.d.Write(x.root[:]) - x.d.finalize(&x.block) - - x.offset = copy(p, x.block[:todo]) - x.remaining -= uint64(todo) - } - - return -} - -func (d *digest) initConfig(cfg *[Size]byte) { - d.offset, d.c[0], d.c[1] = 0, 0, 0 - for i := range d.h { - d.h[i] = iv[i] ^ binary.LittleEndian.Uint32(cfg[i*4:]) - } -} |