changeset 48408:a97a26eb896f

8194494: SHA-512 stub uses AVX 2 instructions on non-supporting CPUs Summary: Check for supports_avx2() && supports_bmi2() before generating SHA-512 stub. Reviewed-by: kvn
author thartmann
date Fri, 05 Jan 2018 10:23:57 +0100
parents 8935285e8759
children cb7926b6b3d6 2ad215f9fdcf
files src/hotspot/cpu/x86/vm_version_x86.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/cpu/x86/vm_version_x86.cpp	Thu Jan 04 14:44:38 2018 -0800
+++ b/src/hotspot/cpu/x86/vm_version_x86.cpp	Fri Jan 05 10:23:57 2018 +0100
@@ -882,7 +882,7 @@
     FLAG_SET_DEFAULT(UseSHA256Intrinsics, false);
   }
 
-  if (UseSHA) {
+  if (UseSHA && supports_avx2() && supports_bmi2()) {
     if (FLAG_IS_DEFAULT(UseSHA512Intrinsics)) {
       FLAG_SET_DEFAULT(UseSHA512Intrinsics, true);
     }