[Patch] Solaris x86 & cpuinfo

Hi,

I’ve made this little patch to extend SDL_cpuinfo.c working with
Solaris. I’ve tested with Solaris 10 1/06 x86, SDL 1.2.9 and Sun Studio
11… I’m using the getisax (extract valid instruction set extensions)
function to know the abilities of hardware.

There is two questions :

I’ve used the #define __sun to test the hardware, it should be another
define for spark or x86 but don’t find him, anyone could help ?

In getisax(…), there are two MMX : Intel and AMD but no MMXext to use
in CPU_haveMMXExt(), any clues ?

Cheers,
Murlock–
Michael Bonfils ( http://www.murlock.org )
membre de http://guses.solaris-fr.org
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed…
Name: patch_cpuinfo_solarisx86.diff
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20051229/a5253bd1/attachment.txt

In getisax(…), there are two MMX : Intel and AMD but no MMXext to use
in CPU_haveMMXExt(), any clues ?

Perhaps we should just use the CPUID instruction directly?

–ryan.

Ryan C. Gordon wrote:

In getisax(…), there are two MMX : Intel and AMD but no MMXext to
use in CPU_haveMMXExt(), any clues ?

Perhaps we should just use the CPUID instruction directly?

–ryan.

Hi,

I’ve reworked and submit this new patch, it uses now cpuid in asm and
works with Sun Studio 11, in 32 and 64bit…

Happy new Year
Cheers,
Michael–
Michael Bonfils ( http://www.murlock.org )
membre de http://guses.solaris-fr.org
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed…
Name: SDL_cpuinfo_solaris.diff
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20060102/ac11c7ce/attachment.asc

I’ve reworked and submit this new patch, it uses now cpuid in asm and
works with Sun Studio 11, in 32 and 64bit…

This is in CVS now, thanks!

–ryan.