crypto-native: fix build error on Arm using clang-13
[vpp.git] / src / plugins / crypto_native / aes.h
index c2c22c6..0ba4e87 100644 (file)
@@ -43,7 +43,7 @@ aes_enc_round (u8x16 a, u8x16 k)
 {
 #if defined (__AES__)
   return (u8x16) _mm_aesenc_si128 ((__m128i) a, (__m128i) k);
-#elif defined (__ARM_FEATURE_AES)
+#elif defined (__ARM_FEATURE_CRYPTO)
   return vaesmcq_u8 (vaeseq_u8 (a, u8x16_splat (0))) ^ k;
 #endif
 }
@@ -79,7 +79,7 @@ aes_enc_last_round (u8x16 a, u8x16 k)
 {
 #if defined (__AES__)
   return (u8x16) _mm_aesenclast_si128 ((__m128i) a, (__m128i) k);
-#elif defined (__ARM_FEATURE_AES)
+#elif defined (__ARM_FEATURE_CRYPTO)
   return vaeseq_u8 (a, u8x16_splat (0)) ^ k;
 #endif
 }
@@ -119,7 +119,7 @@ aes_load_partial (u8x16u * p, int n_bytes)
   __m128i zero = { };
   return (u8x16) _mm_mask_loadu_epi8 (zero, (1 << n_bytes) - 1, p);
 #else
-  return aes_byte_mask (CLIB_MEM_OVERFLOW_LOAD (*, p), n_bytes);
+  return aes_byte_mask (CLIB_MEM_OVERFLOW_LOAD (p), n_bytes);
 #endif
 }
 
@@ -154,7 +154,7 @@ aes_inv_mix_column (u8x16 a)
 {
 #if defined (__AES__)
   return (u8x16) _mm_aesimc_si128 ((__m128i) a);
-#elif defined (__ARM_FEATURE_AES)
+#elif defined (__ARM_FEATURE_CRYPTO)
   return vaesimcq_u8 (a);
 #endif
 }
@@ -178,7 +178,7 @@ aes128_key_assist (u8x16 * rk, u8x16 r)
 }
 
 static_always_inline void
-aes128_key_expand (u8x16 * rk, u8x16 const *k)
+aes128_key_expand (u8x16 *rk, u8x16u const *k)
 {
   rk[0] = k[0];
   aes128_key_assist (rk + 1, aes_keygen_assist (rk[0], 0x01));
@@ -308,7 +308,7 @@ aes128_key_expand_round_neon (u8x16 * rk, u32 rcon)
 }
 
 static_always_inline void
-aes128_key_expand (u8x16 * rk, const u8x16 * k)
+aes128_key_expand (u8x16 *rk, u8x16u const *k)
 {
   rk[0] = k[0];
   aes128_key_expand_round_neon (rk + 1, 0x01);
@@ -385,7 +385,7 @@ aes256_key_expand_round_neon (u8x16 * rk, u32 rcon)
 }
 
 static_always_inline void
-aes256_key_expand (u8x16 * rk, u8x16 const *k)
+aes256_key_expand (u8x16 *rk, u8x16u const *k)
 {
   rk[0] = k[0];
   rk[1] = k[1];