This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch release/8.1
in repository ffmpeg.

commit 93d57157ed625527fbd0beb855a5b19973a1c381
Author:     Kirill A. Korinsky <[email protected]>
AuthorDate: Fri Jun 19 23:31:20 2026 +0200
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sat Sep 19 14:26:46 2026 +0200

    configure/x86: split 7-register check from EBP availability
    
    LLVM commit
    
https://github.com/llvm/llvm-project/commit/0d471b3f64d3116bd57c79d872f7384fff80daa5
    made Clang save and restore EBP around inline asm that only
    clobbers it. This can make the existing EBP crash probe pass even
    when the compiler still cannot allocate the 7-register i386 inline
    asm used behind HAVE_7REGS.
    
    Keep ebp_available for HAVE_6REGS and add a separate
    x86_32_7regs probe for HAVE_7REGS.
    
    Discussion:
    https://marc.info/?t=178015389900001&r=1&w=2
    (cherry picked from commit b57ff00bcf485ad06b1619d31499a6db27a636b0)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 configure           | 12 ++++++++++++
 libavutil/x86/asm.h |  2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 1759694274..86a2437265 100755
--- a/configure
+++ b/configure
@@ -2599,6 +2599,7 @@ TOOLCHAIN_FEATURES="
     symver_asm_label
     symver_gnu_asm
     vfp_args
+    x86_32_7regs
     xform_asm
     xmm_clobbers
 "
@@ -6755,6 +6756,14 @@ EOF
     check_inline_asm ebx_available '""::"b"(0)' &&
         check_inline_asm ebx_available '"":::"%ebx"'
 
+    # check whether 7 registers are available on x86-32
+    # Since 
https://github.com/llvm/llvm-project/commit/0d471b3f64d3116bd57c79d872f7384fff80daa5,
+    # Clang can save/restore EBP around clobber-only asm, so the EBP
+    # crash probe alone can be a false positive for 7-register asm.
+    disable x86_32_7regs
+    enabled_all x86_32 ebx_available ebp_available &&
+        check_inline_asm x86_32_7regs '"" :: "r"(0), "r"(1), "r"(2), "r"(3), 
"g"(4), "r"(5) : "%eax", "%edx"'
+
     # check whether xmm clobbers are supported
     check_inline_asm xmm_clobbers '"":::"%xmm0"'
 
@@ -8396,6 +8405,9 @@ if enabled x86; then
     echo "EBX available             ${ebx_available-no}"
     echo "EBP available             ${ebp_available-no}"
 fi
+if enabled x86_32; then
+    echo "7 registers available     ${x86_32_7regs-no}"
+fi
 if enabled aarch64; then
     echo "NEON enabled              ${neon-no}"
     echo "DOTPROD enabled           ${dotprod-no}"
diff --git a/libavutil/x86/asm.h b/libavutil/x86/asm.h
index f06ea25035..fc9f50b1a9 100644
--- a/libavutil/x86/asm.h
+++ b/libavutil/x86/asm.h
@@ -71,7 +71,7 @@ typedef int32_t x86_reg;
 typedef int x86_reg;
 #endif
 
-#define HAVE_7REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE))
+#define HAVE_7REGS (ARCH_X86_64 || HAVE_X86_32_7REGS)
 #define HAVE_6REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE || HAVE_EBP_AVAILABLE))
 
 #if ARCH_X86_64 && defined(PIC)

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to