Path: blob/master/test/hotspot/jtreg/vmTestbase/jit/t/t006/t006.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/t/t006.27* VM Testbase keywords: [jit, quick]28*29* @library /vmTestbase30* /test/lib31* @run main/othervm jit.t.t006.t00632*/3334package jit.t.t006;3536import nsk.share.TestFailure;37import nsk.share.GoldChecker;3839public class t00640{41public static final GoldChecker goldChecker = new GoldChecker( "t006" );4243public static void main(String argv[])44{45long i = 0x87654321fedcba98l;46int i1, i31, i32, i63;47i1 = 1;48i31 = 31;49i32 = 32;50i63 = 63;5152t006.goldChecker.println(i >> 1);53t006.goldChecker.println(i >> 31);54t006.goldChecker.println(i >> 32);55t006.goldChecker.println(i >> 63);5657t006.goldChecker.println("");58t006.goldChecker.println(i << 1);59t006.goldChecker.println(i << 31);60t006.goldChecker.println(i << 32);61t006.goldChecker.println(i << 63);6263t006.goldChecker.println("");64t006.goldChecker.println(i >>> 1);65t006.goldChecker.println(i >>> 31);66t006.goldChecker.println(i >>> 32);67t006.goldChecker.println(i >>> 63);6869t006.goldChecker.println("");70t006.goldChecker.println(i >> i1);71t006.goldChecker.println(i >> i31);72t006.goldChecker.println(i >> i32);73t006.goldChecker.println(i >> i63);7475t006.goldChecker.println("");76t006.goldChecker.println(i << i1);77t006.goldChecker.println(i << i31);78t006.goldChecker.println(i << i32);79t006.goldChecker.println(i << i63);8081t006.goldChecker.println("");82t006.goldChecker.println(i >>> i1);83t006.goldChecker.println(i >>> i31);84t006.goldChecker.println(i >>> i32);85t006.goldChecker.println(i >>> i63);8687t006.goldChecker.check();88}89}909192