only use SSE2 instructions on CPUs that support it (Closes: #925360)
authorMatthew Vernon <matthew@debian.org>
Mon, 25 Mar 2019 19:55:21 +0000 (19:55 +0000)
committerMatthew Vernon <matthew@debian.org>
Mon, 25 Mar 2019 19:55:21 +0000 (19:55 +0000)
This is a patch from Guillem Jover <guillem@debian.org>.

src/pcre2_jit_compile.c

index 32e985b7938582536c79b5f0803edab141fe8be5..eea9591aca3523a1f391f0a1d3a9d4dae906608a 100644 (file)
@@ -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;