//========================================================================== // // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR // PURPOSE. // // Copyright (c) 1999 - 2001 On2 Technologies Inc. All Rights Reserved. // //-------------------------------------------------------------------------- /**************************************************************************** * * Module Title : Wmt_CpuID.cpp * * Description : willamette processor detection functions * * ***************************************************************************** */ /**************************************************************************** * Header Files ***************************************************************************** */ #include #include extern "C" { /**************************************************************************** * * ROUTINE : WillametteNewInstructionSupport() * * INPUTS : * * OUTPUTS : * * RETURNS : retrun true if the processor support willamette new * instructions, return false otherwise * * * FUNCTION : detect willamette processor * * SPECIAL NOTES : None. * * ERRORS : None. * ****************************************************************************/ int WillametteNewInstructionHWSupport() { int HWSupport = 0; char brand[12]; __try { __asm { lea esi, brand mov eax, 0 cpuid mov [esi], ebx mov [esi+4], edx mov [esi+8], ecx } } __except(EXCEPTION_EXECUTE_HANDLER) { if(_exception_code()) { //cout<