summaryrefslogtreecommitdiff
path: root/blake2.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-07-23 23:49:26 -0400
committerJeffrey Walton <noloader@gmail.com>2016-07-23 23:49:26 -0400
commitef4f185d9beed6709e6bf843b98f579c5fb38e8c (patch)
tree414fc4675deb4218c52592d87cabf16b8229d02b /blake2.cpp
parentd8638a597fe364bca762fe55639899adcafc7e2b (diff)
downloadcryptopp-git-ef4f185d9beed6709e6bf843b98f579c5fb38e8c.tar.gz
Avoid accessing union value through inactive member
Diffstat (limited to 'blake2.cpp')
-rw-r--r--blake2.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/blake2.cpp b/blake2.cpp
index 2e73bdd1..cb274c99 100644
--- a/blake2.cpp
+++ b/blake2.cpp
@@ -13,7 +13,8 @@
NAMESPACE_BEGIN(CryptoPP)
-// Uncomment for benchmarking C++ against NEON
+// Uncomment for benchmarking C++ against SSE2 or NEON
+// #undef CRYPTOPP_BOOL_SSE4_INTRINSICS_AVAILABLE
// #undef CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE
// Visual Studio needs both VS2005 (1400) and _M_64 for SSE2 and _mm_set_epi64x()
@@ -46,7 +47,7 @@ inline __m128i _mm_set_epi64x(const uint64_t a, const uint64_t b)
INT_128_64 v;
v.v64[0] = b; v.v64[1] = a;
- return v.v128;
+ return *(reinterpret_cast<__m128i*>(v.v64));
}
#endif