summaryrefslogtreecommitdiffstats
path: root/Source/kwsys
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-21 11:15:22 (GMT)
committerBrad King <brad.king@kitware.com>2020-04-21 11:15:22 (GMT)
commit8191d39119683c0b8a04cfbd8157524be2bd16a3 (patch)
tree891fb27135c9520217c73078765a817adcfd7f86 /Source/kwsys
parent441a5f73c0a520c8f1d00df77a07b3bd89372284 (diff)
parente833e660efe92f6249ac87c09c7263cf2d3d43b3 (diff)
downloadCMake-8191d39119683c0b8a04cfbd8157524be2bd16a3.zip
CMake-8191d39119683c0b8a04cfbd8157524be2bd16a3.tar.gz
CMake-8191d39119683c0b8a04cfbd8157524be2bd16a3.tar.bz2
Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream * upstream-KWSys: KWSys 2020-04-21 (44086372)
Diffstat (limited to 'Source/kwsys')
-rw-r--r--Source/kwsys/SystemInformation.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
index 95b06e1..ba9fa67 100644
--- a/Source/kwsys/SystemInformation.cxx
+++ b/Source/kwsys/SystemInformation.cxx
@@ -204,7 +204,8 @@ typedef struct rlimit ResourceLimitType;
# define USE_ASM_INSTRUCTIONS 0
#endif
-#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__clang__)
+#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__clang__) && \
+ !defined(_M_ARM64)
# include <intrin.h>
# define USE_CPUID_INTRINSICS 1
#else
@@ -4322,9 +4323,15 @@ SystemInformationImplementation::GetCyclesDifference(DELAY_FUNC DelayFunction,
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
unsigned __int64 stamp1, stamp2;
+# ifdef _M_ARM64
+ stamp1 = _ReadStatusReg(ARM64_PMCCNTR_EL0);
+ DelayFunction(uiParameter);
+ stamp2 = _ReadStatusReg(ARM64_PMCCNTR_EL0);
+# else
stamp1 = __rdtsc();
DelayFunction(uiParameter);
stamp2 = __rdtsc();
+# endif
return stamp2 - stamp1;
#elif USE_ASM_INSTRUCTIONS