From 2aee2f41ae3ef320ee91d59081c0b4d9973d5191 Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 22 Dec 2010 16:43:43 +0000 Subject: If the user defines BOTAN_NO_SSE_INTRINSICS, avoid including intrinsics headers in header files. This is particularly useful for allowing code that will be compiled by nvcc to include loadstor.h, but might be useful in other situations as well. --- src/utils/bswap.h | 4 ++-- src/utils/simd_32/simd_32.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/utils') diff --git a/src/utils/bswap.h b/src/utils/bswap.h index b35dbf123..6dfed0ba9 100644 --- a/src/utils/bswap.h +++ b/src/utils/bswap.h @@ -12,7 +12,7 @@ #include #include -#if defined(BOTAN_TARGET_CPU_HAS_SSE2) +#if defined(BOTAN_TARGET_CPU_HAS_SSE2) && !defined(BOTAN_NO_SSE_INTRINSICS) #include #endif @@ -100,7 +100,7 @@ inline void bswap_4(T x[4]) x[3] = reverse_bytes(x[3]); } -#if defined(BOTAN_TARGET_CPU_HAS_SSE2) +#if defined(BOTAN_TARGET_CPU_HAS_SSE2) && !defined(BOTAN_NO_SSE_INTRINSICS) /** * Swap 4 u32bits in an array using SSE2 shuffle instructions diff --git a/src/utils/simd_32/simd_32.h b/src/utils/simd_32/simd_32.h index 15be7713d..9ea565402 100644 --- a/src/utils/simd_32/simd_32.h +++ b/src/utils/simd_32/simd_32.h @@ -10,7 +10,7 @@ #include -#if defined(BOTAN_TARGET_CPU_HAS_SSE2) +#if defined(BOTAN_TARGET_CPU_HAS_SSE2) && !defined(BOTAN_NO_SSE_INTRINSICS) #include namespace Botan { typedef SIMD_SSE2 SIMD_32; } -- cgit v1.2.3