Commit 6e44bbe0 authored by Oded Gabbay's avatar Oded Gabbay Committed by Emil Velikov fix test for SSE4.1 assembler support

This patch modifies the SSE4.1 test in to use a global
variable to initialize vector variables. In addition, we now return the
value of the computation instead of 0.

This is done so gcc 4.9 (and lower) won't optimize the SSE4.1 assembly
instructions (when using -O1 and higher), because then the configure test
might incorrectly pass even though the assembler doesn't support the
SSE4.1 instructions (the test will pass because the compiler does support the intrinsics).

Cc: "11.0 11.1" <>
Signed-off-by: 's avatarOded Gabbay <>
Reviewed-by: 's avatarEmil Velikov <>
parent 4ef44bb4
......@@ -383,10 +383,11 @@ save_CFLAGS="$CFLAGS"
#include <smmintrin.h>
int param;
int main () {
__m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
__m128i a = _mm_set1_epi32 (param), b = _mm_set1_epi32 (param + 1), c;
c = _mm_max_epu32(a, b);
return 0;
return _mm_cvtsi128_si32(c);
}]])], SSE41_SUPPORTED=1)
if test "x$SSE41_SUPPORTED" = x1; then
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment