[AD] Re: CPU detection for Macintosh

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


On Wednesday, February 2, 2005, at 12:23 am, alleg-developers-request@xxxxxxxxxx wrote:

I must have missed it, but I think think it's a nice feature to have.
Afterall, we're supporting it for Intel machines, might as well support
some other common ones too ;)
Then again, Allegro doesn't use hand-made assembler code under OS X, does it? The main usefulness of CPU detection is in the use of hand optimized
machine code...
(yes, that's saying I'd like there to be more hand optimized assembler code
for other platforms ;))

It is better than the current which just reports "non-Intel CPU, cool ;)" or something similar. At the moment, it just detects a PowerPC and its variant. Since the PPC market is more 'uniform' than x86 it should be possible to determine the presence of Altivec or 64-bit extensions just by looking at the variant number. I didn't do this because, as you say, Allegro doesn't make any use of it. Maybe some decent use could be made of VecLib or the Accelerate framework (http://developer.apple.com/hardware/ve/vector_libraries.html), I'm not sure. IMO, more assembly code is not the right way to go because it increases the load necessary to port Allegro, and the benefit of asm are decreasing as compiler optimisation gets better.

Pete





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