diff options
author | lloyd <[email protected]> | 2010-01-04 14:47:14 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-01-04 14:47:14 +0000 |
commit | bf4526f87e5ce407d521fffa89f571232529c09e (patch) | |
tree | b35d315fff58d9dcd7ef35fb7e6870cd09ce4c7a /src/utils/bswap.h | |
parent | a45919c99b36f4440b74e1b0488127c0c6625409 (diff) |
Remove pshufb-based bswap_4; it causes problems too easily with external
application code that wants to use loadstor.h, since that loads bswap.h
and if SSSE3 isn't enabled via -march GCC will error out. Doesn't seem to
be at all faster than the shuffle-based bswap for SSE2 on a Core2 in any case.
Diffstat (limited to 'src/utils/bswap.h')
-rw-r--r-- | src/utils/bswap.h | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/src/utils/bswap.h b/src/utils/bswap.h index cceeda4f3..fcb0fa7ea 100644 --- a/src/utils/bswap.h +++ b/src/utils/bswap.h @@ -16,10 +16,6 @@ #include <emmintrin.h> #endif -#if defined(BOTAN_TARGET_CPU_HAS_SSSE3) - #include <tmmintrin.h> -#endif - namespace Botan { /* @@ -82,23 +78,7 @@ inline void bswap_4(T x[4]) x[3] = reverse_bytes(x[3]); } -#if defined(BOTAN_TARGET_CPU_HAS_SSSE3) - -template<> -inline void bswap_4(u32bit x[4]) - { - const __m128i bswap_mask = _mm_set_epi8( - 12, 13, 14, 15, - 8, 9, 10, 11, - 4, 5, 6, 7, - 0, 1, 2, 3); - - __m128i T = _mm_loadu_si128((const __m128i*)x); - T = _mm_shuffle_epi8(T, bswap_mask); - _mm_storeu_si128((__m128i*)x, T); - } - -#elif defined(BOTAN_TARGET_CPU_HAS_SSE2) +#if defined(BOTAN_TARGET_CPU_HAS_SSE2) template<> inline void bswap_4(u32bit x[4]) |