diff options
author | Brad King <brad.king@kitware.com> | 2020-04-22 12:33:15 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-04-22 12:33:22 (GMT) |
commit | acecd76f03ce6c137f72840a1aa6ef6e34f79f67 (patch) | |
tree | 31726db43f573c6448d3dc56fc0fb87f79681094 /Source | |
parent | 60831cfb226d680bac4edaa580b801cd86e0e89d (diff) | |
parent | 8191d39119683c0b8a04cfbd8157524be2bd16a3 (diff) | |
download | CMake-acecd76f03ce6c137f72840a1aa6ef6e34f79f67.zip CMake-acecd76f03ce6c137f72840a1aa6ef6e34f79f67.tar.gz CMake-acecd76f03ce6c137f72840a1aa6ef6e34f79f67.tar.bz2 |
Merge topic 'update-kwsys'
8191d39119 Merge branch 'upstream-KWSys' into update-kwsys
e833e660ef KWSys 2020-04-21 (44086372)
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4646
Diffstat (limited to 'Source')
-rw-r--r-- | Source/kwsys/SystemInformation.cxx | 9 |
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 |