From a839af04dc16e0aff8da935ca5b83af932828979 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 14 Mar 2024 11:13:54 +0530 Subject: [PATCH] Fix #7219 --- kitty/simd-string.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kitty/simd-string.c b/kitty/simd-string.c index c7b199461..926630d3c 100644 --- a/kitty/simd-string.c +++ b/kitty/simd-string.c @@ -200,7 +200,7 @@ init_simd(void *x) { #ifdef __APPLE__ #ifdef __arm64__ // simde takes care of NEON on Apple Silicon - // ARM has only 128 bit registers buy using the avx2 code is still slightly faster + // ARM has only 128 bit registers but using the avx2 code is still slightly faster has_sse4_2 = true; has_avx2 = true; #else do_check(); @@ -217,6 +217,8 @@ init_simd(void *x) { // basic AVX2 and SSE4.2 intrinsics, so hopefully they work on ARM // ARM has only 128 bit registers buy using the avx2 code is still slightly faster has_sse4_2 = true; has_avx2 = true; +#elif defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) + // armv6 or armv7 have no __builtin_cpu_supports so assume no SIMD we dont really support these platforms anyway #else do_check(); #endif