• 大小: 7KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-01-04
  • 语言: C/C++
  • 标签: 代码  

资源简介

#include "StdAfx.h" #include "cpuassembly.h" // bit flags set by cpuid when called with register eax set to 1 #define MMX_SUPPORTED 0x00800000 #define SSE_SUPPORTED 0x02000000 #define SSE2_SUPPORTED 0x04000000 #define AMD_3DNOW_SUPPORTED 0x80000000 // AMD specific #define AMD_3DNOW_EX_SUPPO

资源截图

代码片段和文件信息

#include “StdAfx.h“
#include “cpuassembly.h“

// bit flags set by cpuid when called with register eax set to 1
#define MMX_SUPPORTED 0x00800000
#define SSE_SUPPORTED 0x02000000
#define SSE2_SUPPORTED 0x04000000
#define AMD_3DNOW_SUPPORTED 0x80000000

// AMD specific
#define AMD_3DNOW_EX_SUPPORTED 0x40000000
#define AMD_MMX_EX_SUPPORTED 0x00400000

#define SUPPORT_MMX 0x0001
#define SUPPORT_3DNOW 0x0002
#define SUPPORT_SSE 0x0004
#define SUPPORT_SSE2 0x0008

CPUAssembly::CPUAssembly(void)
{
memset(&sCPUInfo 0 sizeof(sCPUInfo));
}

CPUAssembly::~CPUAssembly(void)
{
}

bool CPUAssembly::IsCPUID() const
{
__try 
{
_asm 
{
xor eax eax
cpuid
}
}
__except (EXCEPTION_EXECUTE_HANDLER) 
{
return false;
}
return true;

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        3738  2005-01-23 16:45  CPUAssembly.cpp
     文件        2583  2005-01-23 16:46  CPUPlatformSDK.cpp
     文件        3882  2005-01-23 16:35  CPURegistry.cpp
     文件        5027  2005-01-23 17:02  ICPUInfo.cpp
     文件        1068  2005-01-23 16:44  CPUAssembly.h
     文件         766  2005-01-22 20:55  CPUPlatformSDK.h
     文件        1081  2005-01-22 20:55  CPURegistry.h
     文件        1242  2005-01-23 16:43  ICPUInfo.h

评论

共有 条评论