From dec4be9fe4223ffc2f9c5c06d3d31630fd79560c Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Mon, 7 Jun 2021 10:49:14 -0400 Subject: [PATCH 1/3] Adding ARM checks under Windows. --- .github/workflows/vs16-arm-ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/vs16-arm-ci.yml diff --git a/.github/workflows/vs16-arm-ci.yml b/.github/workflows/vs16-arm-ci.yml new file mode 100644 index 0000000..7c69e38 --- /dev/null +++ b/.github/workflows/vs16-arm-ci.yml @@ -0,0 +1,21 @@ +name: VS16-ARM-CI + +on: [push, pull_request] + +jobs: + ci: + name: windows-vs16 + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + include: + - {arch: ARM} + - {arch: ARM64} + steps: + - name: checkout + uses: actions/checkout@v2 + - name: Use cmake + run: | + cmake -A ${{ matrix.arch }} -DCMAKE_CROSSCOMPILING=1 -DFASTFLOAT_TEST=ON -B build && + cmake --build build --verbose \ No newline at end of file From 7696f1f0a74b6a063df6ba87f17ba9238c814c96 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Mon, 7 Jun 2021 11:06:52 -0400 Subject: [PATCH 2/3] Guarding arm under Windows. --- include/ewah/ewahutil.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ewah/ewahutil.h b/include/ewah/ewahutil.h index 81cd542..ed7b6f3 100644 --- a/include/ewah/ewahutil.h +++ b/include/ewah/ewahutil.h @@ -155,7 +155,7 @@ static inline uint32_t ctz16(uint16_t n) { inline uint32_t countOnes(uint32_t x) { return static_cast(__builtin_popcount(x)); } -#elif defined(_MSC_VER) && _MSC_VER >= 1400 +#elif defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(_M_ARM) inline uint32_t countOnes(uint32_t x) { return __popcnt(x); } #else inline uint32_t countOnes(uint32_t v) { @@ -173,7 +173,7 @@ inline uint32_t countOnes(uint32_t v) { inline uint32_t countOnes(uint64_t x) { return static_cast(__builtin_popcountll(x)); } -#elif defined(_WIN64) && defined(_MSC_VER) && _MSC_VER >= 1400 +#elif defined(_WIN64) && defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(_M_ARM64) inline uint32_t countOnes(uint64_t x) { return static_cast(__popcnt64(static_cast<__int64>(x))); } From 890b60dae7122f2198b3a41a210daf2d68be3e78 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Mon, 7 Jun 2021 11:15:11 -0400 Subject: [PATCH 3/3] Adding another check. --- include/ewah/ewahutil.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ewah/ewahutil.h b/include/ewah/ewahutil.h index ed7b6f3..e038ce9 100644 --- a/include/ewah/ewahutil.h +++ b/include/ewah/ewahutil.h @@ -155,7 +155,7 @@ static inline uint32_t ctz16(uint16_t n) { inline uint32_t countOnes(uint32_t x) { return static_cast(__builtin_popcount(x)); } -#elif defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(_M_ARM) +#elif defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(_M_ARM)&& !defined(_M_ARM64) inline uint32_t countOnes(uint32_t x) { return __popcnt(x); } #else inline uint32_t countOnes(uint32_t v) {