diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2011-12-29 22:44:16 -0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-12 17:34:52 +0200 |
commit | b4525b34074665ed472cd421077a1633110f16a7 (patch) | |
tree | c8b9aa1d8e3991c02400b3b93593812a61346222 /config.tests/common/sse4_2 | |
parent | f9c9d8aaa6684f596cf5675592782d5397e52093 (diff) |
Add configure-time checking for the SSE and AVX features on Windows
Modify configure.exe to run some configure-time tests and check if
the SSE and AVX compiler features are supported.
The tests themselves required a bit of changes to compile with
MSVC. The include in sse4_2.cpp was wrong. And for whatever reason, it
didn't like the volatile variables, which GCC, Clang and ICC have been
happy with. This should produce no effect in compilation, though: even
dead code must be syntactically correct. We're not running the output.
Change-Id: Ibe5d0904a378a7efed853c7215f88a2ddcefb1b3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'config.tests/common/sse4_2')
-rw-r--r-- | config.tests/common/sse4_2/sse4_2.cpp | 8 | ||||
-rw-r--r-- | config.tests/common/sse4_2/sse4_2.pro | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/config.tests/common/sse4_2/sse4_2.cpp b/config.tests/common/sse4_2/sse4_2.cpp index 9052d0685c..1645070c1f 100644 --- a/config.tests/common/sse4_2/sse4_2.cpp +++ b/config.tests/common/sse4_2/sse4_2.cpp @@ -39,13 +39,13 @@ ** ****************************************************************************/ -#include <smmintrin.h> +#include <nmmintrin.h> int main(int, char**) { - volatile __m128i a = _mm_setzero_si128(); - volatile __m128i b = _mm_set1_epi32(42); - volatile __m128i result = _mm_cmpestrm(a, 16, b, 16, 0); + __m128i a = _mm_setzero_si128(); + __m128i b = _mm_set1_epi32(42); + __m128i result = _mm_cmpestrm(a, 16, b, 16, 0); (void)result; return 0; } diff --git a/config.tests/common/sse4_2/sse4_2.pro b/config.tests/common/sse4_2/sse4_2.pro index 044eb197af..744098dce8 100644 --- a/config.tests/common/sse4_2/sse4_2.pro +++ b/config.tests/common/sse4_2/sse4_2.pro @@ -1,5 +1,6 @@ SOURCES = sse4_2.cpp -CONFIG -= x11 qt +CONFIG -= qt dylib release debug_and_release +CONFIG += debug console mac:CONFIG -= app_bundle isEmpty(QMAKE_CFLAGS_SSE4_2):error("This compiler does not support SSE4.2") else:QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_SSE4_2 |