mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 04:01:31 +00:00
- and now it builds! but ... does it run?
This commit is contained in:
parent
67096c8966
commit
bbfb934e80
1 changed files with 9 additions and 1 deletions
|
@ -97,11 +97,13 @@ private:
|
||||||
#else
|
#else
|
||||||
|
|
||||||
// Windows and macOS
|
// Windows and macOS
|
||||||
|
#ifndef _M_ARM
|
||||||
#include "x86.h"
|
#include "x86.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
extern double PerfToSec, PerfToMillisec;
|
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
|
// Trying to include intrin.h here results in some bizarre errors, so I'm just
|
||||||
// going to duplicate the function prototype instead.
|
// going to duplicate the function prototype instead.
|
||||||
//#include <intrin.h>
|
//#include <intrin.h>
|
||||||
|
@ -111,6 +113,12 @@ inline unsigned __int64 rdtsc()
|
||||||
{
|
{
|
||||||
return __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__)
|
#elif defined __APPLE__ && (defined __i386__ || defined __x86_64__)
|
||||||
inline uint64_t rdtsc()
|
inline uint64_t rdtsc()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue