Mercurial > hg > graal-jvmci-8
annotate test/compiler/intrinsics/sha/sanity/TestSHA512Intrinsics.java @ 20428:4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
Reviewed-by: kvn, iignatyev
author | fzhinkin |
---|---|
date | Wed, 03 Sep 2014 15:26:06 +0400 |
parents | |
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-512 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 TestSHA512Intrinsics |
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_384.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:+UseSHA512Intrinsics |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
41 * -Dalgorithm=SHA-384 TestSHA512Intrinsics |
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_384.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:-UseSHA512Intrinsics |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
49 * -Dalgorithm=SHA-384 TestSHA512Intrinsics |
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_512.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:+UseSHA512Intrinsics |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
57 * -Dalgorithm=SHA-512 TestSHA512Intrinsics |
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_512.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:-UseSHA512Intrinsics |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
65 * -Dalgorithm=SHA-512 TestSHA512Intrinsics |
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_384.log positive_512.log |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
68 * negative_384.log negative_512.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 TestSHA512Intrinsics { |
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.SHA512_INTRINSICS_AVAILABLE, |
4d8781a35525
8055903: Develop sanity tests on SPARC's SHA instructions support
fzhinkin
parents:
diff
changeset
|
73 SHASanityTestBase.SHA512_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 } |