ReactOS 0.4.15-dev-6712-g46b4b55
testcpu.c File Reference
#include <stdio.h>
#include "getcpuflags.h"
Include dependency graph for testcpu.c:

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( void  )

Definition at line 12 of file testcpu.c.

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}
#define printf
Definition: freeldr.h:94
#define cpu_3dnow(s)
Definition: getcpuflags.h:50
#define cpu_sse3(s)
Definition: getcpuflags.h:54
#define cpu_mmx(s)
Definition: getcpuflags.h:49
#define cpu_3dnowext(s)
Definition: getcpuflags.h:51
#define cpu_i586(s)
Definition: getcpuflags.h:46
#define cpu_sse(s)
Definition: getcpuflags.h:52
#define cpu_sse2(s)
Definition: getcpuflags.h:53
GLbitfield flags
Definition: glext.h:7161
#define getcpuflags
Definition: intsym.h:206