1 ////////////////////////////////////////////////////////////////////////////////
3 /// A header file for detecting the Intel MMX instructions set extension.
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.
9 /// Author : Copyright (c) Olli Parviainen
10 /// Author e-mail : oparviai @ iki.fi
11 /// SoundTouch WWW: http://www.iki.fi/oparviai/soundtouch
13 ////////////////////////////////////////////////////////////////////////////////
15 // Last changed : $Date$
16 // File revision : $Revision$
20 ////////////////////////////////////////////////////////////////////////////////
24 // SoundTouch audio processing library
25 // Copyright (c) Olli Parviainen
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.
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.
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
41 ////////////////////////////////////////////////////////////////////////////////
43 #ifndef _CPU_DETECT_H_
44 #define _CPU_DETECT_H_
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
54 /// Checks which instruction set extensions are supported by the CPU.
56 /// \return A bitmask of supported extensions, see SUPPORT_... defines.
57 uint detectCPUextensions(void);
59 /// Disables given set of instruction extensions. See SUPPORT_... defines.
60 void disableExtensions(uint wDisableMask);
62 #endif // _CPU_DETECT_H_