src/cpu/x86/vm/vm_version_x86.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 8059139 Sdiff src/cpu/x86/vm

src/cpu/x86/vm/vm_version_x86.cpp

Print this page




 848     }
 849     if(FLAG_IS_DEFAULT(AllocatePrefetchInstr) && supports_3dnow_prefetch()) {
 850       AllocatePrefetchInstr = 3;
 851     }
 852   }
 853 
 854   // Use count leading zeros count instruction if available.
 855   if (supports_lzcnt()) {
 856     if (FLAG_IS_DEFAULT(UseCountLeadingZerosInstruction)) {
 857       UseCountLeadingZerosInstruction = true;
 858     }
 859    } else if (UseCountLeadingZerosInstruction) {
 860     warning("lzcnt instruction is not available on this CPU");
 861     FLAG_SET_DEFAULT(UseCountLeadingZerosInstruction, false);
 862   }
 863 
 864   // Use count trailing zeros instruction if available
 865   if (supports_bmi1()) {
 866     // tzcnt does not require VEX prefix
 867     if (FLAG_IS_DEFAULT(UseCountTrailingZerosInstruction)) {




 868       UseCountTrailingZerosInstruction = true;
 869     }

 870   } else if (UseCountTrailingZerosInstruction) {
 871     warning("tzcnt instruction is not available on this CPU");
 872     FLAG_SET_DEFAULT(UseCountTrailingZerosInstruction, false);
 873   }
 874 
 875   // BMI instructions use an encoding with VEX prefix.
 876   // VEX prefix is generated only when AVX > 0.
 877   if (supports_bmi1() && supports_avx()) {
 878     if (FLAG_IS_DEFAULT(UseBMI1Instructions)) {
 879       UseBMI1Instructions = true;
 880     }
 881   } else if (UseBMI1Instructions) {
 882     warning("BMI1 instructions are not available on this CPU (AVX is also required)");
 883     FLAG_SET_DEFAULT(UseBMI1Instructions, false);
 884   }
 885 
 886   if (supports_bmi2() && supports_avx()) {
 887     if (FLAG_IS_DEFAULT(UseBMI2Instructions)) {
 888       UseBMI2Instructions = true;
 889     }
 890   } else if (UseBMI2Instructions) {
 891     warning("BMI2 instructions are not available on this CPU (AVX is also required)");
 892     FLAG_SET_DEFAULT(UseBMI2Instructions, false);
 893   }
 894 
 895   // Use population count instruction if available.




 848     }
 849     if(FLAG_IS_DEFAULT(AllocatePrefetchInstr) && supports_3dnow_prefetch()) {
 850       AllocatePrefetchInstr = 3;
 851     }
 852   }
 853 
 854   // Use count leading zeros count instruction if available.
 855   if (supports_lzcnt()) {
 856     if (FLAG_IS_DEFAULT(UseCountLeadingZerosInstruction)) {
 857       UseCountLeadingZerosInstruction = true;
 858     }
 859    } else if (UseCountLeadingZerosInstruction) {
 860     warning("lzcnt instruction is not available on this CPU");
 861     FLAG_SET_DEFAULT(UseCountLeadingZerosInstruction, false);
 862   }
 863 
 864   // Use count trailing zeros instruction if available
 865   if (supports_bmi1()) {
 866     // tzcnt does not require VEX prefix
 867     if (FLAG_IS_DEFAULT(UseCountTrailingZerosInstruction)) {
 868       if (!UseBMI1Instructions && !FLAG_IS_DEFAULT(UseBMI1Instructions)) {
 869         // Don't use tzcnt if BMI1 is switched off on command line.
 870         UseCountTrailingZerosInstruction = false;
 871       } else {
 872         UseCountTrailingZerosInstruction = true;
 873       }
 874     }
 875   } else if (UseCountTrailingZerosInstruction) {
 876     warning("tzcnt instruction is not available on this CPU");
 877     FLAG_SET_DEFAULT(UseCountTrailingZerosInstruction, false);
 878   }
 879 
 880   // BMI instructions (except tzcnt) use an encoding with VEX prefix.
 881   // VEX prefix is generated only when AVX > 0.
 882   if (supports_bmi1() && supports_avx()) {
 883     if (FLAG_IS_DEFAULT(UseBMI1Instructions)) {
 884       UseBMI1Instructions = true;
 885     }
 886   } else if (UseBMI1Instructions) {
 887     warning("BMI1 instructions are not available on this CPU (AVX is also required)");
 888     FLAG_SET_DEFAULT(UseBMI1Instructions, false);
 889   }
 890 
 891   if (supports_bmi2() && supports_avx()) {
 892     if (FLAG_IS_DEFAULT(UseBMI2Instructions)) {
 893       UseBMI2Instructions = true;
 894     }
 895   } else if (UseBMI2Instructions) {
 896     warning("BMI2 instructions are not available on this CPU (AVX is also required)");
 897     FLAG_SET_DEFAULT(UseBMI2Instructions, false);
 898   }
 899 
 900   // Use population count instruction if available.


src/cpu/x86/vm/vm_version_x86.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File