java.lang.Object
freenet.support.CPUInformation.CPUIDCPUInfo
freenet.support.CPUInformation.AMDInfoImpl
- All Implemented Interfaces:
AMDCPUInfo, CPUInfo
Moved out of CPUID.java Ref: https://en.wikipedia.org/wiki/List_of_AMD_CPU_microarchitectures Ref: https://gmplib.org/repo/gmp/file/tip/config.guess
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static booleanTrue if the CPU is an Athlon 64 or later AMD.private static booleanTrue if the CPU is an Athlon or later AMD.private static booleanTrue if the CPU is a Bobcat or later AMD.private static booleanTrue if the CPU is a Bulldozer or later AMD.private static booleanTrue if the CPU is an Excavator or later AMD.private static booleanTrue if the CPU is a Geode or later AMD.private static booleanTrue if the CPU is a Jaguar or later AMD.private static booleanTrue if the CPU uses the K10 family or later.private static booleanTrue if the CPU is a K6-2 or later AMD.private static booleanTrue if the CPU is a K6-III or later AMD.private static booleanTrue if the CPU is a K6 or later AMD.private static booleanTrue if the CPU is a Piledriver or later AMD.private static booleanTrue if the CPU is a Steamroller or later AMD.private static booleanTrue if the CPU uses the Zen 2 family or later.private static booleanTrue if the CPU uses the Zen 3 family or later.private static booleanTrue if the CPU uses the Zen 4 family or later.private static booleanTrue if the CPU uses the Zen 5 family or later.private static booleanTrue if the CPU uses the Zen family or later.Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionGets the CPU model description.private StringFinds the CPU's model name from the vendor data.(package private) StringidentifyCPUByModel(int family, int model, int extFamily, int extModel) Sets the instruction-set compatibility flags from the raw CPUID family and model numbers, and returns the microarchitecture guessed from them.booleanChecks if the CPU is at least a 'k8' CPU (Athlon 64, Opteron etc.booleanChecks if the CPU is at least a 'k7' CPU (Athlon, Duron etc.booleanChecks if the CPU is at least a 'bobcat' CPU.booleanChecks if the CPU is at least a 'bulldozer' CPU.booleanChecks if the CPU is at least an 'excavator' CPU.booleanChecks if the CPU is at least a 'geode' CPU.booleanChecks if the CPU is at least a 'jaguar' CPU.booleanChecks if the CPU is at least a 'k10' CPU.booleanChecks if the CPU is at least a 'k6-2' CPU.booleanChecks if the CPU is at least a 'k6-3' CPU.booleanWhether the CPU is at least a K6.booleanChecks if the CPU is at least a 'piledriver' CPU.booleanChecks if the CPU is at least a 'steamroller' CPU.booleanWhether the CPU is at least Zen 2.booleanWhether the CPU is at least Zen 3.booleanWhether the CPU is at least Zen 4.booleanWhether the CPU is at least Zen 5.booleanWhether the CPU is at least Zen.Methods inherited from class CPUIDCPUInfo
getVendor, hasABM, hasADX, hasAES, hasAVX, hasAVX2, hasAVX512, hasBMI1, hasBMI2, hasFMA3, hasMMX, hasMOVBE, hasSSE, hasSSE2, hasSSE3, hasSSE41, hasSSE42, hasSSE4A, hasTBM, hasX64Modifier and TypeMethodDescriptionGets the CPU vendor.booleanhasABM()Also known as LZCNTbooleanhasADX()Intel Multi-Precision Add-Carry Instruction Extensions Available in Broadwell.booleanhasAES()Whether the CPU supports AES.booleanhasAVX()Whether the CPU supports AVX.booleanhasAVX2()Whether the CPU supports AVX2.booleanDoes the CPU supports the AVX-512 Foundation instruction set? Quote wikipedia: AVX-512 consists of multiple extensions not all meant to be supported by all processors implementing them.booleanhasBMI1()Whether the CPU supports BMI1.booleanhasBMI2()Whether the CPU supports BMI2.booleanhasFMA3()Whether the CPU supports FMA3.booleanhasMMX()Checks if CPU supports the MMX instruction set.booleanhasMOVBE()Whether the CPU supports MOVBE.booleanhasSSE()Checks if CPU supports the SSE instruction set.booleanhasSSE2()Checks if CPU supports the SSE2 instruction set.booleanhasSSE3()Checks if CPU supports the SSE3 instruction set.booleanhasSSE41()Checks if CPU supports the SSE4.1 instruction set.booleanhasSSE42()Checks if CPU supports the SSE4.2 instruction set.booleanhasSSE4A()AMD K10 only.booleanhasTBM()Trailing Bit Manipulation (AMD feature)booleanhasX64()Whether the CPU supports 64-bit mode.
Field Details
isK6Compatible
private static boolean isK6CompatibleTrue if the CPU is a K6 or later AMD.isK6_2_Compatible
private static boolean isK6_2_CompatibleTrue if the CPU is a K6-2 or later AMD.isK6_3_Compatible
private static boolean isK6_3_CompatibleTrue if the CPU is a K6-III or later AMD.isGeodeCompatible
private static boolean isGeodeCompatibleTrue if the CPU is a Geode or later AMD.isAthlonCompatible
private static boolean isAthlonCompatibleTrue if the CPU is an Athlon or later AMD.isAthlon64Compatible
private static boolean isAthlon64CompatibleTrue if the CPU is an Athlon 64 or later AMD.isK10Compatible
private static boolean isK10CompatibleTrue if the CPU uses the K10 family or later.isBobcatCompatible
private static boolean isBobcatCompatibleTrue if the CPU is a Bobcat or later AMD.isJaguarCompatible
private static boolean isJaguarCompatibleTrue if the CPU is a Jaguar or later AMD.isBulldozerCompatible
private static boolean isBulldozerCompatibleTrue if the CPU is a Bulldozer or later AMD.isPiledriverCompatible
private static boolean isPiledriverCompatibleTrue if the CPU is a Piledriver or later AMD.isSteamrollerCompatible
private static boolean isSteamrollerCompatibleTrue if the CPU is a Steamroller or later AMD.isExcavatorCompatible
private static boolean isExcavatorCompatibleTrue if the CPU is an Excavator or later AMD.isZenCompatible
private static boolean isZenCompatibleTrue if the CPU uses the Zen family or later.isZen2Compatible
private static boolean isZen2CompatibleTrue if the CPU uses the Zen 2 family or later.isZen3Compatible
private static boolean isZen3CompatibleTrue if the CPU uses the Zen 3 family or later.isZen4Compatible
private static boolean isZen4CompatibleTrue if the CPU uses the Zen 4 family or later.isZen5Compatible
private static boolean isZen5CompatibleTrue if the CPU uses the Zen 5 family or later.
Constructor Details
AMDInfoImpl
public AMDInfoImpl()No-op, all state is static.
Method Details
IsK6Compatible
public boolean IsK6Compatible()Whether the CPU is at least a K6.- Specified by:
IsK6Compatiblein interfaceAMDCPUInfo- Returns:
- true if the CPU present in the machine is at least a 'k6' CPU
IsK6_2_Compatible
public boolean IsK6_2_Compatible()Description copied from interface:AMDCPUInfoChecks if the CPU is at least a 'k6-2' CPU.- Specified by:
IsK6_2_Compatiblein interfaceAMDCPUInfo- Returns:
- true if the CPU present in the machine is at least an 'k6-2' CPU
IsK6_3_Compatible
public boolean IsK6_3_Compatible()Description copied from interface:AMDCPUInfoChecks if the CPU is at least a 'k6-3' CPU.- Specified by:
IsK6_3_Compatiblein interfaceAMDCPUInfo- Returns:
- true if the CPU present in the machine is at least an 'k6-3' CPU
IsGeodeCompatible
public boolean IsGeodeCompatible()Description copied from interface:AMDCPUInfoChecks if the CPU is at least a 'geode' CPU.- Specified by:
IsGeodeCompatiblein interfaceAMDCPUInfo- Returns:
- true if the CPU present in the machine is at least an 'geode' CPU
IsAthlonCompatible
public boolean IsAthlonCompatible()Description copied from interface:AMDCPUInfoChecks if the CPU is at least a 'k7' CPU (Athlon, Duron etc. and better).- Specified by:
IsAthlonCompatiblein interfaceAMDCPUInfo- Returns:
- true if the CPU present in the machine is at least an 'k7' CPU (Atlhon, Duron etc. and better)
IsAthlon64Compatible
public boolean IsAthlon64Compatible()Description copied from interface:AMDCPUInfoChecks if the CPU is at least a 'k8' CPU (Athlon 64, Opteron etc. and better).- Specified by:
IsAthlon64Compatiblein interfaceAMDCPUInfo- Returns:
- true if the CPU present in the machine is at least an 'k8' CPU (Atlhon 64, Opteron etc. and better)
IsK10Compatible
public boolean IsK10Compatible()Description copied from interface:AMDCPUInfoChecks if the CPU is at least a 'k10' CPU.- Specified by:
IsK10Compatiblein interfaceAMDCPUInfo- Returns:
- true if the CPU present in the machine is at least an 'k10' CPU
IsBobcatCompatible
public boolean IsBobcatCompatible()Description copied from interface:AMDCPUInfoChecks if the CPU is at least a 'bobcat' CPU.- Specified by:
IsBobcatCompatiblein interfaceAMDCPUInfo- Returns:
- true if the CPU present in the machine is at least an 'bobcat' CPU
IsJaguarCompatible
public boolean IsJaguarCompatible()Description copied from interface:AMDCPUInfoChecks if the CPU is at least a 'jaguar' CPU.- Specified by:
IsJaguarCompatiblein interfaceAMDCPUInfo- Returns:
- true if the CPU present in the machine is at least an 'jaguar' CPU
IsBulldozerCompatible
public boolean IsBulldozerCompatible()Description copied from interface:AMDCPUInfoChecks if the CPU is at least a 'bulldozer' CPU.- Specified by:
IsBulldozerCompatiblein interfaceAMDCPUInfo- Returns:
- true if the CPU present in the machine is at least a 'bulldozer' CPU
IsPiledriverCompatible
public boolean IsPiledriverCompatible()Description copied from interface:AMDCPUInfoChecks if the CPU is at least a 'piledriver' CPU.- Specified by:
IsPiledriverCompatiblein interfaceAMDCPUInfo- Returns:
- true if the CPU present in the machine is at least a 'piledriver' CPU
IsSteamrollerCompatible
public boolean IsSteamrollerCompatible()Description copied from interface:AMDCPUInfoChecks if the CPU is at least a 'steamroller' CPU.- Specified by:
IsSteamrollerCompatiblein interfaceAMDCPUInfo- Returns:
- true if the CPU present in the machine is at least a 'steamroller' CPU
IsExcavatorCompatible
public boolean IsExcavatorCompatible()Description copied from interface:AMDCPUInfoChecks if the CPU is at least an 'excavator' CPU.- Specified by:
IsExcavatorCompatiblein interfaceAMDCPUInfo- Returns:
- true if the CPU present in the machine is at least a 'excavator' CPU
IsZenCompatible
public boolean IsZenCompatible()Whether the CPU is at least Zen.- Specified by:
IsZenCompatiblein interfaceAMDCPUInfo- Returns:
- true if the CPU present in the machine is at least a Zen family CPU
IsZen2Compatible
public boolean IsZen2Compatible()Whether the CPU is at least Zen 2.- Specified by:
IsZen2Compatiblein interfaceAMDCPUInfo- Returns:
- true if the CPU present in the machine is at least a Zen2 family CPU
IsZen3Compatible
public boolean IsZen3Compatible()Whether the CPU is at least Zen 3.- Specified by:
IsZen3Compatiblein interfaceAMDCPUInfo- Returns:
- true if the CPU present in the machine is at least a Zen3 family CPU
IsZen4Compatible
public boolean IsZen4Compatible()Whether the CPU is at least Zen 4.- Specified by:
IsZen4Compatiblein interfaceAMDCPUInfo- Returns:
- true if the CPU present in the machine is at least a Zen4 family CPU
IsZen5Compatible
public boolean IsZen5Compatible()Whether the CPU is at least Zen 5.- Specified by:
IsZen5Compatiblein interfaceAMDCPUInfo- Returns:
- true if the CPU present in the machine is at least a Zen5 family CPU
getCPUModelString
Description copied from interface:CPUInfoGets the CPU model description.- Specified by:
getCPUModelStringin interfaceCPUInfo- Overrides:
getCPUModelStringin classCPUIDCPUInfo- Returns:
- A string detailing what type of CPU that is present in the machine. I.e. 'Pentium IV' etc.
- Throws:
UnknownCPUException- If for any reason the retrieval of the requested information failed. The message encapsulated in the exception indicates the cause of the failure.
identifyCPU
Finds the CPU's model name from the vendor data.- Returns:
- the model name, null if unknown
identifyCPUByModel
Sets the instruction-set compatibility flags from the raw CPUID family and model numbers, and returns the microarchitecture guessed from them. The flags are static, so they are cleared first: this runs more than once per JVM (the jbigi probe and the router's processor-change check), and a second call must not inherit the first result.Package visible and parameterised so the family and model table can be tested without a CPU to probe. A few pre-Zen families also consult live CPUID feature bits, so only the Zen ranges are fully reproducible.
- Parameters:
family- the CPUID base familymodel- the CPUID base modelextFamily- the CPUID extended family, added to a base family of 15extModel- the CPUID extended model, folded into the model in that case- Returns:
- the microarchitecture name, or null if the family is unknown