[Ffmpeg-devel] help find compile problems

Michael Niedermayer michaelni
Sun Dec 10 17:15:56 CET 2006


Hi

On Sun, Dec 10, 2006 at 10:20:04AM -0500, Ronald S. Bultje wrote:
> Hi,
> 
> if ARCH_X86_{32,64} isn't defined (that was my own mistake, not a ffmpeg
> bug), libavutil/common.h compiles ppc timer code on a x86, resulting in:
> 
> $ gcc -DHAVE_AV_CONFIG_H=1 -c -o vp3.o vp3.c -I../libavutil -I.. -Wall
> /tmp/ccr54Ahb.s: Assembler messages:
> /tmp/ccr54Ahb.s:13925: Error: no such instruction: `mftbu %ecx'
> /tmp/ccr54Ahb.s:13926: Error: no such instruction: `mftb %eax'
> /tmp/ccr54Ahb.s:13927: Error: no such instruction: `mftbu %edx'
> /tmp/ccr54Ahb.s:13928: Warning: using `%dx' instead of `%edx' due to `w'
> suffix
> /tmp/ccr54Ahb.s:13928: Warning: using `%cx' instead of `%ecx' due to `w'
> suffix
> /tmp/ccr54Ahb.s:13929: Error: no such instruction: `bne 1b'
> 
> Attached patch will make it error out instead, by adding an extra check
> for x86s before assuming ppc. This may not be wanted (normally people
> shouldn't see it), but it makes such things easier to find if it does
> occur. (Feel free to reject.)

yes, rejected :)

IMHO a ARCH_X86 define sanity check doesnt belong into the rdtsc code

if you really want this then IMHO it could be put in a seperate file
like sanity_checks.h and that could then do all kinds of checks for the
various #defines ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire




More information about the ffmpeg-devel mailing list