cpuid wrapper

Anders F Björklund afb at algonet.se
Wed Oct 25 04:01:21 PDT 2006


Carlos Santander wrote:

>> It seems that there is actually some interest in this module so I will 
>> accept feature requests.
> 
> I have one: support other processors ;)

Here is something that supports Mac OS X (Darwin):

http://www.algonet.se/~afb/d/cpuinfo.zip

Name:             ppc7450
CPU Type:         CPU_TYPE_POWERPC
CPU Subtype:      CPU_SUBTYPE_POWERPC_7450
Description:      PowerPC 7450
Vector Unit:      true

Name:             i486
CPU Type:         CPU_TYPE_I386
CPU Subtype:      CPU_SUBTYPE_486
Description:      Intel 80486
Vector Unit:      true

It's not public domain but copyrighted*, though...


But sysctl(3) should be all that a "cpuid" needs ?
Maybe that can be used to write a portable version:

hw.cpufrequency: 800000000
hw.optional.altivec: 1

--anders


* Since it needs to use the Mac OS X system headers.



More information about the Digitalmars-d-announce mailing list