changeset 46563:cfca8fbb4051

8182138: Disable generating INC and DEC instructions on Xeon Phi and ATOM CPUs Reviewed-by: kvn Contributed-by: rahul.kandu@intel.com
author kvn
date Fri, 23 Jun 2017 15:16:23 -0700
parents 6608152658ca
children 0ec329b23bbf
files hotspot/src/cpu/x86/vm/vm_version_x86.cpp hotspot/src/cpu/x86/vm/vm_version_x86.hpp
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp	Fri Jun 23 09:54:52 2017 -0400
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp	Fri Jun 23 15:16:23 2017 -0700
@@ -648,9 +648,7 @@
   }
 
   if( is_intel() ) { // Intel cpus specific settings
-    if ((cpu_family() == 0x06) &&
-        ((extended_cpu_model() == 0x57) ||   // Xeon Phi 3200/5200/7200
-        (extended_cpu_model() == 0x85))) {  // Future Xeon Phi
+    if (is_knights_family()) {
       _features &= ~CPU_VZEROUPPER;
     }
   }
@@ -1177,10 +1175,7 @@
         FLAG_SET_DEFAULT(UseSSE42Intrinsics, false);
       }
     }
-    if ((cpu_family() == 0x06) &&
-        ((extended_cpu_model() == 0x36) || // Centerton
-         (extended_cpu_model() == 0x37) || // Silvermont
-         (extended_cpu_model() == 0x4D))) {
+    if (is_atom_family() || is_knights_family()) {
 #ifdef COMPILER2
       if (FLAG_IS_DEFAULT(OptoScheduling)) {
         OptoScheduling = true;
@@ -1191,6 +1186,9 @@
           UseUnalignedLoadStores = true; // use movdqu on newest Intel cpus
         }
       }
+      if (FLAG_IS_DEFAULT(UseIncDec)) {
+        FLAG_SET_DEFAULT(UseIncDec, false);
+      }
     }
     if(FLAG_IS_DEFAULT(AllocatePrefetchInstr) && supports_3dnow_prefetch()) {
       FLAG_SET_DEFAULT(AllocatePrefetchInstr, 3);
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.hpp	Fri Jun 23 09:54:52 2017 -0400
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.hpp	Fri Jun 23 15:16:23 2017 -0700
@@ -641,6 +641,8 @@
   static bool is_P6()             { return cpu_family() >= 6; }
   static bool is_amd()            { assert_is_initialized(); return _cpuid_info.std_vendor_name_0 == 0x68747541; } // 'htuA'
   static bool is_intel()          { assert_is_initialized(); return _cpuid_info.std_vendor_name_0 == 0x756e6547; } // 'uneG'
+  static bool is_atom_family()    { return ((cpu_family() == 0x06) && ((extended_cpu_model() == 0x36) || (extended_cpu_model() == 0x37) || (extended_cpu_model() == 0x4D))); } //Silvermont and Centerton
+  static bool is_knights_family() { return ((cpu_family() == 0x06) && ((extended_cpu_model() == 0x57) || (extended_cpu_model() == 0x85))); } // Xeon Phi 3200/5200/7200 and Future Xeon Phi
 
   static bool supports_processor_topology() {
     return (_cpuid_info.std_max_function >= 0xB) &&