[FFmpeg-devel] [PATCH] more reliable ebx_available check

Måns Rullgård mans
Wed Sep 30 18:21:51 CEST 2009


Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:

> 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)::'

Drop the trailing colons.  Does it work if you make that register
constraint "b"(0) instead?  Not that it's really important.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list