Skip to content

Commit 3bced4b

Browse files
committed
Enable the ARM64 target on the ARM64EC ABI.
ARM64EC enables both _M_AMD64 and _M_ARM64EC. We already exclude ARM64EC from the SSE2 detection, but it was missing for the X64 target detection. However we're now fine to enable the ARM64 target. At least my kernels compile fine (as good as on the raw arm64) on MSVC. Related: https://techcommunity.microsoft.com/blog/windowsosplatform/getting-to-know-arm64ec-defines-and-intrinsic-functions/2957235
1 parent 3b3151f commit 3bced4b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/xsimd/config/xsimd_config.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
*
5252
* Set to 1 if the target is the x86 architecture family.
5353
*/
54-
#if defined(__x86_64__) || defined(__i386__) || defined(_M_AMD64) || defined(_M_IX86)
54+
#if (defined(__x86_64__) || defined(__i386__) || defined(_M_AMD64) || defined(_M_IX86)) && !defined(_M_ARM64EC)
5555
#define XSIMD_TARGET_X86 1
5656
#else
5757
#define XSIMD_TARGET_X86 0
@@ -422,7 +422,7 @@
422422
*
423423
* Set to 1 if the target is in the ARM architecture family in 64 bits, to 0 otherwise
424424
*/
425-
#if defined(__aarch64__) || defined(_M_ARM64)
425+
#if defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC)
426426
#define XSIMD_TARGET_ARM64 1
427427
#else
428428
#define XSIMD_TARGET_ARM64 0

0 commit comments

Comments
 (0)