Path: blob/master/test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA512MultiBlockIntrinsics.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 multi block 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:+UseSHA512Intrinsics -XX:-UseMD5Intrinsics41* -XX:-UseSHA1Intrinsics -XX:-UseSHA256Intrinsics42* -Dalgorithm=SHA-38443* compiler.intrinsics.sha.sanity.TestSHA512MultiBlockIntrinsics44* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions45* -XX:+WhiteBoxAPI -Xbatch -XX:CompileThreshold=50046* -XX:Tier4InvocationThreshold=50047* -XX:+LogCompilation -XX:LogFile=positive_384_def.log48* -XX:CompileOnly=sun/security/provider/DigestBase49* -XX:CompileOnly=sun/security/provider/SHA550* -XX:+UseSHA512Intrinsics -Dalgorithm=SHA-38451* compiler.intrinsics.sha.sanity.TestSHA512MultiBlockIntrinsics52* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions53* -XX:+WhiteBoxAPI -Xbatch -XX:CompileThreshold=50054* -XX:Tier4InvocationThreshold=50055* -XX:+LogCompilation -XX:LogFile=negative_384.log56* -XX:CompileOnly=sun/security/provider/DigestBase57* -XX:CompileOnly=sun/security/provider/SHA5 -XX:-UseSHA58* -Dalgorithm=SHA-38459* compiler.intrinsics.sha.sanity.TestSHA1Intrinsics60* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions61* -XX:+WhiteBoxAPI -Xbatch -XX:CompileThreshold=50062* -XX:Tier4InvocationThreshold=50063* -XX:+LogCompilation -XX:LogFile=positive_512.log64* -XX:CompileOnly=sun/security/provider/DigestBase65* -XX:CompileOnly=sun/security/provider/SHA566* -XX:+UseSHA512Intrinsics -XX:-UseMD5Intrinsics67* -XX:-UseSHA1Intrinsics -XX:-UseSHA256Intrinsics68* -Dalgorithm=SHA-51269* compiler.intrinsics.sha.sanity.TestSHA512MultiBlockIntrinsics70* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions71* -XX:+WhiteBoxAPI -Xbatch -XX:CompileThreshold=50072* -XX:Tier4InvocationThreshold=50073* -XX:+LogCompilation -XX:LogFile=positive_512_def.log74* -XX:CompileOnly=sun/security/provider/DigestBase75* -XX:CompileOnly=sun/security/provider/SHA576* -XX:+UseSHA512Intrinsics -Dalgorithm=SHA-51277* compiler.intrinsics.sha.sanity.TestSHA512MultiBlockIntrinsics78* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions79* -XX:+WhiteBoxAPI -Xbatch -XX:CompileThreshold=50080* -XX:Tier4InvocationThreshold=50081* -XX:+LogCompilation -XX:LogFile=negative_512.log82* -XX:CompileOnly=sun/security/provider/DigestBase83* -XX:CompileOnly=sun/security/provider/SHA5 -XX:-UseSHA84* -Dalgorithm=SHA-51285* compiler.intrinsics.sha.sanity.TestSHA512MultiBlockIntrinsics86* @run main/othervm -DverificationStrategy=VERIFY_INTRINSIC_USAGE87* compiler.testlibrary.intrinsics.Verifier positive_384.log positive_512.log88* positive_384_def.log positive_512_def.log negative_384.log89* negative_512.log90*/9192package compiler.intrinsics.sha.sanity;9394import compiler.testlibrary.sha.predicate.IntrinsicPredicates;9596public class TestSHA512MultiBlockIntrinsics {97public static void main(String args[]) throws Exception {98new DigestSanityTestBase(IntrinsicPredicates.isSHA512IntrinsicAvailable(),99DigestSanityTestBase.MB_INTRINSIC_ID).test();100}101}102103104