[FFmpeg-devel] pre discussion around Blackfin dct_quantize_bfin routine

Reimar Doeffinger Reimar.Doeffinger
Tue Jun 12 22:12:53 CEST 2007

On Tue, Jun 12, 2007 at 12:22:02PM -0700, Trent Piepho wrote:
>   uint64_t lo, hi;

must use uint32_t, otherwise D and W constraints fail

>   asm volatile ("%0=cycles; %1=cycles2;" : "=D"(lo), "=W"(hi));

This result in the usual, and at least to me very well known stupidity
of gcc (also known as "how to do nothing in many steps"):
it really believes that adding, oring and multiplying by 0 is
worth it. That is probably because in the highlevel optimizations they
do these are not present, they only crop up after they have done all
optimizations... An impressive point why machine independant
optimization is stupid.

 5c0:   00 e8 00 00     LINK 0x0;
 5c4:   86 31           R0=CYCLES;
 5c6:   9f 31           R3=CYCLES2;
 5c8:   01 60           R1=0x0(x);
 5ca:   02 60           R2=0x0(x);
 5cc:   10 56           R0=R0|R2;
 5ce:   59 56           R1=R1|R3;
 5d0:   01 e8 00 00     UNLINK;
 5d4:   10 00           RTS;

Reimar Doeffinger

More information about the ffmpeg-devel mailing list