Pentium III处理器的单指令多数据流扩展指令(3)
2010-10-15 09:08:09 来源:Web开发网SSE SDK还有一个Pentium III和SSE寄存器的异常模式.用下面的代码也可以用来检查是否有Pentium III处理器.要编译下面的代码,需要包含fvec.h头文件.
// Checking for SSE emulation support
BOOL CheckP3Emu()
{
BOOL SSEEmu = TRUE;
Fvec32 pNormal = (1.0, 2.0, 3.0, 4.0);
Fvec32 pZero = 0.0;
// Checking for SSE HW emulation
__try {
_asm {
// Issue a move instruction that will cause exception
// w/out HW support emulation
movups xmm1, [pNormal]
// Issue a computational instruction that will cause
// exception w/out HW support emulation
divps xmm1, [pZero]
}
}
// If there''s an exception, set emulation variable to false
__except(EXCEPTION_EXECUTE_HANDLER){
SSEEmu = FALSE;
}
return SSEEmu;
}
3. 参考
For more details about the architecture of the Pentium III, refer [11], [12], [13] and [10].
For more information about Processor identification and CPUID, refer [15] and [7].
For more information about the Streaming SIMD Extensions, refer [19].
For more information about the programming issue, the software conventions and the software development strategies, refer [9], [16] and [17] respectively.
For more about application tuning for SSE and the VTune performance enhancement application, refer [1] and [8] respectively.
For more details about VTune and the Intel C/C++ Compiler, refer [3] and [2] respectively.
For additional information about the Pentium III processor and its capabilities, refer [14], [18], [20], [6], [5] and [4].
更多精彩
赞助商链接