Squashed commit of the following: (#1248)
commit bbfb934e808c6602d3a059adf270e997b71b900c
Author: Rachael Alexanderson <madame-rachelle@users.noreply.github.com>
Date: Sun Dec 6 23:50:15 2020 -0500
- and now it builds! but ... does it run?
commit 67096c8966f28dcff40c998d10e5510d6a689a13
Author: Rachael Alexanderson <madame-rachelle@users.noreply.github.com>
Date: Sun Dec 6 22:25:13 2020 -0500
- one more step closer to compile
commit 5a0c84dd2d3e1798e7a99f4ec1696f678708f0e6
Author: Rachael Alexanderson <madame-rachelle@users.noreply.github.com>
Date: Sun Dec 6 22:13:39 2020 -0500
- set up dynamic opengl load for windows
commit 6ef8118b801f305000ce881a4b04aaaef0196226
Author: Rachael Alexanderson <madame-rachelle@users.noreply.github.com>
Date: Sat Dec 5 16:38:53 2020 -0500
- allow compiling for win-arm64
commit 7d6f3797c4393fa7b0ed567b94d1de135ecb5ac6
Author: Rachael Alexanderson <madame-rachelle@users.noreply.github.com>
Date: Fri Dec 4 05:18:29 2020 -0500
- allow targeting ARM64 on Windows
Co-authored-by: Rachael Alexanderson <madame-rachelle@users.noreply.github.com>
This commit is contained in:
parent
f223005584
commit
64ff15b82b
9 changed files with 98 additions and 19 deletions
|
|
@ -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(0b11, 0b011, 0b1001, 0b1101, 0b000)); //_ReadStatusReg(PMCCNTR_EL0);
|
||||
}
|
||||
#elif defined __APPLE__ && (defined __i386__ || defined __x86_64__)
|
||||
inline uint64_t rdtsc()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue