1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-04-28 01:15:12 +02:00

enable CET on asm

This commit is contained in:
Samuel Neves 2020-06-26 18:39:17 +01:00
parent 4c41a893a0
commit a3ec6c1ccf
3 changed files with 25 additions and 1 deletions

View File

@ -1,3 +1,9 @@
#if defined(__ELF__) && defined(__CET__) && __has_include(<cet.h>)
#include <cet.h>
#else
#define _CET_ENDBR
#endif
.intel_syntax noprefix
.global _blake3_hash_many_avx2
.global blake3_hash_many_avx2
@ -9,6 +15,7 @@
.p2align 6
_blake3_hash_many_avx2:
blake3_hash_many_avx2:
_CET_ENDBR
push r15
push r14
push r13

View File

@ -1,5 +1,10 @@
.intel_syntax noprefix
#if defined(__ELF__) && defined(__CET__) && __has_include(<cet.h>)
#include <cet.h>
#else
#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 +20,7 @@
.p2align 6
_blake3_hash_many_avx512:
blake3_hash_many_avx512:
_CET_ENDBR
push r15
push r14
push r13
@ -2372,6 +2378,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 +2461,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

View File

@ -1,3 +1,9 @@
#if defined(__ELF__) && defined(__CET__) && __has_include(<cet.h>)
#include <cet.h>
#else
#define _CET_ENDBR
#endif
.intel_syntax noprefix
.global blake3_hash_many_sse41
.global _blake3_hash_many_sse41
@ -13,6 +19,7 @@
.p2align 6
_blake3_hash_many_sse41:
blake3_hash_many_sse41:
_CET_ENDBR
push r15
push r14
push r13
@ -1774,6 +1781,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 +1882,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]