diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-17 05:49:02 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-17 06:03:01 +0200 |
commit | b5d6181c6f56aaaee4da1a747e84a54b769df0a6 (patch) | |
tree | 0bfc4c506d50439a8f76f3c9f2e395d05b085dde /src/crypto/zinc/poly1305/poly1305-arm-glue.h | |
parent | 399d5bb850b0e0d0269ef14bb52720221cb526a4 (diff) |
crypto: pass simd by reference
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/crypto/zinc/poly1305/poly1305-arm-glue.h')
-rw-r--r-- | src/crypto/zinc/poly1305/poly1305-arm-glue.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crypto/zinc/poly1305/poly1305-arm-glue.h b/src/crypto/zinc/poly1305/poly1305-arm-glue.h index 8181703..6ec2fc8 100644 --- a/src/crypto/zinc/poly1305/poly1305-arm-glue.h +++ b/src/crypto/zinc/poly1305/poly1305-arm-glue.h @@ -39,10 +39,10 @@ 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) { #if defined(ARM_USE_NEON) - if (simd_context == HAVE_FULL_SIMD && poly1305_use_neon) { + if (poly1305_use_neon && simd_use(simd_context)) { poly1305_blocks_neon(ctx, inp, len, padbit); return true; } @@ -53,10 +53,10 @@ 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) { #if defined(ARM_USE_NEON) - if (simd_context == HAVE_FULL_SIMD && poly1305_use_neon) { + if (poly1305_use_neon && simd_use(simd_context)) { poly1305_emit_neon(ctx, mac, nonce); return true; } |