diff options
author | Jeffrey Walton <noloader@gmail.com> | 2020-04-10 14:36:06 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2020-04-10 14:36:06 -0400 |
commit | 6a13273942a30bf514747b32983a7cae5b9c5622 (patch) | |
tree | 0828c0254d370cdf837a2740cc60a6c12149ccd1 /ppc_simd.h | |
parent | 5f41f3ad597058e4540287c1bbb90104312090ab (diff) | |
download | cryptopp-git-6a13273942a30bf514747b32983a7cae5b9c5622.tar.gz |
Fix compile with XL C++ on Power7
Diffstat (limited to 'ppc_simd.h')
-rw-r--r-- | ppc_simd.h | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -1786,14 +1786,15 @@ inline T VecMergeHigh(const T vec1, const T vec2) /// \since Crypto++ 8.3
inline uint32x4_p VecSplatWord(word32 val)
{
- // Apple Altivec does not offer vec_splats. GCC offers
- // vec_splats back to -mcpu=power4. We can't test
- // further back because -mcpu=power3 is not supported.
-#if defined(_ARCH_PWR4)
+ // Apple Altivec and XL C++ do not offer vec_splats.
+ // GCC offers vec_splats back to -mcpu=power4.
+#if defined(_ARCH_PWR4) && defined(__GNUC__)
return vec_splats(val);
#else
- const word32 x[4] = {val,val,val,val};
- return VecLoad(x);
+ //const word32 x[4] = {val,val,val,val};
+ //return VecLoad(x);
+ const word32 x[4] = {val};
+ return vec_splat(VecLoad(x),0);
#endif
}
|