GDBserver

Macros | Functions
x86-gcc-cpuid.h File Reference

Go to the source code of this file.

## Macros
#define | bit_SSE3 (1 << 0)
#define | bit_PCLMUL (1 << 1)
#define | bit_LZCNT (1 << 5)
#define | bit_SSSE3 (1 << 9)
#define | bit_FMA (1 << 12)
#define | bit_CMPXCHG16B (1 << 13)
#define | bit_SSE4_1 (1 << 19)
#define | bit_SSE4_2 (1 << 20)
#define | bit_MOVBE (1 << 22)
#define | bit_POPCNT (1 << 23)
#define | bit_AES (1 << 25)
#define | bit_XSAVE (1 << 26)
#define | bit_OSXSAVE (1 << 27)
#define | bit_AVX (1 << 28)
#define | bit_F16C (1 << 29)
#define | bit_RDRND (1 << 30)
#define | bit_CMPXCHG8B (1 << 8)
#define | bit_CMOV (1 << 15)
#define | bit_MMX (1 << 23)
#define | bit_FXSAVE (1 << 24)
#define | bit_SSE (1 << 25)
#define | bit_SSE2 (1 << 26)
#define | bit_LAHF_LM (1 << 0)
#define | bit_ABM (1 << 5)
#define | bit_SSE4a (1 << 6)
#define | bit_PRFCHW (1 << 8)
#define | bit_XOP (1 << 11)
#define | bit_LWP (1 << 15)
#define | bit_FMA4 (1 << 16)
#define | bit_TBM (1 << 21)
#define | bit_MWAITX (1 << 29)
#define | bit_AVX5124VNNIW (1 << 2)
#define | bit_AVX5124FMAPS (1 << 3)
#define | bit_MMXEXT (1 << 22)
#define | bit_LM (1 << 29)
#define | bit_3DNOWP (1 << 30)
#define | bit_3DNOW (1 << 31)
#define | bit_CLZERO (1 << 0)
#define | bit_FSGSBASE (1 << 0)
#define | bit_BMI (1 << 3)
#define | bit_HLE (1 << 4)
#define | bit_AVX2 (1 << 5)
#define | bit_BMI2 (1 << 8)
#define | bit_RTM (1 << 11)
#define | bit_MPX (1 << 14)
#define | bit_AVX512F (1 << 16)
#define | bit_AVX512DQ (1 << 17)
#define | bit_RDSEED (1 << 18)
#define | bit_ADX (1 << 19)
#define | bit_AVX512IFMA (1 << 21)
#define | bit_CLFLUSHOPT (1 << 23)
#define | bit_CLWB (1 << 24)
#define | bit_AVX512PF (1 << 26)
#define | bit_AVX512ER (1 << 27)
#define | bit_AVX512CD (1 << 28)
#define | bit_SHA (1 << 29)
#define | bit_AVX512BW (1 << 30)
#define | bit_AVX512VL (1 << 31)
#define | bit_PREFETCHWT1 (1 << 0)
#define | bit_AVX512VBMI (1 << 1)
#define | bit_PKU (1 << 3)
#define | bit_OSPKE (1 << 4)
#define | bit_BNDREGS (1 << 3)
#define | bit_BNDCSR (1 << 4)
#define | bit_XSAVEOPT (1 << 0)
#define | bit_XSAVEC (1 << 1)
#define | bit_XSAVES (1 << 3)
#define | signature_AMD_ebx 0x68747541
#define | signature_AMD_ecx 0x444d4163
#define | signature_AMD_edx 0x69746e65
#define | signature_CENTAUR_ebx 0x746e6543
#define | signature_CENTAUR_ecx 0x736c7561
#define | signature_CENTAUR_edx 0x48727561
#define | signature_CYRIX_ebx 0x69727943
#define | signature_CYRIX_ecx 0x64616574
#define | signature_CYRIX_edx 0x736e4978
#define | signature_INTEL_ebx 0x756e6547
#define | signature_INTEL_ecx 0x6c65746e
#define | signature_INTEL_edx 0x49656e69
#define | signature_TM1_ebx 0x6e617254
#define | signature_TM1_ecx 0x55504361
#define | signature_TM1_edx 0x74656d73
#define | signature_TM2_ebx 0x756e6547
#define | signature_TM2_ecx 0x3638784d
#define | signature_TM2_edx 0x54656e69
#define | signature_NSC_ebx 0x646f6547
#define | signature_NSC_ecx 0x43534e20
#define | signature_NSC_edx 0x79622065
#define | signature_NEXGEN_ebx 0x4778654e
#define | signature_NEXGEN_ecx 0x6e657669
#define | signature_NEXGEN_edx 0x72446e65
#define | signature_RISE_ebx 0x65736952
#define | signature_RISE_ecx 0x65736952
#define | signature_RISE_edx 0x65736952
#define | signature_SIS_ebx 0x20536953
#define | signature_SIS_ecx 0x20536953
#define | signature_SIS_edx 0x20536953
#define | signature_UMC_ebx 0x20434d55
#define | signature_UMC_ecx 0x20434d55
#define | signature_UMC_edx 0x20434d55
#define | signature_VIA_ebx 0x20414956
#define | signature_VIA_ecx 0x20414956
#define | signature_VIA_edx 0x20414956
#define | signature_VORTEX_ebx 0x74726f56
#define | signature_VORTEX_ecx 0x436f5320
#define | signature_VORTEX_edx 0x36387865
#define | __cpuid(level, a, b, c, d)
#define | __cpuid_count(level, count, a, b, c, d)

