arch+x86_64 +linux

arch: architecture-specific interface

The arch module provides non-portable access to CPU information and the floating point environment.

Index

Types

// Undocumented types:
type cpuid_ecxflag;
type cpuid_edxflag;
type cpuid_vendor;

Errors

// Undocumented Errors:
type cpuid_unknownvendor;

Functions

fn cpuid_getvendor() (cpuid_vendor | cpuid_unknownvendor);
fn cpuid_hasflags(edx: u32, ecx: u32) bool;

// Undocumented functions:
fn feclearexcept(ex: uint) void;
fn fegetround() uint;
fn feraiseexcept(ex: uint) void;
fn fesetround(mode: uint) void;
fn fetestexcept(ex: uint) uint;

Types

type cpuid_ecxflag[permalink] [source]

Show undocumented member
type cpuid_ecxflag = enum uint {
	SSE3 = 1 << 0,
	AES = 1 << 25,
	AVX = 1 << 28,
};

type cpuid_edxflag[permalink] [source]

Show undocumented member
type cpuid_edxflag = enum uint {
	SSE = 1 << 25,
	SSE2 = 1 << 26,
};

type cpuid_vendor[permalink] [source]

Show undocumented member
type cpuid_vendor = enum {
	AMD,
	INTEL,
	WINCHIP,
	TRANSMETA,
	CYRIX,
	CENTAUR,
	NEXGEN,
	UMC,
	SIS,
	NSC,
	RISE,
	VORTEX,
	VIA,
	ZHAOXIN,
	HYGON,
	MCST_ELBRUS,
	VMWARE, // Virtual Machines.
	XENHVM,
	MICROSOFT_HV,
	PARALLELS,
};

Errors

type cpuid_unknownvendor[permalink] [source]

Show undocumented member
type cpuid_unknownvendor = !void;

Functions

fn cpuid_getvendor[permalink] [source]

fn cpuid_getvendor() (cpuid_vendor | cpuid_unknownvendor);

Figures out cpu vendor using cpuid

fn cpuid_hasflags[permalink] [source]

fn cpuid_hasflags(edx: u32, ecx: u32) bool;

Checks if cpu has given features. See cpuid_edxflag and cpuid_ecxflag for available options.

fn feclearexcept[permalink] [source]

Show undocumented member
fn feclearexcept(ex: uint) void;

fn fegetround[permalink] [source]

Show undocumented member
fn fegetround() uint;

fn feraiseexcept[permalink] [source]

Show undocumented member
fn feraiseexcept(ex: uint) void;

fn fesetround[permalink] [source]

Show undocumented member
fn fesetround(mode: uint) void;

fn fetestexcept[permalink] [source]

Show undocumented member
fn fetestexcept(ex: uint) uint;