src/third_party/blake3/*.[hcS]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-This is a subset of <https://github.com/BLAKE3-team/BLAKE3> with the following
-license:
+This is a subset of https://github.com/BLAKE3-team/BLAKE3[BLAKE3] 0.3.6 with
+the following license:
-------------------------------------------------------------------------------
This work is released into the public domain with CC0 1.0. Alternatively, it is
assert(input_len > BLAKE3_CHUNK_LEN);
#endif
- uint8_t cv_array[2 * MAX_SIMD_DEGREE_OR_2 * BLAKE3_OUT_LEN];
+ uint8_t cv_array[MAX_SIMD_DEGREE_OR_2 * BLAKE3_OUT_LEN];
size_t num_cvs = blake3_compress_subtree_wide(input, input_len, key,
chunk_counter, flags, cv_array);
+#if defined(__ELF__) && defined(__CET__) && defined(__has_include)
+#if __has_include(<cet.h>)
+#include <cet.h>
+#endif
+#endif
+
+#if !defined(_CET_ENDBR)
+#define _CET_ENDBR
+#endif
+
.intel_syntax noprefix
.global _blake3_hash_many_avx2
.global blake3_hash_many_avx2
.p2align 6
_blake3_hash_many_avx2:
blake3_hash_many_avx2:
+ _CET_ENDBR
push r15
push r14
push r13
-.intel_syntax noprefix
+#if defined(__ELF__) && defined(__CET__) && defined(__has_include)
+#if __has_include(<cet.h>)
+#include <cet.h>
+#endif
+#endif
+#if !defined(_CET_ENDBR)
+#define _CET_ENDBR
+#endif
+
+.intel_syntax noprefix
.global _blake3_hash_many_avx512
.global blake3_hash_many_avx512
.global blake3_compress_in_place_avx512
.p2align 6
_blake3_hash_many_avx512:
blake3_hash_many_avx512:
+ _CET_ENDBR
push r15
push r14
push r13
.p2align 6
_blake3_compress_in_place_avx512:
blake3_compress_in_place_avx512:
+ _CET_ENDBR
vmovdqu xmm0, xmmword ptr [rdi]
vmovdqu xmm1, xmmword ptr [rdi+0x10]
movzx eax, r8b
.p2align 6
_blake3_compress_xof_avx512:
blake3_compress_xof_avx512:
+ _CET_ENDBR
vmovdqu xmm0, xmmword ptr [rdi]
vmovdqu xmm1, xmmword ptr [rdi+0x10]
movzx eax, r8b
+#if defined(__ELF__) && defined(__CET__) && defined(__has_include)
+#if __has_include(<cet.h>)
+#include <cet.h>
+#endif
+#endif
+
+#if !defined(_CET_ENDBR)
+#define _CET_ENDBR
+#endif
+
.intel_syntax noprefix
.global blake3_hash_many_sse41
.global _blake3_hash_many_sse41
.p2align 6
_blake3_hash_many_sse41:
blake3_hash_many_sse41:
+ _CET_ENDBR
push r15
push r14
push r13
.p2align 6
blake3_compress_in_place_sse41:
_blake3_compress_in_place_sse41:
+ _CET_ENDBR
movups xmm0, xmmword ptr [rdi]
movups xmm1, xmmword ptr [rdi+0x10]
movaps xmm2, xmmword ptr [BLAKE3_IV+rip]
.p2align 6
blake3_compress_xof_sse41:
_blake3_compress_xof_sse41:
+ _CET_ENDBR
movups xmm0, xmmword ptr [rdi]
movups xmm1, xmmword ptr [rdi+0x10]
movaps xmm2, xmmword ptr [BLAKE3_IV+rip]