1 # frv testcase for smu $GRi,$GRj
4 .include "../testutils.inc"
11 set_gr_immed 3,gr7 ; multiply small numbers
16 test_spr_immed 6,iacc0l
17 test_spr_immed 0,iacc0h
19 set_gr_immed 1,gr7 ; multiply by 1
24 test_spr_immed 2,iacc0l
25 test_spr_immed 0,iacc0h
27 set_gr_immed 2,gr7 ; multiply by 1
32 test_spr_immed 2,iacc0l
33 test_spr_immed 0,iacc0h
35 set_gr_immed 0,gr7 ; multiply by 0
40 test_spr_immed 0,iacc0l
41 test_spr_immed 0,iacc0h
43 set_gr_immed 2,gr7 ; multiply by 0
48 test_spr_immed 0,iacc0l
49 test_spr_immed 0,iacc0h
51 set_gr_limmed 0x3fff,0xffff,gr7 ; 31 bit result
55 test_gr_limmed 0x3fff,0xffff,gr7
56 test_spr_limmed 0x7fff,0xfffe,iacc0l
57 test_spr_immed 0,iacc0h
59 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
63 test_gr_limmed 0x4000,0x0000,gr7
64 test_spr_limmed 0x8000,0x0000,iacc0l
65 test_spr_immed 0,iacc0h
67 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
71 test_gr_limmed 0x4000,0x0000,gr7
72 test_spr_immed 0,iacc0l
73 test_spr_immed 1,iacc0h
75 set_gr_limmed 0x7fff,0xffff,gr7 ; max positive result
76 set_gr_limmed 0x7fff,0xffff,gr8
78 test_gr_limmed 0x7fff,0xffff,gr8
79 test_gr_limmed 0x7fff,0xffff,gr7
80 test_spr_immed 0x00000001,iacc0l
81 test_spr_limmed 0x3fff,0xffff,iacc0h
84 set_gr_immed -3,gr7 ; multiply small numbers
89 test_spr_immed -6,iacc0l
90 test_spr_immed -1,iacc0h
92 set_gr_immed 3,gr7 ; multiply small numbers
97 test_spr_immed -6,iacc0l
98 test_spr_immed -1,iacc0h
100 set_gr_immed 1,gr7 ; multiply by 1
105 test_spr_immed -2,iacc0l
106 test_spr_immed -1,iacc0h
108 set_gr_immed -2,gr7 ; multiply by 1
113 test_spr_immed -2,iacc0l
114 test_spr_immed -1,iacc0h
116 set_gr_immed 0,gr7 ; multiply by 0
121 test_spr_immed 0,iacc0l
122 test_spr_immed 0,iacc0h
124 set_gr_immed -2,gr7 ; multiply by 0
129 test_spr_immed 0,iacc0l
130 test_spr_immed 0,iacc0h
132 set_gr_limmed 0x2000,0x0001,gr7 ; 31 bit result
136 test_gr_limmed 0x2000,0x0001,gr7
137 test_spr_limmed 0xbfff,0xfffe,iacc0l
138 test_spr_limmed 0xffff,0xffff,iacc0h
140 set_gr_limmed 0x4000,0x0000,gr7 ; 32 bit result
144 test_gr_limmed 0x4000,0x0000,gr7
145 test_spr_limmed 0x8000,0x0000,iacc0l
146 test_spr_limmed 0xffff,0xffff,iacc0h
148 set_gr_limmed 0x4000,0x0001,gr7 ; 32 bit result
152 test_gr_limmed 0x4000,0x0001,gr7
153 test_spr_limmed 0x7fff,0xfffe,iacc0l
154 test_spr_limmed 0xffff,0xffff,iacc0h
156 set_gr_limmed 0x4000,0x0000,gr7 ; 33 bit result
160 test_gr_limmed 0x4000,0x0000,gr7
161 test_spr_limmed 0x0000,0x0000,iacc0l
162 test_spr_limmed 0xffff,0xffff,iacc0h
164 set_gr_limmed 0x7fff,0xffff,gr7 ; max negative result
165 set_gr_limmed 0x8000,0x0000,gr8
167 test_gr_limmed 0x8000,0x0000,gr8
168 test_gr_limmed 0x7fff,0xffff,gr7
169 test_spr_limmed 0x8000,0x0000,iacc0l
170 test_spr_limmed 0xc000,0x0000,iacc0h
173 set_gr_immed -3,gr7 ; multiply small numbers
178 test_spr_immed 6,iacc0l
179 test_spr_immed 0,iacc0h
181 set_gr_immed -1,gr7 ; multiply by 1
186 test_spr_immed 2,iacc0l
187 test_spr_immed 0,iacc0h
189 set_gr_immed -2,gr7 ; multiply by 1
194 test_spr_immed 2,iacc0l
195 test_spr_immed 0,iacc0h
197 set_gr_limmed 0xc000,0x0001,gr7 ; 31 bit result
201 test_gr_limmed 0xc000,0x0001,gr7
202 test_spr_limmed 0x7fff,0xfffe,iacc0l
203 test_spr_immed 0,iacc0h
205 set_gr_limmed 0xc000,0x0000,gr7 ; 32 bit result
209 test_gr_limmed 0xc000,0x0000,gr7
210 test_spr_limmed 0x8000,0x0000,iacc0l
211 test_spr_immed 0,iacc0h
213 set_gr_limmed 0xc000,0x0000,gr7 ; 33 bit result
217 test_gr_limmed 0xc000,0x0000,gr7
218 test_spr_immed 0x00000000,iacc0l
219 test_spr_immed 1,iacc0h
221 set_gr_limmed 0x8000,0x0001,gr7 ; almost max positive result
222 set_gr_limmed 0x8000,0x0001,gr8
224 test_gr_limmed 0x8000,0x0001,gr8
225 test_gr_limmed 0x8000,0x0001,gr7
226 test_spr_immed 0x00000001,iacc0l
227 test_spr_limmed 0x3fff,0xffff,iacc0h
229 set_gr_limmed 0x8000,0x0000,gr7 ; max positive result
230 set_gr_limmed 0x8000,0x0000,gr8
232 test_gr_limmed 0x8000,0x0000,gr8
233 test_gr_limmed 0x8000,0x0000,gr7
234 test_spr_immed 0x00000000,iacc0l
235 test_spr_limmed 0x4000,0x0000,iacc0h