]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Upgrade to BLAKE3 0.3.6
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 6 Aug 2020 14:48:07 +0000 (16:48 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 6 Aug 2020 14:48:07 +0000 (16:48 +0200)
LICENSE.adoc
src/third_party/blake3/blake3.c
src/third_party/blake3/blake3_avx2_x86-64_unix.S
src/third_party/blake3/blake3_avx512_x86-64_unix.S
src/third_party/blake3/blake3_sse41_x86-64_unix.S

index 405d7e346e6e5c7bafa074b4765a1e26ebff76b5..5612a836378f527d0dea1adc93c3b9e7868e1a5e 100644 (file)
@@ -299,8 +299,8 @@ from <https://github.com/Cyan4973/xxHash/releases>.
 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
index 0acefbade9025a8bbd55cb5c5773b81c92994800..c99d059abc7b117f74c86adba4d7748c1d87ae3d 100644 (file)
@@ -335,7 +335,7 @@ INLINE void compress_subtree_to_parent_node(
   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);
 
index fa6f61dd244af1e1d1e9ab7debed14d7d2d3fef7..14dcf5b4619a38cce6045405d7c60e9fbbb99cd3 100644 (file)
@@ -1,3 +1,13 @@
+#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
@@ -9,6 +19,7 @@
         .p2align  6
 _blake3_hash_many_avx2:
 blake3_hash_many_avx2:
+        _CET_ENDBR
         push    r15
         push    r14
         push    r13
index 25612cbf01d22859bd95e951a5a4294460a5476f..fb28d23587b2a0ad14df8ed66b51291d25a7feea 100644 (file)
@@ -1,5 +1,14 @@
-.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
@@ -15,6 +24,7 @@
 .p2align  6
 _blake3_hash_many_avx512:
 blake3_hash_many_avx512:
+        _CET_ENDBR
         push    r15
         push    r14
         push    r13
@@ -2372,6 +2382,7 @@ blake3_hash_many_avx512:
 .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
@@ -2454,6 +2465,7 @@ blake3_compress_in_place_avx512:
 .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
index 268c91bd591460c3bc3f5c0f79e4ab030f7e3ab4..41a1eb2529aa9ead85e2157e44e75e3feae36944 100644 (file)
@@ -1,3 +1,13 @@
+#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
@@ -13,6 +23,7 @@
         .p2align  6
 _blake3_hash_many_sse41:
 blake3_hash_many_sse41:
+        _CET_ENDBR
         push    r15
         push    r14
         push    r13
@@ -1774,6 +1785,7 @@ blake3_hash_many_sse41:
 .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]
@@ -1874,6 +1886,7 @@ _blake3_compress_in_place_sse41:
 .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]