Remove unneeded code from Blake2
parent
f143534d99
commit
916fe7db26
|
|
@ -43,24 +43,11 @@
|
|||
#define M128_CAST(x) ((__m128i *)(void *)(x))
|
||||
#define CONST_M128_CAST(x) ((const __m128i *)(const void *)(x))
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
// Sun Studio 12.3 and earlier lack SSE2's _mm_set_epi64x. Win32 lacks _mm_set_epi64x,
|
||||
// Win64 supplies it except for VS2008. See http://stackoverflow.com/a/38547909/608639
|
||||
#if CRYPTOPP_SSE2_INTRIN_AVAILABLE && ((__SUNPRO_CC >= 0x5100 && __SUNPRO_CC < 0x5130) || \
|
||||
(defined(_MSC_VER) && _MSC_VER < 1600) || (defined(_M_IX86) && _MSC_VER >= 1600))
|
||||
inline __m128i MM_SET_EPI64X(const word64 a, const word64 b)
|
||||
{
|
||||
const word64 t[2] = {b,a}; __m128i r;
|
||||
std::memcpy(&r, t, sizeof(t));
|
||||
return r;
|
||||
}
|
||||
#else
|
||||
# define MM_SET_EPI64X(a, b) _mm_set_epi64x(a, b)
|
||||
#endif
|
||||
|
||||
ANONYMOUS_NAMESPACE_BEGIN
|
||||
|
||||
using CryptoPP::word32;
|
||||
using CryptoPP::word64;
|
||||
|
||||
CRYPTOPP_ALIGN_DATA(16)
|
||||
const word32 BLAKE2S_IV[8] = {
|
||||
0x6A09E667UL, 0xBB67AE85UL, 0x3C6EF372UL, 0xA54FF53AUL,
|
||||
|
|
@ -77,6 +64,8 @@ const word64 BLAKE2B_IV[8] = {
|
|||
|
||||
ANONYMOUS_NAMESPACE_END
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
#if CRYPTOPP_SSE41_AVAILABLE
|
||||
void BLAKE2_Compress32_SSE4(const byte* input, BLAKE2_State<word32, false>& state)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue