From b999079ebdfd1c9bd288763ae06dfdf6a31325e0 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Mon, 21 Sep 2015 17:23:45 -0400 Subject: Move check for SIMD instructions to CPUID Avoids needing to include simd_32 to see if SIMD is disabled. This had caused a build break on Linux x86-32 as SSE2 must be enabled on a per-file basis. --- src/lib/block/block_cipher.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/lib/block/block_cipher.cpp') diff --git a/src/lib/block/block_cipher.cpp b/src/lib/block/block_cipher.cpp index 5b9c4f0ba..7b52f8716 100644 --- a/src/lib/block/block_cipher.cpp +++ b/src/lib/block/block_cipher.cpp @@ -9,10 +9,6 @@ #include #include -#if defined(BOTAN_HAS_SIMD_32) - #include -#endif - #if defined(BOTAN_HAS_AES) #include #endif @@ -249,7 +245,7 @@ BOTAN_REGISTER_BLOCK_CIPHER_NOARGS(Noekeon); #endif #if defined(BOTAN_HAS_NOEKEON_SIMD) -BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(SIMD_32::enabled(), Noekeon_SIMD, "Noekeon", +BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(CPUID::has_simd_32(), Noekeon_SIMD, "Noekeon", "simd32", BOTAN_SIMD_ALGORITHM_PRIO); #endif @@ -278,7 +274,7 @@ BOTAN_REGISTER_BLOCK_CIPHER_NOARGS(Serpent); #endif #if defined(BOTAN_HAS_SERPENT_SIMD) -BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(SIMD_32::enabled(), Serpent_SIMD, "Serpent", +BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(CPUID::has_simd_32(), Serpent_SIMD, "Serpent", "simd32", BOTAN_SIMD_ALGORITHM_PRIO); #endif @@ -304,7 +300,7 @@ BOTAN_REGISTER_BLOCK_CIPHER_NOARGS(XTEA); #endif #if defined(BOTAN_HAS_XTEA_SIMD) -BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(SIMD_32::enabled(), XTEA_SIMD, "XTEA", +BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(CPUID::has_simd_32(), XTEA_SIMD, "XTEA", "simd32", BOTAN_SIMD_ALGORITHM_PRIO); #endif -- cgit v1.2.3