ultimatepp/uppdev/TestSSE/TestSSE.cpp
cxl 351994a6cc Adding uppdev....
git-svn-id: svn://ultimatepp.org/upp/trunk@328 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2008-08-15 08:36:24 +00:00

22 lines
681 B
C++

#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
unsigned int cpeinfo;
unsigned int cpsse3;
__asm {
mov eax, 01h ;01h is the parameter for the CPUID command below
cpuid
mov cpeinfo, edx ;Get the info stored by CPUID
mov cpsse3, ecx ;info about SSE3 is stored in ECX
}
Cout() << "1 - Instruction set is supported by CPU\n";
Cout() << "0 - Instruction set not supported\n";
Cout() << "--------------------------------\n";
Cout() << "MMX: " << ((cpeinfo >> 23) & 0x1 ) << "\tSSE: " << ((cpeinfo >> 25) & 0x1 ) << "\tSSE2: " << ((cpeinfo >> 26) & 0x1 ) << "\n";
Cout() << "SSE3: " << ((cpsse3 ) & 0x1 );
}