Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
70 giacomo 1
/* $Id: common_x86_features.h,v 1.1 2003-03-13 12:11:48 giacomo Exp $ */
2
 
3
/*
4
 * Mesa 3-D graphics library
5
 * Version:  3.5
6
 *
7
 * Copyright (C) 1999-2001  Brian Paul   All Rights Reserved.
8
 *
9
 * Permission is hereby granted, free of charge, to any person obtaining a
10
 * copy of this software and associated documentation files (the "Software"),
11
 * to deal in the Software without restriction, including without limitation
12
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13
 * and/or sell copies of the Software, and to permit persons to whom the
14
 * Software is furnished to do so, subject to the following conditions:
15
 *
16
 * The above copyright notice and this permission notice shall be included
17
 * in all copies or substantial portions of the Software.
18
 *
19
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
22
 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23
 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
 */
26
 
27
/*
28
 * x86 CPUID feature information.  The raw data is returned by
29
 * _mesa_identify_x86_cpu_features() and interpreted with the cpu_has_*
30
 * helper macros.
31
 *
32
 * Gareth Hughes
33
 */
34
 
35
#ifndef __COMMON_X86_FEATURES_H__
36
#define __COMMON_X86_FEATURES_H__
37
 
38
/* Capabilities of CPUs
39
 */
40
#define X86_FEATURE_FPU         0x00000001
41
#define X86_FEATURE_VME         0x00000002
42
#define X86_FEATURE_DE          0x00000004
43
#define X86_FEATURE_PSE         0x00000008
44
#define X86_FEATURE_TSC         0x00000010
45
#define X86_FEATURE_MSR         0x00000020
46
#define X86_FEATURE_PAE         0x00000040
47
#define X86_FEATURE_MCE         0x00000080
48
#define X86_FEATURE_CX8         0x00000100
49
#define X86_FEATURE_APIC        0x00000200
50
#define X86_FEATURE_10          0x00000400
51
#define X86_FEATURE_SEP         0x00000800
52
#define X86_FEATURE_MTRR        0x00001000
53
#define X86_FEATURE_PGE         0x00002000
54
#define X86_FEATURE_MCA         0x00004000
55
#define X86_FEATURE_CMOV        0x00008000
56
#define X86_FEATURE_PAT         0x00010000
57
#define X86_FEATURE_PSE36       0x00020000
58
#define X86_FEATURE_18          0x00040000
59
#define X86_FEATURE_19          0x00080000
60
#define X86_FEATURE_20          0x00100000
61
#define X86_FEATURE_21          0x00200000
62
#define X86_FEATURE_MMXEXT      0x00400000
63
#define X86_FEATURE_MMX         0x00800000
64
#define X86_FEATURE_FXSR        0x01000000
65
#define X86_FEATURE_XMM         0x02000000
66
#define X86_FEATURE_XMM2        0x04000000
67
#define X86_FEATURE_27          0x08000000
68
#define X86_FEATURE_28          0x10000000
69
#define X86_FEATURE_29          0x20000000
70
#define X86_FEATURE_3DNOWEXT    0x40000000
71
#define X86_FEATURE_3DNOW       0x80000000
72
 
73
#define cpu_has_mmx             (_mesa_x86_cpu_features & X86_FEATURE_MMX)
74
#define cpu_has_mmxext          (_mesa_x86_cpu_features & X86_FEATURE_MMXEXT)
75
#define cpu_has_xmm             (_mesa_x86_cpu_features & X86_FEATURE_XMM)
76
#define cpu_has_xmm2            (_mesa_x86_cpu_features & X86_FEATURE_XMM2)
77
#define cpu_has_3dnow           (_mesa_x86_cpu_features & X86_FEATURE_3DNOW)
78
#define cpu_has_3dnowext        (_mesa_x86_cpu_features & X86_FEATURE_3DNOWEXT)
79
 
80
#endif