x86

x86 — x86 helper library

Functions

#define xgetbv()
#define max()
char * igt_x86_features_to_string ()
void igt_memcpy_from_wc ()

Types and Values

#define MMX
#define SSE
#define SSE2
#define SSE3
#define SSSE3
#define SSE4_1
#define SSE4_2
#define AVX
#define AVX2
#define F16C
#define BASIC_CPUID
#define EXTENDED_CPUID
#define bit_MMX
#define bit_SSE
#define bit_SSE2
#define bit_SSE3
#define bit_SSSE3
#define bit_SSE4_1
#define bit_SSE4_2
#define bit_OSXSAVE
#define bit_AVX
#define bit_F16C
#define bit_AVX2
#define has_YMM
unsigned features
unsigned extra

Includes

#include <igt_x86.h>

Description

Functions

xgetbv()

#define             xgetbv(index, eax, edx)

max()

#define max(x, y) __careful_cmp(x, y, >, max)

igt_x86_features_to_string ()

char *
igt_x86_features_to_string (unsigned  features,
                            char *line);

igt_memcpy_from_wc ()

void
igt_memcpy_from_wc (void *dst,
                    const void *src,
                    unsigned long  len);

Types and Values

MMX

#define MMX 0x1

SSE

#define SSE 0x2

SSE2

#define SSE2 0x4

SSE3

#define SSE3 0x8

SSSE3

#define SSSE3 0x10

SSE4_1

#define SSE4_1 0x20

SSE4_2

#define SSE4_2 0x40

AVX

#define AVX 0x80

AVX2

#define AVX2 0x100

F16C

#define F16C 0x200

BASIC_CPUID

#define BASIC_CPUID 0x0

EXTENDED_CPUID

#define EXTENDED_CPUID 0x80000000

bit_MMX

#define bit_MMX		(1 << 23)

bit_SSE

#define bit_SSE		(1 << 25)

bit_SSE2

#define bit_SSE2 (1 << 26)

bit_SSE3

#define bit_SSE3 (1 << 0)

bit_SSSE3

#define bit_SSSE3 (1 << 9)

bit_SSE4_1

#define bit_SSE4_1 (1 << 19)

bit_SSE4_2

#define bit_SSE4_2 (1 << 20)

bit_OSXSAVE

#define bit_OSXSAVE (1 << 27)

bit_AVX

#define bit_AVX		(1 << 28)

bit_F16C

#define bit_F16C (1 << 29)

bit_AVX2

#define bit_AVX2 (1<<5)

has_YMM

#define has_YMM 0x1

features

	unsigned features = 0;

extra

	unsigned extra = 0;