package An official xmake package repository https://xrepo.xmake.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
1.2 KiB

diff --git a/quill/include/quill/core/Rdtsc.h b/quill/include/quill/core/Rdtsc.h
index 2a5203b..17b92b7 100644
--- a/quill/include/quill/core/Rdtsc.h
+++ b/quill/include/quill/core/Rdtsc.h
@@ -45,7 +45,7 @@ QUILL_NODISCARD QUILL_ATTRIBUTE_HOT inline uint64_t rdtsc() noexcept
__asm__ volatile("mrs %0, cntvct_el0" : "=r"(virtual_timer_value));
return static_cast<uint64_t>(virtual_timer_value);
}
-#elif defined(__ARM_ARCH)
+#elif (defined(__ARM_ARCH) && !defined(_MSC_VER))
QUILL_NODISCARD QUILL_ATTRIBUTE_HOT inline uint64_t rdtsc() noexcept
{
#if (__ARM_ARCH >= 6)
@@ -69,13 +69,7 @@ QUILL_NODISCARD QUILL_ATTRIBUTE_HOT inline uint64_t rdtsc() noexcept
// soft failover
return static_cast<uint64_t>(std::chrono::system_clock::now().time_since_epoch().count());
}
-#elif (defined(_M_ARM) || defined(_M_ARM64))
-QUILL_NODISCARD QUILL_ATTRIBUTE_HOT inline uint64_t rdtsc() noexcept
-{
- // soft failover
- return static_cast<uint64_t>(std::chrono::system_clock::now().time_since_epoch().count());
-}
-#elif (defined(__PPC64__))
+#elif (defined(_M_ARM) || defined(_M_ARM64) || defined(__PPC64__))
QUILL_NODISCARD QUILL_ATTRIBUTE_HOT inline uint64_t rdtsc() noexcept
{
// soft failover