1 # frv testcase for smuli $GRi,$GRj,$GRk
4 .include "testutils.inc"
11 set_gr_immed 3,gr7 ; multiply small numbers
18 set_gr_immed 1,gr7 ; multiply by 1
25 set_gr_immed 2,gr7 ; multiply by 1
32 set_gr_immed 0,gr7 ; multiply by 0
39 set_gr_immed 2,gr7 ; multiply by 0
46 set_gr_limmed 0x3fff,0xffff,gr7 ; 31 bit result
51 test_gr_limmed 0x7fff,0xfffe,gr9
53 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
58 test_gr_limmed 0x8000,0x0000,gr9
60 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
65 test_gr_limmed 0x0000,0x0000,gr9
67 set_gr_limmed 0x7fff,0xffff,gr7 ; max positive result
71 test_gr_immed 0x3ff,gr8
72 test_gr_limmed 0x7fff,0xf801,gr9
75 set_gr_immed -3,gr7 ; multiply small numbers
82 set_gr_immed 3,gr7 ; multiply small numbers
89 set_gr_immed 1,gr7 ; multiply by 1
96 set_gr_immed -2,gr7 ; multiply by 1
103 set_gr_immed 0,gr7 ; multiply by 0
106 test_icc 1 1 0 1 icc0
110 set_gr_immed -2,gr7 ; multiply by 0
113 test_icc 1 1 1 0 icc0
117 set_gr_limmed 0x2000,0x0001,gr7 ; 31 bit result
120 test_icc 1 1 1 1 icc0
121 test_gr_limmed 0xffff,0xffff,gr8
122 test_gr_limmed 0xbfff,0xfffe,gr9
124 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
127 test_icc 0 0 0 0 icc0
128 test_gr_limmed 0xffff,0xffff,gr8
129 test_gr_limmed 0x8000,0x0000,gr9
131 set_gr_limmed 0x4000,0x0001,gr7 ; 32 bit result
134 test_icc 0 0 0 1 icc0
135 test_gr_limmed 0xffff,0xffff,gr8
136 test_gr_limmed 0x7fff,0xfffe,gr9
138 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
141 test_icc 0 0 1 0 icc0
142 test_gr_limmed 0xffff,0xffff,gr8
143 test_gr_limmed 0x0000,0x0000,gr9
145 set_gr_limmed 0x7fff,0xffff,gr7 ; max negative result
148 test_icc 0 0 1 1 icc0
149 test_gr_limmed 0xffff,0xfc00,gr8
150 test_gr_limmed 0x0000,0x0800,gr9
153 set_gr_immed -3,gr7 ; multiply small numbers
156 test_icc 0 1 0 0 icc0
160 set_gr_immed -1,gr7 ; multiply by 1
163 test_icc 0 1 0 1 icc0
167 set_gr_immed -2,gr7 ; multiply by 1
170 test_icc 0 1 1 0 icc0
174 set_gr_limmed 0xc000,0x0001,gr7 ; 31 bit result
177 test_icc 0 1 1 1 icc0
179 test_gr_limmed 0x7fff,0xfffe,gr9
181 set_gr_limmed 0xc000,0x0000,gr7 ; 32 bit result
184 test_icc 1 0 0 0 icc0
186 test_gr_limmed 0x8000,0x0000,gr9
188 set_gr_limmed 0xc000,0x0000,gr7 ; 33 bit result
191 test_icc 1 0 0 1 icc0
193 test_gr_immed 0x00000000,gr9
195 set_gr_limmed 0x8000,0x0001,gr7 ; almost max positive result
198 test_icc 1 0 1 0 icc0
199 test_gr_limmed 0x0000,0x03ff,gr8
200 test_gr_limmed 0xffff,0xf800,gr9
203 set_gr_limmed 0x8000,0x0000,gr7 ; max positive result
206 test_icc 1 0 1 1 icc0
207 test_gr_limmed 0x0000,0x0400,gr8
208 test_gr_limmed 0x0000,0x0000,gr9