From: Maksim Shabunin Date: Sun, 25 Feb 2018 10:32:27 +0000 (+0300) Subject: CPU dispatching: additional AVX-512 check for mingw-w64 X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1^2~771^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f0c0e0c6fa198ed3700be4a2bd8f3cc7d70fc127;p=platform%2Fupstream%2Fopencv.git CPU dispatching: additional AVX-512 check for mingw-w64 --- diff --git a/cmake/checks/cpu_avx512.cpp b/cmake/checks/cpu_avx512.cpp index d0898ab..ebb10c7 100644 --- a/cmake/checks/cpu_avx512.cpp +++ b/cmake/checks/cpu_avx512.cpp @@ -3,6 +3,9 @@ void test() { __m512i zmm = _mm512_setzero_si512(); +#if defined __GNUC__ && defined __x86_64__ + asm volatile ("" : : : "zmm16", "zmm17", "zmm18", "zmm19"); +#endif } #else #error "AVX512 is not supported" diff --git a/cmake/checks/cpu_avx512skx.cpp b/cmake/checks/cpu_avx512skx.cpp index 375b62e..2faa2bf 100644 --- a/cmake/checks/cpu_avx512skx.cpp +++ b/cmake/checks/cpu_avx512skx.cpp @@ -7,6 +7,9 @@ void test() __m256i b = _mm256_abs_epi64(a); // VL __m512i c = _mm512_abs_epi8(zmm); // BW __m512i d = _mm512_broadcast_i32x8(b); // DQ +#if defined __GNUC__ && defined __x86_64__ + asm volatile ("" : : : "zmm16", "zmm17", "zmm18", "zmm19"); +#endif } #else #error "AVX512-SKX is not supported"