LLVM 20.0.0git
|
Go to the source code of this file.
Macros | |
#define | DEGREE 4 |
#define | _mm_shuffle_ps2(a, b, c) |
Functions | |
INLINE __m128i | loadu (const uint8_t src[16]) |
INLINE void | storeu (__m128i src, uint8_t dest[16]) |
INLINE __m128i | addv (__m128i a, __m128i b) |
INLINE __m128i | xorv (__m128i a, __m128i b) |
INLINE __m128i | set1 (uint32_t x) |
INLINE __m128i | set4 (uint32_t a, uint32_t b, uint32_t c, uint32_t d) |
INLINE __m128i | rot16 (__m128i x) |
INLINE __m128i | rot12 (__m128i x) |
INLINE __m128i | rot8 (__m128i x) |
INLINE __m128i | rot7 (__m128i x) |
INLINE void | g1 (__m128i *row0, __m128i *row1, __m128i *row2, __m128i *row3, __m128i m) |
INLINE void | g2 (__m128i *row0, __m128i *row1, __m128i *row2, __m128i *row3, __m128i m) |
INLINE void | diagonalize (__m128i *row0, __m128i *row2, __m128i *row3) |
INLINE void | undiagonalize (__m128i *row0, __m128i *row2, __m128i *row3) |
INLINE __m128i | blend_epi16 (__m128i a, __m128i b, const int16_t imm8) |
INLINE void | compress_pre (__m128i rows[4], const uint32_t cv[8], const uint8_t block[BLAKE3_BLOCK_LEN], uint8_t block_len, uint64_t counter, uint8_t flags) |
void | blake3_compress_in_place_sse2 (uint32_t cv[8], const uint8_t block[BLAKE3_BLOCK_LEN], uint8_t block_len, uint64_t counter, uint8_t flags) |
void | blake3_compress_xof_sse2 (const uint32_t cv[8], const uint8_t block[BLAKE3_BLOCK_LEN], uint8_t block_len, uint64_t counter, uint8_t flags, uint8_t out[64]) |
INLINE void | round_fn (__m128i v[16], __m128i m[16], size_t r) |
INLINE void | transpose_vecs (__m128i vecs[DEGREE]) |
INLINE void | transpose_msg_vecs (const uint8_t *const *inputs, size_t block_offset, __m128i out[16]) |
INLINE void | load_counters (uint64_t counter, bool increment_counter, __m128i *out_lo, __m128i *out_hi) |
static void | blake3_hash4_sse2 (const uint8_t *const *inputs, size_t blocks, const uint32_t key[8], uint64_t counter, bool increment_counter, uint8_t flags, uint8_t flags_start, uint8_t flags_end, uint8_t *out) |
INLINE void | hash_one_sse2 (const uint8_t *input, size_t blocks, const uint32_t key[8], uint64_t counter, uint8_t flags, uint8_t flags_start, uint8_t flags_end, uint8_t out[BLAKE3_OUT_LEN]) |
void | blake3_hash_many_sse2 (const uint8_t *const *inputs, size_t num_inputs, size_t blocks, const uint32_t key[8], uint64_t counter, bool increment_counter, uint8_t flags, uint8_t flags_start, uint8_t flags_end, uint8_t *out) |
#define _mm_shuffle_ps2 | ( | a, | |
b, | |||
c | |||
) |
Definition at line 7 of file blake3_sse2.c.
#define DEGREE 4 |
Definition at line 5 of file blake3_sse2.c.
INLINE __m128i addv | ( | __m128i | a, |
__m128i | b | ||
) |
Definition at line 19 of file blake3_sse2.c.
Referenced by g1(), g2(), and round_fn().
void blake3_compress_in_place_sse2 | ( | uint32_t | cv[8], |
const uint8_t | block[BLAKE3_BLOCK_LEN], | ||
uint8_t | block_len, | ||
uint64_t | counter, | ||
uint8_t | flags | ||
) |
Definition at line 260 of file blake3_sse2.c.
References block, compress_pre(), storeu(), and xorv().
void blake3_compress_xof_sse2 | ( | const uint32_t | cv[8], |
const uint8_t | block[BLAKE3_BLOCK_LEN], | ||
uint8_t | block_len, | ||
uint64_t | counter, | ||
uint8_t | flags, | ||
uint8_t | out[64] | ||
) |
Definition at line 270 of file blake3_sse2.c.
References block, compress_pre(), loadu(), storeu(), and xorv().
|
static |
Definition at line 460 of file blake3_sse2.c.
References BLAKE3_BLOCK_LEN, block, blocks, IV, load_counters(), round_fn(), set1(), storeu(), transpose_msg_vecs(), transpose_vecs(), and xorv().
Referenced by blake3_hash_many_sse2().
void blake3_hash_many_sse2 | ( | const uint8_t *const * | inputs, |
size_t | num_inputs, | ||
size_t | blocks, | ||
const uint32_t | key[8], | ||
uint64_t | counter, | ||
bool | increment_counter, | ||
uint8_t | flags, | ||
uint8_t | flags_start, | ||
uint8_t | flags_end, | ||
uint8_t * | out | ||
) |
Definition at line 541 of file blake3_sse2.c.
References blake3_hash4_sse2(), BLAKE3_OUT_LEN, blocks, DEGREE, and hash_one_sse2().
Definition at line 81 of file blake3_sse2.c.
Referenced by compress_pre().
INLINE void compress_pre | ( | __m128i | rows[4], |
const uint32_t | cv[8], | ||
const uint8_t | block[BLAKE3_BLOCK_LEN], | ||
uint8_t | block_len, | ||
uint64_t | counter, | ||
uint8_t | flags | ||
) |
Definition at line 89 of file blake3_sse2.c.
References _mm_shuffle_ps2, blend_epi16(), block, counter_high(), counter_low(), diagonalize(), g1(), g2(), IV, loadu(), set4(), and undiagonalize().
Referenced by blake3_compress_in_place_sse2(), and blake3_compress_xof_sse2().
INLINE void diagonalize | ( | __m128i * | row0, |
__m128i * | row2, | ||
__m128i * | row3 | ||
) |
Definition at line 69 of file blake3_sse2.c.
Referenced by compress_pre().
INLINE void g1 | ( | __m128i * | row0, |
__m128i * | row1, | ||
__m128i * | row2, | ||
__m128i * | row3, | ||
__m128i | m | ||
) |
Definition at line 46 of file blake3_sse2.c.
References addv(), rot12(), rot16(), and xorv().
Referenced by compress_pre().
INLINE void g2 | ( | __m128i * | row0, |
__m128i * | row1, | ||
__m128i * | row2, | ||
__m128i * | row3, | ||
__m128i | m | ||
) |
Definition at line 56 of file blake3_sse2.c.
References addv(), rot7(), rot8(), and xorv().
Referenced by compress_pre().
INLINE void hash_one_sse2 | ( | const uint8_t * | input, |
size_t | blocks, | ||
const uint32_t | key[8], | ||
uint64_t | counter, | ||
uint8_t | flags, | ||
uint8_t | flags_start, | ||
uint8_t | flags_end, | ||
uint8_t | out[BLAKE3_OUT_LEN] | ||
) |
Definition at line 521 of file blake3_sse2.c.
References BLAKE3_BLOCK_LEN, blake3_compress_in_place_sse2, BLAKE3_KEY_LEN, BLAKE3_OUT_LEN, and blocks.
Referenced by blake3_hash_many_sse2().
INLINE void load_counters | ( | uint64_t | counter, |
bool | increment_counter, | ||
__m128i * | out_lo, | ||
__m128i * | out_hi | ||
) |
Definition at line 446 of file blake3_sse2.c.
Referenced by blake3_hash4_sse2().
Definition at line 11 of file blake3_sse2.c.
Referenced by blake3_compress_xof_sse2(), compress_pre(), and transpose_msg_vecs().
INLINE __m128i rot12 | ( | __m128i | x | ) |
INLINE __m128i rot16 | ( | __m128i | x | ) |
Definition at line 30 of file blake3_sse2.c.
Referenced by g1(), and round_fn().
INLINE __m128i rot7 | ( | __m128i | x | ) |
INLINE __m128i rot8 | ( | __m128i | x | ) |
INLINE void round_fn | ( | __m128i | v[16], |
__m128i | m[16], | ||
size_t | r | ||
) |
Definition at line 282 of file blake3_sse2.c.
References addv(), MSG_SCHEDULE, rot12(), rot16(), rot7(), rot8(), and xorv().
Referenced by blake3_hash4_sse2().
Definition at line 24 of file blake3_sse2.c.
Referenced by blake3_hash4_sse2().
Definition at line 26 of file blake3_sse2.c.
Referenced by compress_pre().
INLINE void storeu | ( | __m128i | src, |
uint8_t | dest[16] | ||
) |
Definition at line 15 of file blake3_sse2.c.
Referenced by blake3_compress_in_place_sse2(), blake3_compress_xof_sse2(), and blake3_hash4_sse2().
INLINE void transpose_msg_vecs | ( | const uint8_t *const * | inputs, |
size_t | block_offset, | ||
__m128i | out[16] | ||
) |
Definition at line 419 of file blake3_sse2.c.
References loadu(), and transpose_vecs().
Referenced by blake3_hash4_sse2().
INLINE void transpose_vecs | ( | __m128i | vecs[DEGREE] | ) |
Definition at line 398 of file blake3_sse2.c.
Referenced by blake3_hash4_sse2(), and transpose_msg_vecs().
INLINE void undiagonalize | ( | __m128i * | row0, |
__m128i * | row2, | ||
__m128i * | row3 | ||
) |
Definition at line 75 of file blake3_sse2.c.
Referenced by compress_pre().
INLINE __m128i xorv | ( | __m128i | a, |
__m128i | b | ||
) |
Definition at line 22 of file blake3_sse2.c.
Referenced by blake3_compress_in_place_sse2(), blake3_compress_xof_sse2(), blake3_hash4_sse2(), g1(), g2(), rot12(), rot7(), rot8(), and round_fn().