1 # frv testcase for csmul $GRi,$GRj,$GRk,$CCi,$cond
4 .include "testutils.inc"
10 set_spr_immed 0x1b1b,cccr
13 set_gr_immed 3,gr7 ; multiply small numbers
15 csmul gr7,gr8,gr8,cc4,1
19 set_gr_immed 1,gr7 ; multiply by 1
21 csmul gr7,gr8,gr8,cc4,1
25 set_gr_immed 2,gr7 ; multiply by 1
27 csmul gr7,gr8,gr8,cc4,1
31 set_gr_immed 0,gr7 ; multiply by 0
33 csmul gr7,gr8,gr8,cc4,1
37 set_gr_immed 2,gr7 ; multiply by 0
39 csmul gr7,gr8,gr8,cc4,1
43 set_gr_limmed 0x3fff,0xffff,gr7 ; 31 bit result
45 csmul gr7,gr8,gr8,cc4,1
47 test_gr_limmed 0x7fff,0xfffe,gr9
49 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
51 csmul gr7,gr8,gr8,cc4,1
53 test_gr_limmed 0x8000,0x0000,gr9
55 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
57 csmul gr7,gr8,gr8,cc4,1
59 test_gr_limmed 0x0000,0x0000,gr9
61 set_gr_limmed 0x7fff,0xffff,gr7 ; max positive result
62 set_gr_limmed 0x7fff,0xffff,gr8
63 csmul gr7,gr8,gr8,cc4,1
64 test_gr_limmed 0x3fff,0xffff,gr8
65 test_gr_immed 0x00000001,gr9
68 set_gr_immed -3,gr7 ; multiply small numbers
70 csmul gr7,gr8,gr8,cc4,1
74 set_gr_immed 3,gr7 ; multiply small numbers
76 csmul gr7,gr8,gr8,cc4,1
80 set_gr_immed 1,gr7 ; multiply by 1
82 csmul gr7,gr8,gr8,cc4,1
86 set_gr_immed -2,gr7 ; multiply by 1
88 csmul gr7,gr8,gr8,cc4,1
92 set_gr_immed 0,gr7 ; multiply by 0
94 csmul gr7,gr8,gr8,cc4,1
98 set_gr_immed -2,gr7 ; multiply by 0
100 csmul gr7,gr8,gr8,cc4,1
104 set_gr_limmed 0x2000,0x0001,gr7 ; 31 bit result
106 csmul gr7,gr8,gr8,cc4,1
107 test_gr_limmed 0xffff,0xffff,gr8
108 test_gr_limmed 0xbfff,0xfffe,gr9
110 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
112 csmul gr7,gr8,gr8,cc4,1
113 test_gr_limmed 0xffff,0xffff,gr8
114 test_gr_limmed 0x8000,0x0000,gr9
116 set_gr_limmed 0x4000,0x0001,gr7 ; 32 bit result
118 csmul gr7,gr8,gr8,cc4,1
119 test_gr_limmed 0xffff,0xffff,gr8
120 test_gr_limmed 0x7fff,0xfffe,gr9
122 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
124 csmul gr7,gr8,gr8,cc4,1
125 test_gr_limmed 0xffff,0xffff,gr8
126 test_gr_limmed 0x0000,0x0000,gr9
128 set_gr_limmed 0x7fff,0xffff,gr7 ; max negative result
129 set_gr_limmed 0x8000,0x0000,gr8
130 csmul gr7,gr8,gr8,cc4,1
131 test_gr_limmed 0xc000,0x0000,gr8
132 test_gr_limmed 0x8000,0x0000,gr9
135 set_gr_immed -3,gr7 ; multiply small numbers
137 csmul gr7,gr8,gr8,cc4,1
141 set_gr_immed -1,gr7 ; multiply by 1
143 csmul gr7,gr8,gr8,cc4,1
147 set_gr_immed -2,gr7 ; multiply by 1
149 csmul gr7,gr8,gr8,cc4,1
153 set_gr_limmed 0xc000,0x0001,gr7 ; 31 bit result
155 csmul gr7,gr8,gr8,cc4,1
157 test_gr_limmed 0x7fff,0xfffe,gr9
159 set_gr_limmed 0xc000,0x0000,gr7 ; 32 bit result
161 csmul gr7,gr8,gr8,cc4,1
163 test_gr_limmed 0x8000,0x0000,gr9
165 set_gr_limmed 0xc000,0x0000,gr7 ; 33 bit result
167 csmul gr7,gr8,gr8,cc4,1
169 test_gr_immed 0x00000000,gr9
171 set_gr_limmed 0x8000,0x0001,gr7 ; almost max positive result
172 set_gr_limmed 0x8000,0x0001,gr8
173 csmul gr7,gr8,gr8,cc4,1
174 test_gr_limmed 0x3fff,0xffff,gr8
175 test_gr_immed 0x00000001,gr9
178 set_gr_limmed 0x8000,0x0000,gr7 ; max positive result
179 set_gr_limmed 0x8000,0x0000,gr8
180 csmul gr7,gr8,gr8,cc4,1
181 test_gr_limmed 0x4000,0x0000,gr8
182 test_gr_immed 0x00000000,gr9
185 set_gr_immed 3,gr7 ; multiply small numbers
187 csmul gr7,gr8,gr8,cc5,0
191 set_gr_immed 1,gr7 ; multiply by 1
193 csmul gr7,gr8,gr8,cc5,0
197 set_gr_immed 2,gr7 ; multiply by 1
199 csmul gr7,gr8,gr8,cc5,0
203 set_gr_immed 0,gr7 ; multiply by 0
205 csmul gr7,gr8,gr8,cc5,0
209 set_gr_immed 2,gr7 ; multiply by 0
211 csmul gr7,gr8,gr8,cc5,0
215 set_gr_limmed 0x3fff,0xffff,gr7 ; 31 bit result
217 csmul gr7,gr8,gr8,cc5,0
219 test_gr_limmed 0x7fff,0xfffe,gr9
221 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
223 csmul gr7,gr8,gr8,cc5,0
225 test_gr_limmed 0x8000,0x0000,gr9
227 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
229 csmul gr7,gr8,gr8,cc5,0
231 test_gr_limmed 0x0000,0x0000,gr9
233 set_gr_limmed 0x7fff,0xffff,gr7 ; max positive result
234 set_gr_limmed 0x7fff,0xffff,gr8
235 csmul gr7,gr8,gr8,cc5,0
236 test_gr_limmed 0x3fff,0xffff,gr8
237 test_gr_immed 0x00000001,gr9
240 set_gr_immed -3,gr7 ; multiply small numbers
242 csmul gr7,gr8,gr8,cc5,0
246 set_gr_immed 3,gr7 ; multiply small numbers
248 csmul gr7,gr8,gr8,cc5,0
252 set_gr_immed 1,gr7 ; multiply by 1
254 csmul gr7,gr8,gr8,cc5,0
258 set_gr_immed -2,gr7 ; multiply by 1
260 csmul gr7,gr8,gr8,cc5,0
264 set_gr_immed 0,gr7 ; multiply by 0
266 csmul gr7,gr8,gr8,cc5,0
270 set_gr_immed -2,gr7 ; multiply by 0
272 csmul gr7,gr8,gr8,cc5,0
276 set_gr_limmed 0x2000,0x0001,gr7 ; 31 bit result
278 csmul gr7,gr8,gr8,cc5,0
279 test_gr_limmed 0xffff,0xffff,gr8
280 test_gr_limmed 0xbfff,0xfffe,gr9
282 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
284 csmul gr7,gr8,gr8,cc5,0
285 test_gr_limmed 0xffff,0xffff,gr8
286 test_gr_limmed 0x8000,0x0000,gr9
288 set_gr_limmed 0x4000,0x0001,gr7 ; 32 bit result
290 csmul gr7,gr8,gr8,cc5,0
291 test_gr_limmed 0xffff,0xffff,gr8
292 test_gr_limmed 0x7fff,0xfffe,gr9
294 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
296 csmul gr7,gr8,gr8,cc5,0
297 test_gr_limmed 0xffff,0xffff,gr8
298 test_gr_limmed 0x0000,0x0000,gr9
300 set_gr_limmed 0x7fff,0xffff,gr7 ; max negative result
301 set_gr_limmed 0x8000,0x0000,gr8
302 csmul gr7,gr8,gr8,cc5,0
303 test_gr_limmed 0xc000,0x0000,gr8
304 test_gr_limmed 0x8000,0x0000,gr9
307 set_gr_immed -3,gr7 ; multiply small numbers
309 csmul gr7,gr8,gr8,cc5,0
313 set_gr_immed -1,gr7 ; multiply by 1
315 csmul gr7,gr8,gr8,cc5,0
319 set_gr_immed -2,gr7 ; multiply by 1
321 csmul gr7,gr8,gr8,cc5,0
325 set_gr_limmed 0xc000,0x0001,gr7 ; 31 bit result
327 csmul gr7,gr8,gr8,cc5,0
329 test_gr_limmed 0x7fff,0xfffe,gr9
331 set_gr_limmed 0xc000,0x0000,gr7 ; 32 bit result
333 csmul gr7,gr8,gr8,cc5,0
335 test_gr_limmed 0x8000,0x0000,gr9
337 set_gr_limmed 0xc000,0x0000,gr7 ; 33 bit result
339 csmul gr7,gr8,gr8,cc5,0
341 test_gr_immed 0x00000000,gr9
343 set_gr_limmed 0x8000,0x0001,gr7 ; almost max positive result
344 set_gr_limmed 0x8000,0x0001,gr8
345 csmul gr7,gr8,gr8,cc5,0
346 test_gr_limmed 0x3fff,0xffff,gr8
347 test_gr_immed 0x00000001,gr9
350 set_gr_limmed 0x8000,0x0000,gr7 ; max positive result
351 set_gr_limmed 0x8000,0x0000,gr8
352 csmul gr7,gr8,gr8,cc5,0
353 test_gr_limmed 0x4000,0x0000,gr8
354 test_gr_immed 0x00000000,gr9
357 set_gr_immed 3,gr7 ; multiply small numbers
359 csmul gr7,gr8,gr8,cc4,0
363 set_gr_immed 1,gr7 ; multiply by 1
365 csmul gr7,gr8,gr8,cc4,0
369 set_gr_immed 2,gr7 ; multiply by 1
371 csmul gr7,gr8,gr8,cc4,0
375 set_gr_immed 0,gr7 ; multiply by 0
377 csmul gr7,gr8,gr8,cc4,0
381 set_gr_immed 2,gr7 ; multiply by 0
383 csmul gr7,gr8,gr8,cc4,0
387 set_gr_limmed 0x3fff,0xffff,gr7 ; 31 bit result
389 csmul gr7,gr8,gr8,cc4,0
393 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
395 csmul gr7,gr8,gr8,cc4,0
399 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
401 csmul gr7,gr8,gr8,cc4,0
405 set_gr_limmed 0x7fff,0xffff,gr7 ; max positive result
406 set_gr_limmed 0x7fff,0xffff,gr8
407 csmul gr7,gr8,gr8,cc4,0
408 test_gr_limmed 0x7fff,0xffff,gr8
412 set_gr_immed -3,gr7 ; multiply small numbers
414 csmul gr7,gr8,gr8,cc4,0
418 set_gr_immed 3,gr7 ; multiply small numbers
420 csmul gr7,gr8,gr8,cc4,0
424 set_gr_immed 1,gr7 ; multiply by 1
426 csmul gr7,gr8,gr8,cc4,0
430 set_gr_immed -2,gr7 ; multiply by 1
432 csmul gr7,gr8,gr8,cc4,0
436 set_gr_immed 0,gr7 ; multiply by 0
438 csmul gr7,gr8,gr8,cc4,0
442 set_gr_immed -2,gr7 ; multiply by 0
444 csmul gr7,gr8,gr8,cc4,0
448 set_gr_limmed 0x2000,0x0001,gr7 ; 31 bit result
450 csmul gr7,gr8,gr8,cc4,0
454 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
456 csmul gr7,gr8,gr8,cc4,0
460 set_gr_limmed 0x4000,0x0001,gr7 ; 32 bit result
462 csmul gr7,gr8,gr8,cc4,0
466 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
468 csmul gr7,gr8,gr8,cc4,0
472 set_gr_limmed 0x7fff,0xffff,gr7 ; max negative result
473 set_gr_limmed 0x8000,0x0000,gr8
474 csmul gr7,gr8,gr8,cc4,0
475 test_gr_limmed 0x8000,0x0000,gr8
479 set_gr_immed -3,gr7 ; multiply small numbers
481 csmul gr7,gr8,gr8,cc4,0
485 set_gr_immed -1,gr7 ; multiply by 1
487 csmul gr7,gr8,gr8,cc4,0
491 set_gr_immed -2,gr7 ; multiply by 1
493 csmul gr7,gr8,gr8,cc4,0
497 set_gr_limmed 0xc000,0x0001,gr7 ; 31 bit result
499 csmul gr7,gr8,gr8,cc4,0
503 set_gr_limmed 0xc000,0x0000,gr7 ; 32 bit result
505 csmul gr7,gr8,gr8,cc4,0
509 set_gr_limmed 0xc000,0x0000,gr7 ; 33 bit result
511 csmul gr7,gr8,gr8,cc4,0
515 set_gr_limmed 0x8000,0x0001,gr7 ; almost max positive result
516 set_gr_limmed 0x8000,0x0001,gr8
517 csmul gr7,gr8,gr8,cc4,0
518 test_gr_limmed 0x8000,0x0001,gr8
522 set_gr_limmed 0x8000,0x0000,gr7 ; max positive result
523 set_gr_limmed 0x8000,0x0000,gr8
524 csmul gr7,gr8,gr8,cc4,0
525 test_gr_limmed 0x8000,0x0000,gr8
529 set_gr_immed 3,gr7 ; multiply small numbers
531 csmul gr7,gr8,gr8,cc5,1
535 set_gr_immed 1,gr7 ; multiply by 1
537 csmul gr7,gr8,gr8,cc5,1
541 set_gr_immed 2,gr7 ; multiply by 1
543 csmul gr7,gr8,gr8,cc5,1
547 set_gr_immed 0,gr7 ; multiply by 0
549 csmul gr7,gr8,gr8,cc5,1
553 set_gr_immed 2,gr7 ; multiply by 0
555 csmul gr7,gr8,gr8,cc5,1
559 set_gr_limmed 0x3fff,0xffff,gr7 ; 31 bit result
561 csmul gr7,gr8,gr8,cc5,1
565 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
567 csmul gr7,gr8,gr8,cc5,1
571 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
573 csmul gr7,gr8,gr8,cc5,1
577 set_gr_limmed 0x7fff,0xffff,gr7 ; max positive result
578 set_gr_limmed 0x7fff,0xffff,gr8
579 csmul gr7,gr8,gr8,cc5,1
580 test_gr_limmed 0x7fff,0xffff,gr8
584 set_gr_immed -3,gr7 ; multiply small numbers
586 csmul gr7,gr8,gr8,cc5,1
590 set_gr_immed 3,gr7 ; multiply small numbers
592 csmul gr7,gr8,gr8,cc5,1
596 set_gr_immed 1,gr7 ; multiply by 1
598 csmul gr7,gr8,gr8,cc5,1
602 set_gr_immed -2,gr7 ; multiply by 1
604 csmul gr7,gr8,gr8,cc5,1
608 set_gr_immed 0,gr7 ; multiply by 0
610 csmul gr7,gr8,gr8,cc5,1
614 set_gr_immed -2,gr7 ; multiply by 0
616 csmul gr7,gr8,gr8,cc5,1
620 set_gr_limmed 0x2000,0x0001,gr7 ; 31 bit result
622 csmul gr7,gr8,gr8,cc5,1
626 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
628 csmul gr7,gr8,gr8,cc5,1
632 set_gr_limmed 0x4000,0x0001,gr7 ; 32 bit result
634 csmul gr7,gr8,gr8,cc5,1
638 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
640 csmul gr7,gr8,gr8,cc5,1
644 set_gr_limmed 0x7fff,0xffff,gr7 ; max negative result
645 set_gr_limmed 0x8000,0x0000,gr8
646 csmul gr7,gr8,gr8,cc5,1
647 test_gr_limmed 0x8000,0x0000,gr8
651 set_gr_immed -3,gr7 ; multiply small numbers
653 csmul gr7,gr8,gr8,cc5,1
657 set_gr_immed -1,gr7 ; multiply by 1
659 csmul gr7,gr8,gr8,cc5,1
663 set_gr_immed -2,gr7 ; multiply by 1
665 csmul gr7,gr8,gr8,cc5,1
669 set_gr_limmed 0xc000,0x0001,gr7 ; 31 bit result
671 csmul gr7,gr8,gr8,cc5,1
675 set_gr_limmed 0xc000,0x0000,gr7 ; 32 bit result
677 csmul gr7,gr8,gr8,cc5,1
681 set_gr_limmed 0xc000,0x0000,gr7 ; 33 bit result
683 csmul gr7,gr8,gr8,cc5,1
687 set_gr_limmed 0x8000,0x0001,gr7 ; almost max positive result
688 set_gr_limmed 0x8000,0x0001,gr8
689 csmul gr7,gr8,gr8,cc5,1
690 test_gr_limmed 0x8000,0x0001,gr8
694 set_gr_limmed 0x8000,0x0000,gr7 ; max positive result
695 set_gr_limmed 0x8000,0x0000,gr8
696 csmul gr7,gr8,gr8,cc5,1
697 test_gr_limmed 0x8000,0x0000,gr8
701 set_gr_immed 3,gr7 ; multiply small numbers
703 csmul gr7,gr8,gr8,cc6,0
707 set_gr_immed 1,gr7 ; multiply by 1
709 csmul gr7,gr8,gr8,cc6,0
713 set_gr_immed 2,gr7 ; multiply by 1
715 csmul gr7,gr8,gr8,cc6,0
719 set_gr_immed 0,gr7 ; multiply by 0
721 csmul gr7,gr8,gr8,cc6,0
725 set_gr_immed 2,gr7 ; multiply by 0
727 csmul gr7,gr8,gr8,cc6,0
731 set_gr_limmed 0x3fff,0xffff,gr7 ; 31 bit result
733 csmul gr7,gr8,gr8,cc6,0
737 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
739 csmul gr7,gr8,gr8,cc6,0
743 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
745 csmul gr7,gr8,gr8,cc6,0
749 set_gr_limmed 0x7fff,0xffff,gr7 ; max positive result
750 set_gr_limmed 0x7fff,0xffff,gr8
751 csmul gr7,gr8,gr8,cc6,0
752 test_gr_limmed 0x7fff,0xffff,gr8
756 set_gr_immed -3,gr7 ; multiply small numbers
758 csmul gr7,gr8,gr8,cc6,0
762 set_gr_immed 3,gr7 ; multiply small numbers
764 csmul gr7,gr8,gr8,cc6,0
768 set_gr_immed 1,gr7 ; multiply by 1
770 csmul gr7,gr8,gr8,cc6,0
774 set_gr_immed -2,gr7 ; multiply by 1
776 csmul gr7,gr8,gr8,cc6,0
780 set_gr_immed 0,gr7 ; multiply by 0
782 csmul gr7,gr8,gr8,cc6,0
786 set_gr_immed -2,gr7 ; multiply by 0
788 csmul gr7,gr8,gr8,cc6,0
792 set_gr_limmed 0x2000,0x0001,gr7 ; 31 bit result
794 csmul gr7,gr8,gr8,cc6,0
798 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
800 csmul gr7,gr8,gr8,cc6,0
804 set_gr_limmed 0x4000,0x0001,gr7 ; 32 bit result
806 csmul gr7,gr8,gr8,cc6,0
810 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
812 csmul gr7,gr8,gr8,cc6,0
816 set_gr_limmed 0x7fff,0xffff,gr7 ; max negative result
817 set_gr_limmed 0x8000,0x0000,gr8
818 csmul gr7,gr8,gr8,cc6,0
819 test_gr_limmed 0x8000,0x0000,gr8
823 set_gr_immed -3,gr7 ; multiply small numbers
825 csmul gr7,gr8,gr8,cc6,0
829 set_gr_immed -1,gr7 ; multiply by 1
831 csmul gr7,gr8,gr8,cc6,0
835 set_gr_immed -2,gr7 ; multiply by 1
837 csmul gr7,gr8,gr8,cc6,0
841 set_gr_limmed 0xc000,0x0001,gr7 ; 31 bit result
843 csmul gr7,gr8,gr8,cc6,0
847 set_gr_limmed 0xc000,0x0000,gr7 ; 32 bit result
849 csmul gr7,gr8,gr8,cc6,0
853 set_gr_limmed 0xc000,0x0000,gr7 ; 33 bit result
855 csmul gr7,gr8,gr8,cc6,0
859 set_gr_limmed 0x8000,0x0001,gr7 ; almost max positive result
860 set_gr_limmed 0x8000,0x0001,gr8
861 csmul gr7,gr8,gr8,cc6,0
862 test_gr_limmed 0x8000,0x0001,gr8
866 set_gr_limmed 0x8000,0x0000,gr7 ; max positive result
867 set_gr_limmed 0x8000,0x0000,gr8
868 csmul gr7,gr8,gr8,cc6,0
869 test_gr_limmed 0x8000,0x0000,gr8
873 set_gr_immed 3,gr7 ; multiply small numbers
875 csmul gr7,gr8,gr8,cc7,1
879 set_gr_immed 1,gr7 ; multiply by 1
881 csmul gr7,gr8,gr8,cc7,1
885 set_gr_immed 2,gr7 ; multiply by 1
887 csmul gr7,gr8,gr8,cc7,1
891 set_gr_immed 0,gr7 ; multiply by 0
893 csmul gr7,gr8,gr8,cc7,1
897 set_gr_immed 2,gr7 ; multiply by 0
899 csmul gr7,gr8,gr8,cc7,1
903 set_gr_limmed 0x3fff,0xffff,gr7 ; 31 bit result
905 csmul gr7,gr8,gr8,cc7,1
909 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
911 csmul gr7,gr8,gr8,cc7,1
915 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
917 csmul gr7,gr8,gr8,cc7,1
921 set_gr_limmed 0x7fff,0xffff,gr7 ; max positive result
922 set_gr_limmed 0x7fff,0xffff,gr8
923 csmul gr7,gr8,gr8,cc7,1
924 test_gr_limmed 0x7fff,0xffff,gr8
928 set_gr_immed -3,gr7 ; multiply small numbers
930 csmul gr7,gr8,gr8,cc7,1
934 set_gr_immed 3,gr7 ; multiply small numbers
936 csmul gr7,gr8,gr8,cc7,1
940 set_gr_immed 1,gr7 ; multiply by 1
942 csmul gr7,gr8,gr8,cc7,1
946 set_gr_immed -2,gr7 ; multiply by 1
948 csmul gr7,gr8,gr8,cc7,1
952 set_gr_immed 0,gr7 ; multiply by 0
954 csmul gr7,gr8,gr8,cc7,1
958 set_gr_immed -2,gr7 ; multiply by 0
960 csmul gr7,gr8,gr8,cc7,1
964 set_gr_limmed 0x2000,0x0001,gr7 ; 31 bit result
966 csmul gr7,gr8,gr8,cc7,1
970 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
972 csmul gr7,gr8,gr8,cc7,1
976 set_gr_limmed 0x4000,0x0001,gr7 ; 32 bit result
978 csmul gr7,gr8,gr8,cc7,1
982 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
984 csmul gr7,gr8,gr8,cc7,1
988 set_gr_limmed 0x7fff,0xffff,gr7 ; max negative result
989 set_gr_limmed 0x8000,0x0000,gr8
990 csmul gr7,gr8,gr8,cc7,1
991 test_gr_limmed 0x8000,0x0000,gr8
995 set_gr_immed -3,gr7 ; multiply small numbers
997 csmul gr7,gr8,gr8,cc7,1
1001 set_gr_immed -1,gr7 ; multiply by 1
1003 csmul gr7,gr8,gr8,cc7,1
1004 test_gr_immed -2,gr8
1007 set_gr_immed -2,gr7 ; multiply by 1
1009 csmul gr7,gr8,gr8,cc7,1
1010 test_gr_immed -1,gr8
1013 set_gr_limmed 0xc000,0x0001,gr7 ; 31 bit result
1015 csmul gr7,gr8,gr8,cc7,1
1016 test_gr_immed -2,gr8
1019 set_gr_limmed 0xc000,0x0000,gr7 ; 32 bit result
1021 csmul gr7,gr8,gr8,cc7,1
1022 test_gr_immed -2,gr8
1025 set_gr_limmed 0xc000,0x0000,gr7 ; 33 bit result
1027 csmul gr7,gr8,gr8,cc7,1
1028 test_gr_immed -4,gr8
1031 set_gr_limmed 0x8000,0x0001,gr7 ; almost max positive result
1032 set_gr_limmed 0x8000,0x0001,gr8
1033 csmul gr7,gr8,gr8,cc7,1
1034 test_gr_limmed 0x8000,0x0001,gr8
1038 set_gr_limmed 0x8000,0x0000,gr7 ; max positive result
1039 set_gr_limmed 0x8000,0x0000,gr8
1040 csmul gr7,gr8,gr8,cc7,1
1041 test_gr_limmed 0x8000,0x0000,gr8