diff options
author | Jack Lloyd <[email protected]> | 2017-01-17 16:57:23 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-05-20 11:14:18 -0400 |
commit | 832200d0caaa0c0ebff7348bb72be14146476872 (patch) | |
tree | f6415acb4f5253b1d0383d9e901a368f4c3cc29a /src/tests/tests.cpp | |
parent | 455a39f70e6de8376f78f318f04d07af7d245be3 (diff) |
Add SHA-256 using ARMv8 instructions
Based on patch from Jeffrey Walton in GH #841
Diffstat (limited to 'src/tests/tests.cpp')
-rw-r--r-- | src/tests/tests.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/tests/tests.cpp b/src/tests/tests.cpp index 1886aa122..8f8aeec82 100644 --- a/src/tests/tests.cpp +++ b/src/tests/tests.cpp @@ -887,19 +887,26 @@ std::vector<Botan::CPUID::CPUID_bits> map_cpuid_string(const std::string& tok) return {Botan::CPUID::CPUID_AVX2_BIT}; if(tok == "sha") return {Botan::CPUID::CPUID_SHA_BIT}; -#endif -#if defined(BOTAN_TARGET_CPU_IS_PPC_FAMILY) +#elif defined(BOTAN_TARGET_CPU_IS_PPC_FAMILY) if(tok == "altivec" || tok == "simd") return {Botan::CPUID::CPUID_ALTIVEC_BIT}; -#endif -#if defined(BOTAN_TARGET_CPU_IS_ARM_FAMILY) +#elif defined(BOTAN_TARGET_CPU_IS_ARM_FAMILY) if(tok == "neon" || tok == "simd") return {Botan::CPUID::CPUID_ARM_NEON_BIT}; -#endif - + if(tok == "armv8sha1") + return {Botan::CPUID::CPUID_ARM_SHA1_BIT}; + if(tok == "armv8sha2") + return {Botan::CPUID::CPUID_ARM_SHA2_BIT}; + if(tok == "armv8aes") + return {Botan::CPUID::CPUID_ARM_AES_BIT}; + if(tok == "armv8pmull") + return {Botan::CPUID::CPUID_ARM_PMULL_BIT}; + +#else BOTAN_UNUSED(tok); +#endif return {}; } |