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

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

This is supported on x86 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.

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g. `str,u8` or `String,struct:Vec,test`)