## Functions
static __inline unsigned int | __get_cpuid_max (unsigned int __ext, unsigned int *__sig)
static __inline int | __get_cpuid (unsigned int __leaf, unsigned int *__eax, unsigned int *__ebx, unsigned int *__ecx, unsigned int *__edx)
static __inline int | __get_cpuid_count (unsigned int __leaf, unsigned int __subleaf, unsigned int *__eax, unsigned int *__ebx, unsigned int *__ecx, unsigned int *__edx)

## Macro Definition Documentation

## ◆ __cpuid

#define __cpuid | ( |  | level,
|  |  | a,
|  |  | b,
|  |  | c,
|  |  | d
| ) |  |

Value:
__asm__ ("cpuid\n\t" \
: "=a" (a), "=b" (b), "=c" (c), "=d" (d) \
: "0" (level))

Definition at line 169 of file x86-gcc-cpuid.h.

Referenced by __get_cpuid(), and __get_cpuid_max().

## ◆ __cpuid_count

#define __cpuid_count | ( |  | level,
|  |  | count,
|  |  | a,
|  |  | b,
|  |  | c,
|  |  | d
| ) |  |

Value:
__asm__ ("cpuid\n\t" \
: "=a" (a), "=b" (b), "=c" (c), "=d" (d) \
: "0" (level), "2" (count))

Definition at line 174 of file x86-gcc-cpuid.h.

Referenced by __get_cpuid_count().

## ◆ bit_3DNOW

#define bit_3DNOW (1 << 31)

Definition at line 72 of file x86-gcc-cpuid.h.

## ◆ bit_3DNOWP

#define bit_3DNOWP (1 << 30)

Definition at line 71 of file x86-gcc-cpuid.h.

## ◆ bit_ABM

#define bit_ABM (1 << 5)

Definition at line 57 of file x86-gcc-cpuid.h.

## ◆ bit_ADX

#define bit_ADX (1 << 19)

Definition at line 89 of file x86-gcc-cpuid.h.

## ◆ bit_AES

#define bit_AES (1 << 25)

Definition at line 39 of file x86-gcc-cpuid.h.

## ◆ bit_AVX

#define bit_AVX (1 << 28)

Definition at line 42 of file x86-gcc-cpuid.h.

## ◆ bit_AVX2

#define bit_AVX2 (1 << 5)

Definition at line 82 of file x86-gcc-cpuid.h.

## ◆ bit_AVX5124FMAPS

