From 23ed22594d159cd5549443252a666238034b0c17 Mon Sep 17 00:00:00 2001 From: Cian Ferriter Date: Tue, 21 Jun 2022 15:52:48 +0000 Subject: 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 Signed-off-by: Ilya Maximets --- lib/dpif-netdev-extract-avx512.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/dpif-netdev-extract-avx512.c') 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. */ -- cgit v1.2.1