Skip to content

Commit

Permalink
fix Windows ARM64 build and detect ARM64EC as ARM64
Browse files Browse the repository at this point in the history
  • Loading branch information
jblazquez authored and oconnor663 committed Apr 7, 2024
1 parent 4ec3be8 commit 0816bad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion c/blake3_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@

#include "blake3_impl.h"

#if defined(IS_X86)
#if defined(_MSC_VER)
#include <Windows.h>
#endif

#if defined(IS_X86)
#if defined(_MSC_VER)
#include <intrin.h>
#elif defined(__GNUC__)
#include <immintrin.h>
Expand Down
4 changes: 2 additions & 2 deletions c/blake3_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ enum blake3_flags {
#define INLINE static inline __attribute__((always_inline))
#endif

#if defined(__x86_64__) || defined(_M_X64)
#if (defined(__x86_64__) || defined(_M_X64)) && !defined(_M_ARM64EC)
#define IS_X86
#define IS_X86_64
#endif
Expand All @@ -38,7 +38,7 @@ enum blake3_flags {
#define IS_X86_32
#endif

#if defined(__aarch64__) || defined(_M_ARM64)
#if defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC)
#define IS_AARCH64
#endif

Expand Down

0 comments on commit 0816bad

Please sign in to comment.