[MPlayer-cvslog] CVS: main cpudetect.c,1.40,1.41

Guillaume POIRIER poirierg at gmail.com
Sat Oct 8 14:22:17 CEST 2005


Hi,

On 10/8/05, Alex Beregszaszi <alex at fsn.hu> wrote:
> Hi,
>
> > +// see AMD64 Architecture Programmer's Manual, Volume 3:
> > General-purpose and +// System Instructions, Table 3-2: Effective
> > family computation, page 120.
> >               if(caps->cpuType==0xf){
> > -                 // use extended family (P4, IA64)
> > -                 caps->cpuType=8+((regs2[0]>>20)&255);
> > +                 // use extended family (P4, IA64, K8)
> > +                 caps->cpuType=0xf+((regs2[0]>>20)&255);
>
> Why not cpuType+=((regs then ? :)

I have to admit the (regs2[0]>>20)&255 part seems like black magic to
me, just because I'm more used to defining a preprocessor constant bit
mask instead to the above code.
Is the above code supposed to be faster BTW?

Anyway, if you wanna change that code, feel free to do so, after all,
you're the boss here! :)

Guillaume

--
Reading doesn't hurt, really!
  -- Dominik 'Rathann' Mierzejewski




More information about the MPlayer-cvslog mailing list