< prev index next >

src/hotspot/cpu/x86/vm_version_x86.cpp

Print this page

 905   if (UseAVX > use_avx_limit) {
 906     warning("UseAVX=%d is not supported on this CPU, setting it to UseAVX=%d", (int) UseAVX, use_avx_limit);
 907     FLAG_SET_DEFAULT(UseAVX, use_avx_limit);
 908   } else if (UseAVX < 0) {
 909     warning("UseAVX=%d is not valid, setting it to UseAVX=0", (int) UseAVX);
 910     FLAG_SET_DEFAULT(UseAVX, 0);
 911   }
 912 
 913   if (UseAVX < 3) {
 914     _features &= ~CPU_AVX512F;
 915     _features &= ~CPU_AVX512DQ;
 916     _features &= ~CPU_AVX512CD;
 917     _features &= ~CPU_AVX512BW;
 918     _features &= ~CPU_AVX512VL;
 919     _features &= ~CPU_AVX512_VPOPCNTDQ;
 920     _features &= ~CPU_AVX512_VPCLMULQDQ;
 921     _features &= ~CPU_AVX512_VAES;
 922     _features &= ~CPU_AVX512_VNNI;
 923     _features &= ~CPU_AVX512_VBMI;
 924     _features &= ~CPU_AVX512_VBMI2;

 925   }
 926 
 927   if (UseAVX < 2)
 928     _features &= ~CPU_AVX2;
 929 
 930   if (UseAVX < 1) {
 931     _features &= ~CPU_AVX;
 932     _features &= ~CPU_VZEROUPPER;
 933   }
 934 
 935   if (logical_processors_per_package() == 1) {
 936     // HT processor could be installed on a system which doesn't support HT.
 937     _features &= ~CPU_HT;
 938   }
 939 
 940   if (is_intel()) { // Intel cpus specific settings
 941     if (is_knights_family()) {
 942       _features &= ~CPU_VZEROUPPER;
 943       _features &= ~CPU_AVX512BW;
 944       _features &= ~CPU_AVX512VL;
 945       _features &= ~CPU_AVX512DQ;
 946       _features &= ~CPU_AVX512_VNNI;
 947       _features &= ~CPU_AVX512_VAES;
 948       _features &= ~CPU_AVX512_VPOPCNTDQ;
 949       _features &= ~CPU_AVX512_VPCLMULQDQ;
 950       _features &= ~CPU_AVX512_VBMI;
 951       _features &= ~CPU_AVX512_VBMI2;
 952       _features &= ~CPU_CLWB;
 953       _features &= ~CPU_FLUSHOPT;


 954     }
 955   }
 956 
 957   if (FLAG_IS_DEFAULT(IntelJccErratumMitigation)) {
 958     _has_intel_jcc_erratum = compute_has_intel_jcc_erratum();
 959   } else {
 960     _has_intel_jcc_erratum = IntelJccErratumMitigation;
 961   }
 962 
 963   char buf[512];
 964   int res = jio_snprintf(
 965               buf, sizeof(buf),
 966               "(%u cores per cpu, %u threads per core) family %d model %d stepping %d microcode 0x%x",
 967               cores_per_cpu(), threads_per_core(),
 968               cpu_family(), _model, _stepping, os::cpu_microcode_revision());
 969   assert(res > 0, "not enough temporary space allocated");
 970   insert_features_names(buf + res, sizeof(buf) - res, _features_names);
 971 
 972   _features_string = os::strdup(buf);
 973 

 905   if (UseAVX > use_avx_limit) {
 906     warning("UseAVX=%d is not supported on this CPU, setting it to UseAVX=%d", (int) UseAVX, use_avx_limit);
 907     FLAG_SET_DEFAULT(UseAVX, use_avx_limit);
 908   } else if (UseAVX < 0) {
 909     warning("UseAVX=%d is not valid, setting it to UseAVX=0", (int) UseAVX);
 910     FLAG_SET_DEFAULT(UseAVX, 0);
 911   }
 912 
 913   if (UseAVX < 3) {
 914     _features &= ~CPU_AVX512F;
 915     _features &= ~CPU_AVX512DQ;
 916     _features &= ~CPU_AVX512CD;
 917     _features &= ~CPU_AVX512BW;
 918     _features &= ~CPU_AVX512VL;
 919     _features &= ~CPU_AVX512_VPOPCNTDQ;
 920     _features &= ~CPU_AVX512_VPCLMULQDQ;
 921     _features &= ~CPU_AVX512_VAES;
 922     _features &= ~CPU_AVX512_VNNI;
 923     _features &= ~CPU_AVX512_VBMI;
 924     _features &= ~CPU_AVX512_VBMI2;
 925     _features &= ~CPU_AVX512_BITALG;
 926   }
 927 
 928   if (UseAVX < 2)
 929     _features &= ~CPU_AVX2;
 930 
 931   if (UseAVX < 1) {
 932     _features &= ~CPU_AVX;
 933     _features &= ~CPU_VZEROUPPER;
 934   }
 935 
 936   if (logical_processors_per_package() == 1) {
 937     // HT processor could be installed on a system which doesn't support HT.
 938     _features &= ~CPU_HT;
 939   }
 940 
 941   if (is_intel()) { // Intel cpus specific settings
 942     if (is_knights_family()) {
 943       _features &= ~CPU_VZEROUPPER;
 944       _features &= ~CPU_AVX512BW;
 945       _features &= ~CPU_AVX512VL;
 946       _features &= ~CPU_AVX512DQ;
 947       _features &= ~CPU_AVX512_VNNI;
 948       _features &= ~CPU_AVX512_VAES;
 949       _features &= ~CPU_AVX512_VPOPCNTDQ;
 950       _features &= ~CPU_AVX512_VPCLMULQDQ;
 951       _features &= ~CPU_AVX512_VBMI;
 952       _features &= ~CPU_AVX512_VBMI2;
 953       _features &= ~CPU_CLWB;
 954       _features &= ~CPU_FLUSHOPT;
 955       _features &= ~CPU_GFNI;
 956       _features &= ~CPU_AVX512_BITALG;
 957     }
 958   }
 959 
 960   if (FLAG_IS_DEFAULT(IntelJccErratumMitigation)) {
 961     _has_intel_jcc_erratum = compute_has_intel_jcc_erratum();
 962   } else {
 963     _has_intel_jcc_erratum = IntelJccErratumMitigation;
 964   }
 965 
 966   char buf[512];
 967   int res = jio_snprintf(
 968               buf, sizeof(buf),
 969               "(%u cores per cpu, %u threads per core) family %d model %d stepping %d microcode 0x%x",
 970               cores_per_cpu(), threads_per_core(),
 971               cpu_family(), _model, _stepping, os::cpu_microcode_revision());
 972   assert(res > 0, "not enough temporary space allocated");
 973   insert_features_names(buf + res, sizeof(buf) - res, _features_names);
 974 
 975   _features_string = os::strdup(buf);
 976 
< prev index next >