#define bit_AVX5124FMAPS (1 << 3)

Definition at line 68 of file x86-gcc-cpuid.h.

## ◆ bit_AVX5124VNNIW

#define bit_AVX5124VNNIW (1 << 2)

Definition at line 67 of file x86-gcc-cpuid.h.

## ◆ bit_AVX512BW

#define bit_AVX512BW (1 << 30)

Definition at line 97 of file x86-gcc-cpuid.h.

## ◆ bit_AVX512CD

#define bit_AVX512CD (1 << 28)

Definition at line 95 of file x86-gcc-cpuid.h.

## ◆ bit_AVX512DQ

#define bit_AVX512DQ (1 << 17)

Definition at line 87 of file x86-gcc-cpuid.h.

## ◆ bit_AVX512ER

#define bit_AVX512ER (1 << 27)

Definition at line 94 of file x86-gcc-cpuid.h.

## ◆ bit_AVX512F

#define bit_AVX512F (1 << 16)

Definition at line 86 of file x86-gcc-cpuid.h.

## ◆ bit_AVX512IFMA

#define bit_AVX512IFMA (1 << 21)

Definition at line 90 of file x86-gcc-cpuid.h.

## ◆ bit_AVX512PF

#define bit_AVX512PF (1 << 26)

Definition at line 93 of file x86-gcc-cpuid.h.

## ◆ bit_AVX512VBMI

#define bit_AVX512VBMI (1 << 1)

Definition at line 102 of file x86-gcc-cpuid.h.

## ◆ bit_AVX512VL

#define bit_AVX512VL (1 << 31)

Definition at line 98 of file x86-gcc-cpuid.h.

## ◆ bit_BMI

#define bit_BMI (1 << 3)

Definition at line 80 of file x86-gcc-cpuid.h.

## ◆ bit_BMI2

#define bit_BMI2 (1 << 8)

Definition at line 83 of file x86-gcc-cpuid.h.

## ◆ bit_BNDCSR

#define bit_BNDCSR (1 << 4)

Definition at line 108 of file x86-gcc-cpuid.h.

## ◆ bit_BNDREGS

#define bit_BNDREGS (1 << 3)

Definition at line 107 of file x86-gcc-cpuid.h.

## ◆ bit_CLFLUSHOPT

#define bit_CLFLUSHOPT (1 << 23)

Definition at line 91 of file x86-gcc-cpuid.h.

## ◆ bit_CLWB

#define bit_CLWB (1 << 24)

Definition at line 92 of file x86-gcc-cpuid.h.

## ◆ bit_CLZERO

#define bit_CLZERO (1 << 0)

Definition at line 75 of file x86-gcc-cpuid.h.

## ◆ bit_CMOV

#define bit_CMOV (1 << 15)

Definition at line 48 of file x86-gcc-cpuid.h.

## ◆ bit_CMPXCHG16B

#define bit_CMPXCHG16B (1 << 13)

Definition at line 34 of file x86-gcc-cpuid.h.

## ◆ bit_CMPXCHG8B

#define bit_CMPXCHG8B (1 << 8)

Definition at line 47 of file x86-gcc-cpuid.h.

## ◆ bit_F16C

#define bit_F16C (1 << 29)

Definition at line 43 of file x86-gcc-cpuid.h.

## ◆ bit_FMA

#define bit_FMA (1 << 12)

Definition at line 33 of file x86-gcc-cpuid.h.

## ◆ bit_FMA4

#define bit_FMA4 (1 << 16)

Definition at line 62 of file x86-gcc-cpuid.h.

## ◆ bit_FSGSBASE

#define bit_FSGSBASE (1 << 0)

Definition at line 79 of file x86-gcc-cpuid.h.

## ◆ bit_FXSAVE

#define bit_FXSAVE (1 << 24)

Definition at line 50 of file x86-gcc-cpuid.h.

## ◆ bit_HLE

#define bit_HLE (1 << 4)

Definition at line 81 of file x86-gcc-cpuid.h.

