Mercurial > hg > truffle
annotate test/compiler/intrinsics/sha/sanity/TestSHA256Intrinsics.java @ 20601:86307d477907 jdk8u40-b13
Merge
author | amurillo |
---|---|
date | Mon, 03 Nov 2014 18:18:28 -0800 |
parents | 4d8781a35525 |
children |
rev | line source |
---|---|
20428
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
1 /* |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
4 * |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
8 * |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
13 * accompanied this code). |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
14 * |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
18 * |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
21 * questions. |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
22 */ |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
23 |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
24 import sha.predicate.IntrinsicPredicates; |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
25 |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
26 /** |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
27 * @test |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
28 * @bug 8035968 |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
29 * @summary Verify that SHA-256 intrinsic is actually used. |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
30 * @library /testlibrary /testlibrary/whitebox /compiler/testlibrary ../ |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
31 * @build TestSHA intrinsics.Verifier TestSHA256Intrinsics |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
32 * @run main ClassFileInstaller sun.hotspot.WhiteBox |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
33 * sun.hotspot.WhiteBox$WhiteBoxPermission |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
34 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
35 * -XX:+WhiteBoxAPI -Xbatch -XX:CompileThreshold=500 |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
36 * -XX:Tier4InvocationThreshold=500 |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
37 * -XX:+LogCompilation -XX:LogFile=positive_224.log |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
38 * -XX:CompileOnly=sun/security/provider/DigestBase |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
39 * -XX:CompileOnly=sun/security/provider/SHA |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
40 * -XX:+UseSHA256Intrinsics |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
41 * -Dalgorithm=SHA-224 TestSHA256Intrinsics |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
42 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
43 * -XX:+WhiteBoxAPI -Xbatch -XX:CompileThreshold=500 |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
44 * -XX:Tier4InvocationThreshold=500 |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
45 * -XX:+LogCompilation -XX:LogFile=negative_224.log |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
46 * -XX:CompileOnly=sun/security/provider/DigestBase |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
47 * -XX:CompileOnly=sun/security/provider/SHA |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
48 * -XX:-UseSHA256Intrinsics |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
49 * -Dalgorithm=SHA-224 TestSHA256Intrinsics |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
50 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
51 * -XX:+WhiteBoxAPI -Xbatch -XX:CompileThreshold=500 |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
52 * -XX:Tier4InvocationThreshold=500 |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
53 * -XX:+LogCompilation -XX:LogFile=positive_256.log |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
54 * -XX:CompileOnly=sun/security/provider/DigestBase |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
55 * -XX:CompileOnly=sun/security/provider/SHA |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
56 * -XX:+UseSHA256Intrinsics |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
57 * -Dalgorithm=SHA-256 TestSHA256Intrinsics |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
58 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
59 * -XX:+WhiteBoxAPI -Xbatch -XX:CompileThreshold=500 |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
60 * -XX:Tier4InvocationThreshold=500 |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
61 * -XX:+LogCompilation -XX:LogFile=negative_256.log |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
62 * -XX:CompileOnly=sun/security/provider/DigestBase |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
63 * -XX:CompileOnly=sun/security/provider/SHA |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
64 * -XX:-UseSHA256Intrinsics |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
65 * -Dalgorithm=SHA-256 TestSHA256Intrinsics |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
66 * @run main/othervm -DverificationStrategy=VERIFY_INTRINSIC_USAGE |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
67 * intrinsics.Verifier positive_224.log positive_256.log |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
68 * negative_224.log negative_256.log |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
69 */ |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
70 public class TestSHA256Intrinsics { |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
71 public static void main(String args[]) throws Exception { |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
72 new SHASanityTestBase(IntrinsicPredicates.SHA256_INTRINSICS_AVAILABLE, |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
73 SHASanityTestBase.SHA256_INTRINSIC_ID).test(); |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
74 } |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
75 } |