summaryrefslogtreecommitdiffhomepage
path: root/src/crypto/zinc/poly1305/poly1305-x86_64-glue.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/zinc/poly1305/poly1305-x86_64-glue.h')
-rw-r--r--src/crypto/zinc/poly1305/poly1305-x86_64-glue.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/crypto/zinc/poly1305/poly1305-x86_64-glue.h b/src/crypto/zinc/poly1305/poly1305-x86_64-glue.h
index 7f1af44..1afd1c5 100644
--- a/src/crypto/zinc/poly1305/poly1305-x86_64-glue.h
+++ b/src/crypto/zinc/poly1305/poly1305-x86_64-glue.h
@@ -63,20 +63,20 @@ static inline bool poly1305_init_arch(void *ctx,
static inline bool poly1305_blocks_arch(void *ctx, const u8 *inp,
const size_t len, const u32 padbit,
- simd_context_t simd_context)
+ simd_context_t *simd_context)
{
#ifdef CONFIG_AS_AVX512
- if (poly1305_use_avx512 && simd_context == HAVE_FULL_SIMD)
+ if (poly1305_use_avx512 && simd_use(simd_context))
poly1305_blocks_avx512(ctx, inp, len, padbit);
else
#endif
#ifdef CONFIG_AS_AVX2
- if (poly1305_use_avx2 && simd_context == HAVE_FULL_SIMD)
+ if (poly1305_use_avx2 && simd_use(simd_context))
poly1305_blocks_avx2(ctx, inp, len, padbit);
else
#endif
#ifdef CONFIG_AS_AVX
- if (poly1305_use_avx && simd_context == HAVE_FULL_SIMD)
+ if (poly1305_use_avx && simd_use(simd_context))
poly1305_blocks_avx(ctx, inp, len, padbit);
else
#endif
@@ -86,20 +86,20 @@ static inline bool poly1305_blocks_arch(void *ctx, const u8 *inp,
static inline bool poly1305_emit_arch(void *ctx, u8 mac[POLY1305_MAC_SIZE],
const u32 nonce[4],
- simd_context_t simd_context)
+ simd_context_t *simd_context)
{
#ifdef CONFIG_AS_AVX512
- if (poly1305_use_avx512 && simd_context == HAVE_FULL_SIMD)
+ if (poly1305_use_avx512 && simd_use(simd_context))
poly1305_emit_avx(ctx, mac, nonce);
else
#endif
#ifdef CONFIG_AS_AVX2
- if (poly1305_use_avx2 && simd_context == HAVE_FULL_SIMD)
+ if (poly1305_use_avx2 && simd_use(simd_context))
poly1305_emit_avx(ctx, mac, nonce);
else
#endif
#ifdef CONFIG_AS_AVX
- if (poly1305_use_avx && simd_context == HAVE_FULL_SIMD)
+ if (poly1305_use_avx && simd_use(simd_context))
poly1305_emit_avx(ctx, mac, nonce);
else
#endif