Path: blob/master/test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestMD5MultiBlockIntrinsics.java
41161 views
/*1* Copyright (c) 2020, 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 MD5 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.log38* -XX:CompileOnly=sun/security/provider/DigestBase39* -XX:CompileOnly=sun/security/provider/MD540* -XX:+UseMD5Intrinsics -XX:-UseSHA1Intrinsics41* -XX:-UseSHA256Intrinsics -XX:-UseSHA512Intrinsics42* -Dalgorithm=MD543* compiler.intrinsics.sha.sanity.TestMD5MultiBlockIntrinsics44* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions45* -XX:+WhiteBoxAPI -Xbatch -XX:CompileThreshold=50046* -XX:Tier4InvocationThreshold=50047* -XX:+LogCompilation -XX:LogFile=positive_def.log48* -XX:CompileOnly=sun/security/provider/DigestBase49* -XX:CompileOnly=sun/security/provider/MD550* -XX:+UseMD5Intrinsics -Dalgorithm=MD551* compiler.intrinsics.sha.sanity.TestMD5MultiBlockIntrinsics52* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions53* -XX:+WhiteBoxAPI -Xbatch -XX:CompileThreshold=50054* -XX:Tier4InvocationThreshold=50055* -XX:+LogCompilation -XX:LogFile=negative.log56* -XX:CompileOnly=sun/security/provider/DigestBase57* -XX:CompileOnly=sun/security/provider/MD558* -Dalgorithm=MD559* compiler.intrinsics.sha.sanity.TestMD5MultiBlockIntrinsics60* @run main/othervm -DverificationStrategy=VERIFY_INTRINSIC_USAGE61* compiler.testlibrary.intrinsics.Verifier positive.log positive_def.log62* negative.log63*/6465package compiler.intrinsics.sha.sanity;66import compiler.testlibrary.sha.predicate.IntrinsicPredicates;6768public class TestMD5MultiBlockIntrinsics {69public static void main(String args[]) throws Exception {70new DigestSanityTestBase(IntrinsicPredicates.isMD5IntrinsicAvailable(),71DigestSanityTestBase.MB_INTRINSIC_ID).test();72}73}747576