Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

CPUInfo.h File Reference

#include "basetype.h"

Go to the source code of this file.

Functions

geBoolean CPUInfo_TestFor3DNow (void)
geBoolean CPUInfo_TestForMMX (void)


Function Documentation

geBoolean CPUInfo_TestFor3DNow void   ) 
 

Definition at line 166 of file CPUInfo.c.

References CPUINFO_AMD_ID_STRING, CPUInfo_GetCPUIDEAX(), CPUInfo_GetCPUIDEDX(), CPUInfo_GetCPUIDString(), CPUINFO_VENDOR_STRING_LENGTH, GE_FALSE, GE_TRUE, geBoolean, and uint32.

Referenced by SoftDrv_Init().

00167 {
00168         char VendorString[CPUINFO_VENDOR_STRING_LENGTH];
00169 
00170         CPUInfo_GetCPUIDString(0, VendorString);
00171         if(strncmp(VendorString, CPUINFO_AMD_ID_STRING,strlen(CPUINFO_AMD_ID_STRING))==0)
00172                 {
00173                         uint32  TypeFlags       =CPUInfo_GetCPUIDEAX(0x80000000);
00174                         if(TypeFlags)   //extended functions supported
00175                                 {
00176                                         TypeFlags       =CPUInfo_GetCPUIDEDX(0x80000001);
00177                                         if (TypeFlags & (1<<23))
00178                                                 return GE_TRUE;
00179                                 }
00180                 }
00181         return GE_FALSE;
00182 }

geBoolean CPUInfo_TestForMMX void   ) 
 

Definition at line 184 of file CPUInfo.c.

References CPUINFO_AMD_ID_STRING, CPUInfo_GetCPUIDEAX(), CPUInfo_GetCPUIDEDX(), CPUInfo_GetCPUIDString(), CPUINFO_INTEL_ID_STRING, CPUINFO_VENDOR_STRING_LENGTH, GE_FALSE, GE_TRUE, geBoolean, and uint32.

Referenced by SoftDrv_Init().

00185 {
00186         char VendorString[CPUINFO_VENDOR_STRING_LENGTH];
00187 
00188         CPUInfo_GetCPUIDString(0, VendorString);
00189         if(strncmp(VendorString, CPUINFO_AMD_ID_STRING,strlen(CPUINFO_AMD_ID_STRING))==0)
00190                 {
00191                         uint32  TypeFlags       =CPUInfo_GetCPUIDEAX(0x80000000);
00192                         if(TypeFlags)   //extended functions supported
00193                                 {
00194                                         TypeFlags       =CPUInfo_GetCPUIDEDX(0x80000001);
00195                                         if (TypeFlags & (1<<23))
00196                                                 return GE_TRUE;
00197                                 }
00198                 }
00199         else if(strncmp(VendorString, CPUINFO_INTEL_ID_STRING, strlen(CPUINFO_INTEL_ID_STRING))==0)
00200         {
00201                 uint32  TypeFlags                               =CPUInfo_GetCPUIDEDX(0x1);
00202                 if (TypeFlags & (1<<23))
00203                         return GE_TRUE;
00204         }
00205 
00206         return GE_FALSE;
00207 }


Generated on Tue Sep 30 12:37:13 2003 for GTestAndEngine by doxygen 1.3.2