Path: blob/master/test/hotspot/jtreg/vmTestbase/jit/t/t034/t034.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/t034.27* VM Testbase keywords: [jit, quick]28*29* @library /vmTestbase30* /test/lib31* @run main/othervm jit.t.t034.t03432*/3334package jit.t.t034;3536import nsk.share.TestFailure;37import nsk.share.GoldChecker;3839// opc_idiv40// opc_imul41// opc_ishl42// opc_ishr43// opc_iushr44// opc_ladd45// opc_ldiv46// opc_lmul47// opc_lrem48// opc_lsub4950public class t03451{52public static final GoldChecker goldChecker = new GoldChecker( "t034" );5354public static void main(String argv[])55{56int i, j;57long l, m;5859i = 3;60j = 33;61l = 402;62m = 7;6364t034.goldChecker.println(i/j);65t034.goldChecker.println(i*j);66t034.goldChecker.println(i<<j);67t034.goldChecker.println(i>>j);68t034.goldChecker.println(i>>>j);69t034.goldChecker.println(l+m);70t034.goldChecker.println(l/m);71t034.goldChecker.println(l*m);72t034.goldChecker.println(l%m);73t034.goldChecker.println(l-m);7475i = -i;76l = -l;7778t034.goldChecker.println();79t034.goldChecker.println(i/j);80t034.goldChecker.println(i*j);81t034.goldChecker.println(i<<j);82t034.goldChecker.println(i>>j);83t034.goldChecker.println(i>>>j);84t034.goldChecker.println(l+m);85t034.goldChecker.println(l/m);86t034.goldChecker.println(l*m);87t034.goldChecker.println(l%m);88t034.goldChecker.println(l-m);8990t034.goldChecker.check();91}92}939495