From c63508d6d0ace9152f25110f5b7e8737961922a3 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Thu, 6 Aug 2015 21:10:50 +0200 Subject: [PATCH] lyra2: vstudio improvements --- lyra2/Sponge.h | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/lyra2/Sponge.h b/lyra2/Sponge.h index 6489d1d6..7fcd0934 100644 --- a/lyra2/Sponge.h +++ b/lyra2/Sponge.h @@ -24,15 +24,6 @@ #include -#if defined(__GNUC__) -#define ALIGN __attribute__ ((aligned(32))) -#elif defined(_MSC_VER) -#define ALIGN __declspec(align(32)) -#else -#define ALIGN -#endif - - /* Blake2b IV Array */ static const uint64_t blake2b_IV[8] = { @@ -43,8 +34,12 @@ static const uint64_t blake2b_IV[8] = }; /* Blake2b's rotation */ -static __inline uint64_t rotr64( const uint64_t w, const unsigned c ){ +static __inline uint64_t rotr64(const uint64_t w, const unsigned c) { +#ifdef _MSC_VER + return _rotr64(w, c); +#else return ( w >> c ) | ( w << ( 64 - c ) ); +#endif } /* Blake2b's G function */