From c77ace7059e0376d33c818f7d77b63ecf3739fa9 Mon Sep 17 00:00:00 2001 From: John Marshall Date: Mon, 27 Jun 2022 14:15:59 +0100 Subject: [PATCH] Use native SSE2 intrinsics on i386 as well as x86-64 Make the native SSE2 code conditional on __SSE2__, which is defined by GCC/Clang/etc on x86-64 by default and on i386 with -msse2 etc. --- ksw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ksw.c b/ksw.c index 22c8d10b..1e584e9d 100644 --- a/ksw.c +++ b/ksw.c @@ -26,7 +26,7 @@ #include #include #include -#if defined __x86_64__ +#if defined __SSE2__ #include #elif defined __ARM_NEON #include "neon_sse.h" @@ -126,7 +126,7 @@ kswr_t ksw_u8(kswq_t *q, int tlen, const uint8_t *target, int _o_del, int _e_del __m128i zero, oe_del, e_del, oe_ins, e_ins, shift, *H0, *H1, *E, *Hmax; kswr_t r; -#if defined __x86_64__ +#if defined __SSE2__ #define __max_16(ret, xx) do { \ (xx) = _mm_max_epu8((xx), _mm_srli_si128((xx), 8)); \ (xx) = _mm_max_epu8((xx), _mm_srli_si128((xx), 4)); \ @@ -259,7 +259,7 @@ kswr_t ksw_i16(kswq_t *q, int tlen, const uint8_t *target, int _o_del, int _e_de __m128i zero, oe_del, e_del, oe_ins, e_ins, *H0, *H1, *E, *Hmax; kswr_t r; -#if defined __x86_64__ +#if defined __SSE2__ #define __max_8(ret, xx) do { \ (xx) = _mm_max_epi16((xx), _mm_srli_si128((xx), 8)); \ (xx) = _mm_max_epi16((xx), _mm_srli_si128((xx), 4)); \