## ◆ bit_LAHF_LM

#define bit_LAHF_LM (1 << 0)

Definition at line 56 of file x86-gcc-cpuid.h.

## ◆ bit_LM

#define bit_LM (1 << 29)

Definition at line 70 of file x86-gcc-cpuid.h.

## ◆ bit_LWP

#define bit_LWP (1 << 15)

Definition at line 61 of file x86-gcc-cpuid.h.

## ◆ bit_LZCNT

#define bit_LZCNT (1 << 5)

Definition at line 31 of file x86-gcc-cpuid.h.

## ◆ bit_MMX

#define bit_MMX (1 << 23)

Definition at line 49 of file x86-gcc-cpuid.h.

## ◆ bit_MMXEXT

#define bit_MMXEXT (1 << 22)

Definition at line 69 of file x86-gcc-cpuid.h.

## ◆ bit_MOVBE

#define bit_MOVBE (1 << 22)

Definition at line 37 of file x86-gcc-cpuid.h.

## ◆ bit_MPX

#define bit_MPX (1 << 14)

Definition at line 85 of file x86-gcc-cpuid.h.

## ◆ bit_MWAITX

#define bit_MWAITX (1 << 29)

Definition at line 64 of file x86-gcc-cpuid.h.

## ◆ bit_OSPKE

#define bit_OSPKE (1 << 4)

Definition at line 104 of file x86-gcc-cpuid.h.

## ◆ bit_OSXSAVE

#define bit_OSXSAVE (1 << 27)

Definition at line 41 of file x86-gcc-cpuid.h.

## ◆ bit_PCLMUL

#define bit_PCLMUL (1 << 1)

Definition at line 30 of file x86-gcc-cpuid.h.

## ◆ bit_PKU

#define bit_PKU (1 << 3)

Definition at line 103 of file x86-gcc-cpuid.h.

## ◆ bit_POPCNT

#define bit_POPCNT (1 << 23)

Definition at line 38 of file x86-gcc-cpuid.h.

## ◆ bit_PREFETCHWT1

#define bit_PREFETCHWT1 (1 << 0)

Definition at line 101 of file x86-gcc-cpuid.h.

## ◆ bit_PRFCHW

#define bit_PRFCHW (1 << 8)

Definition at line 59 of file x86-gcc-cpuid.h.

## ◆ bit_RDRND

#define bit_RDRND (1 << 30)

Definition at line 44 of file x86-gcc-cpuid.h.

## ◆ bit_RDSEED

#define bit_RDSEED (1 << 18)

Definition at line 88 of file x86-gcc-cpuid.h.

## ◆ bit_RTM

#define bit_RTM (1 << 11)

Definition at line 84 of file x86-gcc-cpuid.h.

## ◆ bit_SHA

#define bit_SHA (1 << 29)

Definition at line 96 of file x86-gcc-cpuid.h.

## ◆ bit_SSE

#define bit_SSE (1 << 25)

Definition at line 51 of file x86-gcc-cpuid.h.

## ◆ bit_SSE2

#define bit_SSE2 (1 << 26)

Definition at line 52 of file x86-gcc-cpuid.h.

## ◆ bit_SSE3

#define bit_SSE3 (1 << 0)

Definition at line 29 of file x86-gcc-cpuid.h.

## ◆ bit_SSE4_1

#define bit_SSE4_1 (1 << 19)

Definition at line 35 of file x86-gcc-cpuid.h.

## ◆ bit_SSE4_2

#define bit_SSE4_2 (1 << 20)

Definition at line 36 of file x86-gcc-cpuid.h.

## ◆ bit_SSE4a

#define bit_SSE4a (1 << 6)

Definition at line 58 of file x86-gcc-cpuid.h.

## ◆ bit_SSSE3

#define bit_SSSE3 (1 << 9)

Definition at line 32 of file x86-gcc-cpuid.h.

## ◆ bit_TBM

#define bit_TBM (1 << 21)

Definition at line 63 of file x86-gcc-cpuid.h.

