compilertools.processors.x86_32

X86-32 Processors.

class compilertools.processors.x86_32.Cpuid(eax_value=0, ecx_value=0)[source]

Gets Processor CPUID.

Parameters:
  • eax_value (int) – EAX register value

  • ecx_value (int) – ECX register value

property eax

Get EAX register CPUID result.

Returns:

Raw EAX register value.

Return type:

int

property ebx

Get EBX register CPUID result.

Returns:

Raw EAX register value.

Return type:

int

property ecx

Get ECX register CPUID result.

Returns:

Raw EAX register value.

Return type:

int

property edx

Get EDX register CPUID result.

Returns:

Raw EAX register value.

Return type:

int

static registers_to_str(*uints)[source]

Convert unsigned integers from CPUID register to ASCII string.

Parameters:

uints (int) – Unsigned integers to concatenate and convert to string.

Returns:

Result.

Return type:

str

class compilertools.processors.x86_32.Processor(current_machine=False)[source]

x86-32 CPU.

property arch

Processor architecture.

Returns:

Architecture name.

Return type:

str

property brand

Brand from CPUID.

Returns:

Brand.

Return type:

str

clear() → None.  Remove all items from D.
property cpuid_highest_extended_function

CPUID highest extended function.

Returns:

Related EAX value for CPUID.

Return type:

int

property features

Features flags from CPUID.

Returns:

Flags names.

Return type:

list of str

References

Reference: Linux kernel “arch/x86/include/asm/cpufeatures.h”

Feature naming convention: Use “cpufeatures.h” quoted names in comments in priority, then use name from “cpufeatures.h” constants.

Exceptions in names: PNI called SSE3 (like other SSE feature flags)

get(k[, d]) → D[k] if k in D, else d.  d defaults to None.
items() → a set-like object providing a view on D's items
keys() → a set-like object providing a view on D's keys
property os_supports_xsave

OS and CPU support XSAVE instruction.

Returns:

Supports if True.

Return type:

bool

pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() → (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() → an object providing a view on D's values
property vendor

Manufacturer ID from CPUID.

Returns:

Manufacturer ID.

Return type:

str