ReactOS
0.4.16-dev-297-gc569aee
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
getcpuflags.h
Go to the documentation of this file.
1
/*
2
getcpucpuflags: get cpuflags for ia32
3
4
copyright ?-2007 by the mpg123 project - free software under the terms of the LGPL 2.1
5
see COPYING and AUTHORS files in distribution or http:#mpg123.org
6
initially written by KIMURA Takuhiro (for 3DNow!)
7
extended for general use by Thomas Orgis
8
*/
9
10
#ifndef MPG123_H_GETCPUFLAGS
11
#define MPG123_H_GETCPUFLAGS
12
13
/* standard level flags part 1 (ECX)*/
14
#define FLAG_SSE3 0x00000001
15
#define FLAG_SSSE3 0x00000200
16
#define FLAG_AVX 0x1C000000
17
/* standard level flags part 2 (EDX) */
18
#define FLAG2_MMX 0x00800000
19
#define FLAG2_SSE 0x02000000
20
#define FLAG2_SSE2 0x04000000
21
#define FLAG2_FPU 0x00000001
22
/* cpuid extended level 1 (AMD) */
23
#define XFLAG_MMX 0x00800000
24
#define XFLAG_3DNOW 0x80000000
25
#define XFLAG_3DNOWEXT 0x40000000
26
/* eXtended Control Register 0 */
27
#define XCR0FLAG_AVX 0x00000006
28
29
30
struct
cpuflags
31
{
32
#if defined(OPT_ARM) || defined(OPT_NEON) || defined(OPT_NEON64)
33
unsigned
int
has_neon;
34
#else
35
unsigned
int
id
;
36
unsigned
int
std
;
37
unsigned
int
std2
;
38
unsigned
int
ext
;
39
unsigned
int
xcr0_lo
;
40
#endif
41
};
42
43
unsigned
int
getcpuflags
(
struct
cpuflags
*
cf
);
44
45
/* checks the family */
46
#define cpu_i586(s) ( ((s.id & 0xf00)>>8) == 0 || ((s.id & 0xf00)>>8) > 4 )
47
/* checking some flags... */
48
#define cpu_fpu(s) (FLAG2_FPU & s.std2)
49
#define cpu_mmx(s) (FLAG2_MMX & s.std2 || XFLAG_MMX & s.ext)
50
#define cpu_3dnow(s) (XFLAG_3DNOW & s.ext)
51
#define cpu_3dnowext(s) (XFLAG_3DNOWEXT & s.ext)
52
#define cpu_sse(s) (FLAG2_SSE & s.std2)
53
#define cpu_sse2(s) (FLAG2_SSE2 & s.std2)
54
#define cpu_sse3(s) (FLAG_SSE3 & s.std)
55
#define cpu_avx(s) ((FLAG_AVX & s.std) == FLAG_AVX && (XCR0FLAG_AVX & s.xcr0_lo) == XCR0FLAG_AVX)
56
#define cpu_fast_sse(s) ((((s.id & 0xf00)>>8) == 6 && FLAG_SSSE3 & s.std)
/* for Intel/VIA; family 6 CPUs with SSSE3 */
|| \
57
(((s.id & 0xf00)>>8) == 0xf && (((s.id & 0x0ff00000)>>20) > 0 && ((s.id & 0x0ff00000)>>20) != 5)))
/* for AMD; family > 0xF CPUs except Bobcat */
58
#define cpu_neon(s) (s.has_neon)
59
60
#endif
getcpuflags
#define getcpuflags
Definition:
intsym.h:206
cf
Definition:
inetcomm_main.c:73
cpuflags
Definition:
getcpuflags.h:31
cpuflags::std2
unsigned int std2
Definition:
getcpuflags.h:37
cpuflags::std
unsigned int std
Definition:
getcpuflags.h:36
cpuflags::xcr0_lo
unsigned int xcr0_lo
Definition:
getcpuflags.h:39
cpuflags::ext
unsigned int ext
Definition:
getcpuflags.h:38
cpuflags::id
unsigned int id
Definition:
getcpuflags.h:35
sdk
include
reactos
libs
libmpg123
getcpuflags.h
Generated on Wed Nov 27 2024 06:12:42 for ReactOS by
1.9.6