Skip to content

Commit 81759f4

Browse files
committed
Add basic support for Windows ARM64EC
Make libdeflate build for ARM64EC, and add ARM64EC to GitHub Actions. ARM64EC pretends to be x86_64, but lots of x86_64 functionality is broken: - 256-bit and 512-bit vectors are unsupported - _mm*_load*() do not accept void pointers - _m_prefetchw() is not supported - bmi2 intrinsics are not supported For now just do the simple thing and treat ARM64EC as a generic architecture, so do not try to use any of the x86_64 optimized code. The premise of optimizing for ARM64EC seems questionable, after all, given that proper ARM64 builds are fully supported.
1 parent 8d351ab commit 81759f4

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,11 @@ jobs:
139139
name: Build (Windows, Visual Studio ${{matrix.toolset}}, ${{matrix.platform}})
140140
strategy:
141141
matrix:
142-
platform: [ARM64]
142+
platform: [ARM64, ARM64EC]
143143
toolset: [v143, ClangCL]
144+
exclude: # Exclude unsupported combinations
145+
- platform: ARM64EC
146+
toolset: ClangCL
144147
runs-on: windows-latest
145148
steps:
146149
- uses: actions/checkout@v4
@@ -149,7 +152,7 @@ jobs:
149152
- run: >
150153
cmake -B build -G "Visual Studio 17 2022" -T ${{matrix.toolset}}
151154
-A ${{matrix.platform}} -DCMAKE_C_FLAGS="/W4 /WX"
152-
-DCMAKE_INSTALL_PREFIX=build\install
155+
-DCMAKE_INSTALL_PREFIX=build\install -DCMAKE_SYSTEM_VERSION=10
153156
- run: cmake --build build --verbose --config Release
154157
- run: cmake --install build --verbose --config Release
155158

common_defs.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@
6767
#undef ARCH_ARM32
6868
#undef ARCH_RISCV
6969
#ifdef _MSC_VER
70-
# if defined(_M_X64)
70+
/* Way too many things are broken in ARM64EC to pretend that it is x86_64. */
71+
# if defined(_M_X64) && !defined(_M_ARM64EC)
7172
# define ARCH_X86_64
7273
# elif defined(_M_IX86)
7374
# define ARCH_X86_32

0 commit comments

Comments
 (0)