WEB开发网
开发学院软件开发C++ Pentium III处理器的单指令多数据流扩展指令(3)... 阅读

Pentium III处理器的单指令多数据流扩展指令(3)

 2010-10-15 09:08:09 来源:Web开发网   
核心提示:SSE SDK还有一个Pentium III和SSE寄存器的异常模式.用下面的代码也可以用来检查是否有Pentium III处理器.要编译下面的代码,需要包含fvec.h头文件.// Checking for SSE emulation supportBOOL CheckP3Emu(){BOOL SSEEmu = TR

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].

上一页  1 2 3 4 5 6 7 8  下一页

Tags:Pentium III 处理器

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接