ReactOS
0.4.15-dev-8614-gbc76250
testcpu.c
Go to the documentation of this file.
1
/*
2
testcpu: standalone CPU flags tester
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 Thomas Orgis
7
*/
8
9
#include <stdio.h>
10
#include "
getcpuflags.h
"
11
12
int
main
()
13
{
14
int
family;
15
struct
cpuflags
flags
;
16
if
(!
getcpuflags
(&
flags
)){
printf
(
"CPU won't do cpuid (some old i386 or i486)\n"
);
return
0; }
17
family = (
flags
.id & 0xf00)>>8;
18
printf
(
"family: %i\n"
, family);
19
printf
(
"stdcpuflags: 0x%08x\n"
,
flags
.std);
20
printf
(
"std2cpuflags: 0x%08x\n"
,
flags
.std2);
21
printf
(
"extcpuflags: 0x%08x\n"
,
flags
.ext);
22
if
(
cpu_i586
(
flags
))
23
{
24
printf
(
"A i586 or better cpu with:"
);
25
if
(
cpu_mmx
(
flags
))
printf
(
" mmx"
);
26
if
(
cpu_3dnow
(
flags
))
printf
(
" 3dnow"
);
27
if
(
cpu_3dnowext
(
flags
))
printf
(
" 3dnowext"
);
28
if
(
cpu_sse
(
flags
))
printf
(
" sse"
);
29
if
(
cpu_sse2
(
flags
))
printf
(
" sse2"
);
30
if
(
cpu_sse3
(
flags
))
printf
(
" sse3"
);
31
printf
(
"\n"
);
32
}
33
else
printf
(
"I guess you have some i486\n"
);
34
return
0;
35
}
printf
#define printf
Definition:
freeldr.h:97
getcpuflags.h
cpu_3dnow
#define cpu_3dnow(s)
Definition:
getcpuflags.h:50
cpu_sse3
#define cpu_sse3(s)
Definition:
getcpuflags.h:54
cpu_mmx
#define cpu_mmx(s)
Definition:
getcpuflags.h:49
cpu_3dnowext
#define cpu_3dnowext(s)
Definition:
getcpuflags.h:51
cpu_i586
#define cpu_i586(s)
Definition:
getcpuflags.h:46
cpu_sse
#define cpu_sse(s)
Definition:
getcpuflags.h:52
cpu_sse2
#define cpu_sse2(s)
Definition:
getcpuflags.h:53
flags
GLbitfield flags
Definition:
glext.h:7161
getcpuflags
#define getcpuflags
Definition:
intsym.h:206
cpuflags
Definition:
getcpuflags.h:31
main
int main()
Definition:
testcpu.c:12
sdk
lib
3rdparty
libmpg123
testcpu.c
Generated on Sat Sep 7 2024 06:12:45 for ReactOS by
1.9.6