[Ffmpeg-devel] building without optimizations, but with mmx enabled

Michael Niedermayer michaelni
Thu Aug 10 15:33:31 CEST 2006


Hi

On Thu, Aug 10, 2006 at 03:12:09PM +0200, Marco Manfredini wrote:
> I'm still embarrassed about my premature first post, but I hope you will not 
> ignore me for the rest of our life. Anyway, I'm trying to make -O0 builds to 
> understand the inner workings and stumbled on the "suffix or operands invalid 
> for `pshufw'" thing that has been discussed on February with no conclusion. 
> So:
> 
> fdct_mmx.cx(415): pshufw_m2r(*(in + 4), mm5, 0x1B);
> 
> gets expanded via: 
> #define         mmx_m2ri(op,mem,reg,imm) \
>         __asm__ __volatile__ (#op " %1, %0, %%" #reg \
>                               : /* nothing */ \
>                               : "X" (mem), "X" (imm))
> 
> It looks like in my case the compiler puts *(in + 4) into ax on -O0 and passes 
> the register through the unconcerned "X" constraint, which is exactly what 
> "X" allows the compiler to do. My humble question now is, shouldn't this be 
> 	: "m" (mem), "i" (imm))
> instead? 

probably, but the whole mmx.h is broken and shouldnt be used anyway
if you want to fix it, grep for "X", they are all wrong at least

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list