crypto: arm64/aegis128 - use explicit vector load for permute vectors
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 19 Aug 2019 14:15:00 +0000 (17:15 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 30 Aug 2019 08:05:27 +0000 (18:05 +1000)
commit389139b34f407da7c09bc26c4d943f52742a6d42
tree9a9f96abb48b42e1640aae289448f6bd70d0d6d8
parent309b77e0f8bfa3126ff12949173e6d45801a968b
crypto: arm64/aegis128 - use explicit vector load for permute vectors

When building the new aegis128 NEON code in big endian mode, Clang
complains about the const uint8x16_t permute vectors in the following
way:

  crypto/aegis128-neon-inner.c:58:40: warning: vector initializers are not
      compatible with NEON intrinsics in big endian mode
      [-Wnonportable-vector-initialization]
                static const uint8x16_t shift_rows = {
                                                     ^
  crypto/aegis128-neon-inner.c:58:40: note: consider using vld1q_u8() to
      initialize a vector from memory, or vcombine_u8(vcreate_u8(), vcreate_u8())
      to initialize from integer constants

Since the same issue applies to the uint8x16x4_t loads of the AES Sbox,
update those references as well. However, since GCC does not implement
the vld1q_u8_x4() intrinsic, switch from IS_ENABLED() to a preprocessor
conditional to conditionally include this code.

Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/aegis128-neon-inner.c