< prev index next >

src/cpu/x86/vm/vm_version_x86.cpp

Print this page
rev 10837 : SHA256-AVX2


 714     }
 715   }
 716   else if (UseCRC32CIntrinsics) {
 717     if (!FLAG_IS_DEFAULT(UseCRC32CIntrinsics)) {
 718       warning("CRC32C intrinsics are not available on this CPU");
 719     }
 720     FLAG_SET_DEFAULT(UseCRC32CIntrinsics, false);
 721   }
 722 
 723   // GHASH/GCM intrinsics
 724   if (UseCLMUL && (UseSSE > 2)) {
 725     if (FLAG_IS_DEFAULT(UseGHASHIntrinsics)) {
 726       UseGHASHIntrinsics = true;
 727     }
 728   } else if (UseGHASHIntrinsics) {
 729     if (!FLAG_IS_DEFAULT(UseGHASHIntrinsics))
 730       warning("GHASH intrinsic requires CLMUL and SSE2 instructions on this CPU");
 731     FLAG_SET_DEFAULT(UseGHASHIntrinsics, false);
 732   }
 733 
 734   if (supports_sha()) {
 735     if (FLAG_IS_DEFAULT(UseSHA)) {
 736       UseSHA = true;
 737     }
 738   } else if (UseSHA) {
 739     warning("SHA instructions are not available on this CPU");
 740     FLAG_SET_DEFAULT(UseSHA, false);
 741   }
 742 
 743   if (UseSHA) {
 744     if (FLAG_IS_DEFAULT(UseSHA1Intrinsics)) {
 745       FLAG_SET_DEFAULT(UseSHA1Intrinsics, true);
 746     }
 747   } else if (UseSHA1Intrinsics) {
 748     warning("Intrinsics for SHA-1 crypto hash functions not available on this CPU.");
 749     FLAG_SET_DEFAULT(UseSHA1Intrinsics, false);
 750   }
 751 
 752   if (UseSHA) {
 753     if (FLAG_IS_DEFAULT(UseSHA256Intrinsics)) {
 754       FLAG_SET_DEFAULT(UseSHA256Intrinsics, true);
 755     }
 756   } else if (UseSHA256Intrinsics) {
 757     warning("Intrinsics for SHA-224 and SHA-256 crypto hash functions not available on this CPU.");
 758     FLAG_SET_DEFAULT(UseSHA256Intrinsics, false);
 759   }
 760 
 761   if (UseSHA512Intrinsics) {
 762     warning("Intrinsics for SHA-384 and SHA-512 crypto hash functions not available on this CPU.");
 763     FLAG_SET_DEFAULT(UseSHA512Intrinsics, false);




 714     }
 715   }
 716   else if (UseCRC32CIntrinsics) {
 717     if (!FLAG_IS_DEFAULT(UseCRC32CIntrinsics)) {
 718       warning("CRC32C intrinsics are not available on this CPU");
 719     }
 720     FLAG_SET_DEFAULT(UseCRC32CIntrinsics, false);
 721   }
 722 
 723   // GHASH/GCM intrinsics
 724   if (UseCLMUL && (UseSSE > 2)) {
 725     if (FLAG_IS_DEFAULT(UseGHASHIntrinsics)) {
 726       UseGHASHIntrinsics = true;
 727     }
 728   } else if (UseGHASHIntrinsics) {
 729     if (!FLAG_IS_DEFAULT(UseGHASHIntrinsics))
 730       warning("GHASH intrinsic requires CLMUL and SSE2 instructions on this CPU");
 731     FLAG_SET_DEFAULT(UseGHASHIntrinsics, false);
 732   }
 733 
 734   if (supports_sha() LP64_ONLY(|| supports_avx2())) {
 735     if (FLAG_IS_DEFAULT(UseSHA)) {
 736       UseSHA = true;
 737     }
 738   } else if (UseSHA) {
 739     warning("SHA instructions are not available on this CPU");
 740     FLAG_SET_DEFAULT(UseSHA, false);
 741   }
 742 
 743   if (supports_sha() && UseSHA) {
 744     if (FLAG_IS_DEFAULT(UseSHA1Intrinsics)) {
 745       FLAG_SET_DEFAULT(UseSHA1Intrinsics, true);
 746     }
 747   } else if (UseSHA1Intrinsics) {
 748     warning("Intrinsics for SHA-1 crypto hash functions not available on this CPU.");
 749     FLAG_SET_DEFAULT(UseSHA1Intrinsics, false);
 750   }
 751 
 752   if (UseSHA) {
 753     if (FLAG_IS_DEFAULT(UseSHA256Intrinsics)) {
 754       FLAG_SET_DEFAULT(UseSHA256Intrinsics, true);
 755     }
 756   } else if (UseSHA256Intrinsics) {
 757     warning("Intrinsics for SHA-224 and SHA-256 crypto hash functions not available on this CPU.");
 758     FLAG_SET_DEFAULT(UseSHA256Intrinsics, false);
 759   }
 760 
 761   if (UseSHA512Intrinsics) {
 762     warning("Intrinsics for SHA-384 and SHA-512 crypto hash functions not available on this CPU.");
 763     FLAG_SET_DEFAULT(UseSHA512Intrinsics, false);


< prev index next >