ddcpuid

x86 CPU Identification tool

This was initially used internally, so it's pretty unfriendly.

The best way to use this module would be:

CPUINFO info;     // Important to let the struct init to zero!
getLeaves(info);  // Get maximum CPUID leaves (mandatory step before info)
getVendor(info);  // Get vendor string (mandatory step before info)
getInfo(info);    // Fill CPUINFO structure (optional)

Then checking the corresponding field:

if (info.ext.amx_xfd) {
  // Intel AMX is available
} else {
  // Feature unavailable
}

See the CPUINFO structure for available fields.

For more information, it's encouraged to consult the technical manual.

NOTICE: This is best used with DMD and LDC. Will crash on GDC -O1.

Members

Enums

VENDOR_OTHER
anonymousenum VENDOR_OTHER
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Functions

asmcpuid
void asmcpuid(REGISTERS regs, uint level, uint sublevel)
Undocumented in source. Be warned that the author may not have intended to support it.
getInfo
void getInfo(CPUINFO info)

Fetch CPU information.

getLeaves
void getLeaves(CPUINFO info)

Get CPU leaf levels.

getVendor
void getVendor(CPUINFO info)

Fetch CPU vendor

Manifest constants

DDCPUID_CACHE_MAX
enum DDCPUID_CACHE_MAX;

Cache levels buffer size (and maximum size)

DDCPUID_PLATFORM
enum DDCPUID_PLATFORM;

Target platform

DDCPUID_PLATFORM
enum DDCPUID_PLATFORM;

Target platform

DDCPUID_VERSION
enum DDCPUID_VERSION;

Library version

Structs

CACHEINFO
struct CACHEINFO

CPU cache entry

CPUINFO
struct CPUINFO

CPU information structure

REGISTERS
struct REGISTERS
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Meta

Authors

dd86k (dd@dax.moe)