LZcntTestL.java revision 6865:d5d005f1d973
1212793Sdim/* 2212793Sdim * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. 3212793Sdim * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4212793Sdim * 5212793Sdim * This code is free software; you can redistribute it and/or modify it 6212793Sdim * under the terms of the GNU General Public License version 2 only, as 7212793Sdim * published by the Free Software Foundation. 8212793Sdim * 9212793Sdim * This code is distributed in the hope that it will be useful, but WITHOUT 10212793Sdim * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11218893Sdim * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12218893Sdim * version 2 for more details (a copy is included in the LICENSE file that 13218893Sdim * accompanied this code). 14212793Sdim * 15212793Sdim * You should have received a copy of the GNU General Public License version 16212793Sdim * 2 along with this work; if not, write to the Free Software Foundation, 17212793Sdim * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18212793Sdim * 19212793Sdim * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20218893Sdim * or visit www.oracle.com if you need additional information or have any 21251662Sdim * questions. 22251662Sdim */ 23212793Sdim 24212793Sdim/* 25212793Sdim * @test 26212793Sdim * @bug 8031321 27212793Sdim * @library /testlibrary /testlibrary/whitebox /compiler/whitebox .. 28212793Sdim * @build LZcntTestL 29218893Sdim * @run main ClassFileInstaller sun.hotspot.WhiteBox 30218893Sdim * sun.hotspot.WhiteBox$WhiteBoxPermission 31218893Sdim * @run main/othervm -Xbootclasspath/a:. -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI 32218893Sdim * -XX:+IgnoreUnrecognizedVMOptions -XX:+UseCountLeadingZerosInstruction LZcntTestL 33218893Sdim */ 34218893Sdim 35212793Sdimimport java.lang.reflect.Method; 36218893Sdim 37218893Sdimpublic class LZcntTestL extends LZcntTestI { 38218893Sdim 39218893Sdim protected LZcntTestL(Method method) { 40218893Sdim super(method); 41218893Sdim isLongOperation = true; 42212793Sdim } 43218893Sdim 44218893Sdim public static void main(String[] args) throws Exception { 45218893Sdim // j.l.Integer and Long should be loaded to allow a compilation of the methods that use their methods 46212793Sdim System.out.println("classes java.lang.Long should be loaded. Proof: " + Long.class); 47212793Sdim BmiIntrinsicBase.verifyTestCase(LZcntTestL::new, TestLzcntL.LzcntLExpr.class.getDeclaredMethods()); 48218893Sdim } 49218893Sdim} 50212793Sdim