- and now it builds! but ... does it run?

This commit is contained in:
Rachael Alexanderson 2020-12-06 23:50:15 -05:00
parent 67096c8966
commit bbfb934e80

View file

@ -97,11 +97,13 @@ private:
#else
// Windows and macOS
#ifndef _M_ARM
#include "x86.h"
#endif
extern double PerfToSec, PerfToMillisec;
#ifdef _MSC_VER
#if defined(_MSC_VER) && !defined(_M_ARM64)
// Trying to include intrin.h here results in some bizarre errors, so I'm just
// going to duplicate the function prototype instead.
//#include <intrin.h>
@ -111,6 +113,12 @@ inline unsigned __int64 rdtsc()
{
return __rdtsc();
}
#elif defined(_MSC_VER) && defined(_M_ARM64)
#include <intrin.h>
inline unsigned __int64 rdtsc()
{
return _ReadStatusReg(ARM64_SYSREG(3, 3, 13, 0, 2)); //_ReadStatusReg(PMCCNTR_EL0);
}
#elif defined __APPLE__ && (defined __i386__ || defined __x86_64__)
inline uint64_t rdtsc()
{