java.lang.Object
freenet.support.CPUInformation.CPUIDCPUInfo
freenet.support.CPUInformation.IntelInfoImpl
All Implemented Interfaces:
CPUInfo, IntelCPUInfo

class IntelInfoImplextends CPUIDCPUInfo implements IntelCPUInfo
Identifies Intel CPUs via CPUID and exposes instruction set support flags.

Identification Strategy

Two identification paths are used, in order of priority:

  1. Brand string (CPUID leaf 0x80000002–0x80000004): Returns the exact marketing name (e.g. "Intel(R) Core(TM) i9-14900K") and is always accurate when the CPU supports extended CPUID leaves.
  2. Model number fallback: For very old CPUs without brand string support, the processor identifier is computed from CPUID family/model/extended-model/extended-family values and matched against a table of known Intel microarchitectures.

Instruction Set Flags

Regardless of the identification path, the switch(family) block always runs to set the instruction set compatibility flags (isSandyCompatible, isHaswellCompatible, etc.), which are queried by callers to determine feature availability (AVX, AVX2, AVX-512, BMI, FMA, etc.).

Intel Family 6 Model Numbers

Intel uses family 6 for all modern Core processors. The model number (base model + extended model) distinguishes microarchitectures:

  0x0e-0x0f  Core (Merom/Conroe)       0x1a-0x1f  Nehalem
  0x25-0x2f  Westmere                  0x25-0x2f  Sandy Bridge
  0x3a-0x3f  Ivy Bridge                0x3c-0x3f  Haswell
  0x45-0x47  Haswell (ULT)             0x3d-0x4f  Broadwell
  0x4e-0x5e  Skylake                   0x55        Skylake-X / Cascade Lake / Cooper Lake
  0x5c-0x5f  Goldmont (Atom)           0x66-0x67  Cannon Lake
  0x7a        Gemini Lake               0x7c        Lakefield
  0x7d-0x7e  Ice Lake client           0x6a-0x6c  Ice Lake server
  0x82-0x9e  Kaby Lake / Coffee Lake   0xa5-0xa6  Comet Lake
  0x8c-0x8d  Tiger Lake                0xa7        Rocket Lake
  0x97-0x9a  Alder Lake                0xb7-0xbf  Raptor Lake
  0xaa-0xac  Meteor Lake               0xb5-0xc6  Arrow Lake
  0xbd        Lunar Lake                0xcc        Panther Lake
  0xd5        Wildcat Lake              0x8f        Sapphire Rapids
  0xcf        Emerald Rapids            0xad-0xae  Granite Rapids
  0xaf        Sierra Forest             0xdd        Clearwater Forest
  0xb6        Grand Ridge               0xbe        Gracemont (E-core only)
