Mercurial > mplayer.hg
annotate cpudetect.h @ 34594:c20ac9b80ea5
Don't destroy list pointers while saving list items.
Use temporary pointers instead.
author | ib |
---|---|
date | Fri, 10 Feb 2012 15:06:59 +0000 |
parents | 064be070d8c8 |
children | 3e1a4184b70e |
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; | |
39 int hasSSE4a; | |
40 int isX86; | |
41 unsigned cl_size; /* size of cache line */ | |
42 int hasAltiVec; | |
43 int hasTSC; | |
2268
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
44 } CpuCaps; |
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
45 |
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
46 extern CpuCaps gCpuCaps; |
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
47 |
31826
f3aed7bffcbb
Reuse do_cpuid from cpudetect.c in loader/win32.c.
reimar
parents:
31077
diff
changeset
|
48 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
|
49 |
2301 | 50 void GetCpuCaps(CpuCaps *caps); |
2303 | 51 |
52 /* returned value is malloc()'ed so free() it after use */ | |
2301 | 53 char *GetCpuFriendlyName(unsigned int regs[], unsigned int regs2[]); |
2268
72ff2179d396
cpu detect code by Eric Anholt <eanholt@gladstone.uoregon.edu>
arpi
parents:
diff
changeset
|
54 |
26029 | 55 #endif /* MPLAYER_CPUDETECT_H */ |