aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-08-23 10:38:39 -0400
committerJack Lloyd <[email protected]>2017-08-23 10:38:39 -0400
commit767b4018ab2b5a651ec1db105778e29317366d97 (patch)
treea8a45fdc0269235d0352e2234b017f49599e29e8 /src/lib
parentd97fd8356fc1eaacf44f636dcf31b4dae057cb74 (diff)
Fix bug affecting AltiVec on ppc64le processors
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/utils/simd/simd_32.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/lib/utils/simd/simd_32.h b/src/lib/utils/simd/simd_32.h
index def933f4a..6d9223a38 100644
--- a/src/lib/utils/simd/simd_32.h
+++ b/src/lib/utils/simd/simd_32.h
@@ -214,18 +214,12 @@ class SIMD_4x32 final
#elif defined(BOTAN_SIMD_USE_ALTIVEC)
- __vector unsigned char perm = vec_lvsl(0, static_cast<uint32_t*>(nullptr));
- if(CPUID::is_big_endian())
- {
- perm = vec_xor(perm, vec_splat_u8(3)); // bswap vector
- }
-
union {
__vector unsigned int V;
uint32_t R[4];
} vec;
- vec.V = vec_perm(m_vmx, m_vmx, perm);
- Botan::store_be(out, vec.R[0], vec.R[1], vec.R[2], vec.R[3]);
+ vec.V = m_vmx;
+ Botan::store_le(out, vec.R[0], vec.R[1], vec.R[2], vec.R[3]);
#elif defined(BOTAN_SIMD_USE_NEON)