|
1 //////////////////////////////////////////////////////////////////////////////// |
|
2 /// |
|
3 /// A header file for detecting the Intel MMX instructions set extension. |
|
4 /// |
|
5 /// Please see 'mmx_win.cpp', 'mmx_cpp.cpp' and 'mmx_non_x86.cpp' for the |
|
6 /// routine implementations for x86 Windows, x86 gnu version and non-x86 |
|
7 /// platforms, respectively. |
|
8 /// |
|
9 /// Author : Copyright (c) Olli Parviainen |
|
10 /// Author e-mail : oparviai 'at' iki.fi |
|
11 /// SoundTouch WWW: http://www.surina.net/soundtouch |
|
12 /// |
|
13 //////////////////////////////////////////////////////////////////////////////// |
|
14 // |
|
15 // Last changed : $Date: 2008-02-10 10:26:55 -0600 (Sun, 10 Feb 2008) $ |
|
16 // File revision : $Revision: 4 $ |
|
17 // |
|
18 // $Id: cpu_detect.h 11 2008-02-10 16:26:55Z oparviai $ |
|
19 // |
|
20 //////////////////////////////////////////////////////////////////////////////// |
|
21 // |
|
22 // License : |
|
23 // |
|
24 // SoundTouch audio processing library |
|
25 // Copyright (c) Olli Parviainen |
|
26 // |
|
27 // This library is free software; you can redistribute it and/or |
|
28 // modify it under the terms of the GNU Lesser General Public |
|
29 // License as published by the Free Software Foundation; either |
|
30 // version 2.1 of the License, or (at your option) any later version. |
|
31 // |
|
32 // This library is distributed in the hope that it will be useful, |
|
33 // but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
34 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
35 // Lesser General Public License for more details. |
|
36 // |
|
37 // You should have received a copy of the GNU Lesser General Public |
|
38 // License along with this library; if not, write to the Free Software |
|
39 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
40 // |
|
41 //////////////////////////////////////////////////////////////////////////////// |
|
42 |
|
43 #ifndef _CPU_DETECT_H_ |
|
44 #define _CPU_DETECT_H_ |
|
45 |
|
46 #include "STTypes.h" |
|
47 |
|
48 #define SUPPORT_MMX 0x0001 |
|
49 #define SUPPORT_3DNOW 0x0002 |
|
50 #define SUPPORT_ALTIVEC 0x0004 |
|
51 #define SUPPORT_SSE 0x0008 |
|
52 #define SUPPORT_SSE2 0x0010 |
|
53 |
|
54 /// Checks which instruction set extensions are supported by the CPU. |
|
55 /// |
|
56 /// \return A bitmask of supported extensions, see SUPPORT_... defines. |
|
57 uint detectCPUextensions(void); |
|
58 |
|
59 /// Disables given set of instruction extensions. See SUPPORT_... defines. |
|
60 void disableExtensions(uint wDisableMask); |
|
61 |
|
62 #endif // _CPU_DETECT_H_ |