summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorCheng Li <lic121@chinatelecom.cn>2022-09-16 09:56:18 +0000
committerIlya Maximets <i.maximets@ovn.org>2022-09-27 01:17:56 +0200
commit62dab6a5223de1880ef0bb7563a26ef0166080f7 (patch)
treee18cf789098fe6665be0b69ccf512e29974c6859 /m4
parent57b72c552ee5711ef245912b48a7e01c8d309a7f (diff)
downloadopenvswitch-62dab6a5223de1880ef0bb7563a26ef0166080f7.tar.gz
m4: Test avx512 for x86 only.
'as' command of arm version may don't support option '--64', this patch is to move the avx512 test into x86 branch to avoid this. Fixes: 352b6c7116cd ("dpif-lookup: add avx512 gather implementation.") Tested-by: Harry van Haaren <harry.van.haaren@intel.com> Signed-off-by: Cheng Li <lic121@chinatelecom.cn> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'm4')
-rw-r--r--m4/openvswitch.m44
1 files changed, 2 insertions, 2 deletions
diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
index b5be5842e..14d9249b8 100644
--- a/m4/openvswitch.m4
+++ b/m4/openvswitch.m4
@@ -494,8 +494,8 @@ AC_DEFUN([OVS_CHECK_BINUTILS_AVX512],
mkdir -p build-aux
OBJFILE=build-aux/binutils_avx512_check.o
GATHER_PARAMS='0x8(,%ymm1,1),%ymm0{%k2}'
- echo "vpgatherqq $GATHER_PARAMS" | as --64 -o $OBJFILE -
if ($CC -dumpmachine | grep x86_64) >/dev/null 2>&1; then
+ echo "vpgatherqq $GATHER_PARAMS" | as --64 -o $OBJFILE -
if (objdump -d --no-show-raw-insn $OBJFILE | grep -q $GATHER_PARAMS) >/dev/null 2>&1; then
ovs_cv_binutils_avx512_good=yes
else
@@ -504,11 +504,11 @@ AC_DEFUN([OVS_CHECK_BINUTILS_AVX512],
dnl and causing zmm usage with buggy binutils versions.
CFLAGS="$CFLAGS -mno-avx512f"
fi
+ rm $OBJFILE
else
dnl non x86_64 architectures don't have avx512, so not affected
ovs_cv_binutils_avx512_good=no
fi])
- rm $OBJFILE
if test "$ovs_cv_binutils_avx512_good" = yes; then
AC_DEFINE([HAVE_LD_AVX512_GOOD], [1],
[Define to 1 if binutils correctly supports AVX512.])