src/cpu/x86/vm/vm_version_x86.hpp

changeset 4205
a3ecd773a7b9
parent 4153
b9a9ed0f8eeb
child 4410
00af3a3a8df4
     1.1 --- a/src/cpu/x86/vm/vm_version_x86.hpp	Tue Oct 23 13:06:37 2012 -0700
     1.2 +++ b/src/cpu/x86/vm/vm_version_x86.hpp	Wed Oct 24 14:33:22 2012 -0700
     1.3 @@ -78,7 +78,9 @@
     1.4                 sse4_2   : 1,
     1.5                          : 2,
     1.6                 popcnt   : 1,
     1.7 -                        : 3,
     1.8 +                        : 1,
     1.9 +               aes      : 1,
    1.10 +                        : 1,
    1.11                 osxsave  : 1,
    1.12                 avx      : 1,
    1.13                          : 3;
    1.14 @@ -244,7 +246,8 @@
    1.15      CPU_TSC    = (1 << 15),
    1.16      CPU_TSCINV = (1 << 16),
    1.17      CPU_AVX    = (1 << 17),
    1.18 -    CPU_AVX2   = (1 << 18)
    1.19 +    CPU_AVX2   = (1 << 18),
    1.20 +    CPU_AES    = (1 << 19)
    1.21    } cpuFeatureFlags;
    1.22  
    1.23    enum {
    1.24 @@ -420,6 +423,8 @@
    1.25        result |= CPU_TSC;
    1.26      if (_cpuid_info.ext_cpuid7_edx.bits.tsc_invariance != 0)
    1.27        result |= CPU_TSCINV;
    1.28 +    if (_cpuid_info.std_cpuid1_ecx.bits.aes != 0)
    1.29 +      result |= CPU_AES;
    1.30  
    1.31      // AMD features.
    1.32      if (is_amd()) {
    1.33 @@ -544,6 +549,7 @@
    1.34    static bool supports_avx()      { return (_cpuFeatures & CPU_AVX) != 0; }
    1.35    static bool supports_avx2()     { return (_cpuFeatures & CPU_AVX2) != 0; }
    1.36    static bool supports_tsc()      { return (_cpuFeatures & CPU_TSC)    != 0; }
    1.37 +  static bool supports_aes()      { return (_cpuFeatures & CPU_AES) != 0; }
    1.38  
    1.39    // Intel features
    1.40    static bool is_intel_family_core() { return is_intel() &&

mercurial