[vlc-devel] [PATCH 2/19] configure: fix AVX(2) inline check

Lyndon Brown jnqnfe at gmail.com
Thu Sep 24 21:34:54 CEST 2020


From: Lyndon Brown <jnqnfe at gmail.com>
Date: Fri, 8 Mar 2019 03:14:51 +0000
Subject: configure: fix AVX(2) inline check

i'd guessed at what the right AVX2 instruction might be when i added
the new check, then forgot to later go back and do it properly
before it got merged.

diff --git a/configure.ac b/configure.ac
index 99e4669942..9c79185366 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1658,7 +1658,7 @@ frobzor = (uint64_t)_mm256_extract_epi64(a, 0);]])], [
   AC_CACHE_CHECK([if $CC groks AVX inline assembly], [ac_cv_avx_inline], [
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
 void *p;
-asm volatile("xorps256 %%ymm1,%%ymm2"::"r"(p):"ymm1", "ymm2");
+asm volatile("vxorps %%ymm1,%%ymm2,%%ymm3"::"r"(p):"ymm1", "ymm2", "ymm3");
 ]])
     ], [
       ac_cv_avx_inline=yes
@@ -1674,7 +1674,7 @@ asm volatile("xorps256 %%ymm1,%%ymm2"::"r"(p):"ymm1", "ymm2");
   AC_CACHE_CHECK([if $CC groks AVX2 inline assembly], [ac_cv_avx2_inline], [
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
 void *p;
-asm volatile("punpckhqdq256 %%ymm1,%%ymm2"::"r"(p):"ymm1", "ymm2");
+asm volatile("vpunpckhqdq %%ymm1,%%ymm2,%%ymm3"::"r"(p):"ymm1", "ymm2", "ymm3");
 ]])
     ], [
       ac_cv_avx2_inline=yes



More information about the vlc-devel mailing list