diff options
author | Jack Lloyd <[email protected]> | 2018-03-28 04:54:09 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-03-28 05:13:37 -0400 |
commit | 5be6acad588462e29379008dd0e3b7d8f178579b (patch) | |
tree | aa8d55492abd2ae527caec33ae36ac449caecc12 /src/lib/utils/simd/simd_32.h | |
parent | fb816bf68736dfea82eec4ecdbb8170fb9a37bbb (diff) |
Avoid another problem with AltiVec
This caused test failures on ppc64 (big-endian) with GCC 7.2
Diffstat (limited to 'src/lib/utils/simd/simd_32.h')
-rw-r--r-- | src/lib/utils/simd/simd_32.h | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/lib/utils/simd/simd_32.h b/src/lib/utils/simd/simd_32.h index d7316ee01..8e6ac3639 100644 --- a/src/lib/utils/simd/simd_32.h +++ b/src/lib/utils/simd/simd_32.h @@ -134,14 +134,10 @@ class SIMD_4x32 final return SIMD_4x32(_mm_loadu_si128(reinterpret_cast<const __m128i*>(in))); #elif defined(BOTAN_SIMD_USE_ALTIVEC) - union { - __vector unsigned int V; - uint32_t R[4]; - } vec; - - Botan::load_le(vec.R, static_cast<const uint8_t*>(in), 4); + uint32_t R[4]; + Botan::load_le(R, static_cast<const uint8_t*>(in), 4); + return SIMD_4x32(R); - return SIMD_4x32(vec.V); #elif defined(BOTAN_SIMD_USE_NEON) uint32_t in32[4]; @@ -170,14 +166,9 @@ class SIMD_4x32 final #elif defined(BOTAN_SIMD_USE_ALTIVEC) - union { - __vector unsigned int V; - uint32_t R[4]; - } vec; - - Botan::load_be(vec.R, static_cast<const uint8_t*>(in), 4); - - return SIMD_4x32(vec.V); + uint32_t R[4]; + Botan::load_be(R, static_cast<const uint8_t*>(in), 4); + return SIMD_4x32(R); #elif defined(BOTAN_SIMD_USE_NEON) |