AES-NI with per-file target compiler options
This commit is contained in:
parent
a1072948ca
commit
dae01d056d
@ -30,6 +30,10 @@
|
|||||||
|
|
||||||
#ifdef WITH_AESNI
|
#ifdef WITH_AESNI
|
||||||
|
|
||||||
|
#pragma GCC push_options
|
||||||
|
#pragma GCC target("ssse3", "aes")
|
||||||
|
#pragma clang attribute push (__attribute__((target("ssse3,aes"))), apply_to=function)
|
||||||
|
|
||||||
#include <wmmintrin.h>
|
#include <wmmintrin.h>
|
||||||
#include <tmmintrin.h>
|
#include <tmmintrin.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -400,4 +404,7 @@ static inline __m128i ghash_add(__m128i tag, const table_4bit htable, __m128i m)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#pragma clang attribute pop
|
||||||
|
#pragma GCC pop_options
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -336,7 +336,7 @@ Library
|
|||||||
c-sources: cbits/cryptonite_rdrand.c
|
c-sources: cbits/cryptonite_rdrand.c
|
||||||
|
|
||||||
if flag(support_aesni) && (os(linux) || os(freebsd) || os(osx)) && (arch(i386) || arch(x86_64))
|
if flag(support_aesni) && (os(linux) || os(freebsd) || os(osx)) && (arch(i386) || arch(x86_64))
|
||||||
CC-options: -mssse3 -maes -DWITH_AESNI
|
CC-options: -DWITH_AESNI
|
||||||
if flag(support_pclmuldq)
|
if flag(support_pclmuldq)
|
||||||
CC-options: -msse4.1 -mpclmul -DWITH_PCLMUL
|
CC-options: -msse4.1 -mpclmul -DWITH_PCLMUL
|
||||||
C-sources: cbits/aes/x86ni.c
|
C-sources: cbits/aes/x86ni.c
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user