1
1
mirror of https://github.com/BLAKE2/BLAKE2 synced 2024-11-08 14:59:19 +01:00

count cycles on msvc

This commit is contained in:
Samuel Neves 2016-06-15 13:05:28 +01:00
parent 0ee2296e98
commit a0f55091f1

@ -43,6 +43,11 @@ static unsigned long long cpucycles( void ) {
__asm__ __volatile__( ".byte 15;.byte 49;" : "=A" ( result ) );
return result;
}
#elif defined(_MSC_VER)
#include <intrin.h>
static unsigned long long cpucycles( void ) {
return __rdtsc();
}
#else
#error "Don't know how to count cycles on this platform!"
#endif