Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Burger::CPUID_t Struct Reference

Structure that holds the features of the CPU. More...

Public Types

enum  eCPU {
  kCPUIntel , kCPUAMD , kCPUCentaur , kCPUCyrix ,
  kCPUTransmeta , kCPUNationalSemiconductor , kCPUNexgen , kCPURise ,
  kCPUSIS , kCPUUMC , kCPUVIA , kCPUVortex ,
  kCPUShanghai , kCPUHygon , kCPURDC , kCPUElbrus2000 ,
  kCPUMiSTer486 , kCPUKVM , kCPUMicrosoftVirtualPC , kCPUParallels ,
  kCPUVMWare , kCPUXen , kCPURosetta2 , kCPUUnknown
}
 Intel CPU enumeration. More...
 

Public Member Functions

uint_t has_RTSC (void) const noexcept
 Returns non-zero if the RTSC instruction is available.
 
uint_t has_CMOV (void) const noexcept
 Returns non-zero if the CMOV instructions are available.
 
uint_t has_MMX (void) const noexcept
 Returns non-zero if the MMX instructions are available.
 
uint_t has_SSE (void) const noexcept
 Returns non-zero if SSE instructions are available.
 
uint_t has_SSE2 (void) const noexcept
 Returns non-zero if SSE2 instructions are available.
 
uint_t has_SSE3 (void) const noexcept
 Returns non-zero if SSE3 instructions are available.
 
uint_t has_SSSE3 (void) const noexcept
 Returns non-zero if SSSE3 instructions are available.
 
uint_t has_SSE4a (void) const noexcept
 Returns non-zero if SSE4a instructions are available.
 
uint_t has_SSE41 (void) const noexcept
 Returns non-zero if SSE4.1 instructions are available.
 
uint_t has_SSE42 (void) const noexcept
 Returns non-zero if SSE4.2 instructions are available.
 
uint_t has_MOVBE (void) const noexcept
 Returns non-zero if the MOVBE instruction is available.
 
uint_t has_AES (void) const noexcept
 Returns non-zero if AES instructions are available.
 
uint_t has_AVX (void) const noexcept
 Returns non-zero if AVX instructions are available.
 
uint_t has_AVX2 (void) const noexcept
 Returns non-zero if AVX2 instructions are available.
 
uint_t has_CMPXCHG16B (void) const noexcept
 Returns non-zero if the CMPXCHG16B instruction is available.
 
uint_t has_F16C (void) const noexcept
 Returns non-zero if the F16C data type is supported.
 
uint_t has_FMA3 (void) const noexcept
 Returns non-zero if FMA3 instructions are available.
 
uint_t has_FMA4 (void) const noexcept
 Returns non-zero if FMA4 instructions are available.
 
uint_t has_LAHFSAHF (void) const noexcept
 Returns non-zero if LAHF and SAHF instructions support long mode.
 
uint_t has_PrefetchW (void) const noexcept
 Returns non-zero if PrefetchW instructions are available.
 
uint_t has_3DNOW (void) const noexcept
 Returns non-zero if AMD 3DNow! instructions are available.
 
uint_t has_extended3DNOW (void) const noexcept
 Returns non-zero if extended AMD 3DNow! instructions are available.
 

Public Attributes

uint64_t m_uXGETBV
 Result from XGETBV(0)
 
uint32_t m_uHighestCPUID
 Highest allowed CPUID input (0 if CPUID is not present)
 
uint32_t m_uHighestCPUIDExtended
 Highest allowed extended CPUID (0x80000000 and up or zero)
 
uint32_t m_uHighestCPUIDHyperVisor
 Highest allowed hypervisor CPUID (0x40000000 and up or zero)
 
uint32_t m_uModel
 Model information CPUID(1) -> EAX.
 
uint32_t m_uBrand
 Brand information CPUID(1) -> EBX.
 
uint32_t m_uCPUID1ECX
 Extended feature information CPUID(1) -> ECX.
 
