ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

testcpu.c
Go to the documentation of this file.
00001 /*
00002     testcpu: standalone CPU flags tester
00003 
00004     copyright 2007 by the mpg123 project - free software under the terms of the LGPL 2.1
00005     see COPYING and AUTHORS files in distribution or http://mpg123.org
00006     initially written by Thomas Orgis
00007 */
00008 
00009 #include <stdio.h>
00010 #include "getcpuflags.h"
00011 
00012 int main()
00013 {
00014     int family;
00015     struct cpuflags flags;
00016     if(!getcpuflags(&flags)){ printf("CPU won't do cpuid (some old i386 or i486)\n"); return 0; }
00017     family = (flags.id & 0xf00)>>8;
00018     printf("family: %i\n", family);
00019     printf("stdcpuflags:  0x%08x\n", flags.std);
00020     printf("std2cpuflags: 0x%08x\n", flags.std2);
00021     printf("extcpuflags:  0x%08x\n", flags.ext);
00022     if(cpu_i586(flags))
00023     {
00024         printf("A i586 or better cpu with:");
00025         if(cpu_mmx(flags)) printf(" mmx");
00026         if(cpu_3dnow(flags)) printf(" 3dnow");
00027         if(cpu_3dnowext(flags)) printf(" 3dnowext");
00028         if(cpu_sse(flags)) printf(" sse");
00029         if(cpu_sse2(flags)) printf(" sse2");
00030         if(cpu_sse3(flags)) printf(" sse3");
00031         printf("\n");
00032     }
00033     else printf("I guess you have some i486\n");
00034     return 0;
00035 }

Generated on Thu May 24 2012 04:34:40 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.