diff options
author | Cian Ferriter <cian.ferriter@intel.com> | 2022-06-21 15:52:48 +0000 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2022-06-28 13:36:52 +0200 |
commit | 23ed22594d159cd5549443252a666238034b0c17 (patch) | |
tree | c74507a5c46c350a3ef61b908849e85c18bb6126 /lib/dpif-netdev-extract-avx512.c | |
parent | 8c1c447a1d25bfe652d6abefd25d9b70cf44f949 (diff) | |
download | openvswitch-23ed22594d159cd5549443252a666238034b0c17.tar.gz |
dpif-netdev-extract-avx512: Protect GCC builtin usage.
__builtin_constant_p is only available in GCC and only versions >= 4.
Use the same "#if __GNUC__ >= 4" check used in other parts of OVS for
this builtin.
Signed-off-by: Cian Ferriter <cian.ferriter@intel.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'lib/dpif-netdev-extract-avx512.c')
-rw-r--r-- | lib/dpif-netdev-extract-avx512.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/dpif-netdev-extract-avx512.c b/lib/dpif-netdev-extract-avx512.c index 12271be17..f1919befd 100644 --- a/lib/dpif-netdev-extract-avx512.c +++ b/lib/dpif-netdev-extract-avx512.c @@ -128,7 +128,11 @@ _mm512_maskz_permutexvar_epi8_selector(__mmask64 k_shuf, __m512i v_shuf, __m512i v512_zeros = _mm512_setzero_si512(); __m512i v_blk0; #if HAVE_AVX512VBMI +#if __GNUC__ >= 4 if (__builtin_constant_p(use_vbmi) && use_vbmi) { +#else + if (use_vbmi) { +#endif /* As different AVX512 ISA levels have different implementations, * this specializes on the use_vbmi attribute passed in. */ |