uint32_t m_uCPUID1EDX
 Feature information CPUID(1) -> EDX.
 
uint32_t m_uCPUID80000001ECX
 Extended feature bits CPUID(0x80000001) -> ECX.
 
uint32_t m_uCPUID80000001EDX
 Extended processor info CPUID(0x80000001) -> EDX.
 
uint32_t m_uCPUID7EBX
 Feature bits CPUID(7) -> EBX.
 
uint32_t m_uCPUID7ECX
 Feature bits CPUID(7) -> ECX.
 
uint32_t m_uCPUID7EDX
 Feature bits CPUID(7) -> EDX.
 
uint32_t m_uMXCSR
 MXCSR.
 
eCPU m_uCPUType
 Enumeration of the manufacturer of the CPU.
 
char m_CPUName [16]
 12 character brand name of the CPU (Null terminated)
 
char m_BrandName [52]
 48 character full name of the CPU (Null terminated)
 
char m_HypervisorName [16]
 12 character full name of the hypervisor (Null terminated)
 
char m_HypervisorSignature [8]
 4 character hypervisor signature (Null terminated)
 

Detailed Description

Structure that holds the features of the CPU.


On x86 and x64 CPUs, this structure will be filled by the use of the instruction CPUID on Intel architecture CPUs.

Note
This structure only matters on systems with an x86 or x64 CPU
See also
void CPUID(CPUID_t *) or BURGER_INTEL

Member Enumeration Documentation

◆ eCPU

Intel CPU enumeration.


Returned by CPUID(CPUID_t*) to list the manufacturer of the Intel type CPU current executing the application's code.

Note
This structure only matters on systems with an x86 or x64 CPU
See also
void CPUID(CPUID_t *) or BURGER_INTEL
Enumerator
kCPUIntel 

CPU is from Intel.

kCPUAMD 

CPU is from AMD.

kCPUCentaur 

CPU is a Centaur.

kCPUCyrix 

CPU is from Cyrix.

kCPUTransmeta 

CPU is from Transmeta.

kCPUNationalSemiconductor 

CPU is from National Semiconductor (Geode)

kCPUNexgen 

CPU is from NexGen.

kCPURise 

CPU is from Rise Technology (Now SiS)

kCPUSIS 

CPU is from Silicon Integrated Systems.

kCPUUMC 

CPU is from United Microelectronics Corporation.

kCPUVIA 

CPU is from VIA Technology.

kCPUVortex 

CPU is from Vortex Technology.

kCPUShanghai 

CPU is from Zhaoxin.

kCPUHygon 

CPU is from Hygon.

kCPURDC 

CPU is from RDC Semiconductor.

kCPUElbrus2000 

CPU is Russian Elbrus 2000.

kCPUMiSTer486 

CPU is MiSTer 486.

kCPUKVM 

CPU is Kernel Virtual Machine.

kCPUMicrosoftVirtualPC 

CPU is Microsoft Windows Virtual PC.

kCPUParallels 

CPU is Parallels Virtual PC.

kCPUVMWare 

CPU is VMWare.

kCPUXen 

CPU is Xen Hypervisor Virtual Machine.

kCPURosetta2 

CPU is Apple Rosetta 2.

kCPUUnknown 

CPU is emulated or not on this list.

Member Function Documentation

◆ has_3DNOW()

uint_t Burger::CPUID_t::has_3DNOW ( void ) const
inlinenoexcept

Returns non-zero if AMD 3DNow! instructions are available.


https://en.wikipedia.org/wiki/3DNow!

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instructions are available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_AES()

uint_t Burger::CPUID_t::has_AES ( void ) const
inlinenoexcept

Returns non-zero if AES instructions are available.


https://en.wikipedia.org/wiki/AES_instruction_set

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instructions are available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_AVX()

uint_t Burger::CPUID_t::has_AVX ( void ) const
inlinenoexcept

Returns non-zero if AVX instructions are available.


https://en.wikipedia.org/wiki/Advanced_Vector_Extensions

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instructions are available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_AVX2()

uint_t Burger::CPUID_t::has_AVX2 ( void ) const
inlinenoexcept

Returns non-zero if AVX2 instructions are available.


https://en.wikipedia.org/wiki/Advanced_Vector_Extensions

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instructions are available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_CMOV()

uint_t Burger::CPUID_t::has_CMOV ( void ) const
inlinenoexcept

Returns non-zero if the CMOV instructions are available.


https://en.wikipedia.org/wiki/FCMOV

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instructions are available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_CMPXCHG16B()

uint_t Burger::CPUID_t::has_CMPXCHG16B ( void ) const
inlinenoexcept

Returns non-zero if the CMPXCHG16B instruction is available.


http://www.felixcloutier.com/x86/CMPXCHG8B:CMPXCHG16B.html

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the CMPXCHG16B instruction is available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_extended3DNOW()

uint_t Burger::CPUID_t::has_extended3DNOW ( void ) const
inlinenoexcept

Returns non-zero if extended AMD 3DNow! instructions are available.


https://en.wikipedia.org/wiki/3DNow!#3DNow_extensions

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instructions are available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_F16C()

uint_t Burger::CPUID_t::has_F16C ( void ) const
inlinenoexcept

Returns non-zero if the F16C data type is supported.


https://en.wikipedia.org/wiki/F16C

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the F16C data type is supported, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_FMA3()

uint_t Burger::CPUID_t::has_FMA3 ( void ) const
inlinenoexcept

Returns non-zero if FMA3 instructions are available.


https://en.wikipedia.org/wiki/FMA_instruction_set

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instructions are available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_FMA4()

uint_t Burger::CPUID_t::has_FMA4 ( void ) const
inlinenoexcept

Returns non-zero if FMA4 instructions are available.


https://en.wikipedia.org/wiki/FMA_instruction_set#FMA4_instruction_set

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instructions are available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_LAHFSAHF()

uint_t Burger::CPUID_t::has_LAHFSAHF ( void ) const
inlinenoexcept

Returns non-zero if LAHF and SAHF instructions support long mode.


http://www.tptp.cc/mirrors/siyobik.info/instruction/LAHF.html

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instructions are available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_MMX()

uint_t Burger::CPUID_t::has_MMX ( void ) const
inlinenoexcept

Returns non-zero if the MMX instructions are available.


https://en.wikipedia.org/wiki/MMX_(instruction_set)

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instructions are available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_MOVBE()

uint_t Burger::CPUID_t::has_MOVBE ( void ) const
inlinenoexcept

Returns non-zero if the MOVBE instruction is available.


https://www.tptp.cc/mirrors/siyobik.info/instruction/MOVBE.html

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instruction is available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_PrefetchW()

uint_t Burger::CPUID_t::has_PrefetchW ( void ) const
inlinenoexcept

Returns non-zero if PrefetchW instructions are available.


http://www.felixcloutier.com/x86/PREFETCHW.html

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instructions are available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_RTSC()

uint_t Burger::CPUID_t::has_RTSC ( void ) const
inlinenoexcept

Returns non-zero if the RTSC instruction is available.


https://en.wikipedia.org/wiki/Time_Stamp_Counter

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instruction is available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_SSE()

uint_t Burger::CPUID_t::has_SSE ( void ) const
inlinenoexcept

Returns non-zero if SSE instructions are available.


https://en.wikipedia.org/wiki/Streaming_SIMD_Extensions

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instructions are available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_SSE2()

uint_t Burger::CPUID_t::has_SSE2 ( void ) const
inlinenoexcept

Returns non-zero if SSE2 instructions are available.


https://en.wikipedia.org/wiki/SSE2

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instructions are available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_SSE3()

uint_t Burger::CPUID_t::has_SSE3 ( void ) const
inlinenoexcept

Returns non-zero if SSE3 instructions are available.


https://en.wikipedia.org/wiki/SSE3

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instructions are available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_SSE41()

uint_t Burger::CPUID_t::has_SSE41 ( void ) const
inlinenoexcept

Returns non-zero if SSE4.1 instructions are available.


https://en.wikipedia.org/wiki/SSE4#SSE4.1

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instructions are available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_SSE42()

uint_t Burger::CPUID_t::has_SSE42 ( void ) const
inlinenoexcept

Returns non-zero if SSE4.2 instructions are available.


https://en.wikipedia.org/wiki/SSE4#SSE4.2

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instructions are available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_SSE4a()

uint_t Burger::CPUID_t::has_SSE4a ( void ) const
inlinenoexcept

Returns non-zero if SSE4a instructions are available.


https://en.wikipedia.org/wiki/SSE4#SSE4a

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instructions are available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

◆ has_SSSE3()

uint_t Burger::CPUID_t::has_SSSE3 ( void ) const
inlinenoexcept

Returns non-zero if SSSE3 instructions are available.


https://en.wikipedia.org/wiki/SSSE3

Note
This structure only matters on systems with an x86 or x64 CPU
Returns
Non-zero if the instructions are available, zero if not.
See also
void CPUID(CPUID_t *) or BURGER_INTEL

Member Data Documentation

◆ m_BrandName

char Burger::CPUID_t::m_BrandName[52]

48 character full name of the CPU (Null terminated)

◆ m_CPUName

char Burger::CPUID_t::m_CPUName[16]

12 character brand name of the CPU (Null terminated)

◆ m_HypervisorName

char Burger::CPUID_t::m_HypervisorName[16]

12 character full name of the hypervisor (Null terminated)

◆ m_HypervisorSignature

char Burger::CPUID_t::m_HypervisorSignature[8]

4 character hypervisor signature (Null terminated)

◆ m_uBrand

uint32_t Burger::CPUID_t::m_uBrand

Brand information CPUID(1) -> EBX.

◆ m_uCPUID1ECX

uint32_t Burger::CPUID_t::m_uCPUID1ECX

Extended feature information CPUID(1) -> ECX.

◆ m_uCPUID1EDX

uint32_t Burger::CPUID_t::m_uCPUID1EDX

Feature information CPUID(1) -> EDX.

◆ m_uCPUID7EBX

uint32_t Burger::CPUID_t::m_uCPUID7EBX

Feature bits CPUID(7) -> EBX.

◆ m_uCPUID7ECX

uint32_t Burger::CPUID_t::m_uCPUID7ECX

Feature bits CPUID(7) -> ECX.

◆ m_uCPUID7EDX

uint32_t Burger::CPUID_t::m_uCPUID7EDX

Feature bits CPUID(7) -> EDX.

◆ m_uCPUID80000001ECX

uint32_t Burger::CPUID_t::m_uCPUID80000001ECX

Extended feature bits CPUID(0x80000001) -> ECX.

◆ m_uCPUID80000001EDX

uint32_t Burger::CPUID_t::m_uCPUID80000001EDX

Extended processor info CPUID(0x80000001) -> EDX.

◆ m_uCPUType

eCPU Burger::CPUID_t::m_uCPUType

Enumeration of the manufacturer of the CPU.

◆ m_uHighestCPUID

uint32_t Burger::CPUID_t::m_uHighestCPUID

Highest allowed CPUID input (0 if CPUID is not present)

◆ m_uHighestCPUIDExtended

uint32_t Burger::CPUID_t::m_uHighestCPUIDExtended

Highest allowed extended CPUID (0x80000000 and up or zero)

◆ m_uHighestCPUIDHyperVisor

uint32_t Burger::CPUID_t::m_uHighestCPUIDHyperVisor

Highest allowed hypervisor CPUID (0x40000000 and up or zero)

◆ m_uModel

uint32_t Burger::CPUID_t::m_uModel

Model information CPUID(1) -> EAX.

◆ m_uMXCSR

uint32_t Burger::CPUID_t::m_uMXCSR

MXCSR.

◆ m_uXGETBV

uint64_t Burger::CPUID_t::m_uXGETBV

Result from XGETBV(0)