hotspot/src/cpu/x86/vm/vm_version_x86.hpp
changeset 32727 320855c2baef
parent 31864 341ca6d4b290
child 33160 c59f1676d27e
equal deleted inserted replaced
32726:8ccad6e5cdc6 32727:320855c2baef
   225   };
   225   };
   226 
   226 
   227   union XemXcr0Eax {
   227   union XemXcr0Eax {
   228     uint32_t value;
   228     uint32_t value;
   229     struct {
   229     struct {
   230       uint32_t x87    : 1,
   230       uint32_t x87     : 1,
   231                sse    : 1,
   231                sse     : 1,
   232                ymm    : 1,
   232                ymm     : 1,
   233                       : 2,
   233                bndregs : 1,
   234                opmask : 1,
   234                bndcsr  : 1,
   235                zmm512 : 1,
   235                opmask  : 1,
   236                 zmm32 : 1,
   236                zmm512  : 1,
   237                       : 24;
   237                zmm32   : 1,
       
   238                        : 24;
   238     } bits;
   239     } bits;
   239   };
   240   };
   240 
   241 
   241 protected:
   242 protected:
   242   static int _cpu;
   243   static int _cpu;
   701   static bool supports_avx512er() { return (_cpuFeatures & CPU_AVX512ER) != 0; }
   702   static bool supports_avx512er() { return (_cpuFeatures & CPU_AVX512ER) != 0; }
   702   static bool supports_avx512cd() { return (_cpuFeatures & CPU_AVX512CD) != 0; }
   703   static bool supports_avx512cd() { return (_cpuFeatures & CPU_AVX512CD) != 0; }
   703   static bool supports_avx512bw() { return (_cpuFeatures & CPU_AVX512BW) != 0; }
   704   static bool supports_avx512bw() { return (_cpuFeatures & CPU_AVX512BW) != 0; }
   704   static bool supports_avx512vl() { return (_cpuFeatures & CPU_AVX512VL) != 0; }
   705   static bool supports_avx512vl() { return (_cpuFeatures & CPU_AVX512VL) != 0; }
   705   static bool supports_avx512vlbw() { return (supports_avx512bw() && supports_avx512vl()); }
   706   static bool supports_avx512vlbw() { return (supports_avx512bw() && supports_avx512vl()); }
       
   707   static bool supports_avx512novl() { return (supports_evex() && !supports_avx512vl()); }
   706   // Intel features
   708   // Intel features
   707   static bool is_intel_family_core() { return is_intel() &&
   709   static bool is_intel_family_core() { return is_intel() &&
   708                                        extended_cpu_family() == CPU_FAMILY_INTEL_CORE; }
   710                                        extended_cpu_family() == CPU_FAMILY_INTEL_CORE; }
   709 
   711 
   710   static bool is_intel_tsc_synched_at_init()  {
   712   static bool is_intel_tsc_synched_at_init()  {
   815   }
   817   }
   816   static intx prefetch_fields_ahead() {
   818   static intx prefetch_fields_ahead() {
   817     intx count = PrefetchFieldsAhead;
   819     intx count = PrefetchFieldsAhead;
   818     return count >= 0 ? count : 1;
   820     return count >= 0 ? count : 1;
   819   }
   821   }
       
   822   static uint32_t get_xsave_header_lower_segment() {
       
   823     return _cpuid_info.xem_xcr0_eax.value;
       
   824   }
       
   825   static uint32_t get_xsave_header_upper_segment() {
       
   826     return _cpuid_info.xem_xcr0_edx;
       
   827   }
   820 };
   828 };
   821 
   829 
   822 #endif // CPU_X86_VM_VM_VERSION_X86_HPP
   830 #endif // CPU_X86_VM_VM_VERSION_X86_HPP