5 #define LOAD_ADDRESS "dla"
7 #define LOAD_ADDRESS "la"
10 #define TESTINST1(label, instruction,TID, RD) \
12 unsigned int out = 0; \
15 ".set noreorder \n\t" \
16 "bal end31"#TID"\n\t" \
17 "move $" #RD ", $0 \n\t" \
19 "addiu $" #RD ", $" #RD", -1\n\t" \
21 "addiu $" #RD ", $" #RD", -1\n\t" \
23 "addiu $" #RD ", $" #RD", -1\n\t" \
25 "addiu $" #RD ", $" #RD", -1\n\t" \
27 "addiu $" #RD ", $" #RD", -1\n\t" \
28 "bal r_end"#TID "\n\t" \
31 instruction " " label #TID "\n\t" \
33 "addiu $" #RD ", $" #RD", 1\n\t" \
35 "addiu $" #RD ", $" #RD", 1\n\t" \
37 "addiu $" #RD ", $" #RD", 1\n\t" \
39 "addiu $" #RD ", $" #RD", 1\n\t" \
41 "addiu $" #RD ", $" #RD", 1\n\t" \
43 "move %0, $" #RD "\n\t" \
47 : #RD, "cc", "memory" \
49 printf(instruction" :: %x, RSval: %x\n", \
53 #define TESTINST2(instruction, RDval, RSval, RD, RS) \
55 unsigned int out = 0; \
57 "move $" #RD ", %2\n\t" \
58 "move $" #RS ", %1\n\t" \
59 instruction" $" #RS ", end21"instruction#RDval"\n\t" \
61 "addiu $" #RD ", $" #RD", 5\n\t" \
62 "b r_end"instruction#RDval"\n\t" \
64 "end21"instruction#RDval":\n\t" \
65 "addiu $" #RD ", $" #RD", 1\n\t" \
67 "r_end"instruction#RDval":\n\t" \
68 "move %0, $" #RD "\n\t" \
70 : "r" (RSval), "r" (RDval) \
71 : #RD, #RS, "cc", "memory" \
73 printf(instruction" :: %x, RSval: %x\n", \
77 #define TESTINST3(instruction, RDval, RSval, RD, RS) \
79 unsigned int out = 0; \
81 "move $" #RS ", %1\n\t" \
82 "move $" #RD ", %2\n\t" \
83 instruction" $" #RS ", end"instruction#RDval"\n\t" \
85 "addiu $" #RD ", $" #RD", 5\n\t" \
86 "end"instruction#RDval":\n\t" \
87 "addiu $" #RD ", $" #RD", 1\n\t" \
88 "move %0, $" #RD "\n\t" \
90 : "r" (RSval), "r" (RDval) \
91 : #RD, #RS, "cc", "memory" \
93 printf(instruction" :: %x, RSval: %x\n", \
97 #define TESTINST4(instruction, RDval, RSval, RTval, RD, RS, RT) \
99 unsigned int out = 0; \
101 "move $" #RS ", %1\n\t" \
102 "move $" #RT ", %2\n\t" \
103 "move $" #RD ", %3\n\t" \
104 instruction" $" #RS ", $" #RT ", end"instruction#RDval"\n\t" \
106 "addiu $" #RD ", $" #RD", 5\n\t" \
107 "end"instruction#RDval":\n\t" \
108 "addiu $" #RD ", $" #RD", 1\n\t" \
109 "move %0, $" #RD "\n\t" \
111 : "r" (RSval), "r" (RTval), "r" (RDval) \
112 : #RD, #RS, #RT, "cc", "memory" \
114 printf(instruction" :: %x, RSval: %x, RTval: %x\n", \
115 out, RSval, RTval); \
118 #define TESTINST3ja(instruction, RSval, RD) \
120 unsigned int out = 0; \
121 unsigned int out1 = 0; \
122 unsigned int out2 = 0; \
124 "move $" #RD ", %3\n\t" \
125 LOAD_ADDRESS " $t0, r_end"instruction#RSval"\n\t" \
126 LOAD_ADDRESS " $t1, end"instruction#RSval "\n\t" \
127 instruction " $t0, "#RSval"\n\t" \
128 "end"instruction#RSval":\n\t" \
129 "addiu $" #RD ", $" #RD", 100\n\t" \
131 "r_end"instruction#RSval":\n\t" \
132 "addiu $" #RD ", $" #RD", 1\n\t" \
133 "move %0, $" #RD "\n\t" \
134 "move %1, $t1 \n\t" \
135 "move %2, $ra \n\t" \
136 : "=&r" (out), "=&r" (out1), "=&r" (out2) \
138 : #RD, "t0", "t1", "ra", "cc", "memory" \
140 printf(instruction ":: %x, RSval: %x, $t1 == $ra: %x\n", \
141 out, RSval, (out1 == out2)); \
146 #if (__mips_isa_rev>=6)
148 TESTINST1("end12", "balc", 0, v0
);
149 TESTINST1("end13", "balc", 1, v0
);
150 TESTINST1("end14", "balc", 2, v0
);
151 TESTINST1("end15", "balc", 3, v0
);
152 TESTINST1("end16", "balc", 4, v0
);
153 TESTINST1("end21", "balc", 5, v0
);
154 TESTINST1("end22", "balc", 6, v0
);
155 TESTINST1("end23", "balc", 7, v0
);
156 TESTINST1("end24", "balc", 8, v0
);
157 TESTINST1("end25", "balc", 9, v0
);
160 TESTINST1("end12", "bc", 10, v0
);
161 TESTINST1("end13", "bc", 11, v0
);
162 TESTINST1("end14", "bc", 12, v0
);
163 TESTINST1("end15", "bc", 13, v0
);
164 TESTINST1("end16", "bc", 14, v0
);
165 TESTINST1("end21", "bc", 15, v0
);
166 TESTINST1("end22", "bc", 16, v0
);
167 TESTINST1("end23", "bc", 17, v0
);
168 TESTINST1("end24", "bc", 18, v0
);
169 TESTINST1("end25", "bc", 19, v0
);
172 TESTINST2("bgezalc", 0, 0, v0
, v1
);
173 TESTINST2("bgezalc", 1, 1, v1
, a0
);
174 TESTINST2("bgezalc", 2, 0xffffffff, a0
, a1
);
175 TESTINST2("bgezalc", 3, 0xffffffff, a1
, a2
);
176 TESTINST2("bgezalc", 4, 0xfffffffe, a2
, t0
);
177 TESTINST2("bgezalc", 5, 0xffffffff, a3
, t0
);
178 TESTINST2("bgezalc", 6, 0x5, t0
, t1
);
179 TESTINST2("bgezalc", 7, -3, t1
, t2
);
180 TESTINST2("bgezalc", 8, 125, t2
, t3
);
181 TESTINST2("bgezalc", 9, 0x80000000, t3
, 12);
182 TESTINST2("bgezalc", 10, 0xffffffff, 12, 13);
183 TESTINST2("bgezalc", 11, 0x256, 13, 14);
184 TESTINST2("bgezalc", 12, 0x55, 14, 15);
185 TESTINST2("bgezalc", 13, 0xfff, s0
, s1
);
186 TESTINST2("bgezalc", 14, -1, v0
, t9
);
187 TESTINST2("bgezalc", 15, -1, t9
, t8
);
190 TESTINST2("bgtzalc", 0, 0, v0
, v1
);
191 TESTINST2("bgtzalc", 1, 1, v1
, a0
);
192 TESTINST2("bgtzalc", 2, 0xffffffff, a0
, a1
);
193 TESTINST2("bgtzalc", 3, 0xffffffff, a1
, a2
);
194 TESTINST2("bgtzalc", 4, 0xfffffffe, a2
, t0
);
195 TESTINST2("bgtzalc", 5, 0xffffffff, a3
, t0
);
196 TESTINST2("bgtzalc", 6, 0x5, t0
, t1
);
197 TESTINST2("bgtzalc", 7, -3, t1
, t2
);
198 TESTINST2("bgtzalc", 8, 125, t2
, t3
);
199 TESTINST2("bgtzalc", 9, 0x80000000, t3
, 12);
200 TESTINST2("bgtzalc", 10, 0xffffffff, 12, 13);
201 TESTINST2("bgtzalc", 11, 0x256, 13, 14);
202 TESTINST2("bgtzalc", 12, 0x55, 14, 15);
203 TESTINST2("bgtzalc", 13, 0xfff, s0
, s1
);
204 TESTINST2("bgtzalc", 14, -1, v0
, t9
);
205 TESTINST2("bgtzalc", 15, -1, t9
, t8
);
208 TESTINST2("blezalc", 0, 0, v0
, v1
);
209 TESTINST2("blezalc", 1, 1, v1
, a0
);
210 TESTINST2("blezalc", 2, 0xffffffff, a0
, a1
);
211 TESTINST2("blezalc", 3, 0xffffffff, a1
, a2
);
212 TESTINST2("blezalc", 4, 0xfffffffe, a2
, t0
);
213 TESTINST2("blezalc", 5, 0xffffffff, a3
, t0
);
214 TESTINST2("blezalc", 6, 0x5, t0
, t1
);
215 TESTINST2("blezalc", 7, -3, t1
, t2
);
216 TESTINST2("blezalc", 8, 125, t2
, t3
);
217 TESTINST2("blezalc", 9, 0x80000000, t3
, 12);
218 TESTINST2("blezalc", 10, 0xffffffff, 12, 13);
219 TESTINST2("blezalc", 11, 0x256, 13, 14);
220 TESTINST2("blezalc", 12, 0x55, 14, 15);
221 TESTINST2("blezalc", 13, 0xfff, s0
, s1
);
222 TESTINST2("blezalc", 14, -1, v0
, t9
);
223 TESTINST2("blezalc", 15, -1, t9
, t8
);
226 TESTINST2("bltzalc", 0, 0, v0
, v1
);
227 TESTINST2("bltzalc", 1, 1, v1
, a0
);
228 TESTINST2("bltzalc", 2, 0xffffffff, a0
, a1
);
229 TESTINST2("bltzalc", 3, 0xffffffff, a1
, a2
);
230 TESTINST2("bltzalc", 4, 0xfffffffe, a2
, t0
);
231 TESTINST2("bltzalc", 5, 0xffffffff, a3
, t0
);
232 TESTINST2("bltzalc", 6, 0x5, t0
, t1
);
233 TESTINST2("bltzalc", 7, -3, t1
, t2
);
234 TESTINST2("bltzalc", 8, 125, t2
, t3
);
235 TESTINST2("bltzalc", 9, 0x80000000, t3
, 12);
236 TESTINST2("bltzalc", 10, 0xffffffff, 12, 13);
237 TESTINST2("bltzalc", 11, 0x256, 13, 14);
238 TESTINST2("bltzalc", 12, 0x55, 14, 15);
239 TESTINST2("bltzalc", 13, 0xfff, s0
, s1
);
240 TESTINST2("bltzalc", 14, -1, v0
, t9
);
241 TESTINST2("bltzalc", 15, -1, t9
, t8
);
244 TESTINST2("beqzalc", 0, 0, v0
, v1
);
245 TESTINST2("beqzalc", 1, 1, v1
, a0
);
246 TESTINST2("beqzalc", 2, 0xffffffff, a0
, a1
);
247 TESTINST2("beqzalc", 3, 0xffffffff, a1
, a2
);
248 TESTINST2("beqzalc", 4, 0xfffffffe, a2
, t0
);
249 TESTINST2("beqzalc", 5, 0xffffffff, a3
, t0
);
250 TESTINST2("beqzalc", 6, 0x5, t0
, t1
);
251 TESTINST2("beqzalc", 7, -3, t1
, t2
);
252 TESTINST2("beqzalc", 8, 125, t2
, t3
);
253 TESTINST2("beqzalc", 9, 0x80000000, t3
, 12);
254 TESTINST2("beqzalc", 10, 0xffffffff, 12, 13);
255 TESTINST2("beqzalc", 11, 0x256, 13, 14);
256 TESTINST2("beqzalc", 12, 0x55, 14, 15);
257 TESTINST2("beqzalc", 13, 0xfff, s0
, s1
);
258 TESTINST2("beqzalc", 14, -1, v0
, t9
);
259 TESTINST2("beqzalc", 15, -1, t9
, t8
);
262 TESTINST2("bnezalc", 0, 0, v0
, v1
);
263 TESTINST2("bnezalc", 1, 1, v1
, a0
);
264 TESTINST2("bnezalc", 2, 0xffffffff, a0
, a1
);
265 TESTINST2("bnezalc", 3, 0xffffffff, a1
, a2
);
266 TESTINST2("bnezalc", 4, 0xfffffffe, a2
, t0
);
267 TESTINST2("bnezalc", 5, 0xffffffff, a3
, t0
);
268 TESTINST2("bnezalc", 6, 0x5, t0
, t1
);
269 TESTINST2("bnezalc", 7, -3, t1
, t2
);
270 TESTINST2("bnezalc", 8, 125, t2
, t3
);
271 TESTINST2("bnezalc", 9, 0x80000000, t3
, 12);
272 TESTINST2("bnezalc", 10, 0xffffffff, 12, 13);
273 TESTINST2("bnezalc", 11, 0x256, 13, 14);
274 TESTINST2("bnezalc", 12, 0x55, 14, 15);
275 TESTINST2("bnezalc", 13, 0xfff, s0
, s1
);
276 TESTINST2("bnezalc", 14, -1, v0
, t9
);
277 TESTINST2("bnezalc", 15, -1, t9
, t8
);
280 TESTINST3("blezc", 0, 0, v0
, v1
);
281 TESTINST3("blezc", 1, 1, v1
, a0
);
282 TESTINST3("blezc", 2, 0xffffffff, a0
, a1
);
283 TESTINST3("blezc", 3, 0xffffffff, a1
, a2
);
284 TESTINST3("blezc", 4, 0xfffffffe, a2
, t0
);
285 TESTINST3("blezc", 5, 0xffffffff, a3
, t0
);
286 TESTINST3("blezc", 6, 0x5, t0
, t1
);
287 TESTINST3("blezc", 7, -3, t1
, t2
);
288 TESTINST3("blezc", 8, 125, t2
, t3
);
289 TESTINST3("blezc", 9, 0x80000000, t3
, 12);
290 TESTINST3("blezc", 10, 0xffffffff, 12, 13);
291 TESTINST3("blezc", 11, 0x256, 13, 14);
292 TESTINST3("blezc", 12, 0x55, 14, 15);
293 TESTINST3("blezc", 13, 0xfff, s0
, s1
);
294 TESTINST3("blezc", 14, -1, v0
, t9
);
295 TESTINST3("blezc", 15, -1, t9
, t8
);
298 TESTINST3("bgezc", 0, 0, v0
, v1
);
299 TESTINST3("bgezc", 1, 1, v1
, a0
);
300 TESTINST3("bgezc", 2, 0xffffffff, a0
, a1
);
301 TESTINST3("bgezc", 3, 0xffffffff, a1
, a2
);
302 TESTINST3("bgezc", 4, 0xfffffffe, a2
, t0
);
303 TESTINST3("bgezc", 5, 0xffffffff, a3
, t0
);
304 TESTINST3("bgezc", 6, 0x5, t0
, t1
);
305 TESTINST3("bgezc", 7, -3, t1
, t2
);
306 TESTINST3("bgezc", 8, 125, t2
, t3
);
307 TESTINST3("bgezc", 9, 0x80000000, t3
, 12);
308 TESTINST3("bgezc", 10, 0xffffffff, 12, 13);
309 TESTINST3("bgezc", 11, 0x256, 13, 14);
310 TESTINST3("bgezc", 12, 0x55, 14, 15);
311 TESTINST3("bgezc", 13, 0xfff, s0
, s1
);
312 TESTINST3("bgezc", 14, -1, v0
, t9
);
313 TESTINST3("bgezc", 15, -1, t9
, t8
);
316 TESTINST3("bgtzc", 0, 0, v0
, v1
);
317 TESTINST3("bgtzc", 1, 1, v1
, a0
);
318 TESTINST3("bgtzc", 2, 0xffffffff, a0
, a1
);
319 TESTINST3("bgtzc", 3, 0xffffffff, a1
, a2
);
320 TESTINST3("bgtzc", 4, 0xfffffffe, a2
, t0
);
321 TESTINST3("bgtzc", 5, 0xffffffff, a3
, t0
);
322 TESTINST3("bgtzc", 6, 0x5, t0
, t1
);
323 TESTINST3("bgtzc", 7, -3, t1
, t2
);
324 TESTINST3("bgtzc", 8, 125, t2
, t3
);
325 TESTINST3("bgtzc", 9, 0x80000000, t3
, 12);
326 TESTINST3("bgtzc", 10, 0xffffffff, 12, 13);
327 TESTINST3("bgtzc", 11, 0x256, 13, 14);
328 TESTINST3("bgtzc", 12, 0x55, 14, 15);
329 TESTINST3("bgtzc", 13, 0xfff, s0
, s1
);
330 TESTINST3("bgtzc", 14, -1, v0
, t9
);
331 TESTINST3("bgtzc", 15, -1, t9
, t8
);
334 TESTINST4("bgec", 0, 0, 1, v0
, v1
, a0
);
335 TESTINST4("bgec", 1, 1, 1, v1
, a0
, a1
);
336 TESTINST4("bgec", 2, 0xffffffff, 0xffffffff, a0
, a1
, a2
);
337 TESTINST4("bgec", 3, 0xffffffff, 0xfffffffe, a1
, a2
, a3
);
338 TESTINST4("bgec", 4, 0xfffffffe, 0xffffffff, a2
, t0
, t1
);
339 TESTINST4("bgec", 5, 0xffffffff, 0xffffffff, a3
, t0
, t1
);
340 TESTINST4("bgec", 6, 0x5, 0x5, t0
, t1
, t2
);
341 TESTINST4("bgec", 7, -3, -4, t1
, t2
, t3
);
342 TESTINST4("bgec", 8, 125, 125, t2
, t3
, 12);
343 TESTINST4("bgec", 9, 0x80000000, 0x80000000, t3
, 12, 13);
344 TESTINST4("bgec", 10, 0xffffffff, 0x80000000, 12, 13, 14);
345 TESTINST4("bgec", 11, 0x256, 0x256, 13, 14, 15);
346 TESTINST4("bgec", 12, 0x55, 0x55, 14, 15, s0
);
347 TESTINST4("bgec", 13, 0xfff, 0xdd, s0
, s1
, s2
);
348 TESTINST4("bgec", 14, -1, 0x5, v0
, t9
, t8
);
349 TESTINST4("bgec", 15, -1, -1, t9
, t8
, a3
);
352 TESTINST4("bltc", 0, 0, 1, v0
, v1
, a0
);
353 TESTINST4("bltc", 1, 1, 1, v1
, a0
, a1
);
354 TESTINST4("bltc", 2, 0xffffffff, 0xffffffff, a0
, a1
, a2
);
355 TESTINST4("bltc", 3, 0xffffffff, 0xfffffffe, a1
, a2
, a3
);
356 TESTINST4("bltc", 4, 0xfffffffe, 0xffffffff, a2
, t0
, t1
);
357 TESTINST4("bltc", 5, 0xffffffff, 0xffffffff, a3
, t0
, t1
);
358 TESTINST4("bltc", 6, 0x5, 0x5, t0
, t1
, t2
);
359 TESTINST4("bltc", 7, -3, -4, t1
, t2
, t3
);
360 TESTINST4("bltc", 8, 125, 125, t2
, t3
, 12);
361 TESTINST4("bltc", 9, 0x80000000, 0x80000000, t3
, 12, 13);
362 TESTINST4("bltc", 10, 0xffffffff, 0x80000000, 12, 13, 14);
363 TESTINST4("bltc", 11, 0x256, 0x256, 13, 14, 15);
364 TESTINST4("bltc", 12, 0x55, 0x55, 14, 15, s0
);
365 TESTINST4("bltc", 13, 0xfff, 0xdd, s0
, s1
, s2
);
366 TESTINST4("bltc", 14, -1, 0x5, v0
, t9
, t8
);
367 TESTINST4("bltc", 15, -1, -1, t9
, t8
, a3
);
370 TESTINST3("bltzc", 0, 0, v0
, v1
);
371 TESTINST3("bltzc", 1, 1, v1
, a0
);
372 TESTINST3("bltzc", 2, 0xffffffff, a0
, a1
);
373 TESTINST3("bltzc", 3, 0xffffffff, a1
, a2
);
374 TESTINST3("bltzc", 4, 0xfffffffe, a2
, t0
);
375 TESTINST3("bltzc", 5, 0xffffffff, a3
, t0
);
376 TESTINST3("bltzc", 6, 0x5, t0
, t1
);
377 TESTINST3("bltzc", 7, -3, t1
, t2
);
378 TESTINST3("bltzc", 8, 125, t2
, t3
);
379 TESTINST3("bltzc", 9, 0x80000000, t3
, 12);
380 TESTINST3("bltzc", 10, 0xffffffff, 12, 13);
381 TESTINST3("bltzc", 11, 0x256, 13, 14);
382 TESTINST3("bltzc", 12, 0x55, 14, 15);
383 TESTINST3("bltzc", 13, 0xfff, s0
, s1
);
384 TESTINST3("bltzc", 14, -1, v0
, t9
);
385 TESTINST3("bltzc", 15, -1, t9
, t8
);
388 TESTINST4("bgeuc", 0, 0, 1, v0
, v1
, a0
);
389 TESTINST4("bgeuc", 1, 1, 1, v1
, a0
, a1
);
390 TESTINST4("bgeuc", 2, 0xffffffff, 0xffffffff, a0
, a1
, a2
);
391 TESTINST4("bgeuc", 3, 0xffffffff, 0xfffffffe, a1
, a2
, a3
);
392 TESTINST4("bgeuc", 4, 0xfffffffe, 0xffffffff, a2
, t0
, t1
);
393 TESTINST4("bgeuc", 5, 0xffffffff, 0xffffffff, a3
, t0
, t1
);
394 TESTINST4("bgeuc", 6, 0x5, 0x5, t0
, t1
, t2
);
395 TESTINST4("bgeuc", 7, -3, -4, t1
, t2
, t3
);
396 TESTINST4("bgeuc", 8, 125, 125, t2
, t3
, 12);
397 TESTINST4("bgeuc", 9, 0x80000000, 0x80000000, t3
, 12, 13);
398 TESTINST4("bgeuc", 10, 0xffffffff, 0x80000000, 12, 13, 14);
399 TESTINST4("bgeuc", 11, 0x256, 0x256, 13, 14, 15);
400 TESTINST4("bgeuc", 12, 0x55, 0x55, 14, 15, s0
);
401 TESTINST4("bgeuc", 13, 0xfff, 0xdd, s0
, s1
, s2
);
402 TESTINST4("bgeuc", 14, -1, 0x5, v0
, t9
, t8
);
403 TESTINST4("bgeuc", 15, -1, -1, t9
, t8
, a3
);
406 TESTINST4("bltuc", 0, 0, 1, v0
, v1
, a0
);
407 TESTINST4("bltuc", 1, 1, 1, v1
, a0
, a1
);
408 TESTINST4("bltuc", 2, 0xffffffff, 0xffffffff, a0
, a1
, a2
);
409 TESTINST4("bltuc", 3, 0xffffffff, 0xfffffffe, a1
, a2
, a3
);
410 TESTINST4("bltuc", 4, 0xfffffffe, 0xffffffff, a2
, t0
, t1
);
411 TESTINST4("bltuc", 5, 0xffffffff, 0xffffffff, a3
, t0
, t1
);
412 TESTINST4("bltuc", 6, 0x5, 0x5, t0
, t1
, t2
);
413 TESTINST4("bltuc", 7, -3, -4, t1
, t2
, t3
);
414 TESTINST4("bltuc", 8, 125, 125, t2
, t3
, 12);
415 TESTINST4("bltuc", 9, 0x80000000, 0x80000000, t3
, 12, 13);
416 TESTINST4("bltuc", 10, 0xffffffff, 0x80000000, 12, 13, 14);
417 TESTINST4("bltuc", 11, 0x256, 0x256, 13, 14, 15);
418 TESTINST4("bltuc", 12, 0x55, 0x55, 14, 15, s0
);
419 TESTINST4("bltuc", 13, 0xfff, 0xdd, s0
, s1
, s2
);
420 TESTINST4("bltuc", 14, -1, 0x5, v0
, t9
, t8
);
421 TESTINST4("bltuc", 15, -1, -1, t9
, t8
, a3
);
424 TESTINST4("beqc", 0, 0, 1, v0
, v1
, a0
);
425 TESTINST4("beqc", 1, 1, 1, v1
, a0
, a1
);
426 TESTINST4("beqc", 2, 0xffffffff, 0xffffffff, a0
, a1
, a2
);
427 TESTINST4("beqc", 3, 0xffffffff, 0xfffffffe, a1
, a2
, a3
);
428 TESTINST4("beqc", 4, 0xfffffffe, 0xffffffff, a2
, t0
, t1
);
429 TESTINST4("beqc", 5, 0xffffffff, 0xffffffff, a3
, t0
, t1
);
430 TESTINST4("beqc", 6, 0x5, 0x5, t0
, t1
, t2
);
431 TESTINST4("beqc", 7, -3, -4, t1
, t2
, t3
);
432 TESTINST4("beqc", 8, 125, 125, t2
, t3
, 12);
433 TESTINST4("beqc", 9, 0x80000000, 0x80000000, t3
, 12, 13);
434 TESTINST4("beqc", 10, 0xffffffff, 0x80000000, 12, 13, 14);
435 TESTINST4("beqc", 11, 0x256, 0x256, 13, 14, 15);
436 TESTINST4("beqc", 12, 0x55, 0x55, 14, 15, s0
);
437 TESTINST4("beqc", 13, 0xfff, 0xdd, s0
, s1
, s2
);
438 TESTINST4("beqc", 14, -1, 0x5, v0
, t9
, t8
);
439 TESTINST4("beqc", 15, -1, -1, t9
, t8
, a3
);
442 TESTINST4("bnec", 0, 0, 1, v0
, v1
, a0
);
443 TESTINST4("bnec", 1, 1, 1, v1
, a0
, a1
);
444 TESTINST4("bnec", 2, 0xffffffff, 0xffffffff, a0
, a1
, a2
);
445 TESTINST4("bnec", 3, 0xffffffff, 0xfffffffe, a1
, a2
, a3
);
446 TESTINST4("bnec", 4, 0xfffffffe, 0xffffffff, a2
, t0
, t1
);
447 TESTINST4("bnec", 5, 0xffffffff, 0xffffffff, a3
, t0
, t1
);
448 TESTINST4("bnec", 6, 0x5, 0x5, t0
, t1
, t2
);
449 TESTINST4("bnec", 7, -3, -4, t1
, t2
, t3
);
450 TESTINST4("bnec", 8, 125, 125, t2
, t3
, 12);
451 TESTINST4("bnec", 9, 0x80000000, 0x80000000, t3
, 12, 13);
452 TESTINST4("bnec", 10, 0xffffffff, 0x80000000, 12, 13, 14);
453 TESTINST4("bnec", 11, 0x256, 0x256, 13, 14, 15);
454 TESTINST4("bnec", 12, 0x55, 0x55, 14, 15, s0
);
455 TESTINST4("bnec", 13, 0xfff, 0xdd, s0
, s1
, s2
);
456 TESTINST4("bnec", 14, -1, 0x5, v0
, t9
, t8
);
457 TESTINST4("bnec", 15, -1, -1, t9
, t8
, a3
);
460 TESTINST3("beqzc", 0, 0, v0
, v1
);
461 TESTINST3("beqzc", 1, 1, v1
, a0
);
462 TESTINST3("beqzc", 2, 0xffffffff, a0
, a1
);
463 TESTINST3("beqzc", 3, 0xffffffff, a1
, a2
);
464 TESTINST3("beqzc", 4, 0xfffffffe, a2
, t0
);
465 TESTINST3("beqzc", 5, 0xffffffff, a3
, t0
);
466 TESTINST3("beqzc", 6, 0x5, t0
, t1
);
467 TESTINST3("beqzc", 7, -3, t1
, t2
);
468 TESTINST3("beqzc", 8, 125, t2
, t3
);
469 TESTINST3("beqzc", 9, 0x80000000, t3
, 12);
470 TESTINST3("beqzc", 10, 0xffffffff, 12, 13);
471 TESTINST3("beqzc", 11, 0x256, 13, 14);
472 TESTINST3("beqzc", 12, 0x55, 14, 15);
473 TESTINST3("beqzc", 13, 0xfff, s0
, s1
);
474 TESTINST3("beqzc", 14, -1, v0
, t9
);
475 TESTINST3("beqzc", 15, -1, t9
, t8
);
478 TESTINST3("bnezc", 0, 0, v0
, v1
);
479 TESTINST3("bnezc", 1, 1, v1
, a0
);
480 TESTINST3("bnezc", 2, 0xffffffff, a0
, a1
);
481 TESTINST3("bnezc", 3, 0xffffffff, a1
, a2
);
482 TESTINST3("bnezc", 4, 0xfffffffe, a2
, t0
);
483 TESTINST3("bnezc", 5, 0xffffffff, a3
, t0
);
484 TESTINST3("bnezc", 6, 0x5, t0
, t1
);
485 TESTINST3("bnezc", 7, -3, t1
, t2
);
486 TESTINST3("bnezc", 8, 125, t2
, t3
);
487 TESTINST3("bnezc", 9, 0x80000000, t3
, 12);
488 TESTINST3("bnezc", 10, 0xffffffff, 12, 13);
489 TESTINST3("bnezc", 11, 0x256, 13, 14);
490 TESTINST3("bnezc", 12, 0x55, 14, 15);
491 TESTINST3("bnezc", 13, 0xfff, s0
, s1
);
492 TESTINST3("bnezc", 14, -1, v0
, t9
);
493 TESTINST3("bnezc", 15, -1, t9
, t8
);
496 TESTINST4("bovc", 0, 0, 1, v0
, v1
, a0
);
497 TESTINST4("bovc", 1, 1, 1, v1
, a0
, a1
);
498 TESTINST4("bovc", 2, 0xffffffff, 0xffffffff, a0
, a1
, a2
);
499 TESTINST4("bovc", 3, 0xffffffff, 0xfffffffe, a1
, a2
, a3
);
500 TESTINST4("bovc", 4, 0xfffffffe, 0xffffffff, a2
, t0
, t1
);
501 TESTINST4("bovc", 5, 0xffffffff, 0xffffffff, a3
, t0
, t1
);
502 TESTINST4("bovc", 6, 0x5, 0x5, t0
, t1
, t2
);
503 TESTINST4("bovc", 7, -3, -4, t1
, t2
, t3
);
504 TESTINST4("bovc", 8, 125, 125, t2
, t3
, 12);
505 TESTINST4("bovc", 9, 0x80000000, 0x80000000, t3
, 12, 13);
506 TESTINST4("bovc", 10, 0xffffffff, 0x80000000, 12, 13, 14);
507 TESTINST4("bovc", 11, 0x256, 0x256, 13, 14, 15);
508 TESTINST4("bovc", 12, 0x55, 0x55, 14, 15, s0
);
509 TESTINST4("bovc", 13, 0xfff, 0xdd, s0
, s1
, s2
);
510 TESTINST4("bovc", 14, -1, 0x5, v0
, t9
, t8
);
511 TESTINST4("bovc", 15, -1, -1, t9
, t8
, a3
);
514 TESTINST4("bnvc", 0, 0, 1, v0
, v1
, a0
);
515 TESTINST4("bnvc", 1, 1, 1, v1
, a0
, a1
);
516 TESTINST4("bnvc", 2, 0xffffffff, 0xffffffff, a0
, a1
, a2
);
517 TESTINST4("bnvc", 3, 0xffffffff, 0xfffffffe, a1
, a2
, a3
);
518 TESTINST4("bnvc", 4, 0xfffffffe, 0xffffffff, a2
, t0
, t1
);
519 TESTINST4("bnvc", 5, 0xffffffff, 0xffffffff, a3
, t0
, t1
);
520 TESTINST4("bnvc", 6, 0x5, 0x5, t0
, t1
, t2
);
521 TESTINST4("bnvc", 7, -3, -4, t1
, t2
, t3
);
522 TESTINST4("bnvc", 8, 125, 125, t2
, t3
, 12);
523 TESTINST4("bnvc", 9, 0x80000000, 0x80000000, t3
, 12, 13);
524 TESTINST4("bnvc", 10, 0xffffffff, 0x80000000, 12, 13, 14);
525 TESTINST4("bnvc", 11, 0x256, 0x256, 13, 14, 15);
526 TESTINST4("bnvc", 12, 0x55, 0x55, 14, 15, s0
);
527 TESTINST4("bnvc", 13, 0xfff, 0xdd, s0
, s1
, s2
);
528 TESTINST4("bnvc", 14, -1, 0x5, v0
, t9
, t8
);
529 TESTINST4("bnvc", 15, -1, -1, t9
, t8
, a3
);
532 TESTINST3ja("jialc", 0, v0
);
533 TESTINST3ja("jialc", 4, v0
);
534 TESTINST3ja("jialc", 8, v0
);
535 TESTINST3ja("jialc", 16, v0
);
536 TESTINST3ja("jialc", 32, v0
);
539 TESTINST3ja("jic", 0, v0
);
540 TESTINST3ja("jic", 4, v0
);
541 TESTINST3ja("jic", 8, v0
);
542 TESTINST3ja("jic", 16, v0
);
543 TESTINST3ja("jic", 32, v0
);
544 TESTINST3ja("jic", 64, v0
);