aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/utils/simd/simd_32.h21
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)