revert between 56095 -> 55830 in arch
[AROS.git] / arch / m68k-all / m680x0 / 060sp / dist / ftest.s
blob9e98559c5b56d6e87ade116a18cf4e308bbc86dc
2 # $NetBSD: ftest.s,v 1.1 2000/04/14 20:24:39 is Exp $
5 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 # MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
7 # M68000 Hi-Performance Microprocessor Division
8 # M68060 Software Package Production Release
9 #
10 # M68060 Software Package Copyright (C) 1993, 1994, 1995, 1996 Motorola Inc.
11 # All rights reserved.
13 # THE SOFTWARE is provided on an "AS IS" basis and without warranty.
14 # To the maximum extent permitted by applicable law,
15 # MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED,
16 # INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS
17 # FOR A PARTICULAR PURPOSE and any warranty against infringement with
18 # regard to the SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF)
19 # and any accompanying written materials.
21 # To the maximum extent permitted by applicable law,
22 # IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER
23 # (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS,
24 # BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS)
25 # ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE.
27 # Motorola assumes no responsibility for the maintenance and support
28 # of the SOFTWARE.
30 # You are hereby granted a copyright license to use, modify, and distribute the
31 # SOFTWARE so long as this entire notice is retained without alteration
32 # in any modified and/or redistributed versions, and that such modified
33 # versions are clearly identified as such.
34 # No licenses are granted by implication, estoppel or otherwise under any
35 # patents or trademarks of Motorola, Inc.
36 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38 #############################################
39 set SREGS, -64
40 set IREGS, -128
41 set IFPREGS, -224
42 set SFPREGS, -320
43 set IFPCREGS, -332
44 set SFPCREGS, -344
45 set ICCR, -346
46 set SCCR, -348
47 set TESTCTR, -352
48 set DATA, -384
50 #############################################
51 TESTTOP:
52 bra.l _060TESTS_
53 short 0x0000
55 bra.l _060TESTS_unimp
56 short 0x0000
58 bra.l _060TESTS_enable
59 short 0x0000
61 start_str:
62 string "Testing 68060 FPSP started:\n"
64 start_str_unimp:
65 string "Testing 68060 FPSP unimplemented instruction started:\n"
67 start_str_enable:
68 string "Testing 68060 FPSP exception enabled started:\n"
70 pass_str:
71 string "passed\n"
73 fail_str:
74 string " failed\n"
76 align 0x4
77 chk_test:
78 tst.l %d0
79 bne.b test_fail
80 test_pass:
81 pea pass_str(%pc)
82 bsr.l _print_str
83 addq.l &0x4,%sp
84 rts
85 test_fail:
86 mov.l %d1,-(%sp)
87 bsr.l _print_num
88 addq.l &0x4,%sp
90 pea fail_str(%pc)
91 bsr.l _print_str
92 addq.l &0x4,%sp
93 rts
95 #############################################
96 _060TESTS_:
97 link %a6,&-384
99 movm.l &0x3f3c,-(%sp)
100 fmovm.x &0xff,-(%sp)
102 pea start_str(%pc)
103 bsr.l _print_str
104 addq.l &0x4,%sp
106 ### effadd
107 clr.l TESTCTR(%a6)
108 pea effadd_str(%pc)
109 bsr.l _print_str
110 addq.l &0x4,%sp
112 bsr.l effadd_0
114 bsr.l chk_test
116 ### unsupp
117 clr.l TESTCTR(%a6)
118 pea unsupp_str(%pc)
119 bsr.l _print_str
120 addq.l &0x4,%sp
122 bsr.l unsupp_0
124 bsr.l chk_test
126 ### ovfl non-maskable
127 clr.l TESTCTR(%a6)
128 pea ovfl_nm_str(%pc)
129 bsr.l _print_str
130 bsr.l ovfl_nm_0
132 bsr.l chk_test
134 ### unfl non-maskable
135 clr.l TESTCTR(%a6)
136 pea unfl_nm_str(%pc)
137 bsr.l _print_str
138 bsr.l unfl_nm_0
140 bsr.l chk_test
142 movm.l (%sp)+,&0x3cfc
143 fmovm.x (%sp)+,&0xff
145 unlk %a6
148 _060TESTS_unimp:
149 link %a6,&-384
151 movm.l &0x3f3c,-(%sp)
152 fmovm.x &0xff,-(%sp)
154 pea start_str_unimp(%pc)
155 bsr.l _print_str
156 addq.l &0x4,%sp
158 ### unimp
159 clr.l TESTCTR(%a6)
160 pea unimp_str(%pc)
161 bsr.l _print_str
162 addq.l &0x4,%sp
164 bsr.l unimp_0
166 bsr.l chk_test
168 movm.l (%sp)+,&0x3cfc
169 fmovm.x (%sp)+,&0xff
171 unlk %a6
174 _060TESTS_enable:
175 link %a6,&-384
177 movm.l &0x3f3c,-(%sp)
178 fmovm.x &0xff,-(%sp)
180 pea start_str_enable(%pc)
181 bsr.l _print_str
182 addq.l &0x4,%sp
184 ### snan
185 clr.l TESTCTR(%a6)
186 pea snan_str(%pc)
187 bsr.l _print_str
188 bsr.l snan_0
190 bsr.l chk_test
192 ### operr
193 clr.l TESTCTR(%a6)
194 pea operr_str(%pc)
195 bsr.l _print_str
196 bsr.l operr_0
198 bsr.l chk_test
200 ### ovfl
201 clr.l TESTCTR(%a6)
202 pea ovfl_str(%pc)
203 bsr.l _print_str
204 bsr.l ovfl_0
206 bsr.l chk_test
208 ### unfl
209 clr.l TESTCTR(%a6)
210 pea unfl_str(%pc)
211 bsr.l _print_str
212 bsr.l unfl_0
214 bsr.l chk_test
216 ### dz
217 clr.l TESTCTR(%a6)
218 pea dz_str(%pc)
219 bsr.l _print_str
220 bsr.l dz_0
222 bsr.l chk_test
224 ### inexact
225 clr.l TESTCTR(%a6)
226 pea inex_str(%pc)
227 bsr.l _print_str
228 bsr.l inex_0
230 bsr.l chk_test
232 movm.l (%sp)+,&0x3cfc
233 fmovm.x (%sp)+,&0xff
235 unlk %a6
238 #############################################
239 #############################################
241 unimp_str:
242 string "\tUnimplemented FP instructions..."
244 align 0x4
245 unimp_0:
246 addq.l &0x1,TESTCTR(%a6)
248 movm.l DEF_REGS(%pc),&0x3fff
249 fmovm.x DEF_FPREGS(%pc),&0xff
250 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
252 mov.w &0x0000,ICCR(%a6)
253 movm.l &0x7fff,IREGS(%a6)
254 fmovm.x &0xff,IFPREGS(%a6)
255 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
257 mov.l &0x40000000,DATA+0x0(%a6)
258 mov.l &0xc90fdaa2,DATA+0x4(%a6)
259 mov.l &0x2168c235,DATA+0x8(%a6)
261 mov.w &0x0000,%cc
262 unimp_0_pc:
263 fsin.x DATA(%a6),%fp0
265 mov.w %cc,SCCR(%a6)
266 movm.l &0x7fff,SREGS(%a6)
267 fmovm.x &0xff,SFPREGS(%a6)
268 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
270 mov.l &0xbfbf0000,IFPREGS+0x0(%a6)
271 mov.l &0x80000000,IFPREGS+0x4(%a6)
272 mov.l &0x00000000,IFPREGS+0x8(%a6)
273 mov.l &0x08000208,IFPCREGS+0x4(%a6)
274 lea unimp_0_pc(%pc),%a0
275 mov.l %a0,IFPCREGS+0x8(%a6)
277 bsr.l chkregs
278 tst.b %d0
279 bne.l error
281 bsr.l chkfpregs
282 tst.b %d0
283 bne.l error
285 unimp_1:
286 addq.l &0x1,TESTCTR(%a6)
288 movm.l DEF_REGS(%pc),&0x3fff
289 fmovm.x DEF_FPREGS(%pc),&0xff
290 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
292 mov.w &0x0000,ICCR(%a6)
293 movm.l &0x7fff,IREGS(%a6)
294 fmovm.x &0xff,IFPREGS(%a6)
295 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
297 mov.l &0x3ffe0000,DATA+0x0(%a6)
298 mov.l &0xc90fdaa2,DATA+0x4(%a6)
299 mov.l &0x2168c235,DATA+0x8(%a6)
301 mov.w &0x0000,%cc
302 unimp_1_pc:
303 ftan.x DATA(%a6),%fp0
305 mov.w %cc,SCCR(%a6)
306 movm.l &0x7fff,SREGS(%a6)
307 fmovm.x &0xff,SFPREGS(%a6)
308 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
310 mov.l &0x3fff0000,IFPREGS+0x0(%a6)
311 mov.l &0x80000000,IFPREGS+0x4(%a6)
312 mov.l &0x00000000,IFPREGS+0x8(%a6)
313 mov.l &0x00000208,IFPCREGS+0x4(%a6)
314 lea unimp_1_pc(%pc),%a0
315 mov.l %a0,IFPCREGS+0x8(%a6)
317 bsr.l chkregs
318 tst.b %d0
319 bne.l error
321 bsr.l chkfpregs
322 tst.b %d0
323 bne.l error
325 # fmovecr
326 unimp_2:
327 addq.l &0x1,TESTCTR(%a6)
329 movm.l DEF_REGS(%pc),&0x3fff
330 fmovm.x DEF_FPREGS(%pc),&0xff
331 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
333 mov.w &0x0000,ICCR(%a6)
334 movm.l &0x7fff,IREGS(%a6)
335 fmovm.x &0xff,IFPREGS(%a6)
336 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
338 mov.w &0x0000,%cc
339 unimp_2_pc:
340 fmovcr.x &0x31,%fp0
342 mov.w %cc,SCCR(%a6)
343 movm.l &0x7fff,SREGS(%a6)
344 fmovm.x &0xff,SFPREGS(%a6)
345 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
347 mov.l &0x40000000,IFPREGS+0x0(%a6)
348 mov.l &0x935d8ddd,IFPREGS+0x4(%a6)
349 mov.l &0xaaa8ac17,IFPREGS+0x8(%a6)
350 mov.l &0x00000208,IFPCREGS+0x4(%a6)
351 lea unimp_2_pc(%pc),%a0
352 mov.l %a0,IFPCREGS+0x8(%a6)
354 bsr.l chkregs
355 tst.b %d0
356 bne.l error
358 bsr.l chkfpregs
359 tst.b %d0
360 bne.l error
362 # fscc
363 unimp_3:
364 addq.l &0x1,TESTCTR(%a6)
366 movm.l DEF_REGS(%pc),&0x3fff
367 fmovm.x DEF_FPREGS(%pc),&0xff
368 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
370 fmov.l &0x0f000000,%fpsr
371 mov.l &0x00,%d7
373 mov.w &0x0000,ICCR(%a6)
374 movm.l &0x7fff,IREGS(%a6)
375 fmovm.x &0xff,IFPREGS(%a6)
376 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
378 mov.w &0x0000,%cc
379 unimp_3_pc:
380 fsgt %d7
382 mov.w %cc,SCCR(%a6)
383 movm.l &0x7fff,SREGS(%a6)
384 fmovm.x &0xff,SFPREGS(%a6)
385 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
386 mov.l &0x0f008080,IFPCREGS+0x4(%a6)
387 lea unimp_3_pc(%pc),%a0
388 mov.l %a0,IFPCREGS+0x8(%a6)
390 bsr.l chkregs
391 tst.b %d0
392 bne.l error
394 bsr.l chkfpregs
395 tst.b %d0
396 bne.l error
398 # fdbcc
399 unimp_4:
400 addq.l &0x1,TESTCTR(%a6)
402 movm.l DEF_REGS(%pc),&0x3fff
403 fmovm.x DEF_FPREGS(%pc),&0xff
404 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
406 fmov.l &0x0f000000,%fpsr
407 mov.l &0x2,%d7
409 mov.w &0x0000,ICCR(%a6)
410 movm.l &0x7fff,IREGS(%a6)
411 fmovm.x &0xff,IFPREGS(%a6)
412 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
414 mov.w &0x0000,%cc
415 unimp_4_pc:
416 fdbgt.w %d7,unimp_4_pc
418 mov.w %cc,SCCR(%a6)
419 movm.l &0x7fff,SREGS(%a6)
420 fmovm.x &0xff,SFPREGS(%a6)
421 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
422 mov.w &0xffff,IREGS+28+2(%a6)
423 mov.l &0x0f008080,IFPCREGS+0x4(%a6)
424 lea unimp_4_pc(%pc),%a0
425 mov.l %a0,IFPCREGS+0x8(%a6)
427 bsr.l chkregs
428 tst.b %d0
429 bne.l error
431 bsr.l chkfpregs
432 tst.b %d0
433 bne.l error
435 # ftrapcc
436 unimp_5:
437 addq.l &0x1,TESTCTR(%a6)
439 movm.l DEF_REGS(%pc),&0x3fff
440 fmovm.x DEF_FPREGS(%pc),&0xff
441 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
443 fmov.l &0x0f000000,%fpsr
445 mov.w &0x0000,ICCR(%a6)
446 movm.l &0x7fff,IREGS(%a6)
447 fmovm.x &0xff,IFPREGS(%a6)
448 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
450 mov.w &0x0000,%cc
451 unimp_5_pc:
452 ftpgt.l &0xabcdef01
454 mov.w %cc,SCCR(%a6)
455 movm.l &0x7fff,SREGS(%a6)
456 fmovm.x &0xff,SFPREGS(%a6)
457 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
458 mov.l &0x0f008080,IFPCREGS+0x4(%a6)
459 lea unimp_5_pc(%pc),%a0
460 mov.l %a0,IFPCREGS+0x8(%a6)
462 bsr.l chkregs
463 tst.b %d0
464 bne.l error
466 bsr.l chkfpregs
467 tst.b %d0
468 bne.l error
470 clr.l %d0
473 #############################################
475 effadd_str:
476 string "\tUnimplemented <ea>..."
478 align 0x4
479 effadd_0:
480 addq.l &0x1,TESTCTR(%a6)
482 movm.l DEF_REGS(%pc),&0x3fff
483 fmovm.x DEF_FPREGS(%pc),&0xff
484 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
486 mov.w &0x0000,ICCR(%a6)
487 movm.l &0x7fff,IREGS(%a6)
488 fmovm.x &0xff,IFPREGS(%a6)
489 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
491 fmov.b &0x2,%fp0
493 mov.w &0x0000,%cc
494 effadd_0_pc:
495 fmul.x &0xc00000008000000000000000,%fp0
497 mov.w %cc,SCCR(%a6)
498 movm.l &0x7fff,SREGS(%a6)
499 fmovm.x &0xff,SFPREGS(%a6)
500 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
502 mov.l &0xc0010000,IFPREGS+0x0(%a6)
503 mov.l &0x80000000,IFPREGS+0x4(%a6)
504 mov.l &0x00000000,IFPREGS+0x8(%a6)
505 mov.l &0x08000000,IFPCREGS+0x4(%a6)
506 lea effadd_0_pc(%pc),%a0
507 mov.l %a0,IFPCREGS+0x8(%a6)
509 bsr.l chkregs
510 tst.b %d0
511 bne.l error
513 bsr.l chkfpregs
514 tst.b %d0
515 bne.l error
517 effadd_1:
518 addq.l &0x1,TESTCTR(%a6)
520 movm.l DEF_REGS(%pc),&0x3fff
521 fmovm.x DEF_FPREGS(%pc),&0xff
522 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
524 mov.w &0x0000,ICCR(%a6)
525 movm.l &0x7fff,IREGS(%a6)
526 fmovm.x &0xff,IFPREGS(%a6)
527 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
529 mov.w &0x0000,%cc
530 effadd_1_pc:
531 fabs.p &0xc12300012345678912345678,%fp0
533 mov.w %cc,SCCR(%a6)
534 movm.l &0x7fff,SREGS(%a6)
535 fmovm.x &0xff,SFPREGS(%a6)
536 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
538 mov.l &0x3e660000,IFPREGS+0x0(%a6)
539 mov.l &0xd0ed23e8,IFPREGS+0x4(%a6)
540 mov.l &0xd14035bc,IFPREGS+0x8(%a6)
541 mov.l &0x00000108,IFPCREGS+0x4(%a6)
542 lea effadd_1_pc(%pc),%a0
543 mov.l %a0,IFPCREGS+0x8(%a6)
545 bsr.l chkregs
546 tst.b %d0
547 bne.l error
549 bsr.l chkfpregs
550 tst.b %d0
551 bne.l error
553 fmovml_0:
554 addq.l &0x1,TESTCTR(%a6)
556 movm.l DEF_REGS(%pc),&0x3fff
557 fmovm.x DEF_FPREGS(%pc),&0xff
558 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
560 mov.w &0x0000,ICCR(%a6)
561 mov.w &0x0000,%cc
562 movm.l &0x7fff,IREGS(%a6)
563 fmovm.x &0xff,IFPREGS(%a6)
564 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
566 fmovm.l &0xffffffffffffffff,%fpcr,%fpsr
568 mov.w %cc,SCCR(%a6)
569 movm.l &0x7fff,SREGS(%a6)
570 fmovm.x &0xff,SFPREGS(%a6)
571 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
572 mov.l &0x0000fff0,IFPCREGS+0x0(%a6)
573 mov.l &0x0ffffff8,IFPCREGS+0x4(%a6)
575 bsr.l chkregs
576 tst.b %d0
577 bne.l error
579 bsr.l chkfpregs
580 tst.b %d0
581 bne.l error
583 fmovml_1:
584 addq.l &0x1,TESTCTR(%a6)
586 movm.l DEF_REGS(%pc),&0x3fff
587 fmovm.x DEF_FPREGS(%pc),&0xff
588 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
590 mov.w &0x0000,ICCR(%a6)
591 mov.w &0x0000,%cc
592 movm.l &0x7fff,IREGS(%a6)
593 fmovm.x &0xff,IFPREGS(%a6)
594 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
596 fmovm.l &0xffffffffffffffff,%fpcr,%fpiar
598 mov.w %cc,SCCR(%a6)
599 movm.l &0x7fff,SREGS(%a6)
600 fmovm.x &0xff,SFPREGS(%a6)
601 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
602 mov.l &0x0000fff0,IFPCREGS+0x0(%a6)
603 mov.l &0xffffffff,IFPCREGS+0x8(%a6)
605 bsr.l chkregs
606 tst.b %d0
607 bne.l error
609 bsr.l chkfpregs
610 tst.b %d0
611 bne.l error
613 fmovml_2:
614 addq.l &0x1,TESTCTR(%a6)
616 movm.l DEF_REGS(%pc),&0x3fff
617 fmovm.x DEF_FPREGS(%pc),&0xff
618 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
620 mov.w &0x0000,ICCR(%a6)
621 mov.w &0x0000,%cc
622 movm.l &0x7fff,IREGS(%a6)
623 fmovm.x &0xff,IFPREGS(%a6)
624 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
626 fmovm.l &0xffffffffffffffff,%fpsr,%fpiar
628 mov.w %cc,SCCR(%a6)
629 movm.l &0x7fff,SREGS(%a6)
630 fmovm.x &0xff,SFPREGS(%a6)
631 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
632 mov.l &0x0ffffff8,IFPCREGS+0x4(%a6)
633 mov.l &0xffffffff,IFPCREGS+0x8(%a6)
635 bsr.l chkregs
636 tst.b %d0
637 bne.l error
639 bsr.l chkfpregs
640 tst.b %d0
641 bne.l error
643 fmovml_3:
644 addq.l &0x1,TESTCTR(%a6)
646 movm.l DEF_REGS(%pc),&0x3fff
647 fmovm.x DEF_FPREGS(%pc),&0xff
648 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
650 mov.w &0x0000,ICCR(%a6)
651 mov.w &0x0000,%cc
652 movm.l &0x7fff,IREGS(%a6)
653 fmovm.x &0xff,IFPREGS(%a6)
654 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
656 fmovm.l &0xffffffffffffffffffffffff,%fpcr,%fpsr,%fpiar
658 mov.w %cc,SCCR(%a6)
659 movm.l &0x7fff,SREGS(%a6)
660 fmovm.x &0xff,SFPREGS(%a6)
661 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
662 mov.l &0x0000fff0,IFPCREGS+0x0(%a6)
663 mov.l &0x0ffffff8,IFPCREGS+0x4(%a6)
664 mov.l &0xffffffff,IFPCREGS+0x8(%a6)
666 bsr.l chkregs
667 tst.b %d0
668 bne.l error
670 bsr.l chkfpregs
671 tst.b %d0
672 bne.l error
674 # fmovmx dynamic
675 fmovmx_0:
676 addq.l &0x1,TESTCTR(%a6)
678 movm.l DEF_REGS(%pc),&0x3fff
679 fmovm.x DEF_FPREGS(%pc),&0xff
680 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
682 fmov.b &0x1,%fp0
683 fmov.b &0x2,%fp1
684 fmov.b &0x3,%fp2
685 fmov.b &0x4,%fp3
686 fmov.b &0x5,%fp4
687 fmov.b &0x6,%fp5
688 fmov.b &0x7,%fp6
689 fmov.b &0x8,%fp7
691 fmov.l &0x0,%fpiar
692 mov.l &0xffffffaa,%d0
694 mov.w &0x0000,ICCR(%a6)
695 movm.l &0xffff,IREGS(%a6)
697 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
698 fmovm.x &0xff,IFPREGS(%a6)
700 mov.w &0x0000,%cc
702 fmovm.x %d0,-(%sp)
704 mov.w %cc,SCCR(%a6)
706 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
708 fmov.s &0x7f800000,%fp1
709 fmov.s &0x7f800000,%fp3
710 fmov.s &0x7f800000,%fp5
711 fmov.s &0x7f800000,%fp7
713 fmov.x (%sp)+,%fp1
714 fmov.x (%sp)+,%fp3
715 fmov.x (%sp)+,%fp5
716 fmov.x (%sp)+,%fp7
718 movm.l &0xffff,SREGS(%a6)
719 fmovm.x &0xff,SFPREGS(%a6)
721 bsr.l chkregs
722 tst.b %d0
723 bne.l error
725 bsr.l chkfpregs
726 tst.b %d0
727 bne.l error
729 fmovmx_1:
730 addq.l &0x1,TESTCTR(%a6)
732 movm.l DEF_REGS(%pc),&0x3fff
733 fmovm.x DEF_FPREGS(%pc),&0xff
734 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
736 fmov.b &0x1,%fp0
737 fmov.b &0x2,%fp1
738 fmov.b &0x3,%fp2
739 fmov.b &0x4,%fp3
740 fmov.b &0x5,%fp4
741 fmov.b &0x6,%fp5
742 fmov.b &0x7,%fp6
743 fmov.b &0x8,%fp7
745 fmov.x %fp6,-(%sp)
746 fmov.x %fp4,-(%sp)
747 fmov.x %fp2,-(%sp)
748 fmov.x %fp0,-(%sp)
750 fmovm.x &0xff,IFPREGS(%a6)
752 fmov.s &0x7f800000,%fp6
753 fmov.s &0x7f800000,%fp4
754 fmov.s &0x7f800000,%fp2
755 fmov.s &0x7f800000,%fp0
757 fmov.l &0x0,%fpiar
758 fmov.l &0x0,%fpsr
759 mov.l &0xffffffaa,%d0
761 mov.w &0x0000,ICCR(%a6)
762 movm.l &0xffff,IREGS(%a6)
764 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
766 mov.w &0x0000,%cc
768 fmovm.x (%sp)+,%d0
770 mov.w %cc,SCCR(%a6)
772 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
774 movm.l &0xffff,SREGS(%a6)
775 fmovm.x &0xff,SFPREGS(%a6)
777 bsr.l chkregs
778 tst.b %d0
779 bne.l error
781 bsr.l chkfpregs
782 tst.b %d0
783 bne.l error
785 fmovmx_2:
786 addq.l &0x1,TESTCTR(%a6)
788 movm.l DEF_REGS(%pc),&0x3fff
789 fmovm.x DEF_FPREGS(%pc),&0xff
790 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
792 fmov.b &0x1,%fp0
793 fmov.b &0x2,%fp1
794 fmov.b &0x3,%fp2
795 fmov.b &0x4,%fp3
796 fmov.b &0x5,%fp4
797 fmov.b &0x6,%fp5
798 fmov.b &0x7,%fp6
799 fmov.b &0x8,%fp7
801 fmov.l &0x0,%fpiar
802 mov.l &0xffffff00,%d0
804 mov.w &0x0000,ICCR(%a6)
805 movm.l &0xffff,IREGS(%a6)
807 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
808 fmovm.x &0xff,IFPREGS(%a6)
810 mov.w &0x0000,%cc
812 fmovm.x %d0,-(%sp)
814 mov.w %cc,SCCR(%a6)
816 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
818 movm.l &0xffff,SREGS(%a6)
819 fmovm.x &0xff,SFPREGS(%a6)
821 bsr.l chkregs
822 tst.b %d0
823 bne.l error
825 bsr.l chkfpregs
826 tst.b %d0
827 bne.l error
829 clr.l %d0
832 ###########################################################
834 # This test will take a non-maskable overflow directly.
835 ovfl_nm_str:
836 string "\tNon-maskable overflow..."
838 align 0x4
839 ovfl_nm_0:
840 addq.l &0x1,TESTCTR(%a6)
842 movm.l DEF_REGS(%pc),&0x3fff
843 fmovm.x DEF_FPREGS(%pc),&0xff
844 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
846 mov.w &0x0000,ICCR(%a6)
847 movm.l &0x7fff,IREGS(%a6)
848 fmovm.x &0xff,IFPREGS(%a6)
849 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
851 fmov.b &0x2,%fp0
852 mov.l &0x7ffe0000,DATA+0x0(%a6)
853 mov.l &0x80000000,DATA+0x4(%a6)
854 mov.l &0x00000000,DATA+0x8(%a6)
856 mov.w &0x0000,%cc
857 ovfl_nm_0_pc:
858 fmul.x DATA(%a6),%fp0
860 mov.w %cc,SCCR(%a6)
861 movm.l &0x7fff,SREGS(%a6)
862 fmovm.x &0xff,SFPREGS(%a6)
863 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
865 mov.l &0x7fff0000,IFPREGS+0x0(%a6)
866 mov.l &0x00000000,IFPREGS+0x4(%a6)
867 mov.l &0x00000000,IFPREGS+0x8(%a6)
868 mov.l &0x02001048,IFPCREGS+0x4(%a6)
869 lea ovfl_nm_0_pc(%pc),%a0
870 mov.l %a0,IFPCREGS+0x8(%a6)
872 bsr.l chkregs
873 tst.b %d0
874 bne.l error
876 bsr.l chkfpregs
877 tst.b %d0
878 bne.l error
880 clr.l %d0
883 ###########################################################
885 # This test will take an overflow directly.
886 ovfl_str:
887 string "\tEnabled overflow..."
889 align 0x4
890 ovfl_0:
891 addq.l &0x1,TESTCTR(%a6)
893 movm.l DEF_REGS(%pc),&0x3fff
894 fmovm.x DEF_FPREGS(%pc),&0xff
895 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
897 mov.w &0x0000,ICCR(%a6)
898 movm.l &0x7fff,IREGS(%a6)
899 fmovm.x &0xff,IFPREGS(%a6)
900 fmov.l &0x00001000,%fpcr
901 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
903 fmov.b &0x2,%fp0
904 mov.l &0x7ffe0000,DATA+0x0(%a6)
905 mov.l &0x80000000,DATA+0x4(%a6)
906 mov.l &0x00000000,DATA+0x8(%a6)
908 mov.w &0x0000,%cc
909 ovfl_0_pc:
910 fmul.x DATA(%a6),%fp0
912 mov.w %cc,SCCR(%a6)
913 movm.l &0x7fff,SREGS(%a6)
914 fmovm.x &0xff,SFPREGS(%a6)
915 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
917 mov.l &0x7fff0000,IFPREGS+0x0(%a6)
918 mov.l &0x00000000,IFPREGS+0x4(%a6)
919 mov.l &0x00000000,IFPREGS+0x8(%a6)
920 mov.l &0x02001048,IFPCREGS+0x4(%a6)
921 lea ovfl_0_pc(%pc),%a0
922 mov.l %a0,IFPCREGS+0x8(%a6)
924 bsr.l chkregs
925 tst.b %d0
926 bne.l error
928 bsr.l chkfpregs
929 tst.b %d0
930 bne.l error
932 clr.l %d0
935 #####################################################################
937 # This test will take an underflow directly.
938 unfl_str:
939 string "\tEnabled underflow..."
941 align 0x4
942 unfl_0:
943 addq.l &0x1,TESTCTR(%a6)
945 movm.l DEF_REGS(%pc),&0x3fff
946 fmovm.x DEF_FPREGS(%pc),&0xff
947 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
949 mov.w &0x0000,ICCR(%a6)
950 movm.l &0x7fff,IREGS(%a6)
951 fmovm.x &0xff,IFPREGS(%a6)
952 fmov.l &0x00000800,%fpcr
953 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
955 mov.l &0x00000000,DATA+0x0(%a6)
956 mov.l &0x80000000,DATA+0x4(%a6)
957 mov.l &0x00000000,DATA+0x8(%a6)
958 fmovm.x DATA(%a6),&0x80
960 mov.w &0x0000,%cc
961 unfl_0_pc:
962 fdiv.b &0x2,%fp0
964 mov.w %cc,SCCR(%a6)
965 movm.l &0x7fff,SREGS(%a6)
966 fmovm.x &0xff,SFPREGS(%a6)
967 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
969 mov.l &0x00000000,IFPREGS+0x0(%a6)
970 mov.l &0x40000000,IFPREGS+0x4(%a6)
971 mov.l &0x00000000,IFPREGS+0x8(%a6)
972 mov.l &0x00000800,IFPCREGS+0x4(%a6)
973 lea unfl_0_pc(%pc),%a0
974 mov.l %a0,IFPCREGS+0x8(%a6)
976 bsr.l chkregs
977 tst.b %d0
978 bne.l error
980 bsr.l chkfpregs
981 tst.b %d0
982 bne.l error
984 clr.l %d0
987 #####################################################################
989 # This test will take a non-maskable underflow directly.
990 unfl_nm_str:
991 string "\tNon-maskable underflow..."
993 align 0x4
994 unfl_nm_0:
995 addq.l &0x1,TESTCTR(%a6)
997 movm.l DEF_REGS(%pc),&0x3fff
998 fmovm.x DEF_FPREGS(%pc),&0xff
999 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
1001 mov.w &0x0000,ICCR(%a6)
1002 movm.l &0x7fff,IREGS(%a6)
1003 fmovm.x &0xff,IFPREGS(%a6)
1004 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
1006 mov.l &0x00000000,DATA+0x0(%a6)
1007 mov.l &0x80000000,DATA+0x4(%a6)
1008 mov.l &0x00000000,DATA+0x8(%a6)
1009 fmovm.x DATA(%a6),&0x80
1011 mov.w &0x0000,%cc
1012 unfl_nm_0_pc:
1013 fdiv.b &0x2,%fp0
1015 mov.w %cc,SCCR(%a6)
1016 movm.l &0x7fff,SREGS(%a6)
1017 fmovm.x &0xff,SFPREGS(%a6)
1018 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
1020 mov.l &0x00000000,IFPREGS+0x0(%a6)
1021 mov.l &0x40000000,IFPREGS+0x4(%a6)
1022 mov.l &0x00000000,IFPREGS+0x8(%a6)
1023 mov.l &0x00000800,IFPCREGS+0x4(%a6)
1024 lea unfl_nm_0_pc(%pc),%a0
1025 mov.l %a0,IFPCREGS+0x8(%a6)
1027 bsr.l chkregs
1028 tst.b %d0
1029 bne.l error
1031 bsr.l chkfpregs
1032 tst.b %d0
1033 bne.l error
1035 clr.l %d0
1038 #####################################################################
1040 inex_str:
1041 string "\tEnabled inexact..."
1043 align 0x4
1044 inex_0:
1045 addq.l &0x1,TESTCTR(%a6)
1047 movm.l DEF_REGS(%pc),&0x3fff
1048 fmovm.x DEF_FPREGS(%pc),&0xff
1049 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
1051 mov.w &0x0000,ICCR(%a6)
1052 movm.l &0x7fff,IREGS(%a6)
1053 fmovm.x &0xff,IFPREGS(%a6)
1054 fmov.l &0x00000200,%fpcr # enable inexact
1055 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
1057 mov.l &0x50000000,DATA+0x0(%a6)
1058 mov.l &0x80000000,DATA+0x4(%a6)
1059 mov.l &0x00000000,DATA+0x8(%a6)
1060 fmovm.x DATA(%a6),&0x80
1062 mov.w &0x0000,%cc
1063 inex_0_pc:
1064 fadd.b &0x2,%fp0
1066 mov.w %cc,SCCR(%a6)
1067 movm.l &0x7fff,SREGS(%a6)
1068 fmovm.x &0xff,SFPREGS(%a6)
1069 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
1071 mov.l &0x50000000,IFPREGS+0x0(%a6)
1072 mov.l &0x80000000,IFPREGS+0x4(%a6)
1073 mov.l &0x00000000,IFPREGS+0x8(%a6)
1074 mov.l &0x00000208,IFPCREGS+0x4(%a6)
1075 lea inex_0_pc(%pc),%a0
1076 mov.l %a0,IFPCREGS+0x8(%a6)
1078 bsr.l chkregs
1079 tst.b %d0
1080 bne.l error
1082 bsr.l chkfpregs
1083 tst.b %d0
1084 bne.l error
1086 clr.l %d0
1089 #####################################################################
1091 snan_str:
1092 string "\tEnabled SNAN..."
1094 align 0x4
1095 snan_0:
1096 addq.l &0x1,TESTCTR(%a6)
1098 movm.l DEF_REGS(%pc),&0x3fff
1099 fmovm.x DEF_FPREGS(%pc),&0xff
1100 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
1102 mov.w &0x0000,ICCR(%a6)
1103 movm.l &0x7fff,IREGS(%a6)
1104 fmovm.x &0xff,IFPREGS(%a6)
1105 fmov.l &0x00004000,%fpcr # enable SNAN
1106 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
1108 mov.l &0xffff0000,DATA+0x0(%a6)
1109 mov.l &0x00000000,DATA+0x4(%a6)
1110 mov.l &0x00000001,DATA+0x8(%a6)
1111 fmovm.x DATA(%a6),&0x80
1113 mov.w &0x0000,%cc
1114 snan_0_pc:
1115 fadd.b &0x2,%fp0
1117 mov.w %cc,SCCR(%a6)
1118 movm.l &0x7fff,SREGS(%a6)
1119 fmovm.x &0xff,SFPREGS(%a6)
1120 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
1122 mov.l &0xffff0000,IFPREGS+0x0(%a6)
1123 mov.l &0x00000000,IFPREGS+0x4(%a6)
1124 mov.l &0x00000001,IFPREGS+0x8(%a6)
1125 mov.l &0x09004080,IFPCREGS+0x4(%a6)
1126 lea snan_0_pc(%pc),%a0
1127 mov.l %a0,IFPCREGS+0x8(%a6)
1129 bsr.l chkregs
1130 tst.b %d0
1131 bne.l error
1133 bsr.l chkfpregs
1134 tst.b %d0
1135 bne.l error
1137 clr.l %d0
1140 #####################################################################
1142 operr_str:
1143 string "\tEnabled OPERR..."
1145 align 0x4
1146 operr_0:
1147 addq.l &0x1,TESTCTR(%a6)
1149 movm.l DEF_REGS(%pc),&0x3fff
1150 fmovm.x DEF_FPREGS(%pc),&0xff
1151 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
1153 mov.w &0x0000,ICCR(%a6)
1154 movm.l &0x7fff,IREGS(%a6)
1155 fmovm.x &0xff,IFPREGS(%a6)
1156 fmov.l &0x00002000,%fpcr # enable OPERR
1157 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
1159 mov.l &0xffff0000,DATA+0x0(%a6)
1160 mov.l &0x00000000,DATA+0x4(%a6)
1161 mov.l &0x00000000,DATA+0x8(%a6)
1162 fmovm.x DATA(%a6),&0x80
1164 mov.w &0x0000,%cc
1165 operr_0_pc:
1166 fadd.s &0x7f800000,%fp0
1168 mov.w %cc,SCCR(%a6)
1169 movm.l &0x7fff,SREGS(%a6)
1170 fmovm.x &0xff,SFPREGS(%a6)
1171 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
1173 mov.l &0xffff0000,IFPREGS+0x0(%a6)
1174 mov.l &0x00000000,IFPREGS+0x4(%a6)
1175 mov.l &0x00000000,IFPREGS+0x8(%a6)
1176 mov.l &0x01002080,IFPCREGS+0x4(%a6)
1177 lea operr_0_pc(%pc),%a0
1178 mov.l %a0,IFPCREGS+0x8(%a6)
1180 bsr.l chkregs
1181 tst.b %d0
1182 bne.l error
1184 bsr.l chkfpregs
1185 tst.b %d0
1186 bne.l error
1188 clr.l %d0
1191 #####################################################################
1193 dz_str:
1194 string "\tEnabled DZ..."
1196 align 0x4
1197 dz_0:
1198 addq.l &0x1,TESTCTR(%a6)
1200 movm.l DEF_REGS(%pc),&0x3fff
1201 fmovm.x DEF_FPREGS(%pc),&0xff
1202 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
1204 mov.w &0x0000,ICCR(%a6)
1205 movm.l &0x7fff,IREGS(%a6)
1206 fmovm.x &0xff,IFPREGS(%a6)
1207 fmov.l &0x00000400,%fpcr # enable DZ
1208 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
1210 mov.l &0x40000000,DATA+0x0(%a6)
1211 mov.l &0x80000000,DATA+0x4(%a6)
1212 mov.l &0x00000000,DATA+0x8(%a6)
1213 fmovm.x DATA(%a6),&0x80
1215 mov.w &0x0000,%cc
1216 dz_0_pc:
1217 fdiv.b &0x0,%fp0
1219 mov.w %cc,SCCR(%a6)
1220 movm.l &0x7fff,SREGS(%a6)
1221 fmovm.x &0xff,SFPREGS(%a6)
1222 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
1224 mov.l &0x40000000,IFPREGS+0x0(%a6)
1225 mov.l &0x80000000,IFPREGS+0x4(%a6)
1226 mov.l &0x00000000,IFPREGS+0x8(%a6)
1227 mov.l &0x02000410,IFPCREGS+0x4(%a6)
1228 lea dz_0_pc(%pc),%a0
1229 mov.l %a0,IFPCREGS+0x8(%a6)
1231 bsr.l chkregs
1232 tst.b %d0
1233 bne.l error
1235 bsr.l chkfpregs
1236 tst.b %d0
1237 bne.l error
1239 clr.l %d0
1242 #####################################################################
1244 unsupp_str:
1245 string "\tUnimplemented data type/format..."
1247 # an unnormalized number
1248 align 0x4
1249 unsupp_0:
1250 addq.l &0x1,TESTCTR(%a6)
1252 movm.l DEF_REGS(%pc),&0x3fff
1253 fmovm.x DEF_FPREGS(%pc),&0xff
1254 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
1256 mov.w &0x0000,ICCR(%a6)
1257 movm.l &0x7fff,IREGS(%a6)
1258 fmovm.x &0xff,IFPREGS(%a6)
1259 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
1261 mov.l &0xc03f0000,DATA+0x0(%a6)
1262 mov.l &0x00000000,DATA+0x4(%a6)
1263 mov.l &0x00000001,DATA+0x8(%a6)
1264 fmov.b &0x2,%fp0
1265 mov.w &0x0000,%cc
1266 unsupp_0_pc:
1267 fmul.x DATA(%a6),%fp0
1269 mov.w %cc,SCCR(%a6)
1270 movm.l &0x7fff,SREGS(%a6)
1271 fmovm.x &0xff,SFPREGS(%a6)
1272 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
1274 mov.l &0xc0010000,IFPREGS+0x0(%a6)
1275 mov.l &0x80000000,IFPREGS+0x4(%a6)
1276 mov.l &0x00000000,IFPREGS+0x8(%a6)
1277 mov.l &0x08000000,IFPCREGS+0x4(%a6)
1278 lea unsupp_0_pc(%pc),%a0
1279 mov.l %a0,IFPCREGS+0x8(%a6)
1281 bsr.l chkregs
1282 tst.b %d0
1283 bne.l error
1285 bsr.l chkfpregs
1286 tst.b %d0
1287 bne.l error
1289 # a denormalized number
1290 unsupp_1:
1291 addq.l &0x1,TESTCTR(%a6)
1293 movm.l DEF_REGS(%pc),&0x3fff
1294 fmovm.x DEF_FPREGS(%pc),&0xff
1295 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
1297 mov.w &0x0000,ICCR(%a6)
1298 movm.l &0x7fff,IREGS(%a6)
1299 fmovm.x &0xff,IFPREGS(%a6)
1300 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
1302 mov.l &0x80000000,DATA+0x0(%a6)
1303 mov.l &0x01000000,DATA+0x4(%a6)
1304 mov.l &0x00000000,DATA+0x8(%a6)
1305 fmov.l &0x7fffffff,%fp0
1307 mov.w &0x0000,%cc
1308 unsupp_1_pc:
1309 fmul.x DATA(%a6),%fp0
1311 mov.w %cc,SCCR(%a6)
1312 movm.l &0x7fff,SREGS(%a6)
1313 fmovm.x &0xff,SFPREGS(%a6)
1314 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
1316 mov.l &0x80170000,IFPREGS+0x0(%a6)
1317 mov.l &0xfffffffe,IFPREGS+0x4(%a6)
1318 mov.l &0x00000000,IFPREGS+0x8(%a6)
1319 mov.l &0x08000000,IFPCREGS+0x4(%a6)
1320 lea unsupp_1_pc(%pc),%a0
1321 mov.l %a0,IFPCREGS+0x8(%a6)
1323 bsr.l chkregs
1324 tst.b %d0
1325 bne.l error
1327 bsr.l chkfpregs
1328 tst.b %d0
1329 bne.l error
1331 # packed
1332 unsupp_2:
1333 addq.l &0x1,TESTCTR(%a6)
1335 movm.l DEF_REGS(%pc),&0x3fff
1336 fmovm.x DEF_FPREGS(%pc),&0xff
1337 fmovm.l DEF_FPCREGS(%pc),%fpcr,%fpsr,%fpiar
1339 mov.w &0x0000,ICCR(%a6)
1340 movm.l &0x7fff,IREGS(%a6)
1341 fmovm.x &0xff,IFPREGS(%a6)
1342 fmovm.l %fpcr,%fpsr,%fpiar,IFPCREGS(%a6)
1344 mov.l &0xc1230001,DATA+0x0(%a6)
1345 mov.l &0x23456789,DATA+0x4(%a6)
1346 mov.l &0x12345678,DATA+0x8(%a6)
1348 mov.w &0x0000,%cc
1349 unsupp_2_pc:
1350 fabs.p DATA(%a6),%fp0
1352 mov.w %cc,SCCR(%a6)
1353 movm.l &0x7fff,SREGS(%a6)
1354 fmovm.x &0xff,SFPREGS(%a6)
1355 fmovm.l %fpcr,%fpsr,%fpiar,SFPCREGS(%a6)
1357 mov.l &0x3e660000,IFPREGS+0x0(%a6)
1358 mov.l &0xd0ed23e8,IFPREGS+0x4(%a6)
1359 mov.l &0xd14035bc,IFPREGS+0x8(%a6)
1360 mov.l &0x00000108,IFPCREGS+0x4(%a6)
1361 lea unsupp_2_pc(%pc),%a0
1362 mov.l %a0,IFPCREGS+0x8(%a6)
1364 bsr.l chkregs
1365 tst.b %d0
1366 bne.l error
1368 bsr.l chkfpregs
1369 tst.b %d0
1370 bne.l error
1372 clr.l %d0
1375 ###########################################################
1376 ###########################################################
1378 chkregs:
1379 lea IREGS(%a6),%a0
1380 lea SREGS(%a6),%a1
1381 mov.l &14,%d0
1382 chkregs_loop:
1383 cmp.l (%a0)+,(%a1)+
1384 bne.l chkregs_error
1385 dbra.w %d0,chkregs_loop
1387 mov.w ICCR(%a6),%d0
1388 mov.w SCCR(%a6),%d1
1389 cmp.w %d0,%d1
1390 bne.l chkregs_error
1392 clr.l %d0
1395 chkregs_error:
1396 movq.l &0x1,%d0
1399 error:
1400 mov.l TESTCTR(%a6),%d1
1401 movq.l &0x1,%d0
1404 chkfpregs:
1405 lea IFPREGS(%a6),%a0
1406 lea SFPREGS(%a6),%a1
1407 mov.l &23,%d0
1408 chkfpregs_loop:
1409 cmp.l (%a0)+,(%a1)+
1410 bne.l chkfpregs_error
1411 dbra.w %d0,chkfpregs_loop
1413 lea IFPCREGS(%a6),%a0
1414 lea SFPCREGS(%a6),%a1
1415 cmp.l (%a0)+,(%a1)+
1416 bne.l chkfpregs_error
1417 cmp.l (%a0)+,(%a1)+
1418 bne.l chkfpregs_error
1419 cmp.l (%a0)+,(%a1)+
1420 bne.l chkfpregs_error
1422 clr.l %d0
1425 chkfpregs_error:
1426 movq.l &0x1,%d0
1429 DEF_REGS:
1430 long 0xacacacac, 0xacacacac, 0xacacacac, 0xacacacac
1431 long 0xacacacac, 0xacacacac, 0xacacacac, 0xacacacac
1433 long 0xacacacac, 0xacacacac, 0xacacacac, 0xacacacac
1434 long 0xacacacac, 0xacacacac, 0xacacacac, 0xacacacac
1436 DEF_FPREGS:
1437 long 0x7fff0000, 0xffffffff, 0xffffffff
1438 long 0x7fff0000, 0xffffffff, 0xffffffff
1439 long 0x7fff0000, 0xffffffff, 0xffffffff
1440 long 0x7fff0000, 0xffffffff, 0xffffffff
1441 long 0x7fff0000, 0xffffffff, 0xffffffff
1442 long 0x7fff0000, 0xffffffff, 0xffffffff
1443 long 0x7fff0000, 0xffffffff, 0xffffffff
1444 long 0x7fff0000, 0xffffffff, 0xffffffff
1446 DEF_FPCREGS:
1447 long 0x00000000, 0x00000000, 0x00000000
1449 ############################################################
1451 _print_str:
1452 mov.l %d0,-(%sp)
1453 mov.l (TESTTOP-0x80+0x0,%pc),%d0
1454 pea (TESTTOP-0x80,%pc,%d0)
1455 mov.l 0x4(%sp),%d0
1456 rtd &0x4
1458 _print_num:
1459 mov.l %d0,-(%sp)
1460 mov.l (TESTTOP-0x80+0x4,%pc),%d0
1461 pea (TESTTOP-0x80,%pc,%d0)
1462 mov.l 0x4(%sp),%d0
1463 rtd &0x4
1465 ############################################################