1 2/* 3 * Mesa 3-D graphics library 4 * Version: 5.1 5 * 6 * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. 7 * 8 * Permission is hereby granted, free of charge, to any person obtaining a 9 * copy of this software and associated documentation files (the "Software"), 10 * to deal in the Software without restriction, including without limitation 11 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 * and/or sell copies of the Software, and to permit persons to whom the 13 * Software is furnished to do so, subject to the following conditions: 14 * 15 * The above copyright notice and this permission notice shall be included 16 * in all copies or substantial portions of the Software. 17 * 18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 21 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 22 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 23 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 */ 25 26/* 27 * x86 CPUID feature information. The raw data is returned by 28 * _mesa_identify_x86_cpu_features() and interpreted with the cpu_has_* 29 * helper macros. 30 * 31 * Gareth Hughes 32 */ 33 34#ifndef __COMMON_X86_FEATURES_H__ 35#define __COMMON_X86_FEATURES_H__ 36 37#define X86_FEATURE_FPU (1<<0) 38#define X86_FEATURE_CMOV (1<<1) 39#define X86_FEATURE_MMXEXT (1<<2) 40#define X86_FEATURE_MMX (1<<3) 41#define X86_FEATURE_FXSR (1<<4) 42#define X86_FEATURE_XMM (1<<5) 43#define X86_FEATURE_XMM2 (1<<6) 44#define X86_FEATURE_3DNOWEXT (1<<7) 45#define X86_FEATURE_3DNOW (1<<8) 46 47/* standard X86 CPU features */ 48#define X86_CPU_FPU (1<<0) 49#define X86_CPU_CMOV (1<<15) 50#define X86_CPU_MMX (1<<23) 51#define X86_CPU_XMM (1<<25) 52#define X86_CPU_XMM2 (1<<26) 53 54/* extended X86 CPU features */ 55#define X86_CPUEXT_MMX_EXT (1<<22) 56#define X86_CPUEXT_3DNOW_EXT (1<<30) 57#define X86_CPUEXT_3DNOW (1<<31) 58 59#define cpu_has_mmx (_mesa_x86_cpu_features & X86_FEATURE_MMX) 60#define cpu_has_mmxext (_mesa_x86_cpu_features & X86_FEATURE_MMXEXT) 61#define cpu_has_xmm (_mesa_x86_cpu_features & X86_FEATURE_XMM) 62#define cpu_has_xmm2 (_mesa_x86_cpu_features & X86_FEATURE_XMM2) 63#define cpu_has_3dnow (_mesa_x86_cpu_features & X86_FEATURE_3DNOW) 64#define cpu_has_3dnowext (_mesa_x86_cpu_features & X86_FEATURE_3DNOWEXT) 65 66#endif 67 68