See Also:
  • Field Details

    • isPentiumCompatible

      private static boolean isPentiumCompatible
      True for a Pentium class CPU or better.
    • isPentiumMMXCompatible

      private static boolean isPentiumMMXCompatible
      True for a Pentium MMX class CPU or better.
    • isPentium2Compatible

      private static boolean isPentium2Compatible
      True for a Pentium II class CPU or better.
    • isPentium3Compatible

      private static boolean isPentium3Compatible
      True for a Pentium III class CPU or better.
    • isPentium4Compatible

      private static boolean isPentium4Compatible
      True for a Pentium 4 class CPU or better.
    • isPentiumMCompatible

      private static boolean isPentiumMCompatible
      True for a Pentium M class CPU or better.
    • isAtomCompatible

      private static boolean isAtomCompatible
      True for an Atom class CPU or better.
    • isCore2Compatible

      private static boolean isCore2Compatible
      True for a Core 2 class CPU or better.
    • isCoreiCompatible

      private static boolean isCoreiCompatible
      True for a Core i class CPU or better.
    • isSandyCompatible

      private static boolean isSandyCompatible
      True for a Sandy Bridge class CPU or better.
    • isIvyCompatible

      private static boolean isIvyCompatible
      True for an Ivy Bridge class CPU or better.
    • isHaswellCompatible

      private static boolean isHaswellCompatible
      True for a Haswell class CPU or better.
    • isBroadwellCompatible

      private static boolean isBroadwellCompatible
      True for a Broadwell class CPU or better.
    • isSkylakeCompatible

      private static boolean isSkylakeCompatible
      True for a Skylake class CPU or better.
    • smodel

      private static final String smodel
      Identified processor name from identifyCPU(), or null if unrecognized.
  • Constructor Details

    • IntelInfoImpl

      IntelInfoImpl()
      Constructor. The family and model detection below reads the static CPUID results, so an instance carries no state beyond the base class.
  • Method Details

    • IsPentiumCompatible

      public boolean IsPentiumCompatible()
      true if the CPU supports Pentium (P5) instructions.
      Specified by:
      IsPentiumCompatible in interface IntelCPUInfo
      Returns:
      true if the CPU is at least a Pentium CPU
    • IsPentiumMMXCompatible

      public boolean IsPentiumMMXCompatible()
      true if the CPU supports Pentium MMX instructions.
      Specified by:
      IsPentiumMMXCompatible in interface IntelCPUInfo
      Returns:
      true if the CPU is at least a Pentium MMX compatible CPU
    • IsPentium2Compatible

      public boolean IsPentium2Compatible()
      true if the CPU supports Pentium II (P6) instructions.
      Specified by:
      IsPentium2Compatible in interface IntelCPUInfo
      Returns:
      true if the CPU implements at least the p6 instruction set
    • IsPentium3Compatible

      public boolean IsPentium3Compatible()
      true if the CPU supports Pentium III instructions (SSE).
      Specified by:
      IsPentium3Compatible in interface IntelCPUInfo
      Returns:
      true if the CPU implements at least a Pentium III level
    • IsPentium4Compatible

      public boolean IsPentium4Compatible()
      true if the CPU supports Pentium 4 instructions (SSE2).
      Specified by:
      IsPentium4Compatible in interface IntelCPUInfo
      Returns:
      true if the CPU implements at least a Pentium IV level
    • IsPentiumMCompatible

      public boolean IsPentiumMCompatible()
      true if the CPU supports Pentium M (Dothan/Core) instructions.
      Specified by:
      IsPentiumMCompatible in interface IntelCPUInfo
      Returns:
      true if the CPU implements at least a Pentium M level
    • IsAtomCompatible

      public boolean IsAtomCompatible()
      true if the CPU is an Intel Atom (Silvermont/Goldmont/etc.).
      Specified by:
      IsAtomCompatible in interface IntelCPUInfo
      Returns:
      true if the CPU implements at least an Atom level instruction/feature set
    • IsCore2Compatible

      public boolean IsCore2Compatible()
      true if the CPU supports Core 2 (SSSE3) instructions.
      Specified by:
      IsCore2Compatible in interface IntelCPUInfo
      Returns:
      true if the CPU implements at least a Core2 level instruction/feature set
    • IsCoreiCompatible

      public boolean IsCoreiCompatible()
      true if the CPU supports Core i-series (SSE4.2) instructions.
      Specified by:
      IsCoreiCompatible in interface IntelCPUInfo
      Returns:
      true if the CPU implements at least a Corei level instruction/feature set
    • IsSandyCompatible

      public boolean IsSandyCompatible()
      true if the CPU supports Sandy Bridge (AVX) instructions.
      Specified by:
      IsSandyCompatible in interface IntelCPUInfo
      Returns:
      true if the CPU implements at least a SandyBridge level instruction/feature set
    • IsIvyCompatible

      public boolean IsIvyCompatible()
      true if the CPU supports Ivy Bridge (AVX, PCMPGTQ) instructions.
      Specified by:
      IsIvyCompatible in interface IntelCPUInfo
      Returns:
      true if the CPU implements at least an IvyBridge level instruction/feature set
    • IsHaswellCompatible

      public boolean IsHaswellCompatible()
      true if the CPU supports Haswell (AVX2, BMI1/2, FMA) instructions.
      Specified by:
      IsHaswellCompatible in interface IntelCPUInfo
      Returns:
      true if the CPU implements at least a Haswell level instruction/feature set
    • IsBroadwellCompatible

      public boolean IsBroadwellCompatible()
      true if the CPU supports Broadwell (ADX, AVX-512PF/ER) instructions.
      Specified by:
      IsBroadwellCompatible in interface IntelCPUInfo
      Returns:
      true if the CPU implements at least a Broadwell level instruction/feature set
    • IsSkylakeCompatible

      public boolean IsSkylakeCompatible()
      true if the CPU supports Skylake (AVX-512F/DQ/BW/VL) instructions.
      Specified by:
      IsSkylakeCompatible in interface IntelCPUInfo
      Returns:
      true if the CPU implements at least a Skylake level instruction/feature set
    • getCPUModelString

      public String getCPUModelString() throws UnknownCPUException
      Returns the identified processor name, or throws if unrecognized.
      Specified by:
      getCPUModelString in interface CPUInfo
      Overrides:
      getCPUModelString in class CPUIDCPUInfo
      Returns:
      the CPU model string (e.g. "Intel(R) Core(TM) i9-14900K" or "Skylake Core i3/i5/i7")
      Throws:
      UnknownCPUException - if the CPU could not be identified
    • identifyCPU

      private static String identifyCPU()
      Identifies the Intel CPU and sets instruction set compatibility flags.

      Strategy:

      1. Capture the CPUID brand string (leaf 0x80000002–0x80000004), which gives the exact marketing name when available.
      2. Compute the processor family and model from CPUID leaf 1, handling Intel's extended model and extended family fields.
      3. Walk a switch(family) block that matches known model numbers to microarchitecture codenames and sets the appropriate instruction set compatibility flags (isSandyCompatible, isHaswellCompatible, etc.).
      4. Override the model-based name with the brand string if one was captured, providing a more accurate and user-friendly display string.

      The brand string override at the end ensures that modern CPUs (family 6) always display the correct marketing name, while the model-based switch still runs to set the instruction set flags needed by callers.

      Returns:
      the identified processor name, or null if unrecognized