Merge pull request #996 from Winterleaf/Add-new-cpus-AMD-Types

Added support for AMD Chips
This commit is contained in:
Daniel Buckmaster 2014-12-21 19:04:26 +11:00
commit 183fe7dbeb
3 changed files with 26 additions and 2 deletions

View file

@ -74,6 +74,9 @@ enum ProcessorType
CPU_AMD_K6_2,
CPU_AMD_K6_3,
CPU_AMD_Athlon,
CPU_AMD_Phenom,
CPU_AMD_PhenomII,
CPU_AMD_Bulldozer,
CPU_AMD_Unknown,
CPU_Cyrix_6x86,
CPU_Cyrix_MediaGX,

View file

@ -92,8 +92,8 @@ public:
exit conditions.
*/
#define AssertFatal(x, y) \
{ if (((bool)(x))==(bool)0) \
{ if ( ::PlatformAssert::processAssert(::PlatformAssert::Fatal, __FILE__, __LINE__, y) ) { ::Platform::debugBreak(); } } }
{ if (((bool)(x))==false) \
{ if ( ::PlatformAssert::processAssert(::PlatformAssert::Fatal, __FILE__, __LINE__, y) ) { ::Platform::debugBreak(); } } }
#else
#define AssertFatal(x, y) { TORQUE_UNUSED(x); TORQUE_UNUSED(y); }

View file

@ -178,6 +178,9 @@ void SetProcessorInfo(Platform::SystemInfo_struct::Processor& pInfo,
pInfo.properties |= (properties & BIT_SSE) ? CPU_PROP_SSE : 0;
pInfo.properties |= ( properties & BIT_SSE2 ) ? CPU_PROP_SSE2 : 0;
pInfo.properties |= (properties & BIT_3DNOW) ? CPU_PROP_3DNOW : 0;
// Phenom and PhenomII support SSE3, SSE4a
pInfo.properties |= ( properties2 & BIT_SSE3 ) ? CPU_PROP_SSE3 : 0;
pInfo.properties |= ( properties2 & BIT_SSE4_1 ) ? CPU_PROP_SSE4_1 : 0;
// switch on processor family code
switch ((processor >> 8) & 0xf)
{
@ -223,6 +226,24 @@ void SetProcessorInfo(Platform::SystemInfo_struct::Processor& pInfo,
pInfo.name = StringTable->insert("AMD Athlon");
break;
// Phenom Family
case 15:
pInfo.type = CPU_AMD_Phenom;
pInfo.name = StringTable->insert("AMD Phenom");
break;
// Phenom II Family
case 16:
pInfo.type = CPU_AMD_PhenomII;
pInfo.name = StringTable->insert("AMD Phenom II");
break;
// Bulldozer Family
case 17:
pInfo.type = CPU_AMD_Bulldozer;
pInfo.name = StringTable->insert("AMD Bulldozer");
break;
default:
pInfo.type = CPU_AMD_Unknown;
pInfo.name = StringTable->insert("AMD (unknown)");