diff --git a/core/java/src/freenet/support/CPUInformation/CPUID.java b/core/java/src/freenet/support/CPUInformation/CPUID.java index b87fde6f0b4253655fb272658daac6d1df1da5b0..749ac4525c15160c81eaaf22be79a9f774d35a12 100644 --- a/core/java/src/freenet/support/CPUInformation/CPUID.java +++ b/core/java/src/freenet/support/CPUInformation/CPUID.java @@ -476,25 +476,23 @@ public class CPUID { // Remove when implemented isCore7Compatible in BigInteger } else if (getCPUExtendedModel() == 0 && getCPUFamily() == 6 && getCPUModel() == 15){ return true; - } else { - return false; } + return false; } public boolean IsAtomCompatible() { if (getCPUExtendedModel() == 0 && getCPUFamily() == 6 && getCPUModel() == 12){ return true; - } else { - return false; - } + } + return false; + } public boolean IsCore2Compatible() { if (getCPUExtendedModel() == 0 && getCPUFamily() == 6 && getCPUModel() == 15){ return true; - } else { - return false; - } + } + return false; } public boolean IsCoreiCompatible() { @@ -503,9 +501,8 @@ public class CPUID { // Xeon MP (45nm) or Core i7 } else if (getCPUExtendedModel() == 1 && (getCPUFamily() == 6 && (getCPUModel() == 10 || getCPUModel() == 13 || getCPUModel() == 14))){ return true; - } else { - return false; - } + } + return false; } public String getCPUModelString() throws UnknownCPUException { if (getCPUExtendedModel() == 0){ @@ -668,6 +665,9 @@ public class CPUID { System.out.println(" Is pII-compatible: "+((IntelCPUInfo)c).IsPentium2Compatible()); System.out.println(" Is pIII-compatible: "+((IntelCPUInfo)c).IsPentium3Compatible()); System.out.println(" Is pIV-compatible: "+((IntelCPUInfo)c).IsPentium4Compatible()); + System.out.println(" Is atom-compatible: "+((IntelCPUInfo)c).IsAtomCompatible()); + System.out.println(" Is core2-compatible: "+((IntelCPUInfo)c).IsCore2Compatible()); + System.out.println(" Is corei-compatible: "+((IntelCPUInfo)c).IsCoreiCompatible()); } if(c instanceof AMDCPUInfo){ System.out.println(" **AMD-info**"); diff --git a/core/java/src/freenet/support/CPUInformation/IntelCPUInfo.java b/core/java/src/freenet/support/CPUInformation/IntelCPUInfo.java index 20f8aaf77e689e9c267218c30f4a17bccbcb2a4d..a333b63e5be2fd8e5ccf52204f83fcd3e1ed66db 100644 --- a/core/java/src/freenet/support/CPUInformation/IntelCPUInfo.java +++ b/core/java/src/freenet/support/CPUInformation/IntelCPUInfo.java @@ -37,4 +37,16 @@ public interface IntelCPUInfo extends CPUInfo { * @return true iff the CPU implements at least a Pentium IV level instruction/feature set. */ public boolean IsPentium4Compatible(); + /** + * @return true iff the CPU implements at least a Atom level instruction/feature set. + */ + public boolean IsAtomCompatible(); + /** + * @return true iff the CPU implements at least a Core2 level instruction/feature set. + */ + public boolean IsCore2Compatible(); + /** + * @return true iff the CPU implements at least a Corei level instruction/feature set. + */ + public boolean IsCoreiCompatible(); }