Path: blob/master/test/hotspot/jtreg/vmTestbase/jit/t/t031/t031.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/t031.27* VM Testbase keywords: [jit, quick]28*29* @library /vmTestbase30* /test/lib31* @run main/othervm jit.t.t031.t03132*/3334package jit.t.t031;3536import nsk.share.TestFailure;37import nsk.share.GoldChecker;383940// opc_fcmpg, opc_fcmpl4142public class t03143{44public static final GoldChecker goldChecker = new GoldChecker( "t031" );4546public static void main(String argv[])47{48float d = 1.0f, e = 0.5f;4950t031.goldChecker.println("d==" + d + " e==" + e);51if(d < e) t031.goldChecker.println("1l");52if(d > e) t031.goldChecker.println("2g");53if(e < d) t031.goldChecker.println("3l");54if(e > d) t031.goldChecker.println("4g");5556d *= 1e30f;57e /= 1e30f;5859t031.goldChecker.println("d==" + d + " e==" + e);60if(d < e) t031.goldChecker.println("1l");61if(d > e) t031.goldChecker.println("2g");62if(e < d) t031.goldChecker.println("3l");63if(e > d) t031.goldChecker.println("4g");6465d /= e;6667t031.goldChecker.println("d==" + d + " e==" + e);68if(d < e) t031.goldChecker.println("1l");69if(d > e) t031.goldChecker.println("2g");70if(e < d) t031.goldChecker.println("3l");71if(e > d) t031.goldChecker.println("4g");7273d = 0.0f/0.0f;7475t031.goldChecker.println("d==" + d + " e==" + e);76if(d < e) t031.goldChecker.println("1l");77if(d > e) t031.goldChecker.println("2g");78if(e < d) t031.goldChecker.println("3l");79if(e > d) t031.goldChecker.println("4g");8081t031.goldChecker.check();82}83}848586