author | iignatyev |
Fri, 01 Jun 2018 15:48:55 -0700 | |
changeset 50366 | 4d85990f9c4a |
permissions | -rw-r--r-- |
50366
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
1 |
/* |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
2 |
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
4 |
* |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
8 |
* |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
13 |
* accompanied this code). |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
14 |
* |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
18 |
* |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
21 |
* questions. |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
22 |
*/ |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
23 |
|
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
24 |
/* |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
25 |
* @test |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
26 |
* |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
27 |
* @summary converted from VM Testbase jit/t/t049. |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
28 |
* VM Testbase keywords: [jit, quick] |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
29 |
* |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
30 |
* @library /vmTestbase |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
31 |
* /test/lib |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
32 |
* @run driver jdk.test.lib.FileInstaller . . |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
33 |
* @build jit.t.t049.t049 |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
34 |
* @run driver ExecDriver --java jit.t.t049.t049 |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
35 |
*/ |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
36 |
|
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
37 |
package jit.t.t049; |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
38 |
|
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
39 |
import nsk.share.TestFailure; |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
40 |
import nsk.share.GoldChecker; |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
41 |
|
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
42 |
// Register jams and spills |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
43 |
|
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
44 |
class t049 |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
45 |
{ |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
46 |
public static final GoldChecker goldChecker = new GoldChecker( "t049" ); |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
47 |
|
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
48 |
static void intRems() |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
49 |
{ |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
50 |
int a, b, c, d, e, f, g, h, i, j, k, l, z; |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
51 |
|
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
52 |
a=1; b=2; c=3; d=4; e=5; f=6; g=7; h=8; i=9; j=10; k=11; l=12; |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
53 |
z = (a%b) % ((c%d) % ((e%f) % ((g%h) % ((i%j) % (k%l))))); |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
54 |
t049.goldChecker.println("Int: " + z); |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
55 |
} |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
56 |
|
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
57 |
static void longRems() |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
58 |
{ |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
59 |
long a, b, c, d, e, f, g, h, i, j, k, l, z; |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
60 |
|
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
61 |
a=1; b=2; c=3; d=4; e=5; f=6; g=7; h=8; i=9; j=10; k=11; l=12; |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
62 |
z = (a%b) % ((c%d) % ((e%f) % ((g%h) % ((i%j) % (k%l))))); |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
63 |
t049.goldChecker.println("Long: " + z); |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
64 |
} |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
65 |
|
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
66 |
static void floatRems() |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
67 |
{ |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
68 |
float a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, z; |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
69 |
|
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
70 |
a=1; b=2; c=3; d=4; e=5; f=6; g=7; h=8; i=9; j=10; k=11; l=12; |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
71 |
m=13; n=14; o=15; p=16; q=17; r=18; s=19; t=20; |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
72 |
z = (a%b) % ((c%d) % ((e%f) % ((g%h) % ((i%j) % ((k%l) % ((m%n) % |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
73 |
((o%p) % ((q%r) % (s%t))))))))); |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
74 |
t049.goldChecker.println("Float: " + z); |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
75 |
} |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
76 |
|
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
77 |
static void doubleRems() |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
78 |
{ |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
79 |
double a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, z; |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
80 |
|
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
81 |
a=1; b=2; c=3; d=4; e=5; f=6; g=7; h=8; i=9; j=10; k=11; l=12; |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
82 |
m=13; n=14; o=15; p=16; q=17; r=18; s=19; t=20; |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
83 |
z = (a%b) % ((c%d) % ((e%f) % ((g%h) % ((i%j) % ((k%l) % ((m%n) % |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
84 |
((o%p) % ((q%r) % (s%t))))))))); |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
85 |
t049.goldChecker.println("Double: " + z); |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
86 |
} |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
87 |
|
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
88 |
public static void main(String argv[]) |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
89 |
{ |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
90 |
intRems(); |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
91 |
longRems(); |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
92 |
floatRems(); |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
93 |
doubleRems(); |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
94 |
t049.goldChecker.check(); |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
95 |
} |
4d85990f9c4a
8202812: [TESTBUG] Open source VM testbase compiler tests
iignatyev
parents:
diff
changeset
|
96 |
} |