From 6182fda16b1f54920d4a4e12b128cc330e90fbe0 Mon Sep 17 00:00:00 2001 From: Matthew Vernon Date: Mon, 25 Mar 2019 19:55:21 +0000 Subject: [PATCH] only use SSE2 instructions on CPUs that support it (Closes: #925360) This is a patch from Guillem Jover . --- src/pcre2_jit_compile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c index 32e985b..eea9591 100644 --- a/src/pcre2_jit_compile.c +++ b/src/pcre2_jit_compile.c @@ -5120,8 +5120,9 @@ for (i = 0; i < max; i++) } #if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) && !(defined SUPPORT_VALGRIND) && !(defined _WIN64) -if (check_fast_forward_char_pair_sse2(common, chars, max)) - return TRUE; +if (sljit_has_cpu_feature(SLJIT_HAS_SSE2)) + if (check_fast_forward_char_pair_sse2(common, chars, max)) + return TRUE; #endif in_range = FALSE; -- 2.30.2