[FFmpeg-devel] pre discussion around Blackfin dct_quantize_bfin routine

Reimar Doeffinger Reimar.Doeffinger
Tue Jun 12 19:24:04 CEST 2007


Hello,

Btw.: Do you know of debian or SuSE packages for the compilers and stuff
needed for blackfin? As probably everyone knows by now, my main (gentoo)
development box (the laptop I also had at LinuxTag) is probably dead
forever so I can't do things the easy way right now :-(

On Tue, Jun 12, 2007 at 11:47:33AM -0400, Marc Hoffman wrote:
[...]
> unsigned long long read_time (void)

you must really like typing if you don't use just uint64_t *g*

> {
>   unsigned long long t0;
>   unsigned lo,hi;
>   asm volatile ("%0=cycles; %1=cycles2;" : "=d" (lo), "=d" (hi));
>   t0 = lo;

Just out of curiousity:
can the compiler handle "=d" (t0) ?
getting rid of the seperate lo in some way removes one possibility for
the compiler to mess up...

>   t0 |= (unsigned long long)hi << 32;
>   return t0;

And how about doing
return lo + (uint64_t)hi << 32;
?

I personally would just only 32 bit instead of the ugly union
construct, at least until the compiler is fixed...

Greetings,
Reimar Doeffinger




More information about the ffmpeg-devel mailing list