Fix VMULL_P64 and VMULL_HIGH_P64 on GCC117

GCC117 uses GCC 4.8, and it revealed a missing preprocessor code path
pull/461/head
Jeffrey Walton 2017-08-06 06:04:01 -04:00
parent 679000104c
commit fd97121e8a
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 12 additions and 2 deletions

View File

@ -39,9 +39,9 @@
ANONYMOUS_NAMESPACE_BEGIN
// GCC 4.8 and 4.9 are missing PMULL gear
// GCC 4.8 is missing PMULL gear
#if (CRYPTOPP_ARM_PMULL_AVAILABLE)
# if (CRYPTOPP_GCC_VERSION >= 40800) && (CRYPTOPP_GCC_VERSION < 50000)
# if (CRYPTOPP_GCC_VERSION >= 40800) && (CRYPTOPP_GCC_VERSION < 49000)
inline poly128_t VMULL_P64(poly64_t a, poly64_t b)
{
return __builtin_aarch64_crypto_pmulldi_ppp (a, b);
@ -51,6 +51,16 @@ inline poly128_t VMULL_HIGH_P64(poly64x2_t a, poly64x2_t b)
{
return __builtin_aarch64_crypto_pmullv2di_ppp (a, b);
}
# else
inline poly128_t VMULL_P64(poly64_t a, poly64_t b)
{
return vmull_p64(a, b);
}
inline poly128_t VMULL_HIGH_P64(poly64x2_t a, poly64x2_t b)
{
return vmull_high_p64(a, b);
}
# endif
#endif