[MPlayer-dev-eng] [PATCH] revert CPU speed detection

D Richard Felker III dalias at aerifal.cx
Fri Oct 8 02:01:40 CEST 2004


On Fri, Oct 08, 2004 at 12:12:19AM +0200, Aurelien Jacobs wrote:
> > anyway if you need a delay after rdtsc just do a small asm segment
> > that will serialize. making a function call will only make the
> > situation worse since eax/edx have to get pushed before the call and
> > restored afterwards. but i still don't believe the thing about
> > non-serialized meaning you can read wrong values...
> 
> Ok. I didn't understand reliable as inaccurate !
> In fact, on my system (Athlon64), reported CPU speed was simply 0 !
> And I thought that's what Diego called unreliable.
> And yes, with my dumb patch, my system display the right cpu speed !
> So I agree that the serialization is a bad explanation, but I can't
> come with a better one. Can you explain this behavior differently ?

probably nothing to do with the cpu, rather buggy gcc inline asm
(either bugs in how the code marks its output, or bugs in your version
of gcc...could be either). putting a function call in between would
tend to fix things like this.

rich




More information about the MPlayer-dev-eng mailing list