42 43 public class TestUseCountTrailingZerosInstructionOnSupportedCPU 44 extends BMISupportedCPUTest { 45 private static final String DISABLE_BMI = "-XX:-UseBMI1Instructions"; 46 47 public TestUseCountTrailingZerosInstructionOnSupportedCPU() { 48 super("UseCountTrailingZerosInstruction", TZCNT_WARNING, "bmi1"); 49 } 50 51 @Override 52 public void runTestCases() throws Throwable { 53 54 super.runTestCases(); 55 56 /* 57 Verify that option will be disabled if all BMI1 instructions 58 are explicitly disabled. VM will be launched with following options: 59 -XX:-UseBMI1Instructions -version 60 */ 61 CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false", 62 TestUseCountTrailingZerosInstructionOnSupportedCPU.DISABLE_BMI); 63 64 /* 65 Verify that option could be turned on even if other BMI1 66 instructions were turned off. VM will be launched with following 67 options: -XX:-UseBMI1Instructions 68 -XX:+UseCountTrailingZerosInstruction -version 69 */ 70 CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "true", 71 TestUseCountTrailingZerosInstructionOnSupportedCPU.DISABLE_BMI, 72 CommandLineOptionTest.prepareBooleanFlag(optionName, true)); 73 } 74 75 public static void main(String args[]) throws Throwable { 76 new TestUseCountTrailingZerosInstructionOnSupportedCPU().test(); 77 } 78 } 79 | 42 43 public class TestUseCountTrailingZerosInstructionOnSupportedCPU 44 extends BMISupportedCPUTest { 45 private static final String DISABLE_BMI = "-XX:-UseBMI1Instructions"; 46 47 public TestUseCountTrailingZerosInstructionOnSupportedCPU() { 48 super("UseCountTrailingZerosInstruction", TZCNT_WARNING, "bmi1"); 49 } 50 51 @Override 52 public void runTestCases() throws Throwable { 53 54 super.runTestCases(); 55 56 /* 57 Verify that option will be disabled if all BMI1 instructions 58 are explicitly disabled. VM will be launched with following options: 59 -XX:-UseBMI1Instructions -version 60 */ 61 CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false", 62 "Option 'UseCountTrailingZerosInstruction' should have " 63 + "'false' value if all BMI1 instructions are explicitly" 64 + " disabled (-XX:-UseBMI1Instructions flag used)", 65 TestUseCountTrailingZerosInstructionOnSupportedCPU.DISABLE_BMI); 66 67 /* 68 Verify that option could be turned on even if other BMI1 69 instructions were turned off. VM will be launched with following 70 options: -XX:-UseBMI1Instructions 71 -XX:+UseCountTrailingZerosInstruction -version 72 */ 73 CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "true", 74 "Option 'UseCountTrailingZerosInstruction' should be able to " 75 + "be turned on even if all BMI1 instructions are " 76 + "disabled (-XX:-UseBMI1Instructions flag used)", 77 TestUseCountTrailingZerosInstructionOnSupportedCPU.DISABLE_BMI, 78 CommandLineOptionTest.prepareBooleanFlag(optionName, true)); 79 } 80 81 public static void main(String args[]) throws Throwable { 82 new TestUseCountTrailingZerosInstructionOnSupportedCPU().test(); 83 } 84 } 85 |