summaryrefslogtreecommitdiff
path: root/absl/base/internal
diff options
context:
space:
mode:
authorGravatar Ben Niu <niuben003@gmail.com>2022-03-18 13:10:10 -0700
committerGravatar GitHub <noreply@github.com>2022-03-18 16:10:10 -0400
commit4c015dbb49fcfac25899f3ba7da4be665b5f9aab (patch)
tree3c914a0c7e696557705fdab1b79f5f441d82d27d /absl/base/internal
parentc33f21f86a14216336b87d48e9b552a13985b2bc (diff)
Exclude unsupported x64 intrinsics from ARM64EC (#1135)
ARM64EC is a Microsoft-designed ARM64 ABI compatible with AMD64 applications on ARM64 Windows 11. The ARM64EC does not support _umul128 and __rdtsc as x64 intrinsics, though it provides inline function implementations for them, by emulation. Since the code already has portable code paths without using the intrinsics, instead of using the emulated intrinsic implementations, we use the said portable code paths for ARM64EC.
Diffstat (limited to 'absl/base/internal')
-rw-r--r--absl/base/internal/unscaledcycleclock.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/absl/base/internal/unscaledcycleclock.h b/absl/base/internal/unscaledcycleclock.h
index 07f867a6..a4351406 100644
--- a/absl/base/internal/unscaledcycleclock.h
+++ b/absl/base/internal/unscaledcycleclock.h
@@ -47,7 +47,7 @@
// The following platforms have an implementation of a hardware counter.
#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \
defined(__powerpc__) || defined(__ppc__) || defined(__riscv) || \
- defined(_M_IX86) || defined(_M_X64)
+ defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC))
#define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1
#else
#define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 0