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

Marco Manfredini mldb
Thu Aug 10 15:12:09 CEST 2006


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? 

Cheers
Marco




More information about the ffmpeg-devel mailing list