test/compiler/arguments/TestUseCountTrailingZerosInstructionOnUnsupportedCPU.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8038924 Cdiff test/compiler/arguments/TestUseCountTrailingZerosInstructionOnUnsupportedCPU.java

test/compiler/arguments/TestUseCountTrailingZerosInstructionOnUnsupportedCPU.java

Print this page
rev 6404 : 8038924: Test bit-instructions fails with unexpected exit value on sparc
Reviewed-by: kvn, iignatyev
Contributed-by: filipp.zhinkin@oracle.com

*** 23,33 **** /** * @test * @bug 8031321 * @summary Verify processing of UseCountTrailingZerosInstruction option ! * on CPU without TZCNT instuction (BMI1 feature) support. * @library /testlibrary /testlibrary/whitebox * @build TestUseCountTrailingZerosInstructionOnUnsupportedCPU * BMIUnsupportedCPUTest * @run main ClassFileInstaller sun.hotspot.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions --- 23,33 ---- /** * @test * @bug 8031321 * @summary Verify processing of UseCountTrailingZerosInstruction option ! * on CPU without TZCNT instruction (BMI1 feature) support. * @library /testlibrary /testlibrary/whitebox * @build TestUseCountTrailingZerosInstructionOnUnsupportedCPU * BMIUnsupportedCPUTest * @run main ClassFileInstaller sun.hotspot.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
*** 39,68 **** import com.oracle.java.testlibrary.*; import com.oracle.java.testlibrary.cli.*; public class TestUseCountTrailingZerosInstructionOnUnsupportedCPU extends BMIUnsupportedCPUTest { public TestUseCountTrailingZerosInstructionOnUnsupportedCPU() { super("UseCountTrailingZerosInstruction", TZCNT_WARNING, "bmi1"); } @Override public void unsupportedX86CPUTestCases() throws Throwable { super.unsupportedX86CPUTestCases(); ! // verify that option will not be turned on during ! // UseBMI1Instuctions processing ! CommandLineOptionTest. ! verifyOptionValue("UseCountTrailingZerosInstruction", "false", ! "-XX:+UseBMI1Instructions"); ! ! CommandLineOptionTest. ! verifyOptionValue("UseCountTrailingZerosInstruction", "false", ! "-XX:+UseCountTrailingZerosInstruction", ! "-XX:+UseBMI1Instructions"); } public static void main(String args[]) throws Throwable { new TestUseCountTrailingZerosInstructionOnUnsupportedCPU().test(); } --- 39,77 ---- import com.oracle.java.testlibrary.*; import com.oracle.java.testlibrary.cli.*; public class TestUseCountTrailingZerosInstructionOnUnsupportedCPU extends BMIUnsupportedCPUTest { + private static final String ENABLE_BMI = "-XX:+UseBMI1Instructions"; public TestUseCountTrailingZerosInstructionOnUnsupportedCPU() { super("UseCountTrailingZerosInstruction", TZCNT_WARNING, "bmi1"); } @Override public void unsupportedX86CPUTestCases() throws Throwable { super.unsupportedX86CPUTestCases(); ! /* ! Verify that option will not be turned on during UseBMI1Instructions ! processing. VM will be launched with following options: ! -XX:+UseBMI1Instructions -version ! */ ! CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false", ! TestUseCountTrailingZerosInstructionOnUnsupportedCPU. ! ENABLE_BMI); ! ! /* ! VM will be launched with following options: ! -XX:+UseCountTrailingZerosInstruction -XX:+UseBMI1Instructions ! -version ! */ ! CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false", ! CommandLineOptionTest.prepareBooleanFlag(optionName, true), ! TestUseCountTrailingZerosInstructionOnUnsupportedCPU. ! ENABLE_BMI); } public static void main(String args[]) throws Throwable { new TestUseCountTrailingZerosInstructionOnUnsupportedCPU().test(); }
test/compiler/arguments/TestUseCountTrailingZerosInstructionOnUnsupportedCPU.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File