1 |
$Id: README,v 1.16 2005/03/05 12:40:17 debug Exp $ |
2 |
|
3 |
About GXemul's regression tests: |
4 |
-------------------------------- |
5 |
|
6 |
This is a framework for regression testing the emulator. Unfortunately I |
7 |
don't have the time or incentive to actually write the individual tests, |
8 |
but hopefully this README file should be enough to get someone who wishes |
9 |
to write tests started. |
10 |
|
11 |
The regression tests require a MIPS (cross-)compiler to be available. |
12 |
Please study Makefile.skel and ../configure for more information. |
13 |
|
14 |
Adding a new test is done by writing an assembly language file called |
15 |
test_X.S, where X is the name of the test. test_X.good is a file which |
16 |
contains the wanted output. |
17 |
|
18 |
The code in test_common.c calls a function called testmain() in each test |
19 |
(which should be written to conform to a 64-bit ABI calling model, and |
20 |
return an int value) and prints the return value in hex. If a test wants |
21 |
to check more than one int, then it may call printhex() and printstr() |
22 |
manually, as long as the output of the program and the contents of |
23 |
test_X.good are the same. |
24 |
|
25 |
|
26 |
Here is a list of MIPS instructions; some of them are implemented in the |
27 |
emulator, only a few so far have regression tests. NOTE: This list is not |
28 |
complete, and probably incorrect in many places. |
29 |
|
30 |
|
31 |
ISA level: |
32 |
12345,32,64, |
33 |
Instr.: MDMX,3D,16 Impl: Reg. test filename: |
34 |
------- ----------- ----- ------------------- |
35 |
abs.fmt 1 |
36 |
add 1 yes |
37 |
add.fmt 1 yes |
38 |
adda.s ? |
39 |
addciu ? |
40 |
addi 1 yes |
41 |
addiu 1 yes |
42 |
addu 1 yes test_addu.S |
43 |
alnv.ps ? |
44 |
and 1 yes |
45 |
andi 1 yes |
46 |
bc0f 1 |
47 |
bc0fl 2 |
48 |
bc0t 1 |
49 |
bc0tl 2 |
50 |
bc1f 1 |
51 |
bc1t 1 |
52 |
beq 1 yes |
53 |
beql 2 yes |
54 |
bgez 1 yes |
55 |
bgezal 1 yes |
56 |
bgezall 2 yes |
57 |
bgezl 2 yes |
58 |
bgtz 1 yes |
59 |
bgtzl 2 yes |
60 |
blez 1 yes |
61 |
blezl 2 yes |
62 |
bltz 1 yes |
63 |
bltzal 1 yes |
64 |
bltzall 2 yes |
65 |
bltzl 2 yes |
66 |
bne 1 yes |
67 |
bnel 2 yes |
68 |
break 1 yes |
69 |
c.cond 1 yes |
70 |
cache 3 (?) yes |
71 |
ceil.l.fmt 3 |
72 |
ceil.w.fmt 2 |
73 |
cfc1 1 yes |
74 |
clo 32 yes test_clo_clz.S |
75 |
clz 32 yes test_clo_clz.S |
76 |
ctc1 1 |
77 |
cvt.d.fmt 1 or 3 yes |
78 |
cvt.l.fmt 3 yes |
79 |
cvt.s.fmt 1 or 3 yes |
80 |
cvt.w.fmt 1 yes |
81 |
dadd 3 yes |
82 |
daddi 3 yes |
83 |
daddiu 3 yes |
84 |
daddu 3 yes test_daddu.S |
85 |
dclo 64 yes test_dclo_dclz.S |
86 |
dclz 64 yes test_dclo_dclz.S |
87 |
dctr ? |
88 |
dctw ? |
89 |
ddiv 3 yes |
90 |
ddivu 3 yes |
91 |
deret ? yes |
92 |
di c790 yes(ugly) |
93 |
div 1 yes |
94 |
div.fmt 1 yes |
95 |
div1 c790 no |
96 |
divu 1 yes |
97 |
divu1 c790 no |
98 |
dmadd16 ? |
99 |
dmfc1 3 yes |
100 |
dmtc1 3 yes |
101 |
dmult 3 |
102 |
dmultu 3 |
103 |
dsll 3 yes |
104 |
dsll32 3 yes |
105 |
dsllv 3 yes |
106 |
dsra 3 yes |
107 |
dsra32 3 yes |
108 |
dsrav 3 yes |
109 |
dsrl 3 yes |
110 |
dsrl32 3 yes |
111 |
dsrlv 3 yes |
112 |
dsub 3 yes |
113 |
dsubu 3 yes |
114 |
ei c790 yes(ugly) |
115 |
eret 3 (?) |
116 |
ffc ? |
117 |
floor.l.fmt 3 |
118 |
floow.w.fmt 2 |
119 |
flushi ? |
120 |
flushd ? |
121 |
flushid ? |
122 |
hibernate ? |
123 |
j 1 yes |
124 |
jal 1 yes |
125 |
jalx 16 |
126 |
jalr 1 yes |
127 |
jr 1 yes |
128 |
lb 1 yes |
129 |
lbu 1 yes |
130 |
ld 3 yes |
131 |
ldc1 2 yes |
132 |
ldl 3 yes test_unaligned.S |
133 |
ldr 3 yes test_unaligned.S |
134 |
ldxc1 4 |
135 |
lh 1 yes |
136 |
lhu 1 yes |
137 |
ll 2 yes |
138 |
lld 3 yes |
139 |
lui 1 yes |
140 |
luxc1 5 |
141 |
lq c790 yes |
142 |
lqc2 ? |
143 |
lw 1 yes |
144 |
lwc1 1 yes |
145 |
lwxc1 4 |
146 |
lwl 1 yes test_unaligned.S |
147 |
lwr 1 yes test_unaligned.S |
148 |
lwu 3 yes |
149 |
mad ? |
150 |
madu ? |
151 |
madd 32,c790 |
152 |
madd1 c790 |
153 |
madd16 ? |
154 |
madda.s ? |
155 |
maddu 32,c790 |
156 |
maddu1 c790 |
157 |
max.s ? |
158 |
mfbpc c790 |
159 |
mfc0 ? yes |
160 |
mfc1 1 yes |
161 |
mfdab c790 |
162 |
mfdabm c790 |
163 |
mfdvb c790 |
164 |
mfdvbm c790 |
165 |
mfhi 1 yes |
166 |
mfhi1 c790 |
167 |
mfiab c790 |
168 |
mfiabm c790 |
169 |
mflo 1 yes |
170 |
mflo1 c790 |
171 |
mfpc c790 |
172 |
mfps c790 |
173 |
mfsa c790 |
174 |
min.s ? |
175 |
mov.fmt 1 yes |
176 |
movn 4 yes |
177 |
movz 4 yes |
178 |
mtbpc c790 |
179 |
mtc0 ? yes |
180 |
mtc1 1 yes |
181 |
mtdab c790 |
182 |
mtdabm c790 |
183 |
mtdvb c790 |
184 |
mtdvbm c790 |
185 |
mthi 1 yes |
186 |
mthi1 c790 |
187 |
mtiab c790 |
188 |
mtiabm c790 |
189 |
mtlo 1 yes |
190 |
mtlo1 c790 |
191 |
mtpc c790 |
192 |
mtps c790 |
193 |
mtsa c790 |
194 |
mtsab c790 |
195 |
mtsah c790 |
196 |
mul.fmt 1 yes |
197 |
mult 1 (c790 spec.) yes |
198 |
mult1 c790 |
199 |
multu 1 (c790 spec.) yes |
200 |
multu1 c790 |
201 |
neg.fmt 1 yes |
202 |
nmadd.fmt 64, 4 or 5 |
203 |
nmsub.fmt 64, 4 or 5 |
204 |
nop 1 yes |
205 |
nor 1 yes |
206 |
or 1 yes |
207 |
ori 1 yes |
208 |
pabsh c790 |
209 |
pabsw c790 |
210 |
paddb c790 |
211 |
paddh c790 |
212 |
paddsb c790 |
213 |
paddsh c790 |
214 |
paddsw c790 |
215 |
paddub c790 |
216 |
padduh c790 |
217 |
padduw c790 |
218 |
paddw c790 |
219 |
padsbh c790 |
220 |
pand c790 |
221 |
pceqb c790 |
222 |
pceqh c790 |
223 |
pceqw c790 |
224 |
pcgtb c790 |
225 |
pcgth c790 |
226 |
pcgtw c790 |
227 |
pcpyh c790 |
228 |
pcpyld c790 |
229 |
pcpyud c790 |
230 |
pdivbw c790 |
231 |
pdivuw c790 |
232 |
pdivw c790 |
233 |
pexch c790 |
234 |
pexcw c790 |
235 |
pexeh c790 |
236 |
pexew c790 |
237 |
pext5 c790 |
238 |
pextlb c790 |
239 |
pextlh c790 |
240 |
pextlw c790 |
241 |
pextub c790 |
242 |
pextuh c790 |
243 |
pextuw c790 |
244 |
phmadh c790 |
245 |
phmsbh c790 |
246 |
pinteh c790 |
247 |
pinth c790 |
248 |
pll.ps 5, 64 |
249 |
plu.ps 5, 64 |
250 |
plzcw c790 |
251 |
pmaddh c790 |
252 |
pmadduw c790 |
253 |
pmaddw c790 |
254 |
pmaxh c790 |
255 |
pmaxw c790 |
256 |
pmfhi c790 |
257 |
pmfhl c790 |
258 |
pmflo c790 |
259 |
pminh c790 |
260 |
pminw c790 |
261 |
pmsubh c790 |
262 |
pmsubw c790 |
263 |
pmthi c790 |
264 |
pmthl c790 |
265 |
pmtlo c790 |
266 |
pmulth c790 |
267 |
pmultuw c790 |
268 |
pmultw c790 |
269 |
pnor c790 |
270 |
por c790 |
271 |
ppac5 c790 |
272 |
ppacb c790 |
273 |
ppach c790 |
274 |
ppacw c790 |
275 |
prevh c790 |
276 |
pref 4, 32 yes |
277 |
prefx 4, 32?, 64 |
278 |
prot3w c790 |
279 |
psllh c790 |
280 |
psllvw c790 |
281 |
psllw c790 |
282 |
psrah c790 |
283 |
psravw c790 |
284 |
psraw c790 |
285 |
psrlh c790 |
286 |
psrlvw c790 |
287 |
psrlw c790 |
288 |
psubb c790 |
289 |
psubh c790 |
290 |
psubsb c790 |
291 |
psubsh c790 |
292 |
psubsw c790 |
293 |
psubub c790 |
294 |
psubuh c790 |
295 |
psubuw c790 |
296 |
psubw c790 |
297 |
pul.ps 5, 64 |
298 |
puu.ps 5, 64 |
299 |
pxor c790 |
300 |
qfsrv c790 |
301 |
recip.fmt 4 |
302 |
rfe 1 yes |
303 |
round.l.fmt 3 |
304 |
round.w.fmt 2 |
305 |
rsqrt.d 4 |
306 |
rsqrt.s 4 or 5 |
307 |
sb 1 yes |
308 |
sc 2 yes |
309 |
scd 3 yes |
310 |
sd 3 yes |
311 |
sdbbp 32 |
312 |
sdc1 2 yes |
313 |
sdl 3 yes |
314 |
sdr 3 yes |
315 |
sdxc1 4 |
316 |
selsl ? |
317 |
selsr ? |
318 |
sh 1 yes |
319 |
sll 1 yes |
320 |
sllv 1 yes |
321 |
slt 1 yes |
322 |
slti 1 yes |
323 |
sltiu 1 yes |
324 |
sq c790 yes |
325 |
sqc2 ? |
326 |
sqrt.fmt 2 yes |
327 |
stlu 1 yes |
328 |
sra 1 yes |
329 |
srav 1 yes |
330 |
srl 1 yes |
331 |
srlv 1 yes |
332 |
ssnop ? yes |
333 |
standby ? |
334 |
sub 1 yes |
335 |
sub.fmt 1 yes |
336 |
subu 1 yes |
337 |
suspend ? |
338 |
suxc1 5, 64 |
339 |
sw 1 yes |
340 |
swc1 1 yes |
341 |
swxc1 4, 64 |
342 |
swl 1 yes |
343 |
swr 1 yes |
344 |
sync 2 yes |
345 |
syscall 1 yes |
346 |
teq 2 yes |
347 |
teqi 2 no |
348 |
tge 2 |
349 |
tgei 2 |
350 |
tgeiu 2 |
351 |
tgeu 2 |
352 |
tlbp ? |
353 |
tlbr ? |
354 |
tlbwi ? |
355 |
tlbwr ? |
356 |
tlt 2 |
357 |
tlti 2 |
358 |
tltiu 2 |
359 |
tltu 2 |
360 |
tne 2 |
361 |
tnei 2 |
362 |
trunc.l.fmt 3 yes |
363 |
trunc.w.fmt 2 tes |
364 |
vabs ? |
365 |
vadd ? |
366 |
vaddi ? |
367 |
vaddq ? |
368 |
vaddw ? |
369 |
vaddx ? |
370 |
vaddy ? |
371 |
vaddz ? |
372 |
vadda ? |
373 |
vaddai ? |
374 |
vaddaq ? |
375 |
vaddaw ? |
376 |
vaddax ? |
377 |
vadday ? |
378 |
vaddaz ? |
379 |
vcallms ? |
380 |
vcallmsr ? |
381 |
vclipw ? |
382 |
vdiv ? |
383 |
vftoi0 ? |
384 |
vftoi4 ? |
385 |
vftoi12 ? |
386 |
vftoi15 ? |
387 |
viadd ? |
388 |
viaddi ? |
389 |
viand ? |
390 |
vilwr.w ? |
391 |
vilwr.x ? |
392 |
vilwr.y ? |
393 |
vilwr.z ? |
394 |
vior ? |
395 |
viswr.w ? |
396 |
viswr.x ? |
397 |
viswr.y ? |
398 |
viswr.z ? |
399 |
visub ? |
400 |
vitof0 ? |
401 |
vitof4 ? |
402 |
vitof12 ? |
403 |
vitof15 ? |
404 |
vlqd ? |
405 |
vlqi ? |
406 |
vmadd ? |
407 |
vmaddi ? |
408 |
vmaddq ? |
409 |
vmaddw ? |
410 |
vmaddx ? |
411 |
vmaddy ? |
412 |
vmaddz ? |
413 |
vmadda ? |
414 |
vmaddai ? |
415 |
vmaddaq ? |
416 |
vmaddaw ? |
417 |
vmaddax ? |
418 |
vmadday ? |
419 |
vmaddaz ? |
420 |
vmax ? |
421 |
vmaxi ? |
422 |
vmaxw ? |
423 |
vmaxx ? |
424 |
vmaxy ? |
425 |
vmaxz ? |
426 |
vmfir ? |
427 |
vmini ? |
428 |
vminii ? |
429 |
vminiw ? |
430 |
vminix ? |
431 |
vminiy ? |
432 |
vminiz ? |
433 |
vmove ? |
434 |
vmr32 ? |
435 |
vmsub ? |
436 |
vmsubi ? |
437 |
vmsubq ? |
438 |
vmsubw ? |
439 |
vmsubx ? |
440 |
vmsuby ? |
441 |
vmsubz ? |
442 |
vmsuba ? |
443 |
vmsubai ? |
444 |
vmsubaq ? |
445 |
vmsubaw ? |
446 |
vmsubax ? |
447 |
vmsubay ? |
448 |
vmsubaz ? |
449 |
vmtir ? |
450 |
vmul ? |
451 |
vmuli ? |
452 |
vmulq ? |
453 |
vmulw ? |
454 |
vmulx ? |
455 |
vmuly ? |
456 |
vmulz ? |
457 |
vmula ? |
458 |
vmulai ? |
459 |
vmulaq ? |
460 |
vmulaw ? |
461 |
vmulax ? |
462 |
vmulay ? |
463 |
vmulaz ? |
464 |
vnop ? |
465 |
vopmula ? |
466 |
vopmsub ? |
467 |
vrget ? |
468 |
vrinit ? |
469 |
vrnext ? |
470 |
vrsqrt ? |
471 |
vrxor ? |
472 |
vsqd ? |
473 |
vsqi ? |
474 |
vsqrt ? |
475 |
vsub ? |
476 |
vsubi ? |
477 |
vsubq ? |
478 |
vsubw ? |
479 |
vsubx ? |
480 |
vsuby ? |
481 |
vsubz ? |
482 |
vsuba ? |
483 |
vsubai ? |
484 |
vsubaq ? |
485 |
vsubaw ? |
486 |
vsubax ? |
487 |
vsubay ? |
488 |
vsubaz ? |
489 |
vwaitq ? |
490 |
wait 32 |
491 |
waiti ? |
492 |
wb ? |
493 |
xor 1 yes |
494 |
xori 1 yes |
495 |
|
496 |
|
497 |
|
498 |
TODO: |
499 |
o) Hopefully, some day, someone will have the time and energy |
500 |
to actually write all the regression tests necessary. |
501 |
|
502 |
o) 32-bit vs 64-bit modes? |
503 |
|
504 |
o) MIPS I, II, III, IV, V (?), MDMX (?) |
505 |
|
506 |
o) MIPS16 encoding? |
507 |
|
508 |
o) 32-bit vs 64-bit ELFs? |
509 |
|
510 |
o) Try the regression tests using different compilers automagically? |
511 |
ie gcc vs ccc vs solaris' cc... |
512 |
|
513 |
o) Remove the usage of tmpnam(), and make do_tests.c less |
514 |
ugly in general. |
515 |
|
516 |
|