pixman: Branch 'master'

Oded Gabbay gabbayo at kemper.freedesktop.org
Tue Dec 22 01:19:33 PST 2015


 configure.ac |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit a566f627dbd6ea8f2cba70a446e62caaa2ecbd26
Author: Oded Gabbay <oded.gabbay at gmail.com>
Date:   Tue Dec 15 14:53:18 2015 +0200

    configura.ac: fix test for SSE2 & SSSE3 assembler support
    
    This patch modifies the SSE2 & SSSE3 tests in configure.ac 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 SSE assembly
    instructions (when using -O1 and higher), because then the configure test
    might incorrectly pass even though the assembler doesn't support the
    SSE instructions (the test will pass because the compiler does support
    the intrinsics).
    
    v2: instead of using volatile, use a global variable as input
    
    Signed-off-by: Oded Gabbay <oded.gabbay at gmail.com>

diff --git a/configure.ac b/configure.ac
index 3a66909..ae4d3c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -429,10 +429,11 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
 #include <mmintrin.h>
 #include <xmmintrin.h>
 #include <emmintrin.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_xor_si128 (a, b);
-    return 0;
+    return _mm_cvtsi128_si32(c);
 }]])], have_sse2_intrinsics=yes)
 CFLAGS=$xserver_save_CFLAGS
 
@@ -473,10 +474,11 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
 #include <xmmintrin.h>
 #include <emmintrin.h>
 #include <tmmintrin.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_maddubs_epi16 (a, b);
-    return 0;
+    return _mm_cvtsi128_si32(c);
 }]])], have_ssse3_intrinsics=yes)
 CFLAGS=$xserver_save_CFLAGS
 


More information about the xorg-commit mailing list