# 1.27.0[−][src]Function core::arch::x86_64::__cpuid_count

    pub unsafe fn __cpuid_count(leaf: u32, sub_leaf: u32) -> CpuidResult

This is supported on x86-64 only.

Returns the result of the `cpuid` instruction for a given `leaf` (`EAX`) and `sub_leaf` (`ECX`).

The highest-supported leaf value is returned by the first tuple argument of `__get_cpuid_max(0)`. For leaves containung sub-leaves, the second tuple argument returns the highest-supported sub-leaf value.

The CPUID Wikipedia page contains how to query which information using the `EAX` and `ECX` registers, and the interpretation of the results returned in `EAX`, `EBX`, `ECX`, and `EDX`.

The references are:

- Intel 64 and IA-32 Architectures Software Developer's Manual Volume 2: Instruction Set Reference, A-Z.
- AMD64 Architecture Programmer's Manual, Volume 3: General-Purpose and System Instructions.