Path: blob/master/test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA512Intrinsics.java
41161 views
/*1* Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223/**24* @test25* @bug 803596826* @summary Verify that SHA-512 intrinsic is actually used.27*28* @library /test/lib /29* @modules java.base/jdk.internal.misc30* java.management31*32* @build sun.hotspot.WhiteBox33* @run driver jdk.test.lib.helpers.ClassFileInstaller sun.hotspot.WhiteBox34* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions35* -XX:+WhiteBoxAPI -Xbatch -XX:CompileThreshold=50036* -XX:Tier4InvocationThreshold=50037* -XX:+LogCompilation -XX:LogFile=positive_384.log38* -XX:CompileOnly=sun/security/provider/DigestBase39* -XX:CompileOnly=sun/security/provider/SHA540* -XX:+UseSHA512Intrinsics41* -Dalgorithm=SHA-38442* compiler.intrinsics.sha.sanity.TestSHA512Intrinsics43* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions44* -XX:+WhiteBoxAPI -Xbatch -XX:CompileThreshold=50045* -XX:Tier4InvocationThreshold=50046* -XX:+LogCompilation -XX:LogFile=negative_384.log47* -XX:CompileOnly=sun/security/provider/DigestBase48* -XX:CompileOnly=sun/security/provider/SHA549* -XX:-UseSHA512Intrinsics50* -Dalgorithm=SHA-38451* compiler.intrinsics.sha.sanity.TestSHA512Intrinsics52* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions53* -XX:+WhiteBoxAPI -Xbatch -XX:CompileThreshold=50054* -XX:Tier4InvocationThreshold=50055* -XX:+LogCompilation -XX:LogFile=positive_512.log56* -XX:CompileOnly=sun/security/provider/DigestBase57* -XX:CompileOnly=sun/security/provider/SHA558* -XX:+UseSHA512Intrinsics59* -Dalgorithm=SHA-51260* compiler.intrinsics.sha.sanity.TestSHA512Intrinsics61* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions62* -XX:+WhiteBoxAPI -Xbatch -XX:CompileThreshold=50063* -XX:Tier4InvocationThreshold=50064* -XX:+LogCompilation -XX:LogFile=negative_512.log65* -XX:CompileOnly=sun/security/provider/DigestBase66* -XX:CompileOnly=sun/security/provider/SHA567* -XX:-UseSHA512Intrinsics68* -Dalgorithm=SHA-51269* compiler.intrinsics.sha.sanity.TestSHA512Intrinsics70* @run main/othervm -DverificationStrategy=VERIFY_INTRINSIC_USAGE71* compiler.testlibrary.intrinsics.Verifier positive_384.log positive_512.log72* negative_384.log negative_512.log73*/7475package compiler.intrinsics.sha.sanity;7677import compiler.testlibrary.sha.predicate.IntrinsicPredicates;7879public class TestSHA512Intrinsics {80public static void main(String args[]) throws Exception {81new DigestSanityTestBase(IntrinsicPredicates.isSHA512IntrinsicAvailable(),82DigestSanityTestBase.SHA512_INTRINSIC_ID).test();83}84}858687