diff mbox series

[FFmpeg-devel] x86/intmath: use _bzhi_u32 instead of the GCC internal builtin

Message ID 20221117201024.551-1-jamrial@gmail.com
State New
Headers show
Series [FFmpeg-devel] x86/intmath: use _bzhi_u32 instead of the GCC internal builtin | expand


Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

James Almer Nov. 17, 2022, 8:10 p.m. UTC
GCC does not recommend using their __builtin_ia32* builtins, so use the Intel
defined one instead.

Signed-off-by: James Almer <jamrial@gmail.com>
 libavutil/x86/intmath.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series


diff --git a/libavutil/x86/intmath.h b/libavutil/x86/intmath.h
index 8a6b5ae261..2c701646ff 100644
--- a/libavutil/x86/intmath.h
+++ b/libavutil/x86/intmath.h
@@ -82,7 +82,8 @@  static av_always_inline av_const int ff_ctzll_x86(long long v)
 #if defined(__BMI2__)
-#define av_mod_uintp2 __builtin_ia32_bzhi_si
+#include <immintrin.h>
+#define av_mod_uintp2 _bzhi_u32
 /* GCC releases before 5.1.0 have a broken bzhi builtin, so for those we
  * implement it using inline assembly