NegateExactIntTest.java revision 11707:ad7af1afda7a
1252190Srpaulo/*
2252190Srpaulo * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
3252190Srpaulo * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4252190Srpaulo *
5252190Srpaulo * This code is free software; you can redistribute it and/or modify it
6252190Srpaulo * under the terms of the GNU General Public License version 2 only, as
7252190Srpaulo * published by the Free Software Foundation.
8252190Srpaulo *
9252190Srpaulo * This code is distributed in the hope that it will be useful, but WITHOUT
10252190Srpaulo * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11252190Srpaulo * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12252190Srpaulo * version 2 for more details (a copy is included in the LICENSE file that
13252190Srpaulo * accompanied this code).
14252190Srpaulo *
15252190Srpaulo * You should have received a copy of the GNU General Public License version
16252190Srpaulo * 2 along with this work; if not, write to the Free Software Foundation,
17252190Srpaulo * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18252190Srpaulo *
19252190Srpaulo * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20252190Srpaulo * or visit www.oracle.com if you need additional information or have any
21252190Srpaulo * questions.
22252190Srpaulo */
23252190Srpaulo
24252190Srpaulo/*
25252190Srpaulo * @test
26252190Srpaulo * @library /testlibrary /test/lib /
27252190Srpaulo * @modules java.base/jdk.internal.misc
28252190Srpaulo *          java.management
29252190Srpaulo *
30252190Srpaulo * @build compiler.intrinsics.mathexact.sanity.NegateExactIntTest
31252190Srpaulo * @run driver ClassFileInstaller sun.hotspot.WhiteBox
32252190Srpaulo *                                sun.hotspot.WhiteBox$WhiteBoxPermission
33252190Srpaulo * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
34252190Srpaulo *                   -XX:+IgnoreUnrecognizedVMOptions -XX:+WhiteBoxAPI -XX:+LogCompilation
35252190Srpaulo *                   -XX:CompileCommand=compileonly,compiler.intrinsics.mathexact.sanity.MathIntrinsic*::execMathMethod
36252190Srpaulo *                   -XX:LogFile=hs_neg.log -XX:-UseMathExactIntrinsics
37252190Srpaulo *                   compiler.intrinsics.mathexact.sanity.NegateExactIntTest
38252190Srpaulo * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
39252190Srpaulo *                   -XX:+IgnoreUnrecognizedVMOptions -XX:+WhiteBoxAPI -XX:+LogCompilation
40252190Srpaulo *                   -XX:CompileCommand=compileonly,compiler.intrinsics.mathexact.sanity.MathIntrinsic*::execMathMethod
41252190Srpaulo *                   -XX:LogFile=hs.log -XX:+UseMathExactIntrinsics
42252190Srpaulo *                   compiler.intrinsics.mathexact.sanity.NegateExactIntTest
43252190Srpaulo * @run driver compiler.testlibrary.intrinsics.Verifier hs_neg.log hs.log
44252190Srpaulo */
45252190Srpaulo
46252190Srpaulopackage compiler.intrinsics.mathexact.sanity;
47252190Srpaulo
48252190Srpaulopublic class NegateExactIntTest {
49252190Srpaulo
50252190Srpaulo    public static void main(String[] args) throws Exception {
51252190Srpaulo        new IntrinsicBase.IntTest(MathIntrinsic.IntIntrinsic.Negate).test();
52252190Srpaulo    }
53252190Srpaulo}
54252190Srpaulo