Added support for AMD Bulldozer CPUs. Fixed issue with last commit.

This commit is contained in:
dev
2012-01-08 19:54:22 +00:00
parent 527c4b58c1
commit f5b6d56489
3 changed files with 24 additions and 1 deletions

View File

@@ -43,4 +43,8 @@ public interface AMDCPUInfo extends CPUInfo {
* @return true if the CPU present in the machine is at least an 'k8' CPU (Atlhon 64, Opteron etc. and better) * @return true if the CPU present in the machine is at least an 'k8' CPU (Atlhon 64, Opteron etc. and better)
*/ */
public boolean IsBobcatCompatible(); public boolean IsBobcatCompatible();
/**
* @return true if the CPU present in the machine is at least a 'bulldozer' CPU
*/
public boolean IsBulldozerCompatible();
} }

View File

@@ -13,6 +13,7 @@ class AMDInfoImpl extends CPUIDCPUInfo implements AMDCPUInfo
protected static boolean isAthlonCompatible = false; protected static boolean isAthlonCompatible = false;
protected static boolean isAthlon64Compatible = false; protected static boolean isAthlon64Compatible = false;
protected static boolean isBobcatCompatible = false; protected static boolean isBobcatCompatible = false;
protected static boolean isBulldozerCompatible = false;
// If modelString != null, the cpu is considered correctly identified. // If modelString != null, the cpu is considered correctly identified.
protected static String modelString = null; protected static String modelString = null;
@@ -31,6 +32,8 @@ class AMDInfoImpl extends CPUIDCPUInfo implements AMDCPUInfo
public boolean IsBobcatCompatible(){ return isBobcatCompatible; } public boolean IsBobcatCompatible(){ return isBobcatCompatible; }
public boolean IsBulldozerCompatible(){ return isBulldozerCompatible; }
static static
{ {
identifyCPU(); identifyCPU();
@@ -349,6 +352,22 @@ class AMDInfoImpl extends CPUIDCPUInfo implements AMDCPUInfo
break; break;
} }
} }
//Bulldozer
if(CPUID.getCPUFamily() + CPUID.getCPUExtendedFamily() == 21){
isK6Compatible = true;
isK6_2_Compatible = true;
isK6_3_Compatible = true;
isAthlonCompatible = true;
isAthlon64Compatible = true;
isBobcatCompatible = true;
isBulldozerCompatible = true;
isX64 = true;
switch(CPUID.getCPUModel() + CPUID.getCPUExtendedModel()){
case 1:
modelString = "Bulldozer FX-6***/FX-8***";
break;
}
}
} }
public boolean hasX64() public boolean hasX64()

View File

@@ -244,7 +244,7 @@ class IntelInfoImpl extends CPUIDCPUInfo implements IntelCPUInfo
case 12: case 12:
modelString = "Core i7 (32nm)"; modelString = "Core i7 (32nm)";
break; break;
case 12: case 13:
modelString = "Core i7 Extreme Edition (32nm)"; modelString = "Core i7 Extreme Edition (32nm)";
break; break;
case 14: case 14: