Lines Matching refs:i
37 for (int i = 0; i < 128; i++) in add()
38 a[i] += x; in add()
50 for (int i = 0; i < 128; i++) in sub()
51 a[i] -= x; in sub()
63 for (int i = 0; i < 128; i++) in mul()
64 a[i] *= x; in mul()
77 for (int i = 0; i < 128; i++) in div()
78 a[i] /= x; in div()
90 for (int i = 0; i < 128; i++) in neg()
91 a[i] = (short) -a[i]; in neg()
103 for (int i = 0; i < 128; i++) in not()
104 a[i] = (short) ~a[i]; in not()
116 for (int i = 0; i < 128; i++) in shl4()
117 a[i] <<= 4; in shl4()
129 for (int i = 0; i < 128; i++) in sar2()
130 a[i] >>= 2; in sar2()
141 for (int i = 0; i < 128; i++) in shr2()
142 a[i] >>>= 2; in shr2()
150 for (int i = 0; i < 128; i++) in sar31()
151 a[i] >>= 31; in sar31()
155 for (int i = 0; i < 128; i++) in shr31()
156 a[i] >>>= 31; in shr31()
160 for (int i = 0; i < 128; i++) in shr32()
161 a[i] >>>= 32; // 0, since & 31 in shr32()
166 for (int i = 0; i < 128; i++) in shr33()
167 a[i] >>>= 33; // 1, since & 31 in shr33()
175 for (int i = 1; i < 127; i++) in add()
176 a[i] += 11; in add()
186 for (int i = 0; i < 128; i++) { in main()
187 a[i] = (short) i; in main()
191 for (int i = 0; i < 128; i++) { in main()
192 expectEquals(i + 2, a[i], "add"); in main()
195 for (int i = 0; i < 128; i++) { in main()
196 expectEquals(i, a[i], "sub"); in main()
199 for (int i = 0; i < 128; i++) { in main()
200 expectEquals(i + i, a[i], "mul"); in main()
203 for (int i = 0; i < 128; i++) { in main()
204 expectEquals(i, a[i], "div"); in main()
207 for (int i = 0; i < 128; i++) { in main()
208 expectEquals(-i, a[i], "neg"); in main()
213 for (int i = 1; i < 127; i++) { in main()
214 expectEquals(11 - i, a[i], "bounds"); in main()
218 for (int i = 0; i < 128; i++) { in main()
219 a[i] = (short) 0xffff; in main()
222 for (int i = 0; i < 128; i++) { in main()
223 expectEquals((short) 0xfff0, a[i], "shl4"); in main()
226 for (int i = 0; i < 128; i++) { in main()
227 expectEquals((short) 0xfffc, a[i], "sar2"); in main()
230 for (int i = 0; i < 128; i++) { in main()
231 expectEquals((short) 0xffff, a[i], "shr2"); // sic! in main()
234 for (int i = 0; i < 128; i++) { in main()
235 expectEquals((short) 0xffff, a[i], "sar31"); in main()
238 for (int i = 0; i < 128; i++) { in main()
239 expectEquals(0x0001, a[i], "shr31"); in main()
240 a[i] = (short) 0x1200; // reset in main()
243 for (int i = 0; i < 128; i++) { in main()
244 expectEquals((short) 0x1200, a[i], "shr32"); in main()
247 for (int i = 0; i < 128; i++) { in main()
248 expectEquals((short) 0x0900, a[i], "shr33"); in main()
249 a[i] = (short) 0xf0f1; // reset in main()
252 for (int i = 0; i < 128; i++) { in main()
253 expectEquals((short) 0x0f0e, a[i], "not"); in main()