Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1.  
  2. /*
  3.  * Mesa 3-D graphics library
  4.  *
  5.  * Copyright (C) 1999-2001  Brian Paul   All Rights Reserved.
  6.  *
  7.  * Permission is hereby granted, free of charge, to any person obtaining a
  8.  * copy of this software and associated documentation files (the "Software"),
  9.  * to deal in the Software without restriction, including without limitation
  10.  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  11.  * and/or sell copies of the Software, and to permit persons to whom the
  12.  * Software is furnished to do so, subject to the following conditions:
  13.  *
  14.  * The above copyright notice and this permission notice shall be included
  15.  * in all copies or substantial portions of the Software.
  16.  *
  17.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  18.  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
  20.  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
  21.  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  22.  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  23.  * 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.