Re: [AD] CPU detection for Macintosh

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Friday 11 March 2005 23:25, Chris wrote:
> > +   Contains the CPU vendor name, if known. On Mac OSX systems this 
returns
> > +   the PPC subtype name. On other platforms, this may be an empty 
string.
> > +   You can read this variable after you have called check_cpu()
> >     (which is automatically called by allegro_init()).
> 
> Perhaps this should say "On other, non-Intel, platforms" to remove 
> ambiguity? Also, the line width seems to be off on the last new line.

Well, it would be a NULL string too on Intel platforms compiled as C only. 
But I agree that saying `other, non-Intel, platforms' is a better idea.

> > +    CPU_FAMILY_PENTIUM  - The processor is a Pentium or equivalent
> > +    CPU_FAMILY_PPRO     - The processor is a Pentium Pro, II, III or 
equivalent
> 
> I think these might be a little deceiving. Perhaps they should be 
> changed to CPU_FAMILY_I586 and CPU_FAMILY_I686 respectively, to keep in 
> line with the CPU_FAMILY_I386 and CPU_FAMILY_I486 names, and since that 
> is what those are, AFAIK?

Yeah. I wouldn't normally have thought to check for PPRO if I had a Pentium 
III, or indeed a Celeron which isn't even listed in the CPU family. Let 
alone having an AMD K6 or Athlon, which are i586/i686 but not Pentiums.
So I think this makes sense.

> >        CPU_IA64     - Running on Intel 64 bit CPU
> >        CPU_AMD64    - Running on AMD 64 bit CPU
> 
> I don't think we need these since we can already tell these things from 
> the cpu family/model.

True, although if someone decides to change the model ID's for a new 
generation of AMD64 processors (I took the model information from CPUID 
documentation I found online, but I'm not sure how up to date it was), we 
no longer can. It probably also makes sense to check if IA64 or AMD64 
instruction sets are available (though I don't know how these differ), 
just as it does for MMX and MMX+

For AMD64, we have ALLEGRO_AMD64 anyway.

Evert




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/