[FFmpeg-devel] [PATCH] more reliable ebx_available check
Reimar Döffinger
Reimar.Doeffinger
Wed Sep 30 18:08:19 CEST 2009
Hello,
possibly a compiler bug, but still...
For at least Haiku and OpenBSD, but maybe all target that have PIE
enabled by default ebx is incorrectly detected as available.
This is because compiling with an ebx clobber succeeds, only when
using "b" constraint there is "no register in class BREG" error.
This patch fixes it:
Index: configure
===================================================================
--- configure (revision 20097)
+++ configure (working copy)
@@ -573,7 +573,7 @@
asm="$2"
shift 2
check_as "$@" <<EOF && enable $name || disable $name
-void foo(void){ __asm__ volatile($asm); }
+void foo(void){ int x; __asm__ volatile($asm); }
EOF
}
@@ -2162,7 +2162,7 @@
EOF
# check whether EBX is available on x86
- check_asm ebx_available '"":::"%ebx"'
+ check_asm ebx_available '"":"=b"(x)::'
# check whether more than 10 operands are supported
check_cc <<EOF && enable ten_operands
More information about the ffmpeg-devel
mailing list