1 # frv testcase for csmulcc $GRi,$GRj,$GRk,$CCi,$cond
4 .include "testutils.inc"
10 set_spr_immed 0x1b1b,cccr
13 set_gr_immed 3,gr7 ; multiply small numbers
16 csmulcc gr7,gr8,gr8,cc0,1
21 set_gr_immed 1,gr7 ; multiply by 1
24 csmulcc gr7,gr8,gr8,cc0,1
29 set_gr_immed 2,gr7 ; multiply by 1
32 csmulcc gr7,gr8,gr8,cc4,1
37 set_gr_immed 0,gr7 ; multiply by 0
40 csmulcc gr7,gr8,gr8,cc4,1
45 set_gr_immed 2,gr7 ; multiply by 0
48 csmulcc gr7,gr8,gr8,cc0,1
53 set_gr_limmed 0x3fff,0xffff,gr7 ; 31 bit result
56 csmulcc gr7,gr8,gr8,cc0,1
59 test_gr_limmed 0x7fff,0xfffe,gr9
61 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
64 csmulcc gr7,gr8,gr8,cc4,1
67 test_gr_limmed 0x8000,0x0000,gr9
69 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
72 csmulcc gr7,gr8,gr8,cc4,1
75 test_gr_limmed 0x0000,0x0000,gr9
77 set_gr_limmed 0x7fff,0xffff,gr7 ; max positive result
78 set_gr_limmed 0x7fff,0xffff,gr8
80 csmulcc gr7,gr8,gr8,cc0,1
82 test_gr_limmed 0x3fff,0xffff,gr8
83 test_gr_immed 0x00000001,gr9
86 set_gr_immed -3,gr7 ; multiply small numbers
89 csmulcc gr7,gr8,gr8,cc0,1
94 set_gr_immed 3,gr7 ; multiply small numbers
97 csmulcc gr7,gr8,gr8,cc4,1
102 set_gr_immed 1,gr7 ; multiply by 1
105 csmulcc gr7,gr8,gr8,cc4,1
106 test_icc 1 0 1 1 icc0
110 set_gr_immed -2,gr7 ; multiply by 1
113 csmulcc gr7,gr8,gr8,cc0,1
114 test_icc 1 0 0 0 icc0
118 set_gr_immed 0,gr7 ; multiply by 0
121 csmulcc gr7,gr8,gr8,cc0,1
122 test_icc 0 1 0 1 icc0
126 set_gr_immed -2,gr7 ; multiply by 0
129 csmulcc gr7,gr8,gr8,cc4,1
130 test_icc 0 1 1 0 icc0
134 set_gr_limmed 0x2000,0x0001,gr7 ; 31 bit result
137 csmulcc gr7,gr8,gr8,cc4,1
138 test_icc 1 0 1 1 icc0
139 test_gr_limmed 0xffff,0xffff,gr8
140 test_gr_limmed 0xbfff,0xfffe,gr9
142 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
145 csmulcc gr7,gr8,gr8,cc0,1
146 test_icc 1 0 0 0 icc0
147 test_gr_limmed 0xffff,0xffff,gr8
148 test_gr_limmed 0x8000,0x0000,gr9
150 set_gr_limmed 0x4000,0x0001,gr7 ; 32 bit result
153 csmulcc gr7,gr8,gr8,cc0,1
154 test_icc 1 0 0 1 icc0
155 test_gr_limmed 0xffff,0xffff,gr8
156 test_gr_limmed 0x7fff,0xfffe,gr9
158 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
161 csmulcc gr7,gr8,gr8,cc4,1
162 test_icc 1 0 1 0 icc0
163 test_gr_limmed 0xffff,0xffff,gr8
164 test_gr_limmed 0x0000,0x0000,gr9
166 set_gr_limmed 0x7fff,0xffff,gr7 ; max negative result
167 set_gr_limmed 0x8000,0x0000,gr8
169 csmulcc gr7,gr8,gr8,cc4,1
170 test_icc 1 0 1 1 icc0
171 test_gr_limmed 0xc000,0x0000,gr8
172 test_gr_limmed 0x8000,0x0000,gr9
175 set_gr_immed -3,gr7 ; multiply small numbers
178 csmulcc gr7,gr8,gr8,cc0,1
179 test_icc 0 0 0 0 icc0
183 set_gr_immed -1,gr7 ; multiply by 1
186 csmulcc gr7,gr8,gr8,cc0,1
187 test_icc 0 0 0 1 icc0
191 set_gr_immed -2,gr7 ; multiply by 1
194 csmulcc gr7,gr8,gr8,cc4,1
195 test_icc 0 0 1 0 icc0
199 set_gr_limmed 0xc000,0x0001,gr7 ; 31 bit result
202 csmulcc gr7,gr8,gr8,cc4,1
203 test_icc 0 0 1 1 icc0
205 test_gr_limmed 0x7fff,0xfffe,gr9
207 set_gr_limmed 0xc000,0x0000,gr7 ; 32 bit result
210 csmulcc gr7,gr8,gr8,cc0,1
211 test_icc 0 0 0 0 icc0
213 test_gr_limmed 0x8000,0x0000,gr9
215 set_gr_limmed 0xc000,0x0000,gr7 ; 33 bit result
218 csmulcc gr7,gr8,gr8,cc0,1
219 test_icc 0 0 0 1 icc0
221 test_gr_immed 0x00000000,gr9
223 set_gr_limmed 0x8000,0x0001,gr7 ; almost max positive result
224 set_gr_limmed 0x8000,0x0001,gr8
226 csmulcc gr7,gr8,gr8,cc4,1
227 test_icc 0 0 1 0 icc0
228 test_gr_limmed 0x3fff,0xffff,gr8
229 test_gr_immed 0x00000001,gr9
232 set_gr_limmed 0x8000,0x0000,gr7 ; max positive result
233 set_gr_limmed 0x8000,0x0000,gr8
235 csmulcc gr7,gr8,gr8,cc4,1
236 test_icc 0 0 1 1 icc0
237 test_gr_limmed 0x4000,0x0000,gr8
238 test_gr_immed 0x00000000,gr9
241 set_gr_immed 3,gr7 ; multiply small numbers
244 csmulcc gr7,gr8,gr8,cc0,0
245 test_icc 0 0 0 0 icc0
249 set_gr_immed 1,gr7 ; multiply by 1
252 csmulcc gr7,gr8,gr8,cc0,0
253 test_icc 0 0 0 1 icc0
257 set_gr_immed 2,gr7 ; multiply by 1
260 csmulcc gr7,gr8,gr8,cc4,0
261 test_icc 0 0 1 0 icc0
265 set_gr_immed 0,gr7 ; multiply by 0
268 csmulcc gr7,gr8,gr8,cc4,0
269 test_icc 0 0 1 1 icc0
273 set_gr_immed 2,gr7 ; multiply by 0
276 csmulcc gr7,gr8,gr8,cc0,0
277 test_icc 0 1 0 0 icc0
281 set_gr_limmed 0x3fff,0xffff,gr7 ; 31 bit result
284 csmulcc gr7,gr8,gr8,cc0,0
285 test_icc 0 1 0 1 icc0
289 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
292 csmulcc gr7,gr8,gr8,cc4,0
293 test_icc 0 1 1 0 icc0
297 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
300 csmulcc gr7,gr8,gr8,cc4,0
301 test_icc 0 1 1 1 icc0
305 set_gr_limmed 0x7fff,0xffff,gr7 ; max positive result
306 set_gr_limmed 0x7fff,0xffff,gr8
308 csmulcc gr7,gr8,gr8,cc0,0
309 test_icc 1 0 0 0 icc0
310 test_gr_limmed 0x7fff,0xffff,gr8
314 set_gr_immed -3,gr7 ; multiply small numbers
317 csmulcc gr7,gr8,gr8,cc0,0
318 test_icc 1 0 0 1 icc0
322 set_gr_immed 3,gr7 ; multiply small numbers
325 csmulcc gr7,gr8,gr8,cc4,0
326 test_icc 1 0 1 0 icc0
330 set_gr_immed 1,gr7 ; multiply by 1
333 csmulcc gr7,gr8,gr8,cc4,0
334 test_icc 1 0 1 1 icc0
338 set_gr_immed -2,gr7 ; multiply by 1
341 csmulcc gr7,gr8,gr8,cc0,0
342 test_icc 1 1 0 0 icc0
346 set_gr_immed 0,gr7 ; multiply by 0
349 csmulcc gr7,gr8,gr8,cc0,0
350 test_icc 1 1 0 1 icc0
354 set_gr_immed -2,gr7 ; multiply by 0
357 csmulcc gr7,gr8,gr8,cc4,0
358 test_icc 1 1 1 0 icc0
362 set_gr_limmed 0x2000,0x0001,gr7 ; 31 bit result
365 csmulcc gr7,gr8,gr8,cc4,0
366 test_icc 1 1 1 1 icc0
370 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
373 csmulcc gr7,gr8,gr8,cc0,0
374 test_icc 0 0 0 0 icc0
378 set_gr_limmed 0x4000,0x0001,gr7 ; 32 bit result
381 csmulcc gr7,gr8,gr8,cc0,0
382 test_icc 0 0 0 1 icc0
386 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
389 csmulcc gr7,gr8,gr8,cc4,0
390 test_icc 0 0 1 0 icc0
394 set_gr_limmed 0x7fff,0xffff,gr7 ; max negative result
395 set_gr_limmed 0x8000,0x0000,gr8
397 csmulcc gr7,gr8,gr8,cc4,0
398 test_icc 0 0 1 1 icc0
399 test_gr_limmed 0x8000,0x0000,gr8
403 set_gr_immed -3,gr7 ; multiply small numbers
406 csmulcc gr7,gr8,gr8,cc0,0
407 test_icc 0 1 0 0 icc0
411 set_gr_immed -1,gr7 ; multiply by 1
414 csmulcc gr7,gr8,gr8,cc0,0
415 test_icc 0 1 0 1 icc0
419 set_gr_immed -2,gr7 ; multiply by 1
422 csmulcc gr7,gr8,gr8,cc4,0
423 test_icc 0 1 1 0 icc0
427 set_gr_limmed 0xc000,0x0001,gr7 ; 31 bit result
430 csmulcc gr7,gr8,gr8,cc4,0
431 test_icc 0 1 1 1 icc0
435 set_gr_limmed 0xc000,0x0000,gr7 ; 32 bit result
438 csmulcc gr7,gr8,gr8,cc0,0
439 test_icc 1 0 0 0 icc0
443 set_gr_limmed 0xc000,0x0000,gr7 ; 33 bit result
446 csmulcc gr7,gr8,gr8,cc0,0
447 test_icc 1 0 0 1 icc0
451 set_gr_limmed 0x8000,0x0001,gr7 ; almost max positive result
452 set_gr_limmed 0x8000,0x0001,gr8
454 csmulcc gr7,gr8,gr8,cc4,0
455 test_icc 1 0 1 0 icc0
456 test_gr_limmed 0x8000,0x0001,gr8
460 set_gr_limmed 0x8000,0x0000,gr7 ; max positive result
461 set_gr_limmed 0x8000,0x0000,gr8
463 csmulcc gr7,gr8,gr8,cc4,0
464 test_icc 1 0 1 1 icc0
465 test_gr_limmed 0x8000,0x0000,gr8
469 set_gr_immed 3,gr7 ; multiply small numbers
472 csmulcc gr7,gr8,gr8,cc1,0
473 test_icc 0 0 0 0 icc1
477 set_gr_immed 1,gr7 ; multiply by 1
480 csmulcc gr7,gr8,gr8,cc1,0
481 test_icc 0 0 0 1 icc1
485 set_gr_immed 2,gr7 ; multiply by 1
488 csmulcc gr7,gr8,gr8,cc5,0
489 test_icc 0 0 1 0 icc1
493 set_gr_immed 0,gr7 ; multiply by 0
496 csmulcc gr7,gr8,gr8,cc5,0
497 test_icc 0 1 1 1 icc1
501 set_gr_immed 2,gr7 ; multiply by 0
504 csmulcc gr7,gr8,gr8,cc1,0
505 test_icc 0 1 0 0 icc1
509 set_gr_limmed 0x3fff,0xffff,gr7 ; 31 bit result
512 csmulcc gr7,gr8,gr8,cc1,0
513 test_icc 0 0 0 1 icc1
515 test_gr_limmed 0x7fff,0xfffe,gr9
517 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
520 csmulcc gr7,gr8,gr8,cc5,0
521 test_icc 0 0 1 0 icc1
523 test_gr_limmed 0x8000,0x0000,gr9
525 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
528 csmulcc gr7,gr8,gr8,cc5,0
529 test_icc 0 0 1 1 icc1
531 test_gr_limmed 0x0000,0x0000,gr9
533 set_gr_limmed 0x7fff,0xffff,gr7 ; max positive result
534 set_gr_limmed 0x7fff,0xffff,gr8
536 csmulcc gr7,gr8,gr8,cc1,0
537 test_icc 0 0 0 0 icc1
538 test_gr_limmed 0x3fff,0xffff,gr8
539 test_gr_immed 0x00000001,gr9
542 set_gr_immed -3,gr7 ; multiply small numbers
545 csmulcc gr7,gr8,gr8,cc1,0
546 test_icc 1 0 0 1 icc1
550 set_gr_immed 3,gr7 ; multiply small numbers
553 csmulcc gr7,gr8,gr8,cc5,0
554 test_icc 1 0 1 0 icc1
558 set_gr_immed 1,gr7 ; multiply by 1
561 csmulcc gr7,gr8,gr8,cc5,0
562 test_icc 1 0 1 1 icc1
566 set_gr_immed -2,gr7 ; multiply by 1
569 csmulcc gr7,gr8,gr8,cc1,0
570 test_icc 1 0 0 0 icc1
574 set_gr_immed 0,gr7 ; multiply by 0
577 csmulcc gr7,gr8,gr8,cc1,0
578 test_icc 0 1 0 1 icc1
582 set_gr_immed -2,gr7 ; multiply by 0
585 csmulcc gr7,gr8,gr8,cc5,0
586 test_icc 0 1 1 0 icc1
590 set_gr_limmed 0x2000,0x0001,gr7 ; 31 bit result
593 csmulcc gr7,gr8,gr8,cc5,0
594 test_icc 1 0 1 1 icc1
595 test_gr_limmed 0xffff,0xffff,gr8
596 test_gr_limmed 0xbfff,0xfffe,gr9
598 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
601 csmulcc gr7,gr8,gr8,cc1,0
602 test_icc 1 0 0 0 icc1
603 test_gr_limmed 0xffff,0xffff,gr8
604 test_gr_limmed 0x8000,0x0000,gr9
606 set_gr_limmed 0x4000,0x0001,gr7 ; 32 bit result
609 csmulcc gr7,gr8,gr8,cc1,0
610 test_icc 1 0 0 1 icc1
611 test_gr_limmed 0xffff,0xffff,gr8
612 test_gr_limmed 0x7fff,0xfffe,gr9
614 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
617 csmulcc gr7,gr8,gr8,cc5,0
618 test_icc 1 0 1 0 icc1
619 test_gr_limmed 0xffff,0xffff,gr8
620 test_gr_limmed 0x0000,0x0000,gr9
622 set_gr_limmed 0x7fff,0xffff,gr7 ; max negative result
623 set_gr_limmed 0x8000,0x0000,gr8
625 csmulcc gr7,gr8,gr8,cc5,0
626 test_icc 1 0 1 1 icc1
627 test_gr_limmed 0xc000,0x0000,gr8
628 test_gr_limmed 0x8000,0x0000,gr9
631 set_gr_immed -3,gr7 ; multiply small numbers
634 csmulcc gr7,gr8,gr8,cc1,0
635 test_icc 0 0 0 0 icc1
639 set_gr_immed -1,gr7 ; multiply by 1
642 csmulcc gr7,gr8,gr8,cc1,0
643 test_icc 0 0 0 1 icc1
647 set_gr_immed -2,gr7 ; multiply by 1
650 csmulcc gr7,gr8,gr8,cc5,0
651 test_icc 0 0 1 0 icc1
655 set_gr_limmed 0xc000,0x0001,gr7 ; 31 bit result
658 csmulcc gr7,gr8,gr8,cc5,0
659 test_icc 0 0 1 1 icc1
661 test_gr_limmed 0x7fff,0xfffe,gr9
663 set_gr_limmed 0xc000,0x0000,gr7 ; 32 bit result
666 csmulcc gr7,gr8,gr8,cc1,0
667 test_icc 0 0 0 0 icc1
669 test_gr_limmed 0x8000,0x0000,gr9
671 set_gr_limmed 0xc000,0x0000,gr7 ; 33 bit result
674 csmulcc gr7,gr8,gr8,cc1,0
675 test_icc 0 0 0 1 icc1
677 test_gr_immed 0x00000000,gr9
679 set_gr_limmed 0x8000,0x0001,gr7 ; almost max positive result
680 set_gr_limmed 0x8000,0x0001,gr8
682 csmulcc gr7,gr8,gr8,cc5,0
683 test_icc 0 0 1 0 icc1
684 test_gr_limmed 0x3fff,0xffff,gr8
685 test_gr_immed 0x00000001,gr9
688 set_gr_limmed 0x8000,0x0000,gr7 ; max positive result
689 set_gr_limmed 0x8000,0x0000,gr8
691 csmulcc gr7,gr8,gr8,cc5,0
692 test_icc 0 0 1 1 icc1
693 test_gr_limmed 0x4000,0x0000,gr8
694 test_gr_immed 0x00000000,gr9
697 set_gr_immed 3,gr7 ; multiply small numbers
700 csmulcc gr7,gr8,gr8,cc1,1
701 test_icc 0 0 0 0 icc1
705 set_gr_immed 1,gr7 ; multiply by 1
708 csmulcc gr7,gr8,gr8,cc1,1
709 test_icc 0 0 0 1 icc1
713 set_gr_immed 2,gr7 ; multiply by 1
716 csmulcc gr7,gr8,gr8,cc5,1
717 test_icc 0 0 1 0 icc1
721 set_gr_immed 0,gr7 ; multiply by 0
724 csmulcc gr7,gr8,gr8,cc5,1
725 test_icc 0 0 1 1 icc1
729 set_gr_immed 2,gr7 ; multiply by 0
732 csmulcc gr7,gr8,gr8,cc1,1
733 test_icc 0 1 0 0 icc1
737 set_gr_limmed 0x3fff,0xffff,gr7 ; 31 bit result
740 csmulcc gr7,gr8,gr8,cc1,1
741 test_icc 0 1 0 1 icc1
745 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
748 csmulcc gr7,gr8,gr8,cc5,1
749 test_icc 0 1 1 0 icc1
753 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
756 csmulcc gr7,gr8,gr8,cc5,1
757 test_icc 0 1 1 1 icc1
761 set_gr_limmed 0x7fff,0xffff,gr7 ; max positive result
762 set_gr_limmed 0x7fff,0xffff,gr8
764 csmulcc gr7,gr8,gr8,cc1,1
765 test_icc 1 0 0 0 icc1
766 test_gr_limmed 0x7fff,0xffff,gr8
770 set_gr_immed -3,gr7 ; multiply small numbers
773 csmulcc gr7,gr8,gr8,cc1,1
774 test_icc 1 0 0 1 icc1
778 set_gr_immed 3,gr7 ; multiply small numbers
781 csmulcc gr7,gr8,gr8,cc5,1
782 test_icc 1 0 1 0 icc1
786 set_gr_immed 1,gr7 ; multiply by 1
789 csmulcc gr7,gr8,gr8,cc5,1
790 test_icc 1 0 1 1 icc1
794 set_gr_immed -2,gr7 ; multiply by 1
797 csmulcc gr7,gr8,gr8,cc1,1
798 test_icc 1 1 0 0 icc1
802 set_gr_immed 0,gr7 ; multiply by 0
805 csmulcc gr7,gr8,gr8,cc1,1
806 test_icc 1 1 0 1 icc1
810 set_gr_immed -2,gr7 ; multiply by 0
813 csmulcc gr7,gr8,gr8,cc5,1
814 test_icc 1 1 1 0 icc1
818 set_gr_limmed 0x2000,0x0001,gr7 ; 31 bit result
821 csmulcc gr7,gr8,gr8,cc5,1
822 test_icc 1 1 1 1 icc1
826 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
829 csmulcc gr7,gr8,gr8,cc1,1
830 test_icc 0 0 0 0 icc1
834 set_gr_limmed 0x4000,0x0001,gr7 ; 32 bit result
837 csmulcc gr7,gr8,gr8,cc1,1
838 test_icc 0 0 0 1 icc1
842 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
845 csmulcc gr7,gr8,gr8,cc5,1
846 test_icc 0 0 1 0 icc1
850 set_gr_limmed 0x7fff,0xffff,gr7 ; max negative result
851 set_gr_limmed 0x8000,0x0000,gr8
853 csmulcc gr7,gr8,gr8,cc5,1
854 test_icc 0 0 1 1 icc1
855 test_gr_limmed 0x8000,0x0000,gr8
859 set_gr_immed -3,gr7 ; multiply small numbers
862 csmulcc gr7,gr8,gr8,cc1,1
863 test_icc 0 1 0 0 icc1
867 set_gr_immed -1,gr7 ; multiply by 1
870 csmulcc gr7,gr8,gr8,cc1,1
871 test_icc 0 1 0 1 icc1
875 set_gr_immed -2,gr7 ; multiply by 1
878 csmulcc gr7,gr8,gr8,cc5,1
879 test_icc 0 1 1 0 icc1
883 set_gr_limmed 0xc000,0x0001,gr7 ; 31 bit result
886 csmulcc gr7,gr8,gr8,cc5,1
887 test_icc 0 1 1 1 icc1
891 set_gr_limmed 0xc000,0x0000,gr7 ; 32 bit result
894 csmulcc gr7,gr8,gr8,cc1,1
895 test_icc 1 0 0 0 icc1
899 set_gr_limmed 0xc000,0x0000,gr7 ; 33 bit result
902 csmulcc gr7,gr8,gr8,cc1,1
903 test_icc 1 0 0 1 icc1
907 set_gr_limmed 0x8000,0x0001,gr7 ; almost max positive result
908 set_gr_limmed 0x8000,0x0001,gr8
910 csmulcc gr7,gr8,gr8,cc5,1
911 test_icc 1 0 1 0 icc1
912 test_gr_limmed 0x8000,0x0001,gr8
916 set_gr_limmed 0x8000,0x0000,gr7 ; max positive result
917 set_gr_limmed 0x8000,0x0000,gr8
919 csmulcc gr7,gr8,gr8,cc5,1
920 test_icc 1 0 1 1 icc1
921 test_gr_limmed 0x8000,0x0000,gr8
925 set_gr_immed 3,gr7 ; multiply small numbers
928 csmulcc gr7,gr8,gr8,cc2,0
929 test_icc 0 0 0 0 icc2
933 set_gr_immed 1,gr7 ; multiply by 1
936 csmulcc gr7,gr8,gr8,cc2,1
937 test_icc 0 0 0 1 icc2
941 set_gr_immed 2,gr7 ; multiply by 1
944 csmulcc gr7,gr8,gr8,cc6,0
945 test_icc 0 0 1 0 icc2
949 set_gr_immed 0,gr7 ; multiply by 0
952 csmulcc gr7,gr8,gr8,cc6,1
953 test_icc 0 0 1 1 icc2
957 set_gr_immed 2,gr7 ; multiply by 0
960 csmulcc gr7,gr8,gr8,cc2,0
961 test_icc 0 1 0 0 icc2
965 set_gr_limmed 0x3fff,0xffff,gr7 ; 31 bit result
968 csmulcc gr7,gr8,gr8,cc2,1
969 test_icc 0 1 0 1 icc2
973 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
976 csmulcc gr7,gr8,gr8,cc6,1
977 test_icc 0 1 1 0 icc2
981 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
984 csmulcc gr7,gr8,gr8,cc6,0
985 test_icc 0 1 1 1 icc2
989 set_gr_limmed 0x7fff,0xffff,gr7 ; max positive result
990 set_gr_limmed 0x7fff,0xffff,gr8
992 csmulcc gr7,gr8,gr8,cc2,1
993 test_icc 1 0 0 0 icc2
994 test_gr_limmed 0x7fff,0xffff,gr8
998 set_gr_immed -3,gr7 ; multiply small numbers
1001 csmulcc gr7,gr8,gr8,cc2,0
1002 test_icc 1 0 0 1 icc2
1006 set_gr_immed 3,gr7 ; multiply small numbers
1009 csmulcc gr7,gr8,gr8,cc6,1
1010 test_icc 1 0 1 0 icc2
1011 test_gr_immed -2,gr8
1014 set_gr_immed 1,gr7 ; multiply by 1
1017 csmulcc gr7,gr8,gr8,cc6,0
1018 test_icc 1 0 1 1 icc2
1019 test_gr_immed -2,gr8
1022 set_gr_immed -2,gr7 ; multiply by 1
1025 csmulcc gr7,gr8,gr8,cc2,1
1026 test_icc 1 1 0 0 icc2
1030 set_gr_immed 0,gr7 ; multiply by 0
1033 csmulcc gr7,gr8,gr8,cc2,0
1034 test_icc 1 1 0 1 icc2
1035 test_gr_immed -2,gr8
1038 set_gr_immed -2,gr7 ; multiply by 0
1041 csmulcc gr7,gr8,gr8,cc6,1
1042 test_icc 1 1 1 0 icc2
1046 set_gr_limmed 0x2000,0x0001,gr7 ; 31 bit result
1049 csmulcc gr7,gr8,gr8,cc6,0
1050 test_icc 1 1 1 1 icc2
1051 test_gr_immed -2,gr8
1054 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
1057 csmulcc gr7,gr8,gr8,cc2,1
1058 test_icc 0 0 0 0 icc2
1059 test_gr_immed -2,gr8
1062 set_gr_limmed 0x4000,0x0001,gr7 ; 32 bit result
1065 csmulcc gr7,gr8,gr8,cc2,0
1066 test_icc 0 0 0 1 icc2
1067 test_gr_immed -2,gr8
1070 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
1073 csmulcc gr7,gr8,gr8,cc6,1
1074 test_icc 0 0 1 0 icc2
1075 test_gr_immed -4,gr8
1078 set_gr_limmed 0x7fff,0xffff,gr7 ; max negative result
1079 set_gr_limmed 0x8000,0x0000,gr8
1081 csmulcc gr7,gr8,gr8,cc6,0
1082 test_icc 0 0 1 1 icc2
1083 test_gr_limmed 0x8000,0x0000,gr8
1087 set_gr_immed -3,gr7 ; multiply small numbers
1090 csmulcc gr7,gr8,gr8,cc2,1
1091 test_icc 0 1 0 0 icc2
1092 test_gr_immed -2,gr8
1095 set_gr_immed -1,gr7 ; multiply by 1
1098 csmulcc gr7,gr8,gr8,cc2,0
1099 test_icc 0 1 0 1 icc2
1100 test_gr_immed -2,gr8
1103 set_gr_immed -2,gr7 ; multiply by 1
1106 csmulcc gr7,gr8,gr8,cc6,1
1107 test_icc 0 1 1 0 icc2
1108 test_gr_immed -1,gr8
1111 set_gr_limmed 0xc000,0x0001,gr7 ; 31 bit result
1114 csmulcc gr7,gr8,gr8,cc6,0
1115 test_icc 0 1 1 1 icc2
1116 test_gr_immed -2,gr8
1119 set_gr_limmed 0xc000,0x0000,gr7 ; 32 bit result
1122 csmulcc gr7,gr8,gr8,cc2,1
1123 test_icc 1 0 0 0 icc2
1124 test_gr_immed -2,gr8
1127 set_gr_limmed 0xc000,0x0000,gr7 ; 33 bit result
1130 csmulcc gr7,gr8,gr8,cc2,0
1131 test_icc 1 0 0 1 icc2
1132 test_gr_immed -4,gr8
1135 set_gr_limmed 0x8000,0x0001,gr7 ; almost max positive result
1136 set_gr_limmed 0x8000,0x0001,gr8
1138 csmulcc gr7,gr8,gr8,cc6,1
1139 test_icc 1 0 1 0 icc2
1140 test_gr_limmed 0x8000,0x0001,gr8
1144 set_gr_limmed 0x8000,0x0000,gr7 ; max positive result
1145 set_gr_limmed 0x8000,0x0000,gr8
1147 csmulcc gr7,gr8,gr8,cc6,0
1148 test_icc 1 0 1 1 icc2
1149 test_gr_limmed 0x8000,0x0000,gr8
1153 set_gr_immed 3,gr7 ; multiply small numbers
1156 csmulcc gr7,gr8,gr8,cc3,0
1157 test_icc 0 0 0 0 icc3
1161 set_gr_immed 1,gr7 ; multiply by 1
1164 csmulcc gr7,gr8,gr8,cc3,1
1165 test_icc 0 0 0 1 icc3
1169 set_gr_immed 2,gr7 ; multiply by 1
1172 csmulcc gr7,gr8,gr8,cc7,0
1173 test_icc 0 0 1 0 icc3
1177 set_gr_immed 0,gr7 ; multiply by 0
1180 csmulcc gr7,gr8,gr8,cc7,1
1181 test_icc 0 0 1 1 icc3
1185 set_gr_immed 2,gr7 ; multiply by 0
1188 csmulcc gr7,gr8,gr8,cc3,0
1189 test_icc 0 1 0 0 icc3
1193 set_gr_limmed 0x3fff,0xffff,gr7 ; 31 bit result
1196 csmulcc gr7,gr8,gr8,cc3,1
1197 test_icc 0 1 0 1 icc3
1201 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
1204 csmulcc gr7,gr8,gr8,cc7,1
1205 test_icc 0 1 1 0 icc3
1209 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
1212 csmulcc gr7,gr8,gr8,cc7,0
1213 test_icc 0 1 1 1 icc3
1217 set_gr_limmed 0x7fff,0xffff,gr7 ; max positive result
1218 set_gr_limmed 0x7fff,0xffff,gr8
1220 csmulcc gr7,gr8,gr8,cc3,1
1221 test_icc 1 0 0 0 icc3
1222 test_gr_limmed 0x7fff,0xffff,gr8
1226 set_gr_immed -3,gr7 ; multiply small numbers
1229 csmulcc gr7,gr8,gr8,cc3,0
1230 test_icc 1 0 0 1 icc3
1234 set_gr_immed 3,gr7 ; multiply small numbers
1237 csmulcc gr7,gr8,gr8,cc7,1
1238 test_icc 1 0 1 0 icc3
1239 test_gr_immed -2,gr8
1242 set_gr_immed 1,gr7 ; multiply by 1
1245 csmulcc gr7,gr8,gr8,cc7,0
1246 test_icc 1 0 1 1 icc3
1247 test_gr_immed -2,gr8
1250 set_gr_immed -2,gr7 ; multiply by 1
1253 csmulcc gr7,gr8,gr8,cc3,1
1254 test_icc 1 1 0 0 icc3
1258 set_gr_immed 0,gr7 ; multiply by 0
1261 csmulcc gr7,gr8,gr8,cc3,0
1262 test_icc 1 1 0 1 icc3
1263 test_gr_immed -2,gr8
1266 set_gr_immed -2,gr7 ; multiply by 0
1269 csmulcc gr7,gr8,gr8,cc7,1
1270 test_icc 1 1 1 0 icc3
1274 set_gr_limmed 0x2000,0x0001,gr7 ; 31 bit result
1277 csmulcc gr7,gr8,gr8,cc7,0
1278 test_icc 1 1 1 1 icc3
1279 test_gr_immed -2,gr8
1282 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
1285 csmulcc gr7,gr8,gr8,cc3,1
1286 test_icc 0 0 0 0 icc3
1287 test_gr_immed -2,gr8
1290 set_gr_limmed 0x4000,0x0001,gr7 ; 32 bit result
1293 csmulcc gr7,gr8,gr8,cc3,0
1294 test_icc 0 0 0 1 icc3
1295 test_gr_immed -2,gr8
1298 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
1301 csmulcc gr7,gr8,gr8,cc7,1
1302 test_icc 0 0 1 0 icc3
1303 test_gr_immed -4,gr8
1306 set_gr_limmed 0x7fff,0xffff,gr7 ; max negative result
1307 set_gr_limmed 0x8000,0x0000,gr8
1309 csmulcc gr7,gr8,gr8,cc7,0
1310 test_icc 0 0 1 1 icc3
1311 test_gr_limmed 0x8000,0x0000,gr8
1315 set_gr_immed -3,gr7 ; multiply small numbers
1318 csmulcc gr7,gr8,gr8,cc3,1
1319 test_icc 0 1 0 0 icc3
1320 test_gr_immed -2,gr8
1323 set_gr_immed -1,gr7 ; multiply by 1
1326 csmulcc gr7,gr8,gr8,cc3,0
1327 test_icc 0 1 0 1 icc3
1328 test_gr_immed -2,gr8
1331 set_gr_immed -2,gr7 ; multiply by 1
1334 csmulcc gr7,gr8,gr8,cc7,1
1335 test_icc 0 1 1 0 icc3
1336 test_gr_immed -1,gr8
1339 set_gr_limmed 0xc000,0x0001,gr7 ; 31 bit result
1342 csmulcc gr7,gr8,gr8,cc7,0
1343 test_icc 0 1 1 1 icc3
1344 test_gr_immed -2,gr8
1347 set_gr_limmed 0xc000,0x0000,gr7 ; 32 bit result
1350 csmulcc gr7,gr8,gr8,cc3,1
1351 test_icc 1 0 0 0 icc3
1352 test_gr_immed -2,gr8
1355 set_gr_limmed 0xc000,0x0000,gr7 ; 33 bit result
1358 csmulcc gr7,gr8,gr8,cc3,0
1359 test_icc 1 0 0 1 icc3
1360 test_gr_immed -4,gr8
1363 set_gr_limmed 0x8000,0x0001,gr7 ; almost max positive result
1364 set_gr_limmed 0x8000,0x0001,gr8
1366 csmulcc gr7,gr8,gr8,cc7,1
1367 test_icc 1 0 1 0 icc3
1368 test_gr_limmed 0x8000,0x0001,gr8
1372 set_gr_limmed 0x8000,0x0000,gr7 ; max positive result
1373 set_gr_limmed 0x8000,0x0000,gr8
1375 csmulcc gr7,gr8,gr8,cc7,0
1376 test_icc 1 0 1 1 icc3
1377 test_gr_limmed 0x8000,0x0000,gr8