## ◆ bit_XOP

#define bit_XOP (1 << 11)

Definition at line 60 of file x86-gcc-cpuid.h.

## ◆ bit_XSAVE

#define bit_XSAVE (1 << 26)

Definition at line 40 of file x86-gcc-cpuid.h.

## ◆ bit_XSAVEC

#define bit_XSAVEC (1 << 1)

Definition at line 112 of file x86-gcc-cpuid.h.

## ◆ bit_XSAVEOPT

#define bit_XSAVEOPT (1 << 0)

Definition at line 111 of file x86-gcc-cpuid.h.

## ◆ bit_XSAVES

#define bit_XSAVES (1 << 3)

Definition at line 113 of file x86-gcc-cpuid.h.

## ◆ signature_AMD_ebx

#define signature_AMD_ebx 0x68747541

Definition at line 117 of file x86-gcc-cpuid.h.

## ◆ signature_AMD_ecx

#define signature_AMD_ecx 0x444d4163

Definition at line 118 of file x86-gcc-cpuid.h.

## ◆ signature_AMD_edx

#define signature_AMD_edx 0x69746e65

Definition at line 119 of file x86-gcc-cpuid.h.

## ◆ signature_CENTAUR_ebx

#define signature_CENTAUR_ebx 0x746e6543

Definition at line 121 of file x86-gcc-cpuid.h.

## ◆ signature_CENTAUR_ecx

#define signature_CENTAUR_ecx 0x736c7561

Definition at line 122 of file x86-gcc-cpuid.h.

## ◆ signature_CENTAUR_edx

#define signature_CENTAUR_edx 0x48727561

Definition at line 123 of file x86-gcc-cpuid.h.

## ◆ signature_CYRIX_ebx

#define signature_CYRIX_ebx 0x69727943

Definition at line 125 of file x86-gcc-cpuid.h.

## ◆ signature_CYRIX_ecx

#define signature_CYRIX_ecx 0x64616574

Definition at line 126 of file x86-gcc-cpuid.h.

## ◆ signature_CYRIX_edx

#define signature_CYRIX_edx 0x736e4978

Definition at line 127 of file x86-gcc-cpuid.h.

## ◆ signature_INTEL_ebx

#define signature_INTEL_ebx 0x756e6547

Definition at line 129 of file x86-gcc-cpuid.h.

## ◆ signature_INTEL_ecx

#define signature_INTEL_ecx 0x6c65746e

Definition at line 130 of file x86-gcc-cpuid.h.

## ◆ signature_INTEL_edx

#define signature_INTEL_edx 0x49656e69

Definition at line 131 of file x86-gcc-cpuid.h.

## ◆ signature_NEXGEN_ebx

#define signature_NEXGEN_ebx 0x4778654e

Definition at line 145 of file x86-gcc-cpuid.h.

## ◆ signature_NEXGEN_ecx

#define signature_NEXGEN_ecx 0x6e657669

Definition at line 146 of file x86-gcc-cpuid.h.

## ◆ signature_NEXGEN_edx

#define signature_NEXGEN_edx 0x72446e65

Definition at line 147 of file x86-gcc-cpuid.h.

## ◆ signature_NSC_ebx

#define signature_NSC_ebx 0x646f6547

Definition at line 141 of file x86-gcc-cpuid.h.

## ◆ signature_NSC_ecx

#define signature_NSC_ecx 0x43534e20

Definition at line 142 of file x86-gcc-cpuid.h.

## ◆ signature_NSC_edx

#define signature_NSC_edx 0x79622065

Definition at line 143 of file x86-gcc-cpuid.h.

## ◆ signature_RISE_ebx

#define signature_RISE_ebx 0x65736952

Definition at line 149 of file x86-gcc-cpuid.h.

## ◆ signature_RISE_ecx

#define signature_RISE_ecx 0x65736952

Definition at line 150 of file x86-gcc-cpuid.h.

## ◆ signature_RISE_edx

#define signature_RISE_edx 0x65736952

