mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-26 08:29:54 -06:00
KWSys 2020-04-21 (44086372)
Code extracted from:
https://gitlab.kitware.com/utils/kwsys.git
at commit 4408637212fe1ddf09425beba97e105009734e31 (master).
Upstream Shortlog
-----------------
Hernan Martinez (1):
00629420 SystemInformation: Add support for Windows on ARM64
This commit is contained in:
committed by
Brad King
parent
363ec4f585
commit
e833e660ef
@@ -204,7 +204,8 @@ typedef struct rlimit ResourceLimitType;
|
|||||||
# define USE_ASM_INSTRUCTIONS 0
|
# define USE_ASM_INSTRUCTIONS 0
|
||||||
#endif
|
#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>
|
# include <intrin.h>
|
||||||
# define USE_CPUID_INTRINSICS 1
|
# define USE_CPUID_INTRINSICS 1
|
||||||
#else
|
#else
|
||||||
@@ -4322,9 +4323,15 @@ SystemInformationImplementation::GetCyclesDifference(DELAY_FUNC DelayFunction,
|
|||||||
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||||
unsigned __int64 stamp1, stamp2;
|
unsigned __int64 stamp1, stamp2;
|
||||||
|
|
||||||
|
# ifdef _M_ARM64
|
||||||
|
stamp1 = _ReadStatusReg(ARM64_PMCCNTR_EL0);
|
||||||
|
DelayFunction(uiParameter);
|
||||||
|
stamp2 = _ReadStatusReg(ARM64_PMCCNTR_EL0);
|
||||||
|
# else
|
||||||
stamp1 = __rdtsc();
|
stamp1 = __rdtsc();
|
||||||
DelayFunction(uiParameter);
|
DelayFunction(uiParameter);
|
||||||
stamp2 = __rdtsc();
|
stamp2 = __rdtsc();
|
||||||
|
# endif
|
||||||
|
|
||||||
return stamp2 - stamp1;
|
return stamp2 - stamp1;
|
||||||
#elif USE_ASM_INSTRUCTIONS
|
#elif USE_ASM_INSTRUCTIONS
|
||||||
|
|||||||
Reference in New Issue
Block a user