42 43 public class TestUseCountTrailingZerosInstructionOnUnsupportedCPU 44 extends BMIUnsupportedCPUTest { 45 private static final String ENABLE_BMI = "-XX:+UseBMI1Instructions"; 46 47 public TestUseCountTrailingZerosInstructionOnUnsupportedCPU() { 48 super("UseCountTrailingZerosInstruction", TZCNT_WARNING, "bmi1"); 49 } 50 51 @Override 52 public void unsupportedX86CPUTestCases() throws Throwable { 53 54 super.unsupportedX86CPUTestCases(); 55 56 /* 57 Verify that option will not be turned on during UseBMI1Instructions 58 processing. VM will be launched with following options: 59 -XX:+UseBMI1Instructions -version 60 */ 61 CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false", 62 TestUseCountTrailingZerosInstructionOnUnsupportedCPU. 63 ENABLE_BMI); 64 65 /* 66 VM will be launched with following options: 67 -XX:+UseCountTrailingZerosInstruction -XX:+UseBMI1Instructions 68 -version 69 */ 70 CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false", 71 CommandLineOptionTest.prepareBooleanFlag(optionName, true), 72 TestUseCountTrailingZerosInstructionOnUnsupportedCPU. 73 ENABLE_BMI); 74 } 75 76 public static void main(String args[]) throws Throwable { 77 new TestUseCountTrailingZerosInstructionOnUnsupportedCPU().test(); 78 } 79 } 80 | 42 43 public class TestUseCountTrailingZerosInstructionOnUnsupportedCPU 44 extends BMIUnsupportedCPUTest { 45 private static final String ENABLE_BMI = "-XX:+UseBMI1Instructions"; 46 47 public TestUseCountTrailingZerosInstructionOnUnsupportedCPU() { 48 super("UseCountTrailingZerosInstruction", TZCNT_WARNING, "bmi1"); 49 } 50 51 @Override 52 public void unsupportedX86CPUTestCases() throws Throwable { 53 54 super.unsupportedX86CPUTestCases(); 55 56 /* 57 Verify that option will not be turned on during UseBMI1Instructions 58 processing. VM will be launched with following options: 59 -XX:+UseBMI1Instructions -version 60 */ 61 CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false", 62 "Feature bmi1 is not supported on current CPU. Option " 63 + "UseCountTrailingZerosInstruction should have 'false'" 64 + " value", 65 TestUseCountTrailingZerosInstructionOnUnsupportedCPU. 66 ENABLE_BMI); 67 68 /* 69 VM will be launched with following options: 70 -XX:+UseCountTrailingZerosInstruction -XX:+UseBMI1Instructions 71 -version 72 */ 73 CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false", 74 "Feature bmi1 is not supported on current CPU. Option " 75 + "UseCountTrailingZerosInstruction should have 'false'" 76 + " value", 77 CommandLineOptionTest.prepareBooleanFlag(optionName, true), 78 TestUseCountTrailingZerosInstructionOnUnsupportedCPU. 79 ENABLE_BMI); 80 } 81 82 public static void main(String args[]) throws Throwable { 83 new TestUseCountTrailingZerosInstructionOnUnsupportedCPU().test(); 84 } 85 } 86 |