< prev index next >

src/hotspot/cpu/x86/vm_version_x86.cpp

Print this page




 868   }
 869 
 870   if (supports_fma() && UseSSE >= 2) { // Check UseSSE since FMA code uses SSE instructions
 871     if (FLAG_IS_DEFAULT(UseFMA)) {
 872       UseFMA = true;
 873     }
 874   } else if (UseFMA) {
 875     warning("FMA instructions are not available on this CPU");
 876     FLAG_SET_DEFAULT(UseFMA, false);
 877   }
 878 
 879   if (supports_sha() LP64_ONLY(|| supports_avx2() && supports_bmi2())) {
 880     if (FLAG_IS_DEFAULT(UseSHA)) {
 881       UseSHA = true;
 882     }
 883   } else if (UseSHA) {
 884     warning("SHA instructions are not available on this CPU");
 885     FLAG_SET_DEFAULT(UseSHA, false);
 886   }
 887 
 888   if (supports_sha() && UseSHA) {
 889     if (FLAG_IS_DEFAULT(UseSHA1Intrinsics)) {
 890       FLAG_SET_DEFAULT(UseSHA1Intrinsics, true);
 891     }
 892   } else if (UseSHA1Intrinsics) {
 893     warning("Intrinsics for SHA-1 crypto hash functions not available on this CPU.");
 894     FLAG_SET_DEFAULT(UseSHA1Intrinsics, false);
 895   }
 896 
 897   if (UseSHA) {
 898     if (FLAG_IS_DEFAULT(UseSHA256Intrinsics)) {
 899       FLAG_SET_DEFAULT(UseSHA256Intrinsics, true);
 900     }
 901   } else if (UseSHA256Intrinsics) {
 902     warning("Intrinsics for SHA-224 and SHA-256 crypto hash functions not available on this CPU.");
 903     FLAG_SET_DEFAULT(UseSHA256Intrinsics, false);
 904   }
 905 
 906   if (UseSHA && supports_avx2() && supports_bmi2()) {
 907     if (FLAG_IS_DEFAULT(UseSHA512Intrinsics)) {
 908       FLAG_SET_DEFAULT(UseSHA512Intrinsics, true);
 909     }
 910   } else if (UseSHA512Intrinsics) {
 911     warning("Intrinsics for SHA-384 and SHA-512 crypto hash functions not available on this CPU.");
 912     FLAG_SET_DEFAULT(UseSHA512Intrinsics, false);
 913   }
 914 
 915   if (!(UseSHA1Intrinsics || UseSHA256Intrinsics || UseSHA512Intrinsics)) {
 916     FLAG_SET_DEFAULT(UseSHA, false);
 917   }




 868   }
 869 
 870   if (supports_fma() && UseSSE >= 2) { // Check UseSSE since FMA code uses SSE instructions
 871     if (FLAG_IS_DEFAULT(UseFMA)) {
 872       UseFMA = true;
 873     }
 874   } else if (UseFMA) {
 875     warning("FMA instructions are not available on this CPU");
 876     FLAG_SET_DEFAULT(UseFMA, false);
 877   }
 878 
 879   if (supports_sha() LP64_ONLY(|| supports_avx2() && supports_bmi2())) {
 880     if (FLAG_IS_DEFAULT(UseSHA)) {
 881       UseSHA = true;
 882     }
 883   } else if (UseSHA) {
 884     warning("SHA instructions are not available on this CPU");
 885     FLAG_SET_DEFAULT(UseSHA, false);
 886   }
 887 
 888   if (supports_sha() && supports_sse4_1() && UseSHA) {
 889     if (FLAG_IS_DEFAULT(UseSHA1Intrinsics)) {
 890       FLAG_SET_DEFAULT(UseSHA1Intrinsics, true);
 891     }
 892   } else if (UseSHA1Intrinsics) {
 893     warning("Intrinsics for SHA-1 crypto hash functions not available on this CPU.");
 894     FLAG_SET_DEFAULT(UseSHA1Intrinsics, false);
 895   }
 896 
 897   if (supports_sse4_1() && UseSHA) {
 898     if (FLAG_IS_DEFAULT(UseSHA256Intrinsics)) {
 899       FLAG_SET_DEFAULT(UseSHA256Intrinsics, true);
 900     }
 901   } else if (UseSHA256Intrinsics) {
 902     warning("Intrinsics for SHA-224 and SHA-256 crypto hash functions not available on this CPU.");
 903     FLAG_SET_DEFAULT(UseSHA256Intrinsics, false);
 904   }
 905 
 906   if (UseSHA && supports_avx2() && supports_bmi2()) {
 907     if (FLAG_IS_DEFAULT(UseSHA512Intrinsics)) {
 908       FLAG_SET_DEFAULT(UseSHA512Intrinsics, true);
 909     }
 910   } else if (UseSHA512Intrinsics) {
 911     warning("Intrinsics for SHA-384 and SHA-512 crypto hash functions not available on this CPU.");
 912     FLAG_SET_DEFAULT(UseSHA512Intrinsics, false);
 913   }
 914 
 915   if (!(UseSHA1Intrinsics || UseSHA256Intrinsics || UseSHA512Intrinsics)) {
 916     FLAG_SET_DEFAULT(UseSHA, false);
 917   }


< prev index next >