Definition at line 151 of file x86-gcc-cpuid.h.

## ◆ signature_SIS_ebx

#define signature_SIS_ebx 0x20536953

Definition at line 153 of file x86-gcc-cpuid.h.

## ◆ signature_SIS_ecx

#define signature_SIS_ecx 0x20536953

Definition at line 154 of file x86-gcc-cpuid.h.

## ◆ signature_SIS_edx

#define signature_SIS_edx 0x20536953

Definition at line 155 of file x86-gcc-cpuid.h.

## ◆ signature_TM1_ebx

#define signature_TM1_ebx 0x6e617254

Definition at line 133 of file x86-gcc-cpuid.h.

## ◆ signature_TM1_ecx

#define signature_TM1_ecx 0x55504361

Definition at line 134 of file x86-gcc-cpuid.h.

## ◆ signature_TM1_edx

#define signature_TM1_edx 0x74656d73

Definition at line 135 of file x86-gcc-cpuid.h.

## ◆ signature_TM2_ebx

#define signature_TM2_ebx 0x756e6547

Definition at line 137 of file x86-gcc-cpuid.h.

## ◆ signature_TM2_ecx

#define signature_TM2_ecx 0x3638784d

Definition at line 138 of file x86-gcc-cpuid.h.

## ◆ signature_TM2_edx

#define signature_TM2_edx 0x54656e69

Definition at line 139 of file x86-gcc-cpuid.h.

## ◆ signature_UMC_ebx

#define signature_UMC_ebx 0x20434d55

Definition at line 157 of file x86-gcc-cpuid.h.

## ◆ signature_UMC_ecx

#define signature_UMC_ecx 0x20434d55

Definition at line 158 of file x86-gcc-cpuid.h.

## ◆ signature_UMC_edx

#define signature_UMC_edx 0x20434d55

Definition at line 159 of file x86-gcc-cpuid.h.

## ◆ signature_VIA_ebx

#define signature_VIA_ebx 0x20414956

Definition at line 161 of file x86-gcc-cpuid.h.

## ◆ signature_VIA_ecx

#define signature_VIA_ecx 0x20414956

Definition at line 162 of file x86-gcc-cpuid.h.

## ◆ signature_VIA_edx

#define signature_VIA_edx 0x20414956

Definition at line 163 of file x86-gcc-cpuid.h.

## ◆ signature_VORTEX_ebx

#define signature_VORTEX_ebx 0x74726f56

Definition at line 165 of file x86-gcc-cpuid.h.

## ◆ signature_VORTEX_ecx

#define signature_VORTEX_ecx 0x436f5320

Definition at line 166 of file x86-gcc-cpuid.h.

## ◆ signature_VORTEX_edx

#define signature_VORTEX_edx 0x36387865

Definition at line 167 of file x86-gcc-cpuid.h.

## Function Documentation

## ◆ __get_cpuid()

static __inline int __get_cpuid | ( | unsigned int | __leaf,
|  | unsigned int * | __eax,
|  | unsigned int * | __ebx,
|  | unsigned int * | __ecx,
|  | unsigned int * | __edx
| ) |  |
| static

Definition at line 243 of file x86-gcc-cpuid.h.

References __cpuid, and __get_cpuid_max().

## ◆ __get_cpuid_count()

static __inline int __get_cpuid_count | ( | unsigned int | __leaf,
|  | unsigned int | __subleaf,
|  | unsigned int * | __eax,
|  | unsigned int * | __ebx,
|  | unsigned int * | __ecx,
|  | unsigned int * | __edx
| ) |  |
| static

Definition at line 259 of file x86-gcc-cpuid.h.

References __cpuid_count, and __get_cpuid_max().

## ◆ __get_cpuid_max()

static __inline unsigned int __get_cpuid_max | ( | unsigned int | __ext,
|  | unsigned int * | __sig
| ) |  |
| static

Definition at line 188 of file x86-gcc-cpuid.h.

References __cpuid.

Referenced by __get_cpuid(), and __get_cpuid_count().