27#ifndef INCLUDED_X86_X64
28#define INCLUDED_X86_X64
31#error "including x86_x64.h without ARCH_X86_X64=1"
160static inline u64 rdtsc() {
return __rdtsc(); }
Definition: x86_x64.cpp:47
bool cpuid(CpuidRegs *regs)
invoke CPUID instruction.
Definition: x86_x64.cpp:98
void GetCapBits(u32 *d0, u32 *d1, u32 *d2, u32 *d3)
Definition: x86_x64.cpp:156
void DebugBreak()
trigger a breakpoint inside this function when it is called.
Definition: x86_x64.cpp:385
Vendors Vendor()
Definition: x86_x64.cpp:200
Models
Definition: x86_x64.h:81
@ MODEL_NEHALEM_EP_2
Definition: x86_x64.h:83
@ MODEL_NEHALEM_EX
Definition: x86_x64.h:87
@ MODEL_NEHALEM_EP
Definition: x86_x64.h:82
@ MODEL_SANDY_BRIDGE
Definition: x86_x64.h:89
@ MODEL_WESTMERE_EP
Definition: x86_x64.h:86
@ MODEL_I7_I5
Definition: x86_x64.h:84
@ MODEL_WESTMERE_EX
Definition: x86_x64.h:88
@ MODEL_CLARKDALE
Definition: x86_x64.h:85
@ MODEL_SANDY_BRIDGE_2
Definition: x86_x64.h:90
Vendors
CPU vendor.
Definition: x86_x64.h:71
@ VENDOR_AMD
Definition: x86_x64.h:74
@ VENDOR_UNKNOWN
Definition: x86_x64.h:72
@ VENDOR_INTEL
Definition: x86_x64.h:73
double ClockFrequency()
measure the CPU clock frequency via rdtsc and timer_Time.
Definition: x86_x64.cpp:429
bool Cap(Caps cap)
Definition: x86_x64.cpp:142
size_t Model()
Definition: x86_x64.cpp:232
Caps
bit indices of CPU capability flags (128 bits).
Definition: x86_x64.h:110
@ CAP_AMD_MMX_EXT
Definition: x86_x64.h:134
@ CAP_TM_SCC
Definition: x86_x64.h:123
@ CAP_TSC
Definition: x86_x64.h:120
@ CAP_AMD_3DNOW_PRO
Definition: x86_x64.h:135
@ CAP_MMX
Definition: x86_x64.h:124
@ CAP_AMD_3DNOW
Definition: x86_x64.h:136
@ CAP_SSE42
Definition: x86_x64.h:116
@ CAP_EST
Definition: x86_x64.h:113
@ CAP_AMD_MP
Definition: x86_x64.h:133
@ CAP_CMOV
Definition: x86_x64.h:122
@ CAP_HT
Definition: x86_x64.h:127
@ CAP_FPU
Definition: x86_x64.h:119
@ CAP_SSE2
Definition: x86_x64.h:126
@ CAP_SSSE3
Definition: x86_x64.h:114
@ CAP_SSE
Definition: x86_x64.h:125
@ CAP_AMD_CMP_LEGACY
Definition: x86_x64.h:130
@ CAP_MSR
Definition: x86_x64.h:121
@ CAP_SSE3
Definition: x86_x64.h:112
@ CAP_SSE41
Definition: x86_x64.h:115
u64 rdtsc()
Definition: x86_x64.cpp:373
size_t Family()
Definition: x86_x64.cpp:238
registers used/returned by cpuid
Definition: x86_x64.h:45
u32 edx
Definition: x86_x64.h:49
u32 ecx
Definition: x86_x64.h:48
u32 eax
Definition: x86_x64.h:46
u32 ebx
Definition: x86_x64.h:47
uint64_t u64
Definition: types.h:40
uint32_t u32
Definition: types.h:39