commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 05/11: volk: some versions of clang have pr


From: git
Subject: [Commit-gnuradio] [gnuradio] 05/11: volk: some versions of clang have problems with cvtpi32_ps.
Date: Thu, 9 Jan 2014 21:52:39 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

trondeau pushed a commit to branch maint
in repository gnuradio.

commit 15a515efe346d7caeed12348142213fd6034bc9c
Author: Tom Rondeau <address@hidden>
Date:   Sat Dec 28 12:05:23 2013 -0500

    volk: some versions of clang have problems with cvtpi32_ps.
    
    We make a separate cmake check here for xgetbv and cvtpi32_ps and set 
definitions accordingly.
---
 volk/lib/CMakeLists.txt | 40 +++++++++++++++++++++-------------------
 1 file changed, 21 insertions(+), 19 deletions(-)

diff --git a/volk/lib/CMakeLists.txt b/volk/lib/CMakeLists.txt
index 4ac67bc..dfb4e5f 100644
--- a/volk/lib/CMakeLists.txt
+++ b/volk/lib/CMakeLists.txt
@@ -150,28 +150,30 @@ if(CPU_IS_x86)
         ${CMAKE_CURRENT_BINARY_DIR}/test_xgetbv.c)
 endif()
 
-########################################################################
-# eliminate AVX if cvtpi32_ps intrinsic fails on Apple
-########################################################################
-
 if(${HAVE_XGETBV})
-    # check to see if the compiler/linker works with cvtpi32_ps instrinsic
-    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps.c "#include 
<immintrin.h>\nint main (void) {__m128 __a; __m64 __b; __m128 foo = 
_mm_cvtpi32_ps(__a, __b); return (0); }")
-    execute_process(COMMAND ${CMAKE_C_COMPILER} -mavx -o
-        ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps
-        ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps.c
-        OUTPUT_QUIET ERROR_QUIET
-        RESULT_VARIABLE avx_compile_result)
-   if(NOT ${avx_compile_result} EQUAL 0)
-        OVERRULE_ARCH(avx "Compiler missing cvtpi32_ps instrinsic")
-       set(HAVE_XGETBV 0)
-    endif()
-    file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps
-        ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps.c)
+    add_definitions(-DHAVE_XGETBV)
 endif()
 
-if(${HAVE_XGETBV})
-    add_definitions(-DHAVE_XGETBV)
+#########################################################################
+# eliminate AVX if cvtpi32_ps intrinsic fails like some versions of clang
+#########################################################################
+
+# check to see if the compiler/linker works with cvtpi32_ps instrinsic
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps.c "#include 
<immintrin.h>\nint main (void) {__m128 __a; __m64 __b; __m128 foo = 
_mm_cvtpi32_ps(__a, __b); return (0); }")
+execute_process(COMMAND ${CMAKE_C_COMPILER} -mavx -o
+  ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps
+  ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps.c
+  OUTPUT_QUIET ERROR_QUIET
+  RESULT_VARIABLE avx_compile_result)
+if(NOT ${avx_compile_result} EQUAL 0)
+  OVERRULE_ARCH(avx "Compiler missing cvtpi32_ps instrinsic")
+  set(HAVE_CVTPI32_PS 0)
+endif()
+file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps
+  ${CMAKE_CURRENT_BINARY_DIR}/test_cvtpi32_ps.c)
+
+if(${HAVE_CVTPI32_PS})
+    add_definitions(-DHAVE_CVTPI32_PS)
 endif()
 
 ########################################################################



reply via email to

[Prev in Thread] Current Thread [Next in Thread]