annotate test/compiler/7192963/TestIntVect.java @ 18408:2c3666f44855

Truffle: initial commit of object API implementation
author Andreas Woess <andreas.woess@jku.at>
date Tue, 18 Nov 2014 23:19:43 +0100
parents 5af51c882207
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6619
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
1 /*
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
4 *
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
7 * published by the Free Software Foundation.
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
8 *
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
13 * accompanied this code).
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
14 *
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
18 *
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
21 * questions.
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
22 *
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
23 */
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
24
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
25 /**
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
26 * @test
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
27 * @bug 7192963
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
28 * @summary assert(_in[req-1] == this) failed: Must pass arg count to 'new'
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
29 *
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
30 * @run main/othervm/timeout=400 -Xbatch -Xmx64m TestIntVect
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
31 */
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
32
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
33 public class TestIntVect {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
34 private static final int ARRLEN = 997;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
35 private static final int ITERS = 11000;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
36 public static void main(String args[]) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
37 System.out.println("Testing Integer vectors");
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
38 int errn = test();
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
39 if (errn > 0) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
40 System.err.println("FAILED: " + errn + " errors");
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
41 System.exit(97);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
42 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
43 System.out.println("PASSED");
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
44 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
45
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
46 static int test() {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
47 int[] a0 = new int[ARRLEN];
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
48 int[] a1 = new int[ARRLEN];
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
49 // Initialize
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
50 for (int i=0; i<ARRLEN; i++) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
51 a1[i] = i;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
52 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
53 System.out.println("Warmup");
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
54 for (int i=0; i<ITERS; i++) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
55 test_init(a0);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
56 test_addi(a0, a1);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
57 test_lsai(a0, a1);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
58 test_unrl_init(a0);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
59 test_unrl_addi(a0, a1);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
60 test_unrl_lsai(a0, a1);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
61 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
62 // Test and verify results
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
63 System.out.println("Verification");
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
64 int errn = 0;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
65 {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
66 test_init(a0);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
67 for (int i=0; i<ARRLEN; i++) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
68 errn += verify("test_init: ", i, a0[i], (i&3));
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
69 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
70 test_addi(a0, a1);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
71 for (int i=0; i<ARRLEN; i++) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
72 errn += verify("test_addi: ", i, a0[i], (i+(i&3)));
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
73 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
74 test_lsai(a0, a1);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
75 for (int i=0; i<ARRLEN; i++) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
76 errn += verify("test_lsai: ", i, a0[i], (i<<(i&3)));
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
77 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
78 test_unrl_init(a0);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
79 for (int i=0; i<ARRLEN; i++) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
80 errn += verify("test_unrl_init: ", i, a0[i], (i&3));
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
81 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
82 test_unrl_addi(a0, a1);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
83 for (int i=0; i<ARRLEN; i++) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
84 errn += verify("test_unrl_addi: ", i, a0[i], (i+(i&3)));
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
85 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
86 test_unrl_lsai(a0, a1);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
87 for (int i=0; i<ARRLEN; i++) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
88 errn += verify("test_unrl_lsai: ", i, a0[i], (i<<(i&3)));
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
89 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
90 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
91
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
92 if (errn > 0)
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
93 return errn;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
94
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
95 System.out.println("Time");
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
96 long start, end;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
97
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
98 start = System.currentTimeMillis();
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
99 for (int i=0; i<ITERS; i++) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
100 test_init(a0);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
101 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
102 end = System.currentTimeMillis();
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
103 System.out.println("test_init: " + (end - start));
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
104
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
105 start = System.currentTimeMillis();
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
106 for (int i=0; i<ITERS; i++) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
107 test_addi(a0, a1);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
108 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
109 end = System.currentTimeMillis();
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
110 System.out.println("test_addi: " + (end - start));
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
111
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
112 start = System.currentTimeMillis();
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
113 for (int i=0; i<ITERS; i++) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
114 test_lsai(a0, a1);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
115 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
116 end = System.currentTimeMillis();
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
117 System.out.println("test_lsai: " + (end - start));
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
118
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
119 start = System.currentTimeMillis();
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
120 for (int i=0; i<ITERS; i++) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
121 test_unrl_init(a0);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
122 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
123 end = System.currentTimeMillis();
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
124 System.out.println("test_unrl_init: " + (end - start));
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
125
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
126 start = System.currentTimeMillis();
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
127 for (int i=0; i<ITERS; i++) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
128 test_unrl_addi(a0, a1);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
129 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
130 end = System.currentTimeMillis();
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
131 System.out.println("test_unrl_addi: " + (end - start));
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
132
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
133 start = System.currentTimeMillis();
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
134 for (int i=0; i<ITERS; i++) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
135 test_unrl_lsai(a0, a1);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
136 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
137 end = System.currentTimeMillis();
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
138 System.out.println("test_unrl_lsai: " + (end - start));
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
139
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
140 return errn;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
141 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
142
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
143 static void test_init(int[] a0) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
144 for (int i = 0; i < a0.length; i+=1) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
145 a0[i] = (i&3);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
146 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
147 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
148 static void test_addi(int[] a0, int[] a1) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
149 for (int i = 0; i < a0.length; i+=1) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
150 a0[i] = a1[i]+(i&3);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
151 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
152 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
153 static void test_lsai(int[] a0, int[] a1) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
154 for (int i = 0; i < a0.length; i+=1) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
155 a0[i] = a1[i]<<(i&3);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
156 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
157 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
158 static void test_unrl_init(int[] a0) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
159 int i = 0;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
160 for (; i < a0.length-4; i+=4) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
161 a0[i+0] = 0;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
162 a0[i+1] = 1;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
163 a0[i+2] = 2;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
164 a0[i+3] = 3;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
165 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
166 for (; i < a0.length; i++) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
167 a0[i] = (i&3);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
168 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
169 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
170 static void test_unrl_addi(int[] a0, int[] a1) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
171 int i = 0;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
172 for (; i < a0.length-4; i+=4) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
173 a0[i+0] = a1[i+0]+0;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
174 a0[i+1] = a1[i+1]+1;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
175 a0[i+2] = a1[i+2]+2;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
176 a0[i+3] = a1[i+3]+3;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
177 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
178 for (; i < a0.length; i++) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
179 a0[i] = a1[i]+(i&3);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
180 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
181 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
182 static void test_unrl_lsai(int[] a0, int[] a1) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
183 int i = 0;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
184 for (; i < a0.length-4; i+=4) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
185 a0[i+0] = a1[i+0]<<0;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
186 a0[i+1] = a1[i+1]<<1;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
187 a0[i+2] = a1[i+2]<<2;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
188 a0[i+3] = a1[i+3]<<3;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
189 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
190 for (; i < a0.length; i++) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
191 a0[i] = a1[i]<<(i&3);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
192 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
193 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
194
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
195 static int verify(String text, int i, int elem, int val) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
196 if (elem != val) {
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
197 System.err.println(text + "[" + i + "] = " + elem + " != " + val);
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
198 return 1;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
199 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
200 return 0;
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
201 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
202 }
5af51c882207 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
203