diff options
author | Samuel Neves <sneves@dei.uc.pt> | 2015-10-14 16:02:14 +0300 |
---|---|---|
committer | Samuel Neves <sneves@dei.uc.pt> | 2015-10-14 16:02:14 +0300 |
commit | 94d1fefcb49abe199f8c1a58f05f85cac042bf48 (patch) | |
tree | 26dae6dbc6b081610dfbc7597adfdc0498554d7f /sse | |
parent | b6525c7fa15dbf6713e0597727827d191a31a26a (diff) |
fix issues reported by Yutaka Sawada
Diffstat (limited to 'sse')
-rw-r--r-- | sse/blake2b-round.h | 2 | ||||
-rw-r--r-- | sse/blake2b.c | 4 | ||||
-rw-r--r-- | sse/blake2s-round.h | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/sse/blake2b-round.h b/sse/blake2b-round.h index 5c49351..200b066 100644 --- a/sse/blake2b-round.h +++ b/sse/blake2b-round.h @@ -33,7 +33,7 @@ : (-(c) == 63) ? _mm_xor_si128(_mm_srli_epi64((x), -(c)), _mm_add_epi64((x), (x))) \ : _mm_xor_si128(_mm_srli_epi64((x), -(c)), _mm_slli_epi64((x), 64-(-(c)))) #else -#define _mm_roti_epi64(r, c) _mm_xor_si128(_mm_srli_epi64( (r), -(c) ),_mm_slli_epi64( (r), 64-(-c) )) +#define _mm_roti_epi64(r, c) _mm_xor_si128(_mm_srli_epi64( (r), -(c) ),_mm_slli_epi64( (r), 64-(-(c)) )) #endif #else /* ... */ diff --git a/sse/blake2b.c b/sse/blake2b.c index 423bd39..634f0ae 100644 --- a/sse/blake2b.c +++ b/sse/blake2b.c @@ -20,7 +20,9 @@ #include "blake2-config.h" - +#ifdef _MSC_VER +#include <intrin.h> /* for _mm_set_epi64x */ +#endif #include <emmintrin.h> #if defined(HAVE_SSSE3) #include <tmmintrin.h> diff --git a/sse/blake2s-round.h b/sse/blake2s-round.h index 57bbc50..9c58b52 100644 --- a/sse/blake2s-round.h +++ b/sse/blake2s-round.h @@ -31,7 +31,7 @@ : (16==-(c)) ? _mm_shuffle_epi8(r,r16) \ : _mm_xor_si128(_mm_srli_epi32( (r), -(c) ),_mm_slli_epi32( (r), 32-(-(c)) )) ) #else -#define _mm_roti_epi32(r, c) _mm_xor_si128(_mm_srli_epi32( (r), -(c) ),_mm_slli_epi32( (r), 32-(-c) )) +#define _mm_roti_epi32(r, c) _mm_xor_si128(_mm_srli_epi32( (r), -(c) ),_mm_slli_epi32( (r), 32-(-(c)) )) #endif #else /* ... */ |