X-Git-Url: https://www.bearssl.org/gitweb//home/git/?p=BearSSL;a=blobdiff_plain;f=src%2Fsymcipher%2Faes_x86ni_cbcdec.c;h=862b1b5bd2280deac7aa31b435e77857271e65a9;hp=c97ce4890ec65b3758b31c281e12d3ee3ed36078;hb=252dba914912e694d0e69754f0167060fc4d2ba6;hpb=eaa0d38fa8d514aab87b56c6a27d75fa06cdec7e diff --git a/src/symcipher/aes_x86ni_cbcdec.c b/src/symcipher/aes_x86ni_cbcdec.c index c97ce48..862b1b5 100644 --- a/src/symcipher/aes_x86ni_cbcdec.c +++ b/src/symcipher/aes_x86ni_cbcdec.c @@ -22,20 +22,17 @@ * SOFTWARE. */ +#define BR_ENABLE_INTRINSICS 1 #include "inner.h" #if BR_AES_X86NI -#if BR_AES_X86NI_GCC -#if BR_AES_X86NI_GCC_OLD -#pragma GCC target("sse2,sse4.1,aes,pclmul") -#endif -#include -#endif - -#if BR_AES_X86NI_MSC -#include -#endif +/* see bearssl_block.h */ +const br_block_cbcdec_class * +br_aes_x86ni_cbcdec_get_vtable(void) +{ + return br_aes_x86ni_supported() ? &br_aes_x86ni_cbcdec_vtable : NULL; +} /* see bearssl_block.h */ void @@ -46,6 +43,8 @@ br_aes_x86ni_cbcdec_init(br_aes_x86ni_cbcdec_keys *ctx, ctx->num_rounds = br_aes_x86ni_keysched_dec(ctx->skey.skni, key, len); } +BR_TARGETS_X86_UP + /* see bearssl_block.h */ BR_TARGET("sse2,aes") void @@ -199,6 +198,8 @@ br_aes_x86ni_cbcdec_run(const br_aes_x86ni_cbcdec_keys *ctx, _mm_storeu_si128(iv, ivx); } +BR_TARGETS_X86_DOWN + /* see bearssl_block.h */ const br_block_cbcdec_class br_aes_x86ni_cbcdec_vtable = { sizeof(br_aes_x86ni_cbcdec_keys), @@ -210,13 +211,6 @@ const br_block_cbcdec_class br_aes_x86ni_cbcdec_vtable = { &br_aes_x86ni_cbcdec_run }; -/* see bearssl_block.h */ -const br_block_cbcdec_class * -br_aes_x86ni_cbcdec_get_vtable(void) -{ - return br_aes_x86ni_supported() ? &br_aes_x86ni_cbcdec_vtable : NULL; -} - #else /* see bearssl_block.h */