ソフトウェアをインストールする前に、SSE2 のプロセッサ サポートを確認する必要があります。私が理解していることから、私はこれを思いつきました:
bool TestSSE2(char * szErrorMsg)
{
__try
{
__asm
{
xorpd xmm0, xmm0 // executing SSE2 instruction
}
}
#pragma warning (suppress: 6320)
__except (EXCEPTION_EXECUTE_HANDLER)
{
if (_exception_code() == STATUS_ILLEGAL_INSTRUCTION)
{
_tcscpy_s(szErrorMsg,MSGSIZE, _T("Streaming SIMD Extensions 2(SSE2) is not supported by the CPU.\r\n Unable to launch APP"));
return false;
}
_tcscpy_s(szErrorMsg,MSGSIZE, _T("Streaming SIMD Extensions 2(SSE2) is not supported by the CPU.\r\n Unable to launch APP"));
return false;
}
return true;
}
これは機能しますか?私のCPUはそれをサポートしているので、テスト方法がよくわからないので、関数呼び出しから false になりません。
SSE2 のプロセッサ サポートを確認するにはどうすればよいですか?