From f9c91ee2f27eaea68d8c3a130bf7d4bc0c860834 Mon Sep 17 00:00:00 2001 From: Søren Sandmann Pedersen Date: Sun, 1 Jul 2012 16:59:53 -0400 Subject: Use a compile-time constant for the "K" constraint in the MMX detection. When compiling with -O0, gcc doesn't understand that in signed char x = 0; ... asm ("...", : "K" (x)); x is constant. Fix this by using an immediate constant instead of a variable. --- configure.ac | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 2b9d1ba2..36f423ef 100644 --- a/configure.ac +++ b/configure.ac @@ -351,12 +351,11 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ int main () { __m64 v = _mm_cvtsi32_si64 (1); __m64 w; - signed char x = 0; /* Some versions of clang will choke on K */ asm ("pshufw %2, %1, %0\n\t" : "=y" (w) - : "y" (v), "K" (x) + : "y" (v), "K" (5) ); return _mm_cvtsi64_si32 (v); -- cgit v1.2.3