Path: blob/master/test/hotspot/jtreg/vmTestbase/jit/misctests/t5/t5.java
40948 views
/*1* Copyright (c) 2008, 2020, 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*26* @summary converted from VM Testbase jit/misctests/t5.27* VM Testbase keywords: [jit, quick]28*29* @library /vmTestbase30* /test/lib31* @run main/othervm jit.misctests.t5.t532*/3334package jit.misctests.t5;3536import nsk.share.TestFailure;3738public class t539{40public static void main (String [] args)41{42byte[] data = new byte[16];43//foo (data, 0, 16, data, 0);44foo();4546}4748public static int FF (int a, int b, int c, int d, int x, int s, int ac)49{50return (((a += ((b & c) | (~b & d)) + x + ac) << s) | (a >>> (32-s))51+ b);52}5354//static void foo (byte[] data, int off, int len, byte[] to, int pos)55static void foo ()56{57System.out.println ("Starting foo ...");58int[] W = new int[16];5960int a = 0x67452301;61int b = 0xefcdab89;62int c = 0x98badcfe;63int d = 0x10325476;64for (int i = 0; i < 16; i++) {65a = FF (a, b, c, d, W[0], 7, 0xd76aa478);66d = FF (d, a, b, c, W[1], 12, 0xe8c7b756);67c = FF (c, d, a, b, W[2], 17, 0x242070db);68b = FF (b, c, d, a, W[3], 22, 0xc1bdceee);69a = FF (a, b, c, d, W[4], 7, 0xf57c0faf);70d = FF (d, a, b, c, W[5], 12, 0x4787c62a);71c = FF (c, d, a, b, W[6], 17, 0xa8304613);72b = FF (b, c, d, a, W[7], 22, 0xfd469501);73}74System.out.println ("foo ended.");75}76}777879