Mercurial > mplayer.hg
annotate cpudetect.h @ 36780:a5550a57a6cb
Fix bug with Win32 GUI preferences.
Determine string length in order to properly allocate memory.
author | ib |
---|---|
date | Mon, 17 Feb 2014 14:36:16 +0000 |
parents | 3e1a4184b70e |
children |
rev | line source |
---|---|
30429
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
1 /* |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
2 * This file is part of MPlayer. |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
3 * |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
4 * MPlayer is free software; you can redistribute it and/or modify |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
6 * the Free Software Foundation; either version 2 of the License, or |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
7 * (at your option) any later version. |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
8 * |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
9 * MPlayer is distributed in the hope that it will be useful, |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
12 * GNU General Public License for more details. |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
13 * |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
14 * You should have received a copy of the GNU General Public License along |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
17 */ |
c1a3f1bbba26
Add license header to all top-level files missing them.
diego
parents:
29039
diff
changeset
|
18 |
26029 | 19 #ifndef MPLAYER_CPUDETECT_H |
20 #define MPLAYER_CPUDETECT_H | |
2268
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
21 |
31077 | 22 #define CPUTYPE_I386 3 |
23 #define CPUTYPE_I486 4 | |
24 #define CPUTYPE_I586 5 | |
2281 | 25 #define CPUTYPE_I686 6 |
2268
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
26 |
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
27 typedef struct cpucaps_s { |
31077 | 28 int cpuType; |
29 int cpuModel; | |
30 int cpuStepping; | |
31 int hasMMX; | |
32 int hasMMX2; | |
33 int has3DNow; | |
34 int has3DNowExt; | |
35 int hasSSE; | |
36 int hasSSE2; | |
37 int hasSSE3; | |
38 int hasSSSE3; | |
35101 | 39 int hasSSE4; |
40 int hasSSE42; | |
31077 | 41 int hasSSE4a; |
35101 | 42 int hasAVX; |
31077 | 43 int isX86; |
44 unsigned cl_size; /* size of cache line */ | |
45 int hasAltiVec; | |
46 int hasTSC; | |
2268
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
47 } CpuCaps; |
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
48 |
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
49 extern CpuCaps gCpuCaps; |
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
50 |
31826
f3aed7bffcbb
Reuse do_cpuid from cpudetect.c in loader/win32.c.
reimar
parents:
31077
diff
changeset
|
51 void do_cpuid(unsigned int ax, unsigned int *p); |
f3aed7bffcbb
Reuse do_cpuid from cpudetect.c in loader/win32.c.
reimar
parents:
31077
diff
changeset
|
52 |
2301 | 53 void GetCpuCaps(CpuCaps *caps); |
2303 | 54 |
55 /* returned value is malloc()'ed so free() it after use */ | |
2301 | 56 char *GetCpuFriendlyName(unsigned int regs[], unsigned int regs2[]); |
2268
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
57 |
26029 | 58 #endif /* MPLAYER_CPUDETECT_H */ |