[FFmpeg-devel] [PATCH 2/3] libavutil/aarch64/cpu.c: HWCAPS requires inline asm support.

Reimar.Doeffinger at gmx.de Reimar.Doeffinger at gmx.de
Sun Oct 29 19:56:56 EET 2023


From: Reimar Döffinger <Reimar.Doeffinger at gmx.de>

Fixes compilation with tcc, which does not have aarch64
inline asm support.
---
 libavutil/aarch64/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/aarch64/cpu.c b/libavutil/aarch64/cpu.c
index bd780e8591..0d7c1e268d 100644
--- a/libavutil/aarch64/cpu.c
+++ b/libavutil/aarch64/cpu.c
@@ -34,7 +34,7 @@ static int detect_flags(void)
 
     hwcap = getauxval(AT_HWCAP);
 
-#if defined(HWCAP_CPUID)
+#if defined(HWCAP_CPUID) && HAVE_INLINE_ASM
     // We can check for DOTPROD and I8MM using HWCAP_ASIMDDP and
     // HWCAP2_I8MM too, avoiding to read the CPUID registers (which triggers
     // a trap, handled by the kernel). However the HWCAP_* defines for these
-- 
2.39.3 (Apple Git-145)



More information about the ffmpeg